Welcome! Log In Create A New Profile

Advanced

kernel 3.5 and device-tree support...

Posted by davygravy 
Re: kernel 3.5 and device-tree support...
August 09, 2012 10:43AM
Can you pastebin your .config as well as the arch/arm/boot/dts file and your arch/arm/mach-kirkwood board file?
Alan
Re: kernel 3.5 and device-tree support...
August 09, 2012 11:06AM
Yeah

here is the .config:

http://pastebin.com/EjLQnecj

the dts file:

http://pastebin.com/PPZpE0tg

the board file:

http://pastebin.com/Dda3x0fP

i havent used pastebin before so i put them up for a day if you need them again let me know.
Re: kernel 3.5 and device-tree support...
August 09, 2012 11:29AM
I'll see what I can sort out tonight, everything looks ok at first glance, although the GE0 setup is a bit odd...

Edit: I think I see it, you need to update your .config

CONFIG_ARM_APPENDED_DTB needs to be enabled so you can append the DTS to the zImage before doing make uImage.



Edited 1 time(s). Last edit at 08/09/2012 11:30AM by Kurlon.
Alan
Re: kernel 3.5 and device-tree support...
August 09, 2012 11:35AM
Yeah when installing debian from the openrd images it comes up with 2 ethernet ports and you have to select the ethernet 1 instead of 0 for it to get to the network.

But i cant see that affecting the sata's unless there is something more thats missing from the kernel config. how do you append the dtb to the zimage incase that is where im going wrong?
Re: kernel 3.5 and device-tree support...
August 09, 2012 11:40AM
From my prior posts:

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

Replace kirkwood-goflexnet.dtb with the right name for yours, and put the generated uImage wherever is appropriate for your device.
Alan
Re: kernel 3.5 and device-tree support...
August 09, 2012 01:09PM
No i just tried with those changes to the config and it still hangs at the sata and populating /dev.

sata_mv sata_mv.0: cannot get optional clkdev
[   24.374413] sata_mv sata_mv.0: slots 32 ports 2
[ ok 4.438393] uncorrectable error : udevd[370]: timeout 'scsi_id --whitelisted --replace-whitespace -p0x80 -d/dev/sda'

udevd[370]: timeout '/sbin/blkid -o udev -p /dev/sda'

udevd[378]: timeout: killing '/sbin/modprobe -b platform:sata_mv' [404]

It would hardly be that i have the arcNumber set in uBoot would it?
Re: kernel 3.5 and device-tree support...
August 09, 2012 01:11PM
When you boot a DT kernel with a .dtb appended the arcNumber shouldn't matter. Can't hurt to try booting with the arcNumber unset though?
Alan
Re: kernel 3.5 and device-tree support...
August 09, 2012 01:30PM
Nope booting with no arcNumber doesnt seem to have any effect.
Alan
Re: kernel 3.5 and device-tree support...
August 09, 2012 01:35PM
just thaught that since its the sata causing a problem would it be to do with this part of the dts file:

