* BCM4704 stopped booting with 4.4 (due to vmlinux size?)
@ 2016-06-16 6:17 ` Rafał Miłecki
0 siblings, 0 replies; 9+ messages in thread
From: Rafał Miłecki @ 2016-06-16 6:17 UTC (permalink / raw)
To: linux-mips
Cc: Ralf Baechle, David Daney, David Daney, Michael Büsch,
Hauke Mehrtens, Larry Finger, Felix Fietkau, John Crispin,
Paul Wassi
Hello,
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BCM4704 stopped booting with 4.4 (due to vmlinux size?)
2016-06-16 6:17 ` Rafał Miłecki
(?)
@ 2016-06-16 11:42 ` p.wassi
2016-06-16 12:19 ` Manuel Lauss
-1 siblings, 1 reply; 9+ messages in thread
From: p.wassi @ 2016-06-16 11:42 UTC (permalink / raw)
To: "Rafał Miłecki"
Cc: linux-mips, Ralf Baechle, David Daney, David Daney,
"Michael Büsch",
Hauke Mehrtens, Larry Finger, Felix Fietkau, John Crispin
Hi Rafal,
> On the other hand Paul also experiences some problems with his Linksys
> WRT54GL (BCM5352E), the last stable kernel for him seems to be 3.18.
I have to calrify that a bit:
if I use prebuilt images from OpenWrt 15.05.1, they work out of the box (as you say, it's 3.18)
If I take prebuilt images from (LEDE|OpenWrt) trunk (which was 4.1 then), they do not boot.
However, if I clone the repo (which was used to build said trunk) and build it myself,
the images work fine. (kernel 4.1) [1]
The behaviour you described (stopping at "Starting program at 0x80001000") is the same
as I've observed it.
When I'm at home (weekend), I'll try if anything changed with 4.4
Just a side note: WRT54GL with 32MB RAM and LEDE work perfectly stable :-)
Best regards,
P. Wassi
[1]:
http://lists.infradead.org/pipermail/lede-dev/2016-June/001127.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BCM4704 stopped booting with 4.4 (due to vmlinux size?)
2016-06-16 11:42 ` p.wassi
@ 2016-06-16 12:19 ` Manuel Lauss
2016-06-16 12:24 ` Rafał Miłecki
0 siblings, 1 reply; 9+ messages in thread
From: Manuel Lauss @ 2016-06-16 12:19 UTC (permalink / raw)
To: p.wassi
Cc: Rafał Miłecki, linux-mips, Ralf Baechle, David Daney,
David Daney, Michael Büsch, Hauke Mehrtens, Larry Finger,
Felix Fietkau, John Crispin
On Thu, Jun 16, 2016 at 1:42 PM, <p.wassi@gmx.at> wrote:
>> On the other hand Paul also experiences some problems with his Linksys
>> WRT54GL (BCM5352E), the last stable kernel for him seems to be 3.18.
>
> I have to calrify that a bit:
> if I use prebuilt images from OpenWrt 15.05.1, they work out of the box (as you say, it's 3.18)
> If I take prebuilt images from (LEDE|OpenWrt) trunk (which was 4.1 then), they do not boot.
> However, if I clone the repo (which was used to build said trunk) and build it myself,
> the images work fine. (kernel 4.1) [1]
Differences in toolchain perhaps? What versions of gcc, binutils do
you and LEDE/OpenWrt use?
Manuel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BCM4704 stopped booting with 4.4 (due to vmlinux size?)
2016-06-16 12:19 ` Manuel Lauss
@ 2016-06-16 12:24 ` Rafał Miłecki
0 siblings, 0 replies; 9+ messages in thread
From: Rafał Miłecki @ 2016-06-16 12:24 UTC (permalink / raw)
To: Manuel Lauss
Cc: Paul Wassi, linux-mips, Ralf Baechle, David Daney, David Daney,
Michael Büsch, Hauke Mehrtens, Larry Finger, Felix Fietkau,
John Crispin
On 16 June 2016 at 14:19, Manuel Lauss <manuel.lauss@gmail.com> wrote:
> On Thu, Jun 16, 2016 at 1:42 PM, <p.wassi@gmx.at> wrote:
>>> On the other hand Paul also experiences some problems with his Linksys
>>> WRT54GL (BCM5352E), the last stable kernel for him seems to be 3.18.
>>
>> I have to calrify that a bit:
>> if I use prebuilt images from OpenWrt 15.05.1, they work out of the box (as you say, it's 3.18)
>> If I take prebuilt images from (LEDE|OpenWrt) trunk (which was 4.1 then), they do not boot.
>> However, if I clone the repo (which was used to build said trunk) and build it myself,
>> the images work fine. (kernel 4.1) [1]
>
> Differences in toolchain perhaps? What versions of gcc, binutils do
> you and LEDE/OpenWrt use?
When building LEDE, it first compiles toolchain and compiler and then
it uses them to compile all the software. It doesn't use host-provided
toolchain/gcc. So it shouldn't matter on what machine you build your
image (buildbot or locally). Right now LEDE's master uses gcc 5.3.0
and musl 1.1.14.
--
Rafał
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BCM4704 stopped booting with 4.4 (due to vmlinux size?)
2016-06-16 6:17 ` Rafał Miłecki
(?)
(?)
@ 2016-06-16 18:43 ` Aaro Koskinen
2016-06-20 8:39 ` p.wassi
-1 siblings, 1 reply; 9+ messages in thread
From: Aaro Koskinen @ 2016-06-16 18:43 UTC (permalink / raw)
To: Rafał Miłecki
Cc: linux-mips, Ralf Baechle, David Daney, David Daney,
Michael Büsch, Hauke Mehrtens, Larry Finger, Felix Fietkau,
John Crispin, Paul Wassi
Hi,
On Thu, Jun 16, 2016 at 08:17:16AM +0200, Rafał Miłecki wrote:
> From time to time I test new kernels with ancient Linksys WRT300N v1.0
> device based on BCM4704 SoC.
>
> I noticed that after updating kernel from 4.3 to 4.4 it doen't boot
> anymore. All I can see is the last CFE's (bootloader's) message:
> > Starting program at 0x80001000
> Enabling CONFIG_EARLY_PRINTK doesn't help.
>
> After hours or bisecting and testing I found out that it's not caused
> by any /real/ code change but rather adding a kernel message. It seems
> that by adding enough print messages I can stop kernel from booting.
>
> I didn't know what exactly to look at so I started with "objdump
> --syms vmlinux". I took 4.1.16 and 4.3.4 and tried adding to them
> various amount of unique pr_info messages in some random error code
> path (never executed). I noticed that address of .data was increasing
> which makes me believe that it's a matter of .rodata size or some
> affected size/offset in vmlinux.
> 1) 4.1.6: if .data starts at 80369000 of higher kernel doesn't boot.
> 2) 4.3.4: if .data starts at 80368000 of higher kernel doesn't boot.
>
> Do you have any idea what this problem can be caused by? Any idea how
> to fix/workaround it? Can I provide any extra info?
>
> It doesn't affect all BCM4704 devices. Hauke also has some router
> using this SoC and he couldn't reproduce this problem.
> On the other hand Paul also experiences some problems with his Linksys
> WRT54GL (BCM5352E), the last stable kernel for him seems to be 3.18.
> Not sure if it's related however.
WRT54GL with 16 MB RAM boots fine with 4.7-rc3. However, I've always had
the issue that the kernel size cannot exceed some limit, so you need to
craft a very minimal config. You can see the memory map at early boot,
and the kernel probably should not overlap with any memory used by CFE:
Total memory used by CFE: 0x80300000 - 0x803A39B0 (670128)
Initialized Data: 0x803398C0 - 0x8033BFD0 (10000)
BSS Area: 0x8033BFD0 - 0x8033D9B0 (6624)
Local Heap: 0x8033D9B0 - 0x803A19B0 (409600)
Stack Area: 0x803A19B0 - 0x803A39B0 (8192)
Text (code) segment: 0x80300000 - 0x803398C0 (235712)
Boot area (physical): 0x003A4000 - 0x003E4000
Relocation Factor: I:00000000 - D:00000000
Probably one workaround could be to change the load address?
A.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BCM4704 stopped booting with 4.4 (due to vmlinux size?)
2016-06-16 18:43 ` Aaro Koskinen
@ 2016-06-20 8:39 ` p.wassi
0 siblings, 0 replies; 9+ messages in thread
From: p.wassi @ 2016-06-20 8:39 UTC (permalink / raw)
To: Aaro Koskinen
Cc: "Rafał Miłecki",
linux-mips, Ralf Baechle, David Daney, David Daney,
"Michael Büsch",
Hauke Mehrtens, Larry Finger, Felix Fietkau, John Crispin
Hi,
I've now done some further tests on my WRT54GL (BCM5352):
> (...)
> Starting program at 0x80001000
> [ 0.000000] Linux version 4.4.13 (openwrt@debian-compiler) (gcc version 5.3.0 (LEDE GCC 5.3.0 r482) ) #1 Thu Jun 16 19:04:33 UTC 2016
> (...)
So Kernel 4.4 is successfully booting on this hardware.
However, this still does not resolve the issue with prebuilt/"homemade" images for LEDE/OpenWrt.
(This is to be discussed on other mailing lists.)
I have a slightly different memory map compared to Aaro's:
> Total memory used by CFE: 0x80300000 - 0x803A4010 (671760)
> Initialized Data: 0x80339E70 - 0x8033C630 (10176)
> BSS Area: 0x8033C630 - 0x8033E010 (6624)
> Local Heap: 0x8033E010 - 0x803A2010 (409600)
> Stack Area: 0x803A2010 - 0x803A4010 (8192)
> Text (code) segment: 0x80300000 - 0x80339E70 (237168)
> Boot area (physical): 0x003A5000 - 0x003E5000
> Relocation Factor: I:00000000 - D:00000000
For testing:
I have WRT54GL and WL500gpv2 here, and can attach JTAG if that helps.
(No BCM4704 though)
What came to my eyes now:
after the output "Starting program at 0x80001000" it takes some time (~1-2 seconds) until
Kernel's first printk appears. I guess that's the (GZ|LZMA|whatever)-decompressor.
Maybe this gets stuck somehow? -> Would JTAG help?
Best regards,
P. Wassi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BCM4704 stopped booting with 4.4 (due to vmlinux size?)
2016-06-16 6:17 ` Rafał Miłecki
` (2 preceding siblings ...)
(?)
@ 2016-06-30 21:57 ` Hauke Mehrtens
2016-07-01 13:59 ` p.wassi
-1 siblings, 1 reply; 9+ messages in thread
From: Hauke Mehrtens @ 2016-06-30 21:57 UTC (permalink / raw)
To: Rafał Miłecki, linux-mips
Cc: Ralf Baechle, David Daney, David Daney, Michael Büsch,
Larry Finger, Felix Fietkau, John Crispin, Paul Wassi
On 06/16/2016 08:17 AM, Rafał Miłecki wrote:
> Hello,
>
> From time to time I test new kernels with ancient Linksys WRT300N v1.0
> device based on BCM4704 SoC.
>
> I noticed that after updating kernel from 4.3 to 4.4 it doen't boot
> anymore. All I can see is the last CFE's (bootloader's) message:
>> Starting program at 0x80001000
> Enabling CONFIG_EARLY_PRINTK doesn't help.
>
Hi, I just tested this on two of my older bcm47xx devices and I had no
problem with kernel 4.4.14 from LEDE with all the LEDE patches:
Asus WL500GP V1:
CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: �| 10�� 12 22:21:19 CST 2006 (root@localhost.localdomain)
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.
Initializing Arena
Initializing Devices.
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.7.0
rndis0: Broadcom USB RNDIS Network Adapter (P-t-P)
CPU type 0x29006: 264MHz
Total memory: 33554432 KBytes
Total memory used by CFE: 0x80800000 - 0x8089AF40 (634688)
Initialized Data: 0x808313D0 - 0x80833790 (9152)
BSS Area: 0x80833790 - 0x80834F40 (6064)
Local Heap: 0x80834F40 - 0x80898F40 (409600)
Stack Area: 0x80898F40 - 0x8089AF40 (8192)
Text (code) segment: 0x80800000 - 0x808313D0 (201680)
Boot area (physical): 0x0089B000 - 0x008DB000
Relocation Factor: I:00000000 - D:00000000
Device eth0: hwaddr 00-1A-92-EA-73-12, ipaddr 192.168.1.3, mask
255.255.255.0
gateway not set, nameserver not set
Null Rescue Flag.
Reading :: TFTP Server.
Failed.: Timeout occured
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
Loading: .. 3800 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
[ 0.000000] Linux version 4.4.14 (hauke@hauke-desktop) (gcc version
5.3.0 (LEDE GCC 5.3.0 r829) ) #1 Thu Jun 30 20:49:41 UTC 2016
[ 0.000000] CPU0 revision is: 00029006 (Broadcom BMIPS3300)
[ 0.000000] bcm47xx: Using ssb bus
[ 0.000000] ssb: Found chip with id 0x4704, rev 0x09 and package 0x00
Linksys WRT54G/GS/GL:
CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: Fri Jun 25 15:49:22 CST 2004 (root@Amin)
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.
Initializing Arena.
Initializing Devices.
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0
rndis0: Broadcom USB RNDIS Network Adapter (P-t-P)
CPU type 0x29007: 200MHz
Total memory: 0x2000000 bytes (32MB)
Total memory used by CFE: 0x80300000 - 0x8043DF30 (1302320)
Initialized Data: 0x803381A0 - 0x8033A550 (9136)
BSS Area: 0x8033A550 - 0x8033BF30 (6624)
Local Heap: 0x8033BF30 - 0x8043BF30 (1048576)
Stack Area: 0x8043BF30 - 0x8043DF30 (8192)
Text (code) segment: 0x80300000 - 0x803381A0 (229792)
Boot area (physical): 0x0043E000 - 0x0047E000
Relocation Factor: I:00000000 - D:00000000
Boot version: v3.2
The boot is CFE
mac_init(): Find mac [00:0F:66:D3:94:95] in location 1
Nothing...
No eou key find
Device eth0: hwaddr 00-0F-66-D3-94-95, ipaddr 192.168.1.1, mask
255.255.255.0
gateway not set, nameserver not set
Reading :: Failed.: Timeout occured
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
Loading: .. 3800 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
[ 0.000000] Linux version 4.4.14 (hauke@hauke-desktop) (gcc version
5.3.0 (LEDE GCC 5.3.0 r829) ) #1 Thu Jun 30 20:49:41 UTC 2016
[ 0.000000] CPU0 revision is: 00029007 (Broadcom BMIPS3300)
[ 0.000000] bcm47xx: Using ssb bus
[ 0.000000] ssb: Found chip with id 0x4712, rev 0x01 and package 0x00
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: BCM4704 stopped booting with 4.4 (due to vmlinux size?)
2016-06-30 21:57 ` Hauke Mehrtens
@ 2016-07-01 13:59 ` p.wassi
0 siblings, 0 replies; 9+ messages in thread
From: p.wassi @ 2016-07-01 13:59 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: "Rafał Miłecki",
linux-mips, Ralf Baechle, David Daney, David Daney,
"Michael Büsch",
Larry Finger, Felix Fietkau, John Crispin
Hi Hauke,
I also had no problem with booting 4.4 on my bcm47xx legacy devices.
I just tested again with LEDE's current trunk:
[1] does not boot on WRT54GL
As already said: if I clone the repo and build it myself, the device
boots perfectly fine (on 4.1 and 4.4)
Can you confirm, that [1] does not boot on your WRT54G/GL/GS?
In my opinion it's hard to discuss kernels not booting
as long as the builds are not reproducable or deterministic.
Maybe we can first figure out why [1] doesn't boot on some devices.
Best regards,
P. Wassi
[1]:
https://downloads.lede-project.org/snapshots/targets/brcm47xx/legacy/lede-brcm47xx-legacy-standard-squashfs.trx
> Hi, I just tested this on two of my older bcm47xx devices and I had no
> problem with kernel 4.4.14 from LEDE with all the LEDE patches:
>
> Asus WL500GP V1:
> CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
> Build Date: �| 10�� 12 22:21:19 CST 2006 (root@localhost.localdomain)
> Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.
>
> Initializing Arena
> Initializing Devices.
> et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.7.0
> rndis0: Broadcom USB RNDIS Network Adapter (P-t-P)
> CPU type 0x29006: 264MHz
> Total memory: 33554432 KBytes
>
> Total memory used by CFE: 0x80800000 - 0x8089AF40 (634688)
> Initialized Data: 0x808313D0 - 0x80833790 (9152)
> BSS Area: 0x80833790 - 0x80834F40 (6064)
> Local Heap: 0x80834F40 - 0x80898F40 (409600)
> Stack Area: 0x80898F40 - 0x8089AF40 (8192)
> Text (code) segment: 0x80800000 - 0x808313D0 (201680)
> Boot area (physical): 0x0089B000 - 0x008DB000
> Relocation Factor: I:00000000 - D:00000000
>
> Device eth0: hwaddr 00-1A-92-EA-73-12, ipaddr 192.168.1.3, mask
> 255.255.255.0
> gateway not set, nameserver not set
> Null Rescue Flag.
> Reading :: TFTP Server.
> Failed.: Timeout occured
> Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
> Loading: .. 3800 bytes read
> Entry at 0x80001000
> Closing network.
> Starting program at 0x80001000
> [ 0.000000] Linux version 4.4.14 (hauke@hauke-desktop) (gcc version
> 5.3.0 (LEDE GCC 5.3.0 r829) ) #1 Thu Jun 30 20:49:41 UTC 2016
> [ 0.000000] CPU0 revision is: 00029006 (Broadcom BMIPS3300)
> [ 0.000000] bcm47xx: Using ssb bus
> [ 0.000000] ssb: Found chip with id 0x4704, rev 0x09 and package 0x00
>
>
>
>
> Linksys WRT54G/GS/GL:
> CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
> Build Date: Fri Jun 25 15:49:22 CST 2004 (root@Amin)
> Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.
>
> Initializing Arena.
> Initializing Devices.
> et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.60.13.0
> rndis0: Broadcom USB RNDIS Network Adapter (P-t-P)
> CPU type 0x29007: 200MHz
> Total memory: 0x2000000 bytes (32MB)
>
> Total memory used by CFE: 0x80300000 - 0x8043DF30 (1302320)
> Initialized Data: 0x803381A0 - 0x8033A550 (9136)
> BSS Area: 0x8033A550 - 0x8033BF30 (6624)
> Local Heap: 0x8033BF30 - 0x8043BF30 (1048576)
> Stack Area: 0x8043BF30 - 0x8043DF30 (8192)
> Text (code) segment: 0x80300000 - 0x803381A0 (229792)
> Boot area (physical): 0x0043E000 - 0x0047E000
> Relocation Factor: I:00000000 - D:00000000
>
> Boot version: v3.2
> The boot is CFE
>
> mac_init(): Find mac [00:0F:66:D3:94:95] in location 1
> Nothing...
>
> No eou key find
> Device eth0: hwaddr 00-0F-66-D3-94-95, ipaddr 192.168.1.1, mask
> 255.255.255.0
> gateway not set, nameserver not set
> Reading :: Failed.: Timeout occured
> Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
> Loading: .. 3800 bytes read
> Entry at 0x80001000
> Closing network.
> Starting program at 0x80001000
> [ 0.000000] Linux version 4.4.14 (hauke@hauke-desktop) (gcc version
> 5.3.0 (LEDE GCC 5.3.0 r829) ) #1 Thu Jun 30 20:49:41 UTC 2016
> [ 0.000000] CPU0 revision is: 00029007 (Broadcom BMIPS3300)
> [ 0.000000] bcm47xx: Using ssb bus
> [ 0.000000] ssb: Found chip with id 0x4712, rev 0x01 and package 0x00
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread