ProductionSWSubmissionRules

From Variscite Wiki
Production SW submission rules

For submission of bootloaders only

Just provide the bootloader image/s.

(In case of mx6/mx6ul/mx7 it should be SPL and U-Boot images - Otherwise, it should be a combined bootloader image)

For submission of SW which contains filesystems

  • Provide a complete and tested installation .sh script for all of the images.

     This script should be run from an SD card on the target, from the same directory as the provided images.

  • The script should not print any special characters, including underlines or colors.


  • The script should print "PASS" at the end, after a successful run.


  • The script should be able to run from a read-only filesystem.

     Note that kobs-ng attempts to creates a temporary file in the directory it is called from, so if your script uses kobs-ng it should call it from /tmp.
     e.g.

SPL_PATH=`pwd`
cd /tmp
kobs-ng init -x ${SPL_PATH}/${SPL_IMAGE} --search_exponent=1 -v > /dev/null
cd -


  • fw_setenv can't be used in the script.

     If you need to customize the U-Boot environment, you can do one of the following:
     a. Change the default environment in the U-Boot code (under include/configs/<board name>.h)
         In this case, build the customized U-Boot using Yocto, to make sure the change is also taken by u-boot-fw-utils (in case you have it in your image).
     b. Provide a U-Boot environment image and write it to the SOM storage in your installation script.
         In this case, make sure not to save the runtime environment variables (such as ethaddr which holds the Ethernet MAC address):
         When using the U-Boot command line, you should reset the environment to the default one by running "env default -a" before setting your variables and saving the environment to storage.
         Alternatively, you can use fw_setenv on your board to set and save the environment to storage.

  • Burning of One-Time Programmable e-fuses in the SOC is not allowed, neither during the SOM production (by the submitted script), nor automatically during the first boot after production (by the submitted SW).


  • If a UBI filesystem (for NAND flash) is used, it should be provided as a .ubi file.


  • If a custom mtd (NAND flash) partition table is used, it should be provided as a text file called mtdparts.txt, in the following format:
size(label),size(label),...

     while "-" can be used as the size of the last partition to denote "remaining size until the end of the NAND flash".
     e.g.

2m(spl),2m(uboot),2m(uboot-env),8m(kernel),-(rootfs)


  • The content of a non-UBI filesystem should be provided as a .tar.gz file.


  • Files bigger than 50MB should be split to 50MB files.

     Example 1: To split a big rootfs.tar.gz file run:

$ split -b 50M -d rootfs.tar.gz rootfs.tar.gz.

     The resulted files will be:

rootfs.tar.gz.00
rootfs.tar.gz.01
…

     and to untar the resulted files in the script:

cat rootfs.tar.gz* | tar xzp -C <destination directory>


     Example 2: To split a big rootfs.ubi file run:

$ split -b 50M -d rootfs.ubi rootfs.ubi.

     The resulted files will be:

rootfs.ubi.00
rootfs.ubi.01
…

     and to install the resulted files to the NAND flash in the script:

totalsize=0
for filesize in $(stat -c %s rootfs.ubi*); do
	totalsize=$(expr $totalsize + $filesize)
done
cat rootfs.ubi* | ubiformat /dev/mtdX -y -S $totalsize -f -

     (while /dev/mtdX is the destination mtd partition for the ubi image)