Changes between Version 28 and Version 29 of provisioning


Ignore:
Timestamp:
01/31/2025 06:51:18 PM (6 hours ago)
Author:
Tim Harvey
Comment:

update details of venice bsp custom scripts

Legend:

Unmodified
Added
Removed
Modified
  • provisioning

    v28 v29  
    8484=== Option C Details
    8585
    86 This involves a custom_rootfs script used in conjuction with the Venice BSP ([wiki:venice/bsp])
     86This involves a custom_rootfs script used in conjunction with the Venice BSP ([wiki:venice/bsp])
    8787
    8888Before doing any of the following, be sure to build the Venice BSP once successfully before injecting any changes.
     
    9191[https://github.com/Gateworks/bsp-venice/blob/master/Makefile#L256]
    9292
    93 Basically, drop a file inside of the main directory when building the Venice BSP with the name starting with custom_rootfs will be ran. Example file name is custom_rootfs_test.sh
    94 {{{
    95 builder@jammy:~/venice$ ls
    96 Makefile  buildroot              firmware-imx-8.10      ftdi-usb-spi  linux-venice.tar.xz  noble-venice.ext4.xz  setup-environment         uboot-env.bin
    97 atf       cryptodev-linux        firmware-imx-8.10.bin  gnss_devkit   mkimage_jtag         noble-venice.img.gz   u-boot                    venice
    98 build     custom_rootfs_test.sh  firmware.img           linux         noble-venice.ext4    nrc7292               ublox-dev-kit-README.txt  venice-imx8mm-flash.bin
    99 }}}
    100 
    101 Inside this file, run a script that runs on the build machine to create and grab files to be placed into the Ubuntu filesystem.
    102 
    103 The Ubuntu filesystem is of ext2 format, and thus e2tools must be used. In the example below, e2cp is a command that ends up copying files into the /root directory (default Gateworks home directory) when the Ubuntu OS is booted.
    104 
    105 The below example does some random things such as grabbing a tar ball, creating a readme and then copying it into the Ubuntu OS.
    106 
    107 After creating this file, re-run the make argument to rebuild the Gateworks BSP with the custom changes now integrated:
    108 {{{
     93Basically, drop an 'executable' file inside of the main directory when building the Venice BSP with the name starting with custom_kernel, custom_rootfs, custom_image:
     94 * custom_kernel* - will be called passing in the kernel-directory and the install-directory before generation of the kernel tarball. While this is intended for kernel related things (as they go in the kernel tarball) there is no reason you can't also add other files here)
     95 * custom_rootfs* - will be called passing in the ext filesystem image where you can either use things from the e2tools package (e2cp, e2rm, e2ln, e2mkdir) to manipulate the filesystem or use other methods (such as mounting it, manipulating it, unmounting it)
     96 * custom_image* - will be called passing in the uncompressed disk image where you can manipulate it with anything necessary (such as editing the partition table) before it is compressed.
     97
     98Make sure the files are executable and they should probably have a 'set -e' in them so that any command that errors out breaks the build process.
     99
     100After creating or altering these custom* scripts, re-run the make argument to rebuild the Gateworks BSP with the custom changes now integrated:
     101{{{#!bash
    109102make -j8 ubuntu-image
    110103}}}
    111104
    112 The output should then be a file such as noble-venice.img.gz, which can then be flashed onto the Gateworks SBC and should contain the changes.
    113 
    114 
    115 Example custom_rootfs_test.sh file:
    116 {{{
     105Examples:
     106 * custom_rootfs_test.sh:
     107{{{#!bash
    117108#!/bin/bash
    118109