sata@80000 {
			status = "okay";
			nr-ports = <2>;

since thats just copied from the goflexnet dts maybe the sata@80000 needs to be a different number?
Re: kernel 3.5 and device-tree support...
August 09, 2012 01:37PM
I'm not 100% convinced it's the SATA, AFAIK the address is fixed for them on Kirkwood. Do you have two ports?
Re: kernel 3.5 and device-tree support...
August 09, 2012 01:44PM
I just decided to create an account so i can edit my posts if i think iv found something new.

Yeah i have 2 ports and i just looked through a couple of the devices and the ones that have the sata seem to have the same sata@80000.

it seems to be haveing trouble with some kind of clock here:
sata_mv.0: cannot get optional clkdev

and i seen this in one of the other kirkwood devices i wonder would it do anything?
i2c@11000 {
			status = "okay";
			clock-frequency = <400000>;

			s35390a: s35390a@30 {
				compatible = "s35390a";
				reg = <0x30>;
			};
		};
Re: kernel 3.5 and device-tree support...
August 09, 2012 01:52PM
You would only define i2c if your board has it. I want to say you had an i2c connection defined in your board file, in which case you can remove it from there and add it to the DTS, but I don't believe that's the hangup. SATA is complaining about a completely optional item, I've got to fire my GFN up when I get home to see if it makes a similar complaint.
Re: kernel 3.5 and device-tree support...
August 09, 2012 02:06PM
I actually have a GFN here aswel but i dont have any drives or o's on it at the minute and it takes hours to install debian to a usb stick on it (at least in my experience it did anyway) and i have no spare drives to put into it.

in the board config i have an i2c :
static struct i2c_board_info __initdata ix2200_i2c = {
	I2C_BOARD_INFO("lm63", 0x4c),
};

what about the thing that comes up befor the hang:
 Synthesizing the initial hotplug events...udevd[370]: timeout 'scsi_id --whitelisted --replace-whitespace -p0x80 -d/dev/sda'
Does that mean anything?
Re: kernel 3.5 and device-tree support...
August 09, 2012 02:15PM
Well, it means you're getting well past kernel init and running multiuser (udev is firing off), which you were before as well. As to why it's going pearshaped for udev I'm not certain.
Re: kernel 3.5 and device-tree support...
August 09, 2012 02:26PM
This is a longshot but since im running wheezy its hardly something in it thats messing up would it?

Also i moved the i2c into the dts luckily the iconnect had the same lm63 so that made that easy.

edit:
since im booting from a usb should i do something with this line thats in the board config file?
	kirkwood_ehci_init();

edit 2:
this is how the dts fie looks now:

http://pastebin.com/Zbc4j3Ck

and this is the board config file:

http://pastebin.com/RnNZFpQN

edit 3:

i just realised / remembered that when the nas boots it pauses / waits for the sata drives to spin up at that same spot on a working kernel so prehaps the delay / wait for the drives to detect / spinup is gone so it sees it as the sata arent working?

edit 4:

1 more edit before i call it a night for today. i compiled a 3.4.5 kernel and it compiles 790 modules takeing the config file from that and using it to build the 3.6 rc kernel it only builds 710 modules. Maybe something has been removed or renamed that it needs.



Edited 4 time(s). Last edit at 08/09/2012 04:53PM by Buttzy10169.
Re: kernel 3.5 and device-tree support...
August 10, 2012 03:30AM
I seem to be getting a kernel panic now today this is the most i can get from the kernel panic when it tries to load unless anyone knows how i can capture the entire panic?

http://pastebin.com/wyBJEiuy

edit1:

i removed a kirkwood init line from the board config file and that seem's to of gotten rid of the kernel panic but now during boot it just seems to stop with:
turn off boot console earlycon0

edit2:
the kernel panic happens if i leave this in the board file:
kirkwood_init();

without that the boot now just seems to stop with the above mentioned:
turn off boot console earlycon0

edit 3:
i got by the error where it stops with the turning off the console by adding the following to the board config file:
kirkwood_uart0_init();
but now it tries to load the root fs but cant find any i just get:
Waiting 10sec before mounting root device...
[   29.974590] List of all partitions:
[   29.978106] 1f00            3072 mtdblock0  (driver?)
[   29.983186] 1f01            4096 mtdblock1  (driver?)
[   29.988282] No filesystem could mount root, tried: 
[   29.993189] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
the root file system is just an ext2 partition so it should mount?



Edited 3 time(s). Last edit at 08/10/2012 10:53AM by Buttzy10169.
rpress
Re: kernel 3.5 and device-tree support...
August 10, 2012 11:42AM
I have U-boot built with FDT support and kernel 3.6.0-rc1 working on the iConnect. No appending needed for the blob. Next I will get this working on my GoFlexNet, I'll let you know how I get on.
Re: kernel 3.5 and device-tree support...
August 10, 2012 11:48AM
Im working on the iomega ix2-200 not the goflex net the goflexnet already has a new uboot and support in 3.6 rc1 kernel

This is as far as iv gotten with the ix2-200 but it wont boot it tries to mount the root filesystem before it has even detected the usb or anything I could realy use someone's help as i have no clue where to go from here:

this is the dts file for the ix2-200:

http://pastebin.com/M14vzjnQ

this is the board config file at the minute:

http://pastebin.com/RkcJ4pEB

any help wopuld be apreciated.



Edited 1 time(s). Last edit at 08/10/2012 01:17PM by Buttzy10169.
rpress
Re: kernel 3.5 and device-tree support...
August 10, 2012 04:28PM
Well, turns out I have the same problem as you with the GoFlexNet. It hangs at sata_mv. So I don't think it's something you've done with your new device tree for the ix2, as I am running unmodified 3.6.0-rc1 and it does not work. I am running Debian squeeze.

The good news is that I was able to compile U-Boot with built-in FDT support and I can boot from SATA, albeit just one side. I'm not sure if the two SATA fix is in the u-boot-marvell.git repository yet.
Re: kernel 3.5 and device-tree support...
August 10, 2012 04:44PM
it must be something silly thats missing somewhere then coz the goflexnet was mainlined and you said it didnt work so it must be something very small somewhere. Im trying to boot from the usb though on my device.

Mine is getting weird now telling me the support is not there.and when it was attemting to boot it seemed to be trying to mount the rootfs way too early before any usb's or sata drives are detected the i got a kernel panic?
Re: kernel 3.5 and device-tree support...
August 10, 2012 04:50PM
I'm just about finished with a 3.5.1 Arch Arm kernel, once that's done I'll bang on 3.6-rc1 on my GFN and see if I can figure out what you guys are running into. FYI, I do use a root delay of 10 seconds on my GFN, might be worth a try if you're bombing due to trying to mount the rootfs too soon.
Re: kernel 3.5 and device-tree support...
August 10, 2012 04:57PM
I actualy have a root delay of 10 in mine aswel but it just waits the 10 seconds then panics.
Its not even getting to the part of trying to detect any usb's or sata drives.

if i build with support for just the rd88f6281 it gets to the point of trying to detect the sata but with my own ix2200 board config and dts it doesnt try to detect any usb's or sata's just tries to mount the rootfs then pancs when it can't.
rpress
Re: kernel 3.5 and device-tree support...
August 10, 2012 05:04PM
Alright, I have changed dts file to read nr-ports = <1> instead of <2>. Now it boots, and only one port is working as expected. So it's something to do with the additional port, which I suspect was not tested when put in the kernel mainline.

It may be something to do with my U-Boot, as it also does not detect both drives correctly. Buttzy10169, does your "ide reset" in U-Boot show two drives correctly? I have two of the same drives, but my U-Boot shows them as having even the same serial number which is wrong.
Re: kernel 3.5 and device-tree support...
August 10, 2012 05:12PM
Yeah it shows my 2 drives and the are the same both 2tb drives but the serials do show slightly different.

1 ends in zs the other ss. my uboot would be the origional marvell uboot aswel as i dont have a jtag to build and test new uboot's.
rpress
Re: kernel 3.5 and device-tree support...
August 10, 2012 05:23PM
I don't have JTAG either, I just live on the wild side and flash stuff to MTD0. Anyway I found a patch for U-Boot that fixed it and the two drives are now showing up with the right serial numbers. So that leaves something in the kernel that's wrong. I found some recent changes here:

https://patchwork.kernel.org/patch/1151271/
https://patchwork.kernel.org/patch/1151261/
Re: kernel 3.5 and device-tree support...
August 10, 2012 05:30PM
Looks like they have been changeing something in the sata_mv alright but thats about as much as i can make out of those patches. im gna try build for the rd88f6281 as thats what iv been working off of for my ix2-200 and thats what the origional patch modified to make it work. then i will see if it boots with it.

edit 1:
Nope that didn't work.



Edited 1 time(s). Last edit at 08/10/2012 05:55PM by Buttzy10169.
Re: kernel 3.5 and device-tree support...
August 11, 2012 01:30AM
Im beginning to think that the same way that the goflex net needed a new uboot to use the 3.2 kernels and beyond properly perhapt maybe now the ix2-200 needs a new uboot to be able to use kernels with device tree?

edit 1:
rpress How did you compile the new uBoot with the dts support?



Edited 1 time(s). Last edit at 08/11/2012 01:33AM by Buttzy10169.
Re: kernel 3.5 and device-tree support...
August 11, 2012 01:54AM
Hmm another problem I see with my iConnect is that the kernel only shows 128 MB RAM, whereas it is really 256 MB, and the old 3.4 kernel showed 256 MB. The GFN only has 128 MB, so this isn't a problem on that one. The DTS files look correct, I'm not sure where the problem is. How much RAM does the ix2-200 have?
Re: kernel 3.5 and device-tree support...
August 11, 2012 02:01AM
Buttzy10169 Wrote:
-------------------------------------------------------
> Im beginning to think that the same way that the
> goflex net needed a new uboot to use the 3.2
> kernels and beyond properly perhapt maybe now the
> ix2-200 needs a new uboot to be able to use
> kernels with device tree?
>
> edit 1:
> rpress How did you compile the new uBoot with the
> dts support?

I think the 3.2 problem was due to some L2 cache config problem. In my case the latest U-Boot and the latest kernel have that sata_mv problem.

I didn't try to append the DTB to the kernel file, I just went straight to the preferred method which is DTB from the bootloader. I compiled U-Boot with some patches found here, and added the #define CONFIG_OF_LIBFDT in the config header file. Then I was able to change the U-Boot scripts to load the DTB from the drive and execute bootm with the DTB address.
Re: kernel 3.5 and device-tree support...
August 11, 2012 02:13AM
did you change the dts file for the iconnect?

check the memory setting in the dts file and see if this is right for 256mb of ram:
memory {
		device_type = "memory";
		reg = <0x00000000 0x10000000>;

Would you have any idea on how to compile and run uboot from ram so i can test a new version? The ix2-200 has 256mb of ram aswel. But i cannot get the system booted with the kernel to see if it is showing up properly.



Edited 1 time(s). Last edit at 08/11/2012 02:15AM by Buttzy10169.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: