Skip to content

Commit

Permalink
safe-upgrade: fix calibration data partition name
Browse files Browse the repository at this point in the history
DISCLAIMER: Breaks safe-upgrade retrocompatibility!

Newer OpenWrt rely on calibration data MTD partitions being named 'art'
older OpenWrt on which librerouterOS 1.5 is based, looked for calibration
calibration data for on-SoC radio on 'ART' partition.
In particular librerouter v1 have an on SoC radio which have calibration data
in art partition, safe-upgrade can either support older OpenWrt version or
newer, but not both at least without change the code drastically.
Here in development branch let's support new OpenWrt.
  • Loading branch information
G10h4ck committed Mar 20, 2024
1 parent 4be8f34 commit 25f5b8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/safe-upgrade/files/usr/sbin/safe-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ local function upgrade(args)
else
fw_mtd_str = '7936k(firmware),7936k(fw2)'
end
local boot_script_tpl = 'set bootargs console=ttyS0,115200 board=LIBREROUTERV1 mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),%s,128k(res),64k(ART); echo booting part %d; bootm ${fw_addr};'
local boot_script_tpl = 'set bootargs console=ttyS0,115200 board=LIBREROUTERV1 mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),%s,128k(res),64k(art); echo booting part %d; bootm ${fw_addr};'
local boot_script = string.format(boot_script_tpl, fw_mtd_str, partitions.other)
set_uboot_env(string.format('boot_%d', partitions.other), boot_script)
set_testing_partition(partitions.other)
Expand Down

0 comments on commit 25f5b8c

Please sign in to comment.