[PATCH] ARM: dts: ixp4xx: Fix up the Netgear WG302 device tree

Finn Thain fthain at linux-m68k.org
Sat Jul 9 00:44:32 PDT 2022


On Fri, 8 Jul 2022, Geert Uytterhoeven wrote:

> On Fri, Jul 8, 2022 at 3:15 PM Linus Walleij <linus.walleij at linaro.org> wrote:
> > On Fri, Jul 8, 2022 at 5:16 AM Finn Thain <fthain at linux-m68k.org> wrote:
> > > Does anyone still have the configs for that test? Here's what I see when I
> > > build and boot ixp4xx_defconfig.
> > >
> > >     RedBoot> load -r -b 0x01600000 zImage
> > >     Using default protocol (TFTP)
> > >     Raw file loaded 0x01600000-0x018a4087, assumed entry at 0x01600000
> > >     RedBoot> exec 0x01600000
> > >     Using base address 0x01600000 and length 0x002a4088
> > >
> > >     Error: invalid dtb and unrecognized/unsupported machine ID
> > >       r1=0x000000f5, r2=0x00000000
> > >     Available machine support:
> > >
> > >     ID (hex)        NAME
> > >     ffffffff        Generic DT based system
> > >     ffffffff        IXP4xx (Device Tree)
> > >
> > >     Please check your kernel config and/or bootloader.
> >
> > Usually this is because the DTB is corrupt.
> 
> Usually because it gets overwritten due to a bad combination of load
> addresses for kernel and DTB, or during copying by the boot loader.
> However, this is redboot, using a single load command.
> 

Load address seems to be okay. Changing 0x01600000 to 0x00080000 has no 
effect here. I suspect you're right about Redboot preventing such 
mistakes.

> Finn: Does your zImage have an appended DTB?
> 

No, I wasn't aware of that step. Thanks for the tip!

Appending the appropriate dtb was sufficient to get the ixp4xx_defconfig 
build to boot. But a build using a custom .config crashed early:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.19.0-rc5-00105-g9f09069cde34 (fthain at nippy) (arm-unknown-linux-gnueabi-gcc (btc) 6.4.0, GNU ld (btc) 2.28) #16 Sat Jul 9 13:46:40 AEST 2022
[    0.000000] CPU: XScale-IXP42x Family [690541f1] revision 1 (ARMv5TE), cr=000039ff
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Netgear WG302 v1
[    0.000000] printk: debug: ignoring loglevel setting.
[    0.000000] printk: bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Internal error: Oops - BUG: 0 [#1] ARM
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.19.0-rc5-00105-g9f09069cde34 #16
[    0.000000] Hardware name: IXP4xx (Device Tree)
[    0.000000] PC is at 0x80494a74
[    0.000000] LR is at 0x00200000
[    0.000000] pc : [<80494a74>]    lr : [<00200000>]    psr: 800000d3
[    0.000000] sp : 804b1ed4  ip : 81ffcfb0  fp : fef00000
[    0.000000] r10: ffe00000  r9 : 001fffff  r8 : 804b760c
[    0.000000] r7 : 804d6218  r6 : 804e8234  r5 : 804b75ec  r4 : 81ffcf88
[    0.000000] r3 : 81ffcfd8  r2 : fef00000  r1 : ff000000  r0 : 81ffcf88
[    0.000000] Flags: Nzcv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment user
[    0.000000] Control: 000039ff  Table: 00004000  DAC: 00000055
[    0.000000] Register r0 information:
[    0.000000] 8<--- cut here ---
[    0.000000] Unable to handle kernel paging request at virtual address 0003ff84
[    0.000000] [0003ff84] *pgd=00000000

After a lot of messing around, I was finally able to fix my .config by 
deleting "CONFIG_DEBUG_UART_VIRT=0xfef00003". Then make was able to 
replace it with "CONFIG_DEBUG_UART_VIRT=0xfec00003" which resolved the 
crash. (ISTR the original setting came from an old ixp4xx .config from 
openwrt.org.)



More information about the linux-arm-kernel mailing list