Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix safe-upgrade bootstrap broken since OpenWrt 19.07 #1050

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions packages/safe-upgrade/files/usr/sbin/safe-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ local su = {}

su.version = '1.0'
local firmware_size_bytes = 7936*1024
local fw1_addr = 0x9f050000
local fw2_addr = 0x9f050000 + firmware_size_bytes
-- Keep the fw addresses as strings beacause of https://gitlab.com/librerouter/librerouteros/-/issues/61
local fw1_addr = '0x9f050000'
local fw2_addr = '0x9f810000' -- fw1_addr + firmware_size_bytes

su._supported_devices = {'librerouter-v1'}
su._mtd_partitions_desc = '/proc/mtd'

Expand Down Expand Up @@ -277,8 +279,8 @@ local function bootstrap(args)

set_stable_partition(1)
set_testing_partition(0)
set_uboot_env('fw1_addr', string.format("0x%x", fw1_addr))
set_uboot_env('fw2_addr', string.format("0x%x", fw2_addr))
set_uboot_env('fw1_addr', fw1_addr)
set_uboot_env('fw2_addr', fw2_addr)

-- configure cmdline using the current cmdline config to not force
-- us to know here the correct cmdline bootargs of the running kernel
Expand Down