All of lore.kernel.org
 help / color / mirror / Atom feed
From: Finn Thain <fthain@linux-m68k.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Imre Kaloz <kaloz@openwrt.org>,
	 Krzysztof Halasa <khalasa@piap.pl>,
	 Linux ARM <linux-arm-kernel@lists.infradead.org>,
	 Zoltan HERPAI <wigyori@uid0.hu>
Subject: Re: [PATCH] ARM: dts: ixp4xx: Fix up the Netgear WG302 device tree
Date: Sat, 9 Jul 2022 17:44:32 +1000 (AEST)	[thread overview]
Message-ID: <7d2ec26-253e-ba2b-5b86-e4a83fc5ec2@linux-m68k.org> (raw)
In-Reply-To: <CAMuHMdUEYmYF+R=1X1Y7rwGYkt6kEOBK=vC3fNoFA4HVfDB9=Q@mail.gmail.com>


On Fri, 8 Jul 2022, Geert Uytterhoeven wrote:

> On Fri, Jul 8, 2022 at 3:15 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> > On Fri, Jul 8, 2022 at 5:16 AM Finn Thain <fthain@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@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.)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-07-09  7:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-28  0:28 [PATCH] ARM: dts: ixp4xx: Fix up the Netgear WG302 device tree Linus Walleij
2022-07-08  3:16 ` Finn Thain
2022-07-08 13:07   ` Linus Walleij
2022-07-08 15:29     ` Geert Uytterhoeven
2022-07-09  7:44       ` Finn Thain [this message]
2022-07-09  7:43     ` Finn Thain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d2ec26-253e-ba2b-5b86-e4a83fc5ec2@linux-m68k.org \
    --to=fthain@linux-m68k.org \
    --cc=geert@linux-m68k.org \
    --cc=kaloz@openwrt.org \
    --cc=khalasa@piap.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=wigyori@uid0.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.