Changes between Version 49 and Version 50 of buildroot
- Timestamp:
- 12/02/2021 03:04:53 AM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
buildroot
v49 v50 1026 1026 - '''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. 1027 1027 {{{#!bash 1028 cat << EOF > sw-descrption 1028 1029 #!/bin/sh 1029 cat << EOF > sw-descrption 1030 1030 1031 if [ $# -lt 1 ]; then 1031 1032 exit 0; … … 1097 1098 # sign the sw-description 1098 1099 openssl 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 1104 mount output/rootfs.ext2 /mnt 1105 cp output/build/linux-v5.10.18-venice/arch/arm64/boot/dts/freescale/imx8mm-venice-gw7*.dtb /mnt/bin/ 1106 umount /mnt 1107 cp output/images/rootfs.ext2 ./venice_swupdate.ext2 1108 gzip venice_swupdate.ext2 1109 }}} 1110 1111 * '''Build swupdate image 1112 {{{#!bash 1101 1113 for i in sw-description sw-description.sig update.sh venice_swupdate.ext2.gz; do 1102 1114 echo $i; done | cpio -ov -H crc > my-software.swu … … 1128 1140 * '''While in U-Boot install the Buildroot rootfs to the first Linux partition offset (LinuxA)''' 1129 1141 {{{#!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 buffer1142 tftpboot ${loadaddr} rootfs.ext4.gz && gzwrite mmc 2 ${loadaddr} ${filesize} 0x100000 0x1000000 # rootfsA is at 0x1000000 (16MiB) 1131 1143 }}} 1132 1144 * '''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.''' 1133 1145 {{{#!bash 1134 setenv mmcbootpart 21146 setenv mmcbootpart 1 1135 1147 1136 1148 setenv 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}'