Changes between Initial Version and Version 1 of venice/yocto


Ignore:
Timestamp:
04/24/2023 05:08:18 PM (13 months ago)
Author:
Ryan Erbstoesser
Comment:

start page

Legend:

Unmodified
Added
Removed
Modified
  • venice/yocto

    v1 v1  
     1= Yocto on Venice SBCs
     2
     3Yocto is a Linux distribution.
     4
     5Gateworks 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
     9To install a pre-built binary of Yocto on the Venice SBC as a demo, please use the following binary and instructions.
     10
     11The 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
     13NOTE, 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
     15Download 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
     17Once 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{{{
     19setenv ipaddr 192.168.1.1
     20setenv serverip 192.168.1.2
     21setenv image venice-yocto-kirkstone-sample-full-image.ext4.gz
     22run update_rootfs
     23}}}
     24
     25After the transfer is complete, reboot the board into Yocto.
     26
     27Example output once booted:
     28{{{
     29root@localhost:~# uname -a
     30Linux localhost 5.15.15-gc3a6ad5a1338 #1 SMP Thu Dec 29 20:29:26 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
     31root@localhost:~# cat /etc/os-release
     32ID=fsl-imx-xwayland
     33NAME="NXP i.MX Release Distro"
     34VERSION="5.15-kirkstone (kirkstone)"
     35VERSION_ID=5.15-kirkstone
     36PRETTY_NAME="NXP i.MX Release Distro 5.15-kirkstone (kirkstone)"
     37DISTRO_CODENAME="kirkstone"
     38
     39}}}
     40
     41== Assembling Binary
     42
     43If 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
     48https://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
     51wget https://raw.githubusercontent.com/Gateworks/bsp-venice/master/mkfs
     52chmod +x mkfs
     53
     54# get Gateworks Linux kernel
     55wget 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
     58sudo ./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
     61wget https://raw.githubusercontent.com/Gateworks/bsp-venice/master/boot.scr -O boot.scr.txt
     62
     63# create uImage version of boots cript
     64mkimage -A arm64 -T script -C none -d boot.scr.txt boot.scr
     65
     66# inject it into the ext4fs
     67sudo e2cp -G 0 -O 0 boot.scr imx-image-full.ext4:/boot/
     68
     69# delete the default /etc/hostname which contains 'imx8mmevk'
     70sudo e2rm imx-image-full.ext4:/etc/hostname
     71
     72# you can either mount the ext4 locally and continue to manipulate it,
     73or 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
     77gzip 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}}}