Ravpower wd03 does not start with openwrt master

Hi,

I tried to flash openwrt master on a ravpower wd03 and the device did not start anymore.
v18.06.4 works fine.

Using a serial console I see the following happening:


U-Boot 1.1.3 (May  7 2014 - 05:33:12)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fac000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
spi_wait_nsec: 29 
spi device id: c8 40 17 c8 40 (4017c840)
Warning: un-recognized chip ID, please update bootloader!
raspi_read: from:1d4000 len:1000 
*** Warning - bad CRC, using default environment

============================================ 

Ralink UBoot Version: 4.1.0.0
-------------------------------------------- 
ASIC 7620_MP (Port5<->None)
DRAM component: 256 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: SPI Flash
Date:May  7 2014  Time:05:33:12

============================================ 

icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768 

 ##### The CPU freq = 580 MHZ #### 

 estimate memory size =32 Mbytes
raspi_read: from:40028 len:6 
Initialize vs configure module
raspi_read: from:1d0000 len:1000 
Initialize GPIO

check: 0

Input i key to enter menu:  
\0x08\0x08\0x08 1 
\0x08\0x08\0x08 0 

raspi_read: from:50000 len:180000 

## Booting image at 80500000 ...

   Image Name:   MIPS OpenWrt Linux-4.14.98
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1577517 Bytes =  1.5 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum
 ... Bad Data CRC

(here the device halts)

With OpenWrt v18.06.4 I see the following:

U-Boot 1.1.3 (May  7 2014 - 05:33:12)

Board: Ralink A
PSoC DRAM:  32 MB
relocate_code Pointer at: 81fac000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.

******************************

Software System Reset Occurred

******************************

spi_wait_nsec: 29 
spi device id: c8 40 17 c8 40 (4017c840)
Warning: un-recognized chip ID, please update bootloader!
raspi_read: from:1d4000 len:1000 

*** Warning - bad CRC, using default environment

============================================ 

Ralink UBoot Version: 4.1.0.0

-------------------------------------------- 

ASIC 7620_MP (Port5<->None)
DRAM component: 256 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: SPI Flash
Date:May  7 2014  Time:05:33:12

============================================ 

icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768 

 ##### The CPU freq = 580 MHZ #### 

 estimate memory size =32 Mbytes
raspi_read: from:40028 len:6 

Initialize vs configure module
raspi_read: from:1d0000 len:1000 
Initialize GPIO

check: 0

Input i key to enter menu:  
\0x08\0x08\0x08 1 
\0x08\0x08\0x08 0 

raspi_read: from:50000 len:180000 

## Booting image at 80500000 ...

   Image Name:   MIPS OpenWrt Linux-4.14.98
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1572417 Bytes =  1.5 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

No initrd

## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 32

Starting kernel ...

[    0.000000] Linux version 4.14.98 (user@686cf3994001) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r9310-ebcd5226cc)) #0 Mon Feb 11 20:18:48 2019
[    0.000000] Board has DDR1
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620N ver:2 eco:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is Ravpower WD03

(the Linux kernel startup continues from here on)

I managed to identify the harmless looking commit a7370b5179f5c9793fb18d087955f51d9c080715 as the "cause", which probably only increases the kernel size.

This post is also probably related to RavPower WD03 won't start OpenWrt after update.

(Hint: Don't reply to yourself or add new posts after your own, edit your previous post. There's a limit on the number of self-replies!)

Here is the partition map (openwrt v18.06.4):

root@OpenWrt:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00030000 00001000 "u-boot"
mtd1: 00010000 00001000 "u-boot-env"
mtd2: 00010000 00001000 "factory"
mtd3: 007b0000 00001000 "firmware"
mtd4: 00175af5 00001000 "kernel"
mtd5: 0063a50b 00001000 "rootfs"
mtd6: 00480000 00001000 "rootfs_data"

