-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Latest meta-swupdate provides a shell script wrapper to start swupdate. This allows to put shell code snippets into the folder /usr/lib/swupdate/conf.d to generate the parameters for swupdate at run-time, in a very flexible way. Based on that meta-swupdate-boards is now generic enough to work for systemd and sysv based DISTROs. Note: For the beaglebone board swupdate 2019.11 is highly recommended. This version provides proper support for force_ro protection. Signed-off-by: Adrian Freihofer <[email protected]>
- Loading branch information
Showing
9 changed files
with
87 additions
and
596 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
recipes-support/swupdate/swupdate/beaglebone-yocto/09-swupdate-args
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,16 @@ | ||
rootfs=`mount | grep "on / type" | cut -d':' -f 2 | cut -d' ' -f 1` | ||
|
||
if [ $rootfs == '/dev/mmcblk1p2' ];then | ||
selection="-e stable,copy2" | ||
else | ||
selection="-e stable,copy1" | ||
fi | ||
|
||
state=`fw_printenv ustate | cut -f 2 -d'='` | ||
if [ $state == 1 ];then | ||
SWUPDATE_SURICATTA_ARGS="-c 2" | ||
else | ||
SWUPDATE_SURICATTA_ARGS=" " | ||
fi | ||
|
||
SWUPDATE_ARGS="-H beaglebone:1.0 ${selection} -f /etc/swupdate.cfg" |
2 changes: 2 additions & 0 deletions
2
recipes-support/swupdate/swupdate/beaglebone-yocto/10-remove-force-ro
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,2 @@ | ||
# be sure that we can change U-Boot ENV (not needed with swupdate >2019.11) | ||
echo 0 > /sys/block/mmcblk1boot1/force_ro |
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
193 changes: 0 additions & 193 deletions
193
recipes-support/swupdate/swupdate/beaglebone-yocto/swupdate
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
recipes-support/swupdate/swupdate/raspberrypi3/09-swupdate-args
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,16 @@ | ||
rootfs=`mount | grep "on / type" | cut -d':' -f 2 | cut -d' ' -f 1` | ||
|
||
if [ $rootfs == '/dev/mmcblk0p2' ];then | ||
selection="-e stable,copy2" | ||
else | ||
selection="-e stable,copy1" | ||
fi | ||
|
||
state=`fw_printenv ustate | cut -f 2 -d'='` | ||
if [ $state == 1 ];then | ||
SWUPDATE_SURICATTA_ARGS="-c 2" | ||
else | ||
SWUPDATE_SURICATTA_ARGS=" " | ||
fi | ||
|
||
SWUPDATE_ARGS="-H raspberrypi3:1.0 ${selection} -f /etc/swupdate.cfg" |
Oops, something went wrong.