commit 3af9e86624631f19f73b0b4b410c7f56391ca2b5
parent 28d39cd66d70b85aaad89ca582a62f8e8e5d7f28
Author: Daniel Barlow <dan@telent.net>
Date: Wed, 1 Jan 2025 11:56:54 +0000
rt3200: replace bootcmd variable
the default is to boot to recovery if there's anything in pstore, but
this doesn't interact well with persstent logging
Diffstat:
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/devices/belkin-rt3200/default.nix b/devices/belkin-rt3200/default.nix
@@ -86,16 +86,25 @@
Name: liminix
Character device major/minor: 250:8
root@OpenWrt:~# ubiupdatevol /dev/ubi0_7 /tmp/rootfs
- root@OpenWrt:~# fw_setenv orig_boot_production $(fw_printenv boot_production | sed -E 's/.+?=//')
- root@OpenWrt:~# fw_setenv boot_production 'led $bootled_pwr on ; ubifsmount ubi0:liminix && ubifsload ''${loadaddr} boot/fit && bootm ''${loadaddr}'
+ To make the new system bootable we also need to change some U-Boot variables.
+ ``boot_production`` needs to mount the filesystem and boot the FIT image
+ found there, and :code:`bootcmd` needs to be told _not_ to boot the rescue
+ image if there are records in pstore, because that interferes with
+ ``config.log.persistent``
- For subsequent Liminix reinstalls, you don't need to repeat the
- "Preparation" step and in fact should seek to avoid it if
- possible. Updating volumes with :command:`ubiupdatevol` will
- preserve the erase counters used for write levelling, so is
- preferred over any kind of "factory" wipe which will reset them.
- '';
+ root@OpenWrt:~# fw_setenv orig_boot_production $(fw_printenv -n boot_production)
+ root@OpenWrt:~# fw_setenv orig_bootcmd $(fw_printenv -n bootcmd)
+ root@OpenWrt:~# fw_setenv boot_production 'led $bootled_pwr on ; ubifsmount ubi0:liminix && ubifsload ''${loadaddr} boot/fit && bootm ''${loadaddr}'
+ root@OpenWrt:~# fw_setenv bootcmd 'run boot_ubi'
+
+ For subsequent Liminix reinstalls, just run the
+ :command:`ubiupdatevol` command again. You don't need to repeat
+ the "Preparation" step and in fact should seek to avoid it if
+ possible, as it will reset the erase counters used for write
+ levelling. Using UBI-aware tools is therefore preferred over any
+ kind of "factory" wipe which will reset them.
+ '';
system = {
crossSystem = {