3.9.0+ Device-tree kernels

(1/15) > >>

cbxbiker61:
OK, well I've been converting to devicetree based kernels for arm.  This will allow me to properly support quite a few variations of the kirkwood and dove based devices, others as well (DeviceTree is awesome from a distribution standpoint).

UPDATE-KERNEL.sh will work with the kernel's starting at 3.9.0, for anything prior, continue to use the older scripts.

The UPDATE-KERNEL.sh is a work-in-progress, right now I know it works properly on SheevaPlug's and CuBox's.  Theoretically it will work for the other variations as well, feedback would be appreciated.

UPDATE-KERNEL.sh attempts to identify the device based on entries in the /proc filesystem.  In those cases where it id's the device correctly, all that is necessary is "sudo ./UPDATE-KERNEL.sh 3.9.0", for devices that aren't id'd correctly "sudo ./UPDATE-KERNEL.sh 3.9.0 device-type" should work.

The earliest version of UPDATE-KERNEL.sh, wasn't optimal (from a distribution standpoint), and I rewrote it to download the zImage and a corresponding .dtb file, that will be the version that you want.  You can grab it from http://www.xilka.com/sheeva/tmp/UPDATE-KERNEL.sh (the version in /sheeva should be OK after the web server caches have a chance to update).  Keep in mind that I haven't got auto detection setup properly for devices other than SheevaPlug, SheevaPlug-eSATA and CuBox.  After you have installed a device-tree kernel, from that point on the auto-detection should work reliably since I can use entries in /proc/device-tree.

bad_gui:
I ran the new script on my Guruplug plus and it gabbed this:

kirkwood-sheevaplug-3.9.0.dtb

instead of this

kirkwood-guruplug-server-plus-3.9.0.dtb

I did a netinstall of Wheezy a while ago (Linux guruplug 3.2.0-4-kirkwood #1 Debian 3.2.41-2 armv5tel GNU/Linux)
so my /proc/device-tree is empty

My /proc/cpuinfo shows this

Code:

Processor       : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS        : 1191.11
Features        : swp half thumb fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant     : 0x2
CPU part        : 0x131
CPU revision    : 1

Hardware        : Marvell eSATA SheevaPlug Reference Board
Revision        : 0000
Serial          : 0000000000000000



Since the wrong .dtb file was downloaded, then the wrong uImage was created (if I understand this function correctly)

Code:

MkImage()
{
        cat $Platform-$KVer-zImage $Platform-$Device-$KVer.dtb > /tmp/zImage.$Device$$

        $MKIMAGE -A arm -O linux -C none  -T kernel -a 0x00008000 -e 0x00008000 \
                -n "Linux-$Platform-$Device-$KVer" \
                -d /tmp/zImage.$Device$$ \
                $Platform-$Device-$KVer-uImage

        rm /tmp/zImage.$Device$$
}

cbxbiker61:
Yes, that's correct it created a wrong uImage.  I think I need to rewrite it so that a second parameter will always override the assumed device.  That should take care of that.  I'm sure in the meantime you could patch the script to do that.

bad_gui:
I deleted all downloaded files (including the new ones in /boot), edited the script to
define  AssumedDevice='guruplug-server-plus' and it ran without errors.  I copied the
new kirkwood-guruplug-server-plus-3.9.0-uImage to /boot/uImage
and rebooted but the system froze after booting kernel.

When I try a cold reboot I get this

Code:

Reset IDE: ide_preinit failed
** Bad partition 1 **
** Bad partition 1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!


Here is the (relevant snip) boot command from printenv

bootcmd=setenv bootargs $(bootargs_console); run bootcmd_sata; bootm 0x00800000 0x01100000
bootcmd_sata=ide reset; ext2load ide 0:1 0x00800000 /uImage; ext2load ide 0:1 0x01100000 /uInitrd

Here is the content of /boot    It seems to me that the initrd.img is specific for kernel 3.2.0-4-kirkwood
and that is causing the problem?

Code:

drwxr-xr-x 2 root root   12288 Jan 23 21:33 lost+found
lrwxrwxrwx 1 root root      24 Jan 23 21:47 vmlinuz -> vmlinuz-3.2.0-4-kirkwood
lrwxrwxrwx 1 root root      27 Jan 23 21:47 initrd.img -> initrd.img-3.2.0-4-kirkwood
-rw-r--r-- 1 root root 1606512 Mar 27 15:40 vmlinuz-3.2.0-4-kirkwood
-rw-r--r-- 1 root root 1207425 Mar 27 15:41 System.map-3.2.0-4-kirkwood
-rw-r--r-- 1 root root  107503 Mar 27 15:41 config-3.2.0-4-kirkwood
-rw-r--r-- 1 root root 1606576 Apr  8 23:22 uImage.bak-kernel-3.2.04-kirkwood
-rw-r--r-- 1 root root 7360243 Apr  8 23:22 uInitrd.bak
-rw-r--r-- 1 root root 7439034 Apr 25 20:27 initrd.img-3.2.0-4-kirkwood
-rw-r--r-- 1 root root 1606576 Apr 25 20:27 uImage-kernel-3.2.04-kirkwood
-rw-r--r-- 1 root root 7439098 Apr 25 20:27 uInitrd
-rw-r--r-- 1 root root 1497556 Apr 30 21:52 kirkwood-3.9.0-System.map
-rw-r--r-- 1 root root 2455457 Apr 30 21:52 kirkwood-guruplug-server-plus-3.9.0-uImage
-rw-r--r-- 1 root root 1606576 May  1  2013 uImage

bad_gui:
After reading more about uInitrd I realize that isn't the problem

I tried booting the new 3.9.0 kernel from a tftp server and got the same freeze


Code:

Marvell>> bootm 0x800000
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-kirkwood-guruplug-server-p
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2455393 Bytes = 2.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
Using machid 0xa76 from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.


This seems linke the problem described on the bottom of this page
 http://wiki.beyondlogic.org/index.php/GuruPlug_Building_Kernel

but the config file for 3.9.0
http://www.xilka.com/sheeva/3/3.9/3.9.0/release/1/kirkwood-3.9.0.config
shows that the relevant change was made for compatibility with old u-boot versions

Quote

CONFIG_VECTORS_BASE=0xffff0000
# CONFIG_ARM_PATCH_PHYS_VIRT is not set
CONFIG_PHYS_OFFSET=0x0



Anyone have any suggestions on how to troubleshoot this?

Navigation

[0] Message Index

[#] Next page