[openwrt/openwrt] ath79: fix initramfs execution for NEC Aterm devices

LEDE Commits lede-commits at lists.infradead.org
Sun Apr 13 07:54:51 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/10a674d27738020384a1bfcca693200999a9e406

commit 10a674d27738020384a1bfcca693200999a9e406
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Sun Apr 13 19:41:19 2025 +0900

    ath79: fix initramfs execution for NEC Aterm devices
    
    Fix execution of initramfs image on NEC Aterm devices by increasing
    available memory for lzma extraction of lzma-loader.
    
    The size of initramfs image of v24.10.0 exceeds available memory
    (LZMA_TEXT_START - LOADADDR) and loader data running at LZMA_TEXT_START
    will be overwritten by extracted data. As a result, LZMA extraction will
    be broken and stuck (or unexpectedly reset).
    Fix that issue by setting higher LZMA_TEXT_START address to increase
    available memory for LZMA extraction by lzma-loader.
    
    log (v24.10.0):
    
    boot> tftpd
    tftpd start 192.168.0.1
    boot> start tftp load openwrt-24.10.0-ath79-generic-ne
    end tftp load length = 6569768
    start memory load ...
    memory load complete
      begin  : 0x80040000
      length : 6567044
      startup: 0x80040000
    
    boot> boot
    begin  : 0x80040000
    length : 6567044
    startup: 0x80040000
    option: 0x0
    NEC Aterm series (QCA9558)
    
    Calibrating SGMII
    SGMII cal value = 0xe
    
    Configuring SGMII force mode
      SGMII_CONFIG : 0x000000a2
      MR_AN_CONTROL: 0x00008140
      MR_AN_CONTROL: 0x00000140
    
    OpenWrt kernel loader for AR7XXX/AR9XXX
    Copyright (C) 2011 Gabor Juhos <juhosg at openwrt.org>
    Decompressing kernel... [:<syntax:value>]');retu  <--- (stuck)
    IPL:SOFT-RESET                    <--- (reset by WDT)
    memory test ... ok
    flinstall OK
    
    boot version: 1.0.0
    ...
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18476
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ath79/image/common-nec.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ath79/image/common-nec.mk b/target/linux/ath79/image/common-nec.mk
index 7981a72d8e..23671e215d 100644
--- a/target/linux/ath79/image/common-nec.mk
+++ b/target/linux/ath79/image/common-nec.mk
@@ -8,6 +8,7 @@ endef
 define Device/nec-netbsd-aterm
   DEVICE_VENDOR := NEC
   LOADER_TYPE := bin
+  LZMA_TEXT_START := 0x82800000
   KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
   KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
   ARTIFACTS := uboot.bin




More information about the lede-commits mailing list