Changes between Version 49 and Version 50 of buildroot


Ignore:
Timestamp:
12/02/2021 03:04:53 AM (12 months ago)
Author:
Cale Collins
Comment:

added instruction to swupdate venice, add dtbs, fixed fzwrite length, mmcbootpart 1 not 2.

Legend:

Unmodified
Added
Removed
Modified
  • buildroot

    v49 v50  
    10261026- '''update.sh''': This is the script that SWUpdate runs which we use as both a preinst and psotinst script (via cmdline). We determine the current root device and, flip it, and symlink /dev/update to the device to update to. We don't have to do the image install as we've configured SWUpdate to do that for us in sw-descrption images.
    10271027{{{#!bash
     1028cat << EOF > sw-descrption
    10281029#!/bin/sh
    1029 cat << EOF > sw-descrption
     1030
    10301031if [ $# -lt 1 ]; then
    10311032        exit 0;
     
    10971098# sign the sw-description
    10981099openssl dgst -sha256 -sign swupdate-priv.pem sw-description > sw-description.sig
    1099 # build swupdate image
    1100 cp output/images/rootfs.ext2.gz ./venice_swupdate.ext2.gz
     1100}}}
     1101
     1102* '''Add device tree files to rootfs and gzip'''
     1103{{{#!bash
     1104mount output/rootfs.ext2 /mnt
     1105cp output/build/linux-v5.10.18-venice/arch/arm64/boot/dts/freescale/imx8mm-venice-gw7*.dtb /mnt/bin/
     1106umount /mnt
     1107cp output/images/rootfs.ext2 ./venice_swupdate.ext2
     1108gzip venice_swupdate.ext2
     1109}}}
     1110
     1111* '''Build swupdate image
     1112{{{#!bash
    11011113for i in sw-description sw-description.sig update.sh venice_swupdate.ext2.gz; do
    11021114        echo $i; done | cpio -ov -H crc > my-software.swu
     
    11281140* '''While in U-Boot install the Buildroot rootfs to the first Linux partition offset (LinuxA)'''
    11291141{{{#!bash
    1130 tftpboot ${loadaddr} venice_swupdate.ext2.gz && gzwrite mmc 0 ${loadaddr} ${filesize} 0x100000 0x2000000 # rootfsA is at 0x2000000 (32MiB) and we use a 1MiB buffer
     1142tftpboot ${loadaddr} rootfs.ext4.gz && gzwrite mmc 2 ${loadaddr} ${filesize} 0x100000 0x1000000 # rootfsA is at 0x1000000 (16MiB)
    11311143}}}
    11321144* '''In U-Boot set the env to use the ''mmcbootpart'' variable that our update.sh will need in order to toggle the partition after a successful update. Custom bootargs will also be applied in this step.'''
    11331145{{{#!bash
    1134 setenv mmcbootpart 2
     1146setenv mmcbootpart 1
    11351147
    11361148setenv bootcmd 'setenv bootargs console=${console} root=/dev/mmcblk2p${mmcbootpart} rootwait rw; setenv fsload load mmc 2:${mmcbootpart}; setenv dir /boot; run loadfdt && $fsload ${kernel_addr_r} boot/Image && booti ${kernel_addr_r} - ${fdt_addr_r}'