maybe the partition size needs to be increased. But these values do not match up with the dts layout. Maybe someone can explain that. :slight_smile:

                partitions {
                        compatible = "fixed-partitions";
                        #address-cells = <1>;
                        #size-cells = <1>;

                        partition@0 {
                                label = "u-boot";
                                reg = <0x0 0x30000>;
                                read-only;
                        };

                        partition@30000 {
                                label = "u-boot-env";
                                reg = <0x30000 0x10000>;
                                read-only;
                        };

                        factory: partition@40000 {
                                label = "factory";
                                reg = <0x40000 0x10000>;
                                read-only;
                        };

                        partition@50000 {
                                compatible = "denx,uimage";
                                label = "firmware";
                                reg = <0x50000 0x7b0000>;
                        };

Looking at your /proc/mtd output:

u-boot lines up starting at 0x00000 for 0x30000
u-boot-env then starts at (0x00000 + 0x30000) = 0x30000 for 0x10000
factory then starts at (0x30000 + 0x10000) = 0x40000 for 0x010000
firmware then starts at (0x40000 + 0x010000) = 0x50000 for 0x7b0000 and contains, from auto-split at boot:

  • kernel
  • rootfs
  • rootfs-data

True, the first few partitions match, but what about mtd4-mtd6, they are not listed. Are these things passed on my u-boot maybe?

Done when the kernel initializes the MTD subsystem for the flash. It "knows" that compatible = "denx,uimage"; and label = "firmware"; means "examine this and split it into kernel, ROM, and overlay, based on known markers".

Edit: See, for details

target/linux/generic/pending-4.19/403-mtd-hook-mtdsplit-to-Kbuild.patch
target/linux/generic/pending-4.19/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
target/linux/generic/pending-4.19/400-mtd-add-rootfs-split-support.patch
target/linux/generic/files/drivers/mtd/mtdsplit/

ok, I see. ... I suspect that the size for the kernel is not sufficient. Is there a way to debug this problem further? Other models with an identical partition do not seem to have this problem (at least I think I would heard about that..)

I will build a custom openwrt master image with a much smaller kernel (no usb etc.) and see if that works.

Hmmm, the error seems to be related to checksums, as if U-Boot isn't getting all of the kernel or something.

Failing

   Data Size:    1577517 Bytes =  1.5 MB

Succeeding

   Data Size:    1572417 Bytes =  1.5 MB

Crossing some "imaginary" line in U-Boot, perhaps??

>>> 1.5 * 1024 * 1024
1572864.0

I'd try a build with a smaller kernel. Try, perhaps, adding to your .config some options to strip down things more -- maybe that will drop your kernel below 1,572,864 and it will "magically" work. (This is a pure guess.)

CONFIG_STRIP_KERNEL_EXPORTS=y
1 Like

I got master to boot now (" Data Size: 1519250 Bytes = 1.4 MB"), but I removed an unholy amount of stuff. So I wonder where this size limitation comes from.

@badzz do you happen to know where the limitation comes from?

I am not quite sure , However in your log is shows
raspi_read: from:50000 len:180000
180000 h = 1572864 d
Which seems to match your limit.

Btw, whats wrong with the dts ? I am not sure I got it
Edit:
Original size of the partition for the kernel is indeed 0x180000 .. looks like a hard coded parameter for u-boot
dev: size ​erasesize ​ name
mtd4: 00180000 00010000 "​Kernel_RootFS"​
Edit 2:
can somebody try to dump u-boot env variables using fw_printenv ?
http://www.armadeus.org/wiki/index.php?title=Accessing_U-Boot_environment_variables_from_Linux

1 Like

Good catch. Looks like a new U-Boot is required for robust support. While one might be able to change the U-Boot environment variables, there’s no guarantee that the uboot-env partition won’t be rewritten back to default.

Edit: To be clear, if it is possible to adjust and a new ROM can be flashed in a dev setting if things go sour, this is a good way to proceed.

I am not sure what the values for /etc/fw_env.config have to be, so here is the output of strings /dev/mtd1:

LKCountryRegion=0
CountryRegionABand=0
CountryCode=US
BssidNum=1
ssid_tail=
ssid_pre=
SSID1=FileHubPlus-8782
SSID2=
WirelessMode=9
FixedTxMode=HT
TxRate=0
Channel=0
BasicRate=15
BeaconPeriod=100
DtimPeriod=1
TxPower=100
DisableOLBC=0
BGProtection=0
MaxStaNum=0
TxAntenna=
RxAntenna=
TxPreamble=1
RTSThreshold=2347
FragThreshold=2346
TxBurst=1
PktAggregate=1
AutoProvisionEn=0
FreqDelta=0
TurboRate=0
WmmCapable=1
APAifsn=3;7;1;1
APCwmin=4;4;3;2
APCwmax=6;10;4;3
APTxop=0;0;94;47
APACM=0;0;0;0
BSSAifsn=3;7;2;2
BSSCwmin=4;4;3;2
BSSCwmax=10;10;4;3
BSSTxop=0;0;94;47
BSSACM=0;0;0;0
AckPolicy=0;0;0;0
APSDCapable=0
DLSCapable=0
NoForwarding=0
NoForwardingBTNBSSID=0
HideSSID=0
ShortSlot=1
AutoChannelSelect=2
AutoChannelSkipList=12;13;
IEEE8021X=0
IEEE80211H=0
CarrierDetect=0
ITxBfEn=0
PreAntSwitch=
PhyRateLimit=0
DebugFlags=0
ETxBfEnCond=0
ITxBfTimeout=0
ETxBfTimeout=0
ETxBfNoncompress=0
ETxBfIncapable=0
FineAGC=0
StreamMode=0
StreamModeMac0=
StreamModeMac1=
StreamModeMac2=
StreamModeMac3=
CSPeriod=6
RDRegion=
StationKeepAlive=0
BlockCh=
GreenAP=1
PreAuth=0
AuthMode=WPAPSKWPA2PSK
EncrypType=TKIPAES
RekeyInterval=3600
PMKCachePeriod=10
WPAPSK1=11111111
WPAPSK2=
DefaultKeyID=2
SecurityMode=0
Key1Type=1
Key1Str1=
Key2Type=0
Key2Str1=
Key2Str2=
Key3Type=0
Key3Str1=
Key4Type=0
Key4Str1=
Key4Str2=
HSCounter=0
HT_HTC=1
HT_RDG=1
HT_LinkAdapt=0
HT_OpMode=0
HT_MpduDensity=5
HT_EXTCHA=1
HT_BW=1
HT_AutoBA=1
HT_BADecline=0
HT_AMSDU=0
HT_BAWinSize=64
HT_GI=1
HT_STBC=1
HT_MCS=33
HT_PROTECT=1
HT_DisallowTKIP=1
HT_TxStream=2
HT_RxStream=2
HT_40MHZ_INTOLERANT=0
HT_BSSCoexistence=0
HT_MIMOPS=3
NintendoCapable=0
WscConfMode=0
WscConfStatus=2
WCNTest=0
own_ip_addr=
Ethifname=
EAPifname=
PreAuthifname=
session_timeout_interval=0
idle_timeout_interval=0
WiFiTest=0
TGnWifiTest=0
ApCliEnable=0
ApCliSsid1=
ApCliBssid=
ApCliAuthMode=WPAPSKWPA2PSK
ApCliEncrypType=TKIPAES
ApCliWPAPSK=
ApCliDefaultKeyID=2
ApCliKey1Type=1
ApCliKey1Str=
ApCliKey2Type=1
ApCliKey2Str=
ApCliKey3Type=1
ApCliKey3Str=
ApCliKey4Type=1
ApCliKey4Str=
ApCliAutoConnection=1
RadioOn=1
SSID=
WPAPSK=
Key1Str=
Key2Str=
Key3Str=
Key4Str=
WAN_MAC_ADDR=0:1C:C2:3E:87:83
RFICType=8
TXPath=1
RXPath=1
OperationMode=1
wanConnectionMode=DHCP
dhcpEnabled=1
wan_ipaddr=192.168.1.1
wan_netmask=255.255.255.0
wan_gateway=192.168.1.254
wan_primary_dns=8.8.8.8
wan_secondary_dns=208.67.222.222
dhcpStart=10.10.10.1
dhcpEnd=10.10.10.50
dhcpGateway=10.10.10.254
dhcpMask=255.255.255.0
dhcpPriDns=10.10.10.254
dhcpSecDns=
dhcpPriDnsBak=10.10.10.254
dhcpSecDnsBak=
lan_ipaddr=10.10.10.254
lan_netmask=255.255.255.0
apClient=0
HostName=ralink
natEnabled=1
EffectiveFlag=1
UsrInputSsid=
UsrInputPasswd=
servername=
wan_pppoe_user=
wan_pppoe_pass=
wan_pppoe_opmode=KeepAlive
wan_pppoe_optime=60
wan_3g_user=
wan_3g_pass=
wan_3g_apn=
wan_3g_dev=
wan_3g_dial=
wanModeBak=DHCP
SSID_PREFIX=FileHubPlus
WirelessWanModeBak=DHCP
WiredWanModeBak=DHCP
Wireless_wan_ipaddr=
Wireless_wan_netmask=
Wireless_wan_gateway=
Wireless_wan_primary_dns=
Wireless_wan_secondary_dns=
wan_primary_dns_bak=
wan_secondary_dns_bak=
ssid2_on=1
ssid1_on=1
FireWall_en=0

EDIT: change typo mtd2 to mtd1

2 Likes

thanks .. there does not seems to be anything in there .. :unamused:
Flashing u-boot seems to be the way forward. Some reading/searching needs to happen for me before I say anything interesting

That's the partition you should examine, not mtd2

hexdump -C /dev/mtd1

should do it if fw_printenv isn't working yet.

@jeff: here you go

root@OpenWrt:~# hexdump -C /dev/mtd1
00000000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00002000  68 e5 4c 4b 43 6f 75 6e  74 72 79 52 65 67 69 6f  |h.LKCountryRegio|
00002010  6e 3d 30 00 43 6f 75 6e  74 72 79 52 65 67 69 6f  |n=0.CountryRegio|
00002020  6e 41 42 61 6e 64 3d 30  00 43 6f 75 6e 74 72 79  |nABand=0.Country|
00002030  43 6f 64 65 3d 55 53 00  42 73 73 69 64 4e 75 6d  |Code=US.BssidNum|
00002040  3d 31 00 73 73 69 64 5f  74 61 69 6c 3d 00 73 73  |=1.ssid_tail=.ss|
00002050  69 64 5f 70 72 65 3d 00  53 53 49 44 31 3d 46 69  |id_pre=.SSID1=Fi|
00002060  6c 65 48 75 62 50 6c 75  73 2d 38 37 38 32 00 53  |leHubPlus-8782.S|
00002070  53 49 44 32 3d 00 57 69  72 65 6c 65 73 73 4d 6f  |SID2=.WirelessMo|
00002080  64 65 3d 39 00 46 69 78  65 64 54 78 4d 6f 64 65  |de=9.FixedTxMode|
00002090  3d 48 54 00 54 78 52 61  74 65 3d 30 00 43 68 61  |=HT.TxRate=0.Cha|
000020a0  6e 6e 65 6c 3d 30 00 42  61 73 69 63 52 61 74 65  |nnel=0.BasicRate|
000020b0  3d 31 35 00 42 65 61 63  6f 6e 50 65 72 69 6f 64  |=15.BeaconPeriod|
000020c0  3d 31 30 30 00 44 74 69  6d 50 65 72 69 6f 64 3d  |=100.DtimPeriod=|
000020d0  31 00 54 78 50 6f 77 65  72 3d 31 30 30 00 44 69  |1.TxPower=100.Di|
000020e0  73 61 62 6c 65 4f 4c 42  43 3d 30 00 42 47 50 72  |sableOLBC=0.BGPr|
000020f0  6f 74 65 63 74 69 6f 6e  3d 30 00 4d 61 78 53 74  |otection=0.MaxSt|
00002100  61 4e 75 6d 3d 30 00 54  78 41 6e 74 65 6e 6e 61  |aNum=0.TxAntenna|
00002110  3d 00 52 78 41 6e 74 65  6e 6e 61 3d 00 54 78 50  |=.RxAntenna=.TxP|
00002120  72 65 61 6d 62 6c 65 3d  31 00 52 54 53 54 68 72  |reamble=1.RTSThr|
00002130  65 73 68 6f 6c 64 3d 32  33 34 37 00 46 72 61 67  |eshold=2347.Frag|
00002140  54 68 72 65 73 68 6f 6c  64 3d 32 33 34 36 00 54  |Threshold=2346.T|
00002150  78 42 75 72 73 74 3d 31  00 50 6b 74 41 67 67 72  |xBurst=1.PktAggr|
00002160  65 67 61 74 65 3d 31 00  41 75 74 6f 50 72 6f 76  |egate=1.AutoProv|
00002170  69 73 69 6f 6e 45 6e 3d  30 00 46 72 65 71 44 65  |isionEn=0.FreqDe|
00002180  6c 74 61 3d 30 00 54 75  72 62 6f 52 61 74 65 3d  |lta=0.TurboRate=|
00002190  30 00 57 6d 6d 43 61 70  61 62 6c 65 3d 31 00 41  |0.WmmCapable=1.A|
000021a0  50 41 69 66 73 6e 3d 33  3b 37 3b 31 3b 31 00 41  |PAifsn=3;7;1;1.A|
000021b0  50 43 77 6d 69 6e 3d 34  3b 34 3b 33 3b 32 00 41  |PCwmin=4;4;3;2.A|
000021c0  50 43 77 6d 61 78 3d 36  3b 31 30 3b 34 3b 33 00  |PCwmax=6;10;4;3.|
000021d0  41 50 54 78 6f 70 3d 30  3b 30 3b 39 34 3b 34 37  |APTxop=0;0;94;47|
000021e0  00 41 50 41 43 4d 3d 30  3b 30 3b 30 3b 30 00 42  |.APACM=0;0;0;0.B|
000021f0  53 53 41 69 66 73 6e 3d  33 3b 37 3b 32 3b 32 00  |SSAifsn=3;7;2;2.|
00002200  42 53 53 43 77 6d 69 6e  3d 34 3b 34 3b 33 3b 32  |BSSCwmin=4;4;3;2|
00002210  00 42 53 53 43 77 6d 61  78 3d 31 30 3b 31 30 3b  |.BSSCwmax=10;10;|
00002220  34 3b 33 00 42 53 53 54  78 6f 70 3d 30 3b 30 3b  |4;3.BSSTxop=0;0;|
00002230  39 34 3b 34 37 00 42 53  53 41 43 4d 3d 30 3b 30  |94;47.BSSACM=0;0|
00002240  3b 30 3b 30 00 41 63 6b  50 6f 6c 69 63 79 3d 30  |;0;0.AckPolicy=0|
00002250  3b 30 3b 30 3b 30 00 41  50 53 44 43 61 70 61 62  |;0;0;0.APSDCapab|
00002260  6c 65 3d 30 00 44 4c 53  43 61 70 61 62 6c 65 3d  |le=0.DLSCapable=|
00002270  30 00 4e 6f 46 6f 72 77  61 72 64 69 6e 67 3d 30  |0.NoForwarding=0|
00002280  00 4e 6f 46 6f 72 77 61  72 64 69 6e 67 42 54 4e  |.NoForwardingBTN|
00002290  42 53 53 49 44 3d 30 00  48 69 64 65 53 53 49 44  |BSSID=0.HideSSID|
000022a0  3d 30 00 53 68 6f 72 74  53 6c 6f 74 3d 31 00 41  |=0.ShortSlot=1.A|
000022b0  75 74 6f 43 68 61 6e 6e  65 6c 53 65 6c 65 63 74  |utoChannelSelect|
000022c0  3d 32 00 41 75 74 6f 43  68 61 6e 6e 65 6c 53 6b  |=2.AutoChannelSk|
000022d0  69 70 4c 69 73 74 3d 31  32 3b 31 33 3b 00 49 45  |ipList=12;13;.IE|
000022e0  45 45 38 30 32 31 58 3d  30 00 49 45 45 45 38 30  |EE8021X=0.IEEE80|
000022f0  32 31 31 48 3d 30 00 43  61 72 72 69 65 72 44 65  |211H=0.CarrierDe|
00002300  74 65 63 74 3d 30 00 49  54 78 42 66 45 6e 3d 30  |tect=0.ITxBfEn=0|
00002310  00 50 72 65 41 6e 74 53  77 69 74 63 68 3d 00 50  |.PreAntSwitch=.P|
00002320  68 79 52 61 74 65 4c 69  6d 69 74 3d 30 00 44 65  |hyRateLimit=0.De|
00002330  62 75 67 46 6c 61 67 73  3d 30 00 45 54 78 42 66  |bugFlags=0.ETxBf|
00002340  45 6e 43 6f 6e 64 3d 30  00 49 54 78 42 66 54 69  |EnCond=0.ITxBfTi|
00002350  6d 65 6f 75 74 3d 30 00  45 54 78 42 66 54 69 6d  |meout=0.ETxBfTim|
00002360  65 6f 75 74 3d 30 00 45  54 78 42 66 4e 6f 6e 63  |eout=0.ETxBfNonc|
00002370  6f 6d 70 72 65 73 73 3d  30 00 45 54 78 42 66 49  |ompress=0.ETxBfI|
00002380  6e 63 61 70 61 62 6c 65  3d 30 00 46 69 6e 65 41  |ncapable=0.FineA|
00002390  47 43 3d 30 00 53 74 72  65 61 6d 4d 6f 64 65 3d  |GC=0.StreamMode=|
000023a0  30 00 53 74 72 65 61 6d  4d 6f 64 65 4d 61 63 30  |0.StreamModeMac0|
000023b0  3d 00 53 74 72 65 61 6d  4d 6f 64 65 4d 61 63 31  |=.StreamModeMac1|
000023c0  3d 00 53 74 72 65 61 6d  4d 6f 64 65 4d 61 63 32  |=.StreamModeMac2|
000023d0  3d 00 53 74 72 65 61 6d  4d 6f 64 65 4d 61 63 33  |=.StreamModeMac3|
000023e0  3d 00 43 53 50 65 72 69  6f 64 3d 36 00 52 44 52  |=.CSPeriod=6.RDR|
000023f0  65 67 69 6f 6e 3d 00 53  74 61 74 69 6f 6e 4b 65  |egion=.StationKe|
00002400  65 70 41 6c 69 76 65 3d  30 00 42 6c 6f 63 6b 43  |epAlive=0.BlockC|
00002410  68 3d 00 47 72 65 65 6e  41 50 3d 31 00 50 72 65  |h=.GreenAP=1.Pre|
00002420  41 75 74 68 3d 30 00 41  75 74 68 4d 6f 64 65 3d  |Auth=0.AuthMode=|
00002430  57 50 41 50 53 4b 57 50  41 32 50 53 4b 00 45 6e  |WPAPSKWPA2PSK.En|
00002440  63 72 79 70 54 79 70 65  3d 54 4b 49 50 41 45 53  |crypType=TKIPAES|
00002450  00 52 65 6b 65 79 49 6e  74 65 72 76 61 6c 3d 33  |.RekeyInterval=3|
00002460  36 30 30 00 50 4d 4b 43  61 63 68 65 50 65 72 69  |600.PMKCachePeri|
00002470  6f 64 3d 31 30 00 57 50  41 50 53 4b 31 3d 31 31  |od=10.WPAPSK1=11|
00002480  31 31 31 31 31 31 00 57  50 41 50 53 4b 32 3d 00  |111111.WPAPSK2=.|
00002490  44 65 66 61 75 6c 74 4b  65 79 49 44 3d 32 00 53  |DefaultKeyID=2.S|
000024a0  65 63 75 72 69 74 79 4d  6f 64 65 3d 30 00 4b 65  |ecurityMode=0.Ke|
000024b0  79 31 54 79 70 65 3d 31  00 4b 65 79 31 53 74 72  |y1Type=1.Key1Str|
000024c0  31 3d 00 4b 65 79 32 54  79 70 65 3d 30 00 4b 65  |1=.Key2Type=0.Ke|
000024d0  79 32 53 74 72 31 3d 00  4b 65 79 32 53 74 72 32  |y2Str1=.Key2Str2|
000024e0  3d 00 4b 65 79 33 54 79  70 65 3d 30 00 4b 65 79  |=.Key3Type=0.Key|
000024f0  33 53 74 72 31 3d 00 4b  65 79 34 54 79 70 65 3d  |3Str1=.Key4Type=|
00002500  30 00 4b 65 79 34 53 74  72 31 3d 00 4b 65 79 34  |0.Key4Str1=.Key4|
00002510  53 74 72 32 3d 00 48 53  43 6f 75 6e 74 65 72 3d  |Str2=.HSCounter=|
00002520  30 00 48 54 5f 48 54 43  3d 31 00 48 54 5f 52 44  |0.HT_HTC=1.HT_RD|
00002530  47 3d 31 00 48 54 5f 4c  69 6e 6b 41 64 61 70 74  |G=1.HT_LinkAdapt|
00002540  3d 30 00 48 54 5f 4f 70  4d 6f 64 65 3d 30 00 48  |=0.HT_OpMode=0.H|
00002550  54 5f 4d 70 64 75 44 65  6e 73 69 74 79 3d 35 00  |T_MpduDensity=5.|
00002560  48 54 5f 45 58 54 43 48  41 3d 31 00 48 54 5f 42  |HT_EXTCHA=1.HT_B|
00002570  57 3d 31 00 48 54 5f 41  75 74 6f 42 41 3d 31 00  |W=1.HT_AutoBA=1.|
00002580  48 54 5f 42 41 44 65 63  6c 69 6e 65 3d 30 00 48  |HT_BADecline=0.H|
00002590  54 5f 41 4d 53 44 55 3d  30 00 48 54 5f 42 41 57  |T_AMSDU=0.HT_BAW|
000025a0  69 6e 53 69 7a 65 3d 36  34 00 48 54 5f 47 49 3d  |inSize=64.HT_GI=|
000025b0  31 00 48 54 5f 53 54 42  43 3d 31 00 48 54 5f 4d  |1.HT_STBC=1.HT_M|
000025c0  43 53 3d 33 33 00 48 54  5f 50 52 4f 54 45 43 54  |CS=33.HT_PROTECT|
000025d0  3d 31 00 48 54 5f 44 69  73 61 6c 6c 6f 77 54 4b  |=1.HT_DisallowTK|
000025e0  49 50 3d 31 00 48 54 5f  54 78 53 74 72 65 61 6d  |IP=1.HT_TxStream|
000025f0  3d 32 00 48 54 5f 52 78  53 74 72 65 61 6d 3d 32  |=2.HT_RxStream=2|
00002600  00 48 54 5f 34 30 4d 48  5a 5f 49 4e 54 4f 4c 45  |.HT_40MHZ_INTOLE|
00002610  52 41 4e 54 3d 30 00 48  54 5f 42 53 53 43 6f 65  |RANT=0.HT_BSSCoe|
00002620  78 69 73 74 65 6e 63 65  3d 30 00 48 54 5f 4d 49  |xistence=0.HT_MI|
00002630  4d 4f 50 53 3d 33 00 4e  69 6e 74 65 6e 64 6f 43  |MOPS=3.NintendoC|
00002640  61 70 61 62 6c 65 3d 30  00 57 73 63 43 6f 6e 66  |apable=0.WscConf|
00002650  4d 6f 64 65 3d 30 00 57  73 63 43 6f 6e 66 53 74  |Mode=0.WscConfSt|
00002660  61 74 75 73 3d 32 00 57  43 4e 54 65 73 74 3d 30  |atus=2.WCNTest=0|
00002670  00 6f 77 6e 5f 69 70 5f  61 64 64 72 3d 00 45 74  |.own_ip_addr=.Et|
00002680  68 69 66 6e 61 6d 65 3d  00 45 41 50 69 66 6e 61  |hifname=.EAPifna|
00002690  6d 65 3d 00 50 72 65 41  75 74 68 69 66 6e 61 6d  |me=.PreAuthifnam|
000026a0  65 3d 00 73 65 73 73 69  6f 6e 5f 74 69 6d 65 6f  |e=.session_timeo|
000026b0  75 74 5f 69 6e 74 65 72  76 61 6c 3d 30 00 69 64  |ut_interval=0.id|
000026c0  6c 65 5f 74 69 6d 65 6f  75 74 5f 69 6e 74 65 72  |le_timeout_inter|
000026d0  76 61 6c 3d 30 00 57 69  46 69 54 65 73 74 3d 30  |val=0.WiFiTest=0|
000026e0  00 54 47 6e 57 69 66 69  54 65 73 74 3d 30 00 41  |.TGnWifiTest=0.A|
000026f0  70 43 6c 69 45 6e 61 62  6c 65 3d 30 00 41 70 43  |pCliEnable=0.ApC|
00002700  6c 69 53 73 69 64 31 3d  00 41 70 43 6c 69 42 73  |liSsid1=.ApCliBs|
00002710  73 69 64 3d 00 41 70 43  6c 69 41 75 74 68 4d 6f  |sid=.ApCliAuthMo|
00002720  64 65 3d 57 50 41 50 53  4b 57 50 41 32 50 53 4b  |de=WPAPSKWPA2PSK|
00002730  00 41 70 43 6c 69 45 6e  63 72 79 70 54 79 70 65  |.ApCliEncrypType|
00002740  3d 54 4b 49 50 41 45 53  00 41 70 43 6c 69 57 50  |=TKIPAES.ApCliWP|
00002750  41 50 53 4b 3d 00 41 70  43 6c 69 44 65 66 61 75  |APSK=.ApCliDefau|
00002760  6c 74 4b 65 79 49 44 3d  32 00 41 70 43 6c 69 4b  |ltKeyID=2.ApCliK|
00002770  65 79 31 54 79 70 65 3d  31 00 41 70 43 6c 69 4b  |ey1Type=1.ApCliK|
00002780  65 79 31 53 74 72 3d 00  41 70 43 6c 69 4b 65 79  |ey1Str=.ApCliKey|
00002790  32 54 79 70 65 3d 31 00  41 70 43 6c 69 4b 65 79  |2Type=1.ApCliKey|
000027a0  32 53 74 72 3d 00 41 70  43 6c 69 4b 65 79 33 54  |2Str=.ApCliKey3T|
000027b0  79 70 65 3d 31 00 41 70  43 6c 69 4b 65 79 33 53  |ype=1.ApCliKey3S|
000027c0  74 72 3d 00 41 70 43 6c  69 4b 65 79 34 54 79 70  |tr=.ApCliKey4Typ|
000027d0  65 3d 31 00 41 70 43 6c  69 4b 65 79 34 53 74 72  |e=1.ApCliKey4Str|
000027e0  3d 00 41 70 43 6c 69 41  75 74 6f 43 6f 6e 6e 65  |=.ApCliAutoConne|
000027f0  63 74 69 6f 6e 3d 31 00  52 61 64 69 6f 4f 6e 3d  |ction=1.RadioOn=|
00002800  31 00 53 53 49 44 3d 00  57 50 41 50 53 4b 3d 00  |1.SSID=.WPAPSK=.|
00002810  4b 65 79 31 53 74 72 3d  00 4b 65 79 32 53 74 72  |Key1Str=.Key2Str|
00002820  3d 00 4b 65 79 33 53 74  72 3d 00 4b 65 79 34 53  |=.Key3Str=.Key4S|
00002830  74 72 3d 00 57 41 4e 5f  4d 41 43 5f 41 44 44 52  |tr=.WAN_MAC_ADDR|
00002840  3d 30 3a 31 43 3a 43 32  3a 33 45 3a 38 37 3a 38  |=0:1C:C2:3E:87:8|
00002850  33 0a 00 52 46 49 43 54  79 70 65 3d 38 00 54 58  |3..RFICType=8.TX|
00002860  50 61 74 68 3d 31 00 52  58 50 61 74 68 3d 31 00  |Path=1.RXPath=1.|
00002870  4f 70 65 72 61 74 69 6f  6e 4d 6f 64 65 3d 31 00  |OperationMode=1.|
00002880  77 61 6e 43 6f 6e 6e 65  63 74 69 6f 6e 4d 6f 64  |wanConnectionMod|
00002890  65 3d 44 48 43 50 00 64  68 63 70 45 6e 61 62 6c  |e=DHCP.dhcpEnabl|
000028a0  65 64 3d 31 00 77 61 6e  5f 69 70 61 64 64 72 3d  |ed=1.wan_ipaddr=|
000028b0  31 39 32 2e 31 36 38 2e  31 2e 31 00 77 61 6e 5f  |192.168.1.1.wan_|
000028c0  6e 65 74 6d 61 73 6b 3d  32 35 35 2e 32 35 35 2e  |netmask=255.255.|
000028d0  32 35 35 2e 30 00 77 61  6e 5f 67 61 74 65 77 61  |255.0.wan_gatewa|
000028e0  79 3d 31 39 32 2e 31 36  38 2e 31 2e 32 35 34 00  |y=192.168.1.254.|
000028f0  77 61 6e 5f 70 72 69 6d  61 72 79 5f 64 6e 73 3d  |wan_primary_dns=|
00002900  38 2e 38 2e 38 2e 38 00  77 61 6e 5f 73 65 63 6f  |8.8.8.8.wan_seco|
00002910  6e 64 61 72 79 5f 64 6e  73 3d 32 30 38 2e 36 37  |ndary_dns=208.67|
00002920  2e 32 32 32 2e 32 32 32  00 64 68 63 70 53 74 61  |.222.222.dhcpSta|
00002930  72 74 3d 31 30 2e 31 30  2e 31 30 2e 31 00 64 68  |rt=10.10.10.1.dh|
00002940  63 70 45 6e 64 3d 31 30  2e 31 30 2e 31 30 2e 35  |cpEnd=10.10.10.5|
00002950  30 00 64 68 63 70 47 61  74 65 77 61 79 3d 31 30  |0.dhcpGateway=10|
00002960  2e 31 30 2e 31 30 2e 32  35 34 00 64 68 63 70 4d  |.10.10.254.dhcpM|
00002970  61 73 6b 3d 32 35 35 2e  32 35 35 2e 32 35 35 2e  |ask=255.255.255.|
00002980  30 00 64 68 63 70 50 72  69 44 6e 73 3d 31 30 2e  |0.dhcpPriDns=10.|
00002990  31 30 2e 31 30 2e 32 35  34 00 64 68 63 70 53 65  |10.10.254.dhcpSe|
000029a0  63 44 6e 73 3d 00 64 68  63 70 50 72 69 44 6e 73  |cDns=.dhcpPriDns|
000029b0  42 61 6b 3d 31 30 2e 31  30 2e 31 30 2e 32 35 34  |Bak=10.10.10.254|
000029c0  00 64 68 63 70 53 65 63  44 6e 73 42 61 6b 3d 00  |.dhcpSecDnsBak=.|
000029d0  6c 61 6e 5f 69 70 61 64  64 72 3d 31 30 2e 31 30  |lan_ipaddr=10.10|
000029e0  2e 31 30 2e 32 35 34 00  6c 61 6e 5f 6e 65 74 6d  |.10.254.lan_netm|
000029f0  61 73 6b 3d 32 35 35 2e  32 35 35 2e 32 35 35 2e  |ask=255.255.255.|
00002a00  30 00 61 70 43 6c 69 65  6e 74 3d 30 00 48 6f 73  |0.apClient=0.Hos|
00002a10  74 4e 61 6d 65 3d 72 61  6c 69 6e 6b 00 6e 61 74  |tName=ralink.nat|
00002a20  45 6e 61 62 6c 65 64 3d  31 00 45 66 66 65 63 74  |Enabled=1.Effect|
00002a30  69 76 65 46 6c 61 67 3d  31 00 55 73 72 49 6e 70  |iveFlag=1.UsrInp|
00002a40  75 74 53 73 69 64 3d 00  55 73 72 49 6e 70 75 74  |utSsid=.UsrInput|
00002a50  50 61 73 73 77 64 3d 00  73 65 72 76 65 72 6e 61  |Passwd=.serverna|
00002a60  6d 65 3d 00 77 61 6e 5f  70 70 70 6f 65 5f 75 73  |me=.wan_pppoe_us|
00002a70  65 72 3d 00 77 61 6e 5f  70 70 70 6f 65 5f 70 61  |er=.wan_pppoe_pa|
00002a80  73 73 3d 00 77 61 6e 5f  70 70 70 6f 65 5f 6f 70  |ss=.wan_pppoe_op|
00002a90  6d 6f 64 65 3d 4b 65 65  70 41 6c 69 76 65 00 77  |mode=KeepAlive.w|
00002aa0  61 6e 5f 70 70 70 6f 65  5f 6f 70 74 69 6d 65 3d  |an_pppoe_optime=|
00002ab0  36 30 00 77 61 6e 5f 33  67 5f 75 73 65 72 3d 00  |60.wan_3g_user=.|
00002ac0  77 61 6e 5f 33 67 5f 70  61 73 73 3d 00 77 61 6e  |wan_3g_pass=.wan|
00002ad0  5f 33 67 5f 61 70 6e 3d  00 77 61 6e 5f 33 67 5f  |_3g_apn=.wan_3g_|
00002ae0  64 65 76 3d 00 77 61 6e  5f 33 67 5f 64 69 61 6c  |dev=.wan_3g_dial|
00002af0  3d 00 77 61 6e 4d 6f 64  65 42 61 6b 3d 44 48 43  |=.wanModeBak=DHC|
00002b00  50 00 53 53 49 44 5f 50  52 45 46 49 58 3d 46 69  |P.SSID_PREFIX=Fi|
00002b10  6c 65 48 75 62 50 6c 75  73 00 57 69 72 65 6c 65  |leHubPlus.Wirele|
00002b20  73 73 57 61 6e 4d 6f 64  65 42 61 6b 3d 44 48 43  |ssWanModeBak=DHC|
00002b30  50 00 57 69 72 65 64 57  61 6e 4d 6f 64 65 42 61  |P.WiredWanModeBa|
00002b40  6b 3d 44 48 43 50 00 57  69 72 65 6c 65 73 73 5f  |k=DHCP.Wireless_|
00002b50  77 61 6e 5f 69 70 61 64  64 72 3d 00 57 69 72 65  |wan_ipaddr=.Wire|
00002b60  6c 65 73 73 5f 77 61 6e  5f 6e 65 74 6d 61 73 6b  |less_wan_netmask|
00002b70  3d 00 57 69 72 65 6c 65  73 73 5f 77 61 6e 5f 67  |=.Wireless_wan_g|
00002b80  61 74 65 77 61 79 3d 00  57 69 72 65 6c 65 73 73  |ateway=.Wireless|
00002b90  5f 77 61 6e 5f 70 72 69  6d 61 72 79 5f 64 6e 73  |_wan_primary_dns|
00002ba0  3d 00 57 69 72 65 6c 65  73 73 5f 77 61 6e 5f 73  |=.Wireless_wan_s|
00002bb0  65 63 6f 6e 64 61 72 79  5f 64 6e 73 3d 00 77 61  |econdary_dns=.wa|
00002bc0  6e 5f 70 72 69 6d 61 72  79 5f 64 6e 73 5f 62 61  |n_primary_dns_ba|
00002bd0  6b 3d 00 77 61 6e 5f 73  65 63 6f 6e 64 61 72 79  |k=.wan_secondary|
00002be0  5f 64 6e 73 5f 62 61 6b  3d 00 73 73 69 64 32 5f  |_dns_bak=.ssid2_|
00002bf0  6f 6e 3d 31 00 73 73 69  64 31 5f 6f 6e 3d 31 00  |on=1.ssid1_on=1.|
00002c00  46 69 72 65 57 61 6c 6c  5f 65 6e 3d 30 00 00 00  |FireWall_en=0...|
00002c10  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00006000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00010000

I don't see typical U-Boot parameters in there around bootargs and definitely not kernel size.

It looks like they are using that partition for persistent config data, which is, well "interesting". I would have expected that kind of data to be in the "factory" partition, not the "uboot-env" partition.

Here's a more typical U-Boot environment:

altkern=5f80000
baudrate=115200
boot_part_ready=3
boot_ver=1.2.9
bootcmd=if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi
bootdelay=2
bootpart1=set bootargs $partbootargs && nand read $loadaddr $prikern $kernsize && bootm $loadaddr
bootpart2=set bootargs $partbootargs2 && nand read $loadaddr $altkern $kernsize && bootm $loadaddr
ethact=eth0
ethaddr=00:03:7f:ba:db:ad
flash_type=2
flashimg=tftp $loadaddr $image && nand erase $prikern $imgsize && nand write $loadaddr $prikern $filesize
flashimg2=tftp $loadaddr $image && nand erase $altkern $imgsize && nand write $loadaddr $altkern $filesize
image=dallas.img
imgsize=5800000
ipaddr=192.168.1.1
kernsize=300000
loadaddr=84000000
machid=8010006
netmask=255.255.255.0
partbootargs=init=/sbin/init rootfstype=ubifs ubi.mtd=11,2048 root=ubi0:ubifs rootwait rw
partbootargs2=init=/sbin/init rootfstype=ubifs ubi.mtd=13,2048 root=ubi0:ubifs rootwait rw
prikern=780000
serverip=192.168.1.254
stderr=serial
stdin=serial
stdout=serial
boot_part=1
auto_recovery=yes

Something like

kernsize=300000

would be helpful -- for the device shown, it is used in

nand read $loadaddr $prikern $kernsize && bootm $loadaddr

to load the kernel from flash, then boot it.

Picking this back up :laughing:. This is exactly the same issue I have been fighting with my HooToo device - same limit as well. FYI, some of the parameters you mention can be seen in mtd0, but I don't see kernsize :frowning_face:. Any suggestions of what else to look for?

And @mwarning - to let you know, the kernel size has been increased in master (vs. formal / older builds), it seems to have broken some devices with this 1.5 MB limit.

Thanks!

Hi all, Any more progress on this issue? I'm able to flash the linked 19.07 build without issue, however even a basic build (git clone, menuconfig, make...) ...that's significantly smaller than the stock 19.07, fails to work. No issues in the build process whatsoever.

Is there a way to find the .config for the stock 19.07 build that does work? There must be something different from what the custom build is outputting....

Hello there!

We (@arrmo ,@mpratt14 and me) are working hard to get a solution for these kernel size limited FileHub devices.

Please be patient, I hope the fix would hit master before release 20.xx!

1 Like