Skip to content

Commit

Permalink
uboot-envtools: fix GL-MT2500 offset
Browse files Browse the repository at this point in the history
The previous offsets did also work, as they've wrapped back to 0x0.
However, in reality the environment starts at offset 0x0 of the
u-boot-env MMC partition.

Signed-off-by: David Bauer <[email protected]>
  • Loading branch information
blocktrron committed Dec 4, 2023
1 parent f3df2a6 commit d7d01fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
9 changes: 3 additions & 6 deletions package/boot/uboot-envtools/files/mediatek_filogic
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,14 @@ bananapi,bpi-r3)
;;
esac
;;
glinet,gl-mt2500)
glinet,gl-mt2500|\
glinet,gl-mt6000)
local envdev=$(find_mmc_part "u-boot-env")
ubootenv_add_uci_config "$envdev" "0x400000" "0x80000"
ubootenv_add_uci_config "$envdev" "0x0" "0x80000"
;;
glinet,gl-mt3000)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000"
;;
glinet,gl-mt6000)
local envdev=$(find_mmc_part "u-boot-env")
ubootenv_add_uci_config "$envdev" "0x0" "0x80000"
;;
xiaomi,mi-router-wr30u|\
xiaomi,mi-router-ax3000t|\
xiaomi,redmi-router-ax6000)
Expand Down
7 changes: 1 addition & 6 deletions target/linux/mediatek/image/filogic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,9 @@ define Device/glinet_gl-mt2500
DEVICE_MODEL := GL-MT2500
DEVICE_DTS := mt7981b-glinet-gl-mt2500
DEVICE_DTS_DIR := ../dts
DEVICE_DTS_LOADADDR := 0x47000000
DEVICE_PACKAGES := kmod-usb3
DEVICE_PACKAGES := e2fsprogs f2fsck mkf2fs kmod-usb3
SUPPORTED_DEVICES += glinet,mt2500-emmc
IMAGES := sysupgrade.bin
KERNEL := kernel-bin | lzma | \
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
KERNEL_INITRAMFS := kernel-bin | lzma | \
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += glinet_gl-mt2500
Expand Down

0 comments on commit d7d01fb

Please sign in to comment.