forked from buildroot/buildroot
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Implement support for swupdate, local updates
This commit adds support for updating the system using swupdate, using a dual root filesystem scheme: - genimage.cfg is updated to add another root filesystem partition, to implement the dual copy scheme - sw-description is the swupdate image description file, that will be part of the swupdate update file - postupdate.sh is the shell script that will be executed on the target once the upgrade has completed successfully. - gen-swupdate-image.sh is the shell script executed on the build machine at the end of the Buildroot build to generate the swupdate update file - extlinux.conf is updated so that the root= kernel argument is properly adjusted depending on which partition we are booting on - stm32mp15_dk_defconfig is updated with swupdate, the sgdisk tool from gptfdisk, and to call the gen-swupdate-image.sh script as a post-image script. - the kernel configuration is updated with additional options for USB mass storage support Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
- Loading branch information
Showing
7 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
|
||
BOARD_DIR=$(dirname $0) | ||
|
||
cp ${BOARD_DIR}/sw-description ${BINARIES_DIR} | ||
|
||
IMG_FILES="sw-description rootfs.ext4.gz" | ||
|
||
pushd ${BINARIES_DIR} | ||
for f in ${IMG_FILES} ; do | ||
echo ${f} | ||
done | cpio -ovL -H crc > buildroot.swu | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
label stm32mp15-buildroot | ||
kernel /boot/zImage | ||
devicetree /boot/stm32mp157c-dk2.dtb | ||
append root=/dev/mmcblk0p4 rootwait console=ttySTM0,115200 vt.global_cursor_default=0 | ||
append root=/dev/mmcblk0p${devplist} rootwait console=ttySTM0,115200 vt.global_cursor_default=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
sgdisk -A 4:toggle:2 -A 5:toggle:2 /dev/mmcblk0 | ||
reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
software = { | ||
version = "0.1.0"; | ||
rootfs = { | ||
rootfs-1: { | ||
images: ( | ||
{ | ||
filename = "rootfs.ext4.gz"; | ||
compressed = true; | ||
device = "/dev/mmcblk0p4"; | ||
}); | ||
} | ||
rootfs-2: { | ||
images: ( | ||
{ | ||
filename = "rootfs.ext4.gz"; | ||
compressed = true; | ||
device = "/dev/mmcblk0p5"; | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters