Skip to contentSkip to conversation

Kernel fails to start on at91sam9263 target

PATCH Sam Ravnborg 2 participants 4 messages Jun 3, 2018 – Jun 4, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi all.

I have a proprietary target with an AT91SAM9263 CPU. I have at91bootstrap running and barebox load fine.

When I try to boot the kernel it stop after Uncompressing...

Log snip:

chunk_get_cached: found 7287 in 7
fat_read: 0 3421056 3421056 23bab76c
OF: ** translation for device /ahb/nor_flash@10000000 **
OF: bus is default (na=1, ns=1) on /ahb
OF: parent bus is default (na=1, ns=1) on
OF: empty ranges; 1:1 translation
OF: with offset: 10000000
OF: reached root node
OF: ** translation for device /ahb/nor_flash@10000000 **
OF: bus is default (na=1, ns=1) on /ahb
OF: parent bus is default (na=1, ns=1) on
OF: empty ranges; 1:1 translation
OF: with offset: 10000000
OF: reached root node
eth_of_fixup_node: no valid mac address, cannot fixup __request_region ok: 0x21495000:0x2149c300
commandline: root=/dev/disk0.1 rootfstype=ext4 rw rootwait console=ttyS0,115200 booting kernel with devicetree
exitcall-> 0x23e073c0
exitcall-> 0x23e0c004
exitcall-> 0x23e415c8
Uncompressing Linux... done, booting the kernel.

The barebox commands to boot the kernel was:

$ mount -a
$ bootm /mnt/disk0.0/zImage

The zImage + barebox.bin + BOOT.BIN are all located in a 10M FAT16 partition on the SDCARD - which allows me to use the RomBOOT feature in AT91SAM9263.

I expect that I miss something obvious - but so far I have failed to realize what it is.

Attached the patch I have to support the proprietary board. It is NOT intended for upstream barebox, but attached only if this could give someone a hint.

The kernel is 4.17-rc3 with no extra patches.

If anyone have any good ideas I am all ears.

Thanks in advance,

Sam

From cf47728f632bae1aa7f104002418ffc9105d955c Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <[email protected]>
Date: Fri, 29 Dec 2017 10:01:36 +0100
Subject: [PATCH 601/601] skovarm9cpu: initial support

TODO:
- display does not work.
- Seiko display timings are bogus, needs an update
- pwm is not correct

---
 arch/arm/boards/Makefile                    |   2 +
 arch/arm/boards/skovarm9cpu/Makefile        |   3 +
 arch/arm/boards/skovarm9cpu/lowlevel_init.c | 130 +++++++++++
 arch/arm/boards/skovarm9cpu/of_init.c       | 101 ++++++++
 arch/arm/configs/skovarm9cpu_defconfig      |  83 +++++++
 arch/arm/dts/Makefile                       |   2 +
 arch/arm/dts/skovarm9cpu.dts                | 351 ++++++++++++++++++++++++++++
 arch/arm/mach-at91/Kconfig                  |  10 +
 images/Makefile.at91                        |   4 +
 9 files changed, 686 insertions(+)
 create mode 100644 arch/arm/boards/skovarm9cpu/Makefile
 create mode 100644 arch/arm/boards/skovarm9cpu/lowlevel_init.c
 create mode 100644 arch/arm/boards/skovarm9cpu/of_init.c
 create mode 100644 arch/arm/configs/skovarm9cpu_defconfig
 create mode 100644 arch/arm/dts/skovarm9cpu.dts
arch/arm/boards/Makefile +2 -0
index ca187ccb8..541c367e4 100644
@@ -150,3 +150,5 @@ obj-$(CONFIG_MACH_WARP7)			+= element14-warp7/
 obj-$(CONFIG_MACH_VF610_TWR)			+= freescale-vf610-twr/
 obj-$(CONFIG_MACH_ZII_RDU2)			+= zii-imx6q-rdu2/
 obj-$(CONFIG_MACH_ZII_VF610_DEV)		+= zii-vf610-dev/
+
+obj-$(CONFIG_MACH_SKOVARM9CPU)			+= skovarm9cpu/
arch/arm/boards/skovarm9cpu/Makefile new file +3 -0
new file mode 100644
index 000000000..5b7c8a6cb
@@ -0,0 +1,3 @@
+obj-y += of_init.o
+
+lwl-y += lowlevel_init.o
arch/arm/boards/skovarm9cpu/lowlevel_init.c new file +130 -0

130 lines not on this page · raw message

arch/arm/boards/skovarm9cpu/of_init.c new file +101 -0

101 lines not on this page · raw message

arch/arm/configs/skovarm9cpu_defconfig new file +83 -0

83 lines not on this page · raw message

arch/arm/dts/Makefile +2 -0
index 0526a6f40..2496838c4 100644
@@ -107,4 +107,6 @@ pbl-dtb-$(CONFIG_MACH_ZII_VF610_DEV) += \
 pbl-dtb-$(CONFIG_MACH_AT91SAM9263EK_DT) += at91sam9263ek.dtb.o
 pbl-dtb-$(CONFIG_MACH_AT91SAM9X5EK) += at91sam9x5ek.dtb.o
 
+pbl-dtb-$(CONFIG_MACH_SKOVARM9CPU) += skovarm9cpu.dtb.o
+
 clean-files := *.dtb *.dtb.S .*.dtc .*.pre .*.dts *.dtb.lzo
arch/arm/dts/skovarm9cpu.dts new file +351 -0

351 lines not on this page · raw message

arch/arm/mach-at91/Kconfig +10 -0
index 0a9cf3ad1..81f2050fa 100644
@@ -531,6 +531,16 @@ config AT91_MULTI_BOARDS
 
 if AT91_MULTI_BOARDS
 
