| 1 | = Yocto on Venice SBCs |
| 2 | |
| 3 | Yocto is a Linux distribution. |
| 4 | |
| 5 | Gateworks does not formally include Yocto in the Venice BSP, but it is possible to use the NXP Yocto root filesystem with the Gateworks kernel to boot Yocto on a Venice SBC. |
| 6 | |
| 7 | == Demo / Sample Pre-Built Binary |
| 8 | |
| 9 | To install a pre-built binary of Yocto on the Venice SBC as a demo, please use the following binary and instructions. |
| 10 | |
| 11 | The Gateworks demo binary includes the [https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applications-processors:IMXLINUX NXP Linux 5.15.71_2.2.0 Yocto 4.0 Kirkstone EVK / RootFS for the i.MX8M Mini] and the Gateworks 5.15 kernel. |
| 12 | |
| 13 | NOTE, please first install a full Ubuntu image as a base on the Venice SBC to get the bootloader and everything setup. [wiki:venice/ubuntu Link Here] |
| 14 | |
| 15 | Download the Yocto demo binary [http://dev.gateworks.com/venice/images/venice-yocto-kirkstone-sample-full-image.ext4.gz here] and place on TFTP server. |
| 16 | |
| 17 | Once Ubuntu is booting, then work on loading the Yocto demo binary through TFTP. Note that the binary is quite large at 1.2GB, and thus a Venice SBC with 4GB of DRAM is required to load over the network. If using a 1GB DRAM SBC, it will be required to load from removable storage. |
| 18 | {{{ |
| 19 | setenv ipaddr 192.168.1.1 |
| 20 | setenv serverip 192.168.1.2 |
| 21 | setenv image venice-yocto-kirkstone-sample-full-image.ext4.gz |
| 22 | run update_rootfs |
| 23 | }}} |
| 24 | |
| 25 | After the transfer is complete, reboot the board into Yocto. |
| 26 | |
| 27 | Example output once booted: |
| 28 | {{{ |
| 29 | root@localhost:~# uname -a |
| 30 | Linux localhost 5.15.15-gc3a6ad5a1338 #1 SMP Thu Dec 29 20:29:26 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux |
| 31 | root@localhost:~# cat /etc/os-release |
| 32 | ID=fsl-imx-xwayland |
| 33 | NAME="NXP i.MX Release Distro" |
| 34 | VERSION="5.15-kirkstone (kirkstone)" |
| 35 | VERSION_ID=5.15-kirkstone |
| 36 | PRETTY_NAME="NXP i.MX Release Distro 5.15-kirkstone (kirkstone)" |
| 37 | DISTRO_CODENAME="kirkstone" |
| 38 | |
| 39 | }}} |
| 40 | |
| 41 | == Assembling Binary |
| 42 | |
| 43 | If trying to use a different rootfs or different kernel, use the following instructions to create a custom rootfs image file: |
| 44 | {{{ |
| 45 | # Get a root filesystem from NXP's Linux BSP download page: (REQUIRES NXP LOGIN) |
| 46 | # For standard Venice SBCs, use the i.MX 8M Mini EVK download link |
| 47 | # Extract the download to reveal all the pieces |
| 48 | https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applications-processors:IMXLINUX |
| 49 | |
| 50 | # get mkfs tool and make it executable |
| 51 | wget https://raw.githubusercontent.com/Gateworks/bsp-venice/master/mkfs |
| 52 | chmod +x mkfs |
| 53 | |
| 54 | # get Gateworks Linux kernel |
| 55 | wget http://dev.gateworks.com/venice/kernel/linux-venice.tar.xz |
| 56 | |
| 57 | # build ext4 fs using the imx-image-full-imx8mmevk.tar.zst file and Gateworks kernel |
| 58 | sudo ./mkfs ext4 imx-image-full.ext4 4096M LF_v5.15.71-2.2.0_images_IMX8MMEVK/imx-image-full-imx8mmevk.tar.zst linux-venice.tar.xz |
| 59 | |
| 60 | # get bootscript |
| 61 | wget https://raw.githubusercontent.com/Gateworks/bsp-venice/master/boot.scr -O boot.scr.txt |
| 62 | |
| 63 | # create uImage version of boots cript |
| 64 | mkimage -A arm64 -T script -C none -d boot.scr.txt boot.scr |
| 65 | |
| 66 | # inject it into the ext4fs |
| 67 | sudo e2cp -G 0 -O 0 boot.scr imx-image-full.ext4:/boot/ |
| 68 | |
| 69 | # delete the default /etc/hostname which contains 'imx8mmevk' |
| 70 | sudo e2rm imx-image-full.ext4:/etc/hostname |
| 71 | |
| 72 | # you can either mount the ext4 locally and continue to manipulate it, |
| 73 | or use e2cp/e2mkdir/e2rm as I've done above; ie /etc/issue and |
| 74 | /etc/issuenet contain 'NXP i.MX Release Distro 5.15-krikstone' |
| 75 | |
| 76 | # compress it to be used on Gateworks SBC |
| 77 | gzip imx-image-full.ext4 |
| 78 | |
| 79 | #Transfer imx-image-full.ext4 to a TFTP server and use the update_rootfs script to flash it toe the Venice SBC as shown in the instructions above |
| 80 | }}} |