Converting kirkwood-goflexnet to DTS

6 messages, 3 authors, 2012-06-15 · open the first message on its own page

Converting kirkwood-goflexnet to DTS

From: andrew@lunn.ch (Andrew Lunn)
Date: 2012-06-14 14:17:06

Hi Josh

Welcome to the fun...

# CONFIG_SERIAL_OF_PLATFORM is not set

You need this one, if you want the serial ports to work...  Also,
don't be surprised when they do work, even though IRQ=0!

It is a good idea to build the kernel with earlyprintk support and to
pass it as a kernel parameter.

Also, -rc2 is FUBAR on all Orion platforms, unless you have:

http://comments.gmane.org/gmane.linux.ports.arm.kernel/170442

	Andrew

Converting kirkwood-goflexnet to DTS

From: Josh Coombs <hidden>
Date: 2012-06-14 22:16:14

Finally some progress.  Using the printk patch along with earlyprintk
and the config tweaks as suggested, my kernel at least now shows why
it's dying:

--------------------------
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.5.0-rc2-ARCH
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3015272 Bytes = 2.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000c11).

Available machine support:

ID (hex)        NAME
ffffffff        Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.
--------------------------

Obviously, I've missed something with my work as my machine is not
showing up as a supported unit in that list.  At least the machine ID
being detected is correct, so that's a plus.

I should be able to crack this and have another test kernel in 4
hours, I'm hoping with good results.

Josh C

Converting kirkwood-goflexnet to DTS

From: Josh Coombs <hidden>
Date: 2012-06-15 04:53:45

On Thu, Jun 14, 2012 at 6:16 PM, Josh Coombs [off-list ref] wrote:
Finally some progress. ?Using the printk patch along with earlyprintk
and the config tweaks as suggested, my kernel at least now shows why
it's dying:

--------------------------
## Booting kernel from Legacy Image at 00800000 ...
? Image Name: ? Linux-3.5.0-rc2-ARCH
? Image Type: ? ARM Linux Kernel Image (uncompressed)
? Data Size: ? ?3015272 Bytes = 2.9 MiB
? Load Address: 00008000
? Entry Point: ?00008000
? Verifying Checksum ... OK
? Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000c11).

Available machine support:

ID (hex) ? ? ? ?NAME
ffffffff ? ? ? ?Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.
--------------------------
I'm still stuck with the same error.  I'm working against 5.2rc2 with
the Orion/kirkwood printk.c patch.

I'm not 100% on proper etiquette here so rather than spam first and
get scolded, I've pastebined the relevant info.

My current patchset is here: http://pastie.org/4090298
The stripped kernel conf I'm using is here: http://pastie.org/4090323

I'm including all but the iconnect flattened tree board types in my
config, included DTS early testing, and am appending the DTS
definitions to the end of the kernel as I don't expect my uboot to
play nice, so I'm rather surprised to not see any of the boards show
up as supported with that boot error.  I feel like this has got to be
a kernel conf issue, or I'm missing a step in preparing a DTS based
kernel.

I also know my board definition will need cleanup to support both the
GoFlex Net and Home but went this way just to test the concept first.

Josh C

Converting kirkwood-goflexnet to DTS

From: Thomas Petazzoni <hidden>
Date: 2012-06-15 08:41:40

Hello,

Le Fri, 15 Jun 2012 00:53:45 -0400,
Josh Coombs [off-list ref] a ?crit :
quoted
Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000c11).

Available machine support:

ID (hex) ? ? ? ?NAME
ffffffff ? ? ? ?Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.
--------------------------
I'm still stuck with the same error.  I'm working against 5.2rc2 with
the Orion/kirkwood printk.c patch.

I'm not 100% on proper etiquette here so rather than spam first and
get scolded, I've pastebined the relevant info.

My current patchset is here: http://pastie.org/4090298
The stripped kernel conf I'm using is here: http://pastie.org/4090323

I'm including all but the iconnect flattened tree board types in my
config, included DTS early testing, and am appending the DTS
definitions to the end of the kernel as I don't expect my uboot to
play nice, so I'm rather surprised to not see any of the boards show
up as supported with that boot error.  I feel like this has got to be
a kernel conf issue, or I'm missing a step in preparing a DTS based
kernel.

I also know my board definition will need cleanup to support both the
GoFlex Net and Home but went this way just to test the concept first.
Seems like your kernel isn't seeing the appended DTB, and therefore
falls back at looking at r1 for a machine ID. Can you detail the
command line you're using to build your kernel?

What I'm doing is:

 1) Build the zImage

 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4

 2) Build the DTB

 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- armada-xp-db.dtb

 3) Concatenate zImage+DTB

 arch/arm/boot/zImage arch/arm/boot/armada-xp-db.dtb  > zImage-armada-xp.dtb

 4) Run mkimage on it

 /bin/bash scripts/mkuboot.sh -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n 'Linux-marvell' -d zImage-armada-xp.dtb arch/arm/boot/uImage.armada-xp

 5) Boot arch/arm/boot/uImage.armada-xp

Of course, in the final step, you need to adjust the -a and -e options
as needed for your platform. But apparently, your platform uses the
same addresses.

Are you doing something similar to prepare your uImage? As far as I
know, the kernel build process does not automatically append the DTB,
so you have to do it manually as detailed above.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

Converting kirkwood-goflexnet to DTS

From: Josh Coombs <hidden>
Date: 2012-06-15 12:40:48

Thomas, Andrew,

You were both correct.  After one additional test failure last night
and a lot more reading I reached the same conclusion, I was foolishly
thinking .dtbs would be automatically appended to the kernel when
configured to support that method of including them.

What I did this morning:

make
make kirkwood-goflexnet.dtb
cat arch/arm/boot/kirkwood-goflexnet.dtb >> arch/arm/boot/zImage
make uImage

That resulted in: http://pastie.org/4092019

Boots, with some serious errors, doesn't seem to mount a FS and stops.
 Reducing my kernel arguments down to "console=ttyS0,115200
earlyprintk rootfs=/dev/sda1 rootdelay=10" I see the same errors, but
I also show the key hardware involved being detected, and the nand
partitioning looks correct.  My status LED goes solid green, so it
appears something is working right.  I'll dig into goflexnet_init next
to try and determine what is wrong in there.

Josh C

Converting kirkwood-goflexnet to DTS

From: Thomas Petazzoni <hidden>
Date: 2012-06-15 12:53:41

Josh,

Le Fri, 15 Jun 2012 08:40:48 -0400,
Josh Coombs [off-list ref] a ?crit :
You were both correct.  After one additional test failure last night
and a lot more reading I reached the same conclusion, I was foolishly
thinking .dtbs would be automatically appended to the kernel when
configured to support that method of including them.
Yeah, but the DTB append feature is only a development/debugging
feature provided to allow DT-related development with non-DT capable
bootloaders. However, my understanding is that it is assumed that
people should ultimately use DT-capable bootloaders.
That resulted in: http://pastie.org/4092019

Boots, with some serious errors, doesn't seem to mount a FS and stops.
 Reducing my kernel arguments down to "console=ttyS0,115200
earlyprintk rootfs=/dev/sda1 rootdelay=10" I see the same errors, but
I also show the key hardware involved being detected, and the nand
partitioning looks correct.  My status LED goes solid green, so it
appears something is working right.  I'll dig into goflexnet_init next
to try and determine what is wrong in there.
Haven't looked at the details, but aren't certain devices registered
multiple times?

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help