+config MACH_SKOVARM9CPU
+	bool "SKOV ARM9 CPU"
+	select OFDEVICE
+	select COMMON_CLK_OF_PROVIDER
+	select HAVE_AT91_USB_CLK
+	select HAVE_AT91_BOOTSTRAP
+	select AT91SAM926X_BOARD_INIT
+	help
+	  Say y here if you are using SKOV's ARM9 CPU board
+
 config MACH_AT91SAM9263EK
 	bool "Atmel AT91SAM9263-EK"
 	depends on ARCH_AT91SAM9263
images/Makefile.at91 +4 -0
index c7d86563a..4288cfe7a 100644
@@ -9,3 +9,7 @@ image-$(CONFIG_MACH_AT91SAM9X5EK) += barebox-at91sam9x5ek.img
 pblx-$(CONFIG_MACH_AT91SAM9263EK) += start_at91sam9263ek
 FILE_barebox-at91sam9263ek.img = start_at91sam9263ek.pblx
 image-$(CONFIG_MACH_AT91SAM9263EK) += barebox-at91sam9263ek.img
+
+pblx-$(CONFIG_MACH_SKOVARM9CPU) += start_skovarm9cpu
+FILE_barebox-skovarm9cpu.img = start_skovarm9cpu.pblx
+image-$(CONFIG_MACH_SKOVARM9CPU) += barebox-skovarm9cpu.img
Signature · 7 lines
2.12.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw
Quoted 33 lines · Sam Ravnborg

Hi all.

I have a proprietary target with an AT91SAM9263 CPU. I have at91bootstrap running and barebox load fine.

When I try to boot the kernel it stop after Uncompressing...

Log snip:

chunk_get_cached: found 7287 in 7
fat_read: 0 3421056 3421056 23bab76c
OF: ** translation for device /ahb/nor_flash@10000000 **
OF: bus is default (na=1, ns=1) on /ahb
OF: parent bus is default (na=1, ns=1) on
OF: empty ranges; 1:1 translation
OF: with offset: 10000000
OF: reached root node
OF: ** translation for device /ahb/nor_flash@10000000 **
OF: bus is default (na=1, ns=1) on /ahb
OF: parent bus is default (na=1, ns=1) on
OF: empty ranges; 1:1 translation
OF: with offset: 10000000
OF: reached root node
eth_of_fixup_node: no valid mac address, cannot fixup __request_region ok: 0x21495000:0x2149c300
commandline: root=/dev/disk0.1 rootfstype=ext4 rw rootwait console=ttyS0,115200 booting kernel with devicetree
exitcall-> 0x23e073c0
exitcall-> 0x23e0c004
exitcall-> 0x23e415c8
Uncompressing Linux... done, booting the kernel.

Quoted 3 lines

The barebox commands to boot the kernel was:

$ mount -a
$ bootm /mnt/disk0.0/zImage

The output of bootm -v might be useful. Have you tried earlyprintk or earlyconsole?

You have specified the memory in the devicetree. This should not disturb, but looks unnecessary.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

Hi Sascha.

Quoted 34 lines · Sascha Hauer
Quoted 33 lines · Sam Ravnborg

Hi all.

I have a proprietary target with an AT91SAM9263 CPU. I have at91bootstrap running and barebox load fine.

When I try to boot the kernel it stop after Uncompressing...

Log snip:

chunk_get_cached: found 7287 in 7
fat_read: 0 3421056 3421056 23bab76c
OF: ** translation for device /ahb/nor_flash@10000000 **
OF: bus is default (na=1, ns=1) on /ahb
OF: parent bus is default (na=1, ns=1) on
OF: empty ranges; 1:1 translation
OF: with offset: 10000000
OF: reached root node
OF: ** translation for device /ahb/nor_flash@10000000 **
OF: bus is default (na=1, ns=1) on /ahb
OF: parent bus is default (na=1, ns=1) on
OF: empty ranges; 1:1 translation
OF: with offset: 10000000
OF: reached root node
eth_of_fixup_node: no valid mac address, cannot fixup __request_region ok: 0x21495000:0x2149c300
commandline: root=/dev/disk0.1 rootfstype=ext4 rw rootwait console=ttyS0,115200 booting kernel with devicetree
exitcall-> 0x23e073c0
exitcall-> 0x23e0c004
exitcall-> 0x23e415c8
Uncompressing Linux... done, booting the kernel.

Quoted 6 lines
Quoted 3 lines

The barebox commands to boot the kernel was:

$ mount -a
$ bootm /mnt/disk0.0/zImage

The output of bootm -v might be useful. Have you tried earlyprintk or earlyconsole?

Nope, I will try this. Thanks for the hints. I somehow missed the -v option to bootm yesterday but increased the loglevel as can be seen above.

Quoted 2 lines

You have specified the memory in the devicetree. This should not disturb, but looks unnecessary.

The intent is to make the DT as complete as possible, for use by both barebox and the kernel. So in the end I have only one DT, which is passed from barebox to the kernel. I plan to use fixup's to select the correct display.

The timing needs to be included in panel-simple, but using fixups allows the logic to be part of the barebox board specific parts and not a hack in the kernel. But let me get the kernel started first...

Sam

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#3 lore raw
In reply to Sascha Hauer

Hi Sascha.

Quoted 1 line

The output of bootm -v might be useful.

This setting is 'hidden' in General Setttings which is why I missed it.

Quoted 1 line

Have you tried earlyprintk or earlyconsole?

earlyprintk did the trick.
Now I can see the output of the kernel boot and can see it bails out with a null-reference.

So all good, now I can move forward again.

Sam

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox