Skip to content

Commit 64c88be

Browse files
committed
Update readme
1 parent 6b52570 commit 64c88be

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

README.md

+39-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,45 @@
8383

8484
## linux-arm64-jetsonnano
8585

86-
TODO
86+
*Note: you can build natively on a Jetson Nano. However, you may need a swapfile on the SD card. Also, if building on the jetson nano, change BUILD_THREADS to 1 in the build script.*
87+
88+
- Build on a Linux system (assumed to be `amd64` / `x86_64`)
89+
- Setup a chroot using an Ubuntu Focal Jetson nano image [link](https://github.com/Qengineering/Jetson-Nano-Ubuntu-20-image)
90+
```sh
91+
# Use different package manager if not debian based system
92+
sudo apt install schroot qemu-user-static
93+
94+
# Mount image
95+
sudo losetup -f -P --show ./jetson-image.img
96+
sudo mkdir /srv/chroot/jetson-image
97+
sudo mount /dev/loop# /srv/chroot/jetson-image
98+
```
99+
- Write chroot config file `/etc/schroot/chroot.d/focal-arm64.conf`
100+
```conf
101+
[jetson-image]
102+
description=Jetson OS Image
103+
type=directory
104+
directory=/srv/chroot/jetson-image
105+
users=[YOUR_USERNAME]
106+
root-groups=root
107+
profile=desktop
108+
personality=linux
109+
```
110+
- On more recent Ubuntu / Debian systems, `yescrypt` is used, but this is not supported in older systems (focal included). Thus change `/etc/pam.d/common-password` by modifying `yescrypt` to be `sha512`. Failing to do so will prevent `sudo` from working in the chroot environment.
111+
- Enter chroot with `sudo schroot -c jetson-image` and run
112+
```sh
113+
sed -i 's/focal main/focal main universe multiverse/g' /etc/apt/sources.list
114+
apt update
115+
apt install sudo locales git python3 zip
116+
exit
117+
```
118+
- Enter the chroot without sudo `schroot -c jetson-image`
119+
- Run the build
120+
```sh
121+
cd linux-arm64-jetsonnano
122+
./buildopencv.sh | tee build.log
123+
```
124+
- Upload the sh file
87125

88126

89127
## windows-amd64-pc

0 commit comments

Comments
 (0)