[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cubox-i with Debian Stock Kernel



Am 30.05.2014 15:04, schrieb Ian Campbell:
On Fri, 2014-05-30 at 14:13 +0200, Steve Langasek wrote:
There is already a branch for this in flash-kernel git, which I was waiting
for u-boot support on in unstable before proposing for merge.  U-Boot
support is there now, so maybe this is mergeable now.  Ian, would you like a
bug report for this?
Can we get the patch on the list for comment please? Looks like it might
want rebasing onto later flash-kernel?

Looking at the script in git, I'm not clear if the platform requires
uImage and bootm rather than bootz, it seems like the script tries both?
(or am I misreading it?) Also does it need appended DTB or does it
provide an FDT in firmware?

Latest flash-kernel allows the use of @@KERNEL_VERSION@@ in the boot.scr
and also automatically installs the appropriate dtb into /boot -- which
might simplify some things in the script?

Ian.



Just for reference, what works reliably for me:

# cat vmlinuz usr/lib/linux-image-3.15-rc5-armmp/imx6q-cubox-i.dtb > ImageDeb

# mkimage -A arm -O linux -C none -T kernel -a 0x10008000 -e 0x10008000 -n "Debian-cubox-i4q-i-3.15-rc5" -d ImageDeb uImage

# mkimage -A arm -O linux -T ramdisk -C gzip -n "Debian-cubox-i4q-i-3.15-rc5" -d boot/initrd.img-3.15-rc5-armmp uInitrd

Then in the bootloader (I should have taken rootpart 1 and created a boot.scr):

CuBox-i U-Boot > setenv rootfs ext4
CuBox-i U-Boot > setenv rootpart 2
CuBox-i U-Boot > setenv rootunit 0
CuBox-i U-Boot > setenv bootargs root=/dev/mmcblk0p2 rootfstype=ext4 ro rootwait console=ttymxc0,115200
CuBox-i U-Boot > ext4load mmc 0:2 0x10800000 /uImage
2881907 bytes read in 97 ms (28.3 MiB/s)
CuBox-i U-Boot > ext4load mmc 0:2 0x12800000 /uInitrd
** File not found /uInitrd **
CuBox-i U-Boot > ext4load mmc 0:2 0x12800000 /ramdisk
10909117 bytes read in 389 ms (26.7 MiB/s)
CuBox-i U-Boot > bootm 0x10800000 0x12800000


I tried bootz, but that did not work for me:

[...same root and boot args as above ...]
CuBox-i U-Boot > ext4load mmc 0:2 0x10800000 vmlinuz
2853240 bytes read in 272 ms (10 MiB/s)
CuBox-i U-Boot > ext4load mmc 0:2 0x18000000 imx6q-cubox-i.dtb
28603 bytes read in 149 ms (186.5 KiB/s)
CuBox-i U-Boot > ext4load mmc 0:2 0x12800000 initrd.img
10909053 bytes read in 480 ms (21.7 MiB/s)
CuBox-i U-Boot > bootz 0x10800000 0x12800000 0x18000000
Kernel image @ 0x10800000 [ 0x000000 - 0x2b8978 ]
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid
CuBox-i U-Boot >

The initird.img ramdisk, the zImage and the dtb are unmodified (just copied the dtb into root):

root@bokocube:/# file initrd.img
initrd.img: symbolic link to `/boot/initrd.img-3.15-rc5-armmp'
root@bokocube:/# file /boot/initrd.img-3.15-rc5-armmp
/boot/initrd.img-3.15-rc5-armmp: gzip compressed data, last modified: Thu May 29 21:55:53 2014, from Unix
root@bokocube:/#

Rainer

--
Rainer Dorsch
http://bokomoko.de/


Reply to: