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

Re: Cubox-i with Debian Stock Kernel



Hi Ian,

thanks for your quick reply.

Am 30.05.2014 13:28, schrieb Ian Campbell:
On Fri, 2014-05-30 at 12:36 +0200, Rainer Dorsch wrote:
Hello,

I debootstrapped sid for my cubox-i and installed a Debian stock kernel.
Thanks for the descriptions at

https://wiki.debian.org/ArmHardFloatPort/CuBox-i

from Steve and the therein referenced blog post from Gunnar.

The good news: it is up and running

root@bokocube:~# uname -a
Linux bokocube 3.15-rc5-armmp #1 SMP Debian 3.15~rc5-1~exp1 (2014-05-16)
armv7l GNU/Linux
root@bokocube:~# cat /proc/device-tree/model
SolidRun Cubox-i Dual/Quadroot@bokocube:~#

What I did is to use mkimage to create an u-boot image of the kernel+dtb
and initrd.
By u-boot image do you mean you ran mkimag to create uImage and
uInitrd/uRamdisk or did you create some sort of single encapsulated
thing? Does the Cubox-i u-boot support bootz or just bootm?

I merget kernel and dtb together (but that is probably not even needed):

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 essentially to boot

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 98 ms (28 MiB/s)
CuBox-i U-Boot >  ext4load mmc 0:2 0x12800000 /uInitrd
10909117 bytes read in 388 ms (26.8 MiB/s)
CuBox-i U-Boot > bootm 0x10800000 0x12800000
## Booting kernel from Legacy Image at 10800000 ...
   Image Name:   Debian-cubox-i4q-i-3.15-rc5
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2881843 Bytes = 2.7 MiB
   Load Address: 10008000
   Entry Point:  10008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 12800000 ...
   Image Name:   Debian-cubox-i4q-i-3.15-rc5
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    10909053 Bytes = 10.4 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Note, the address 0x12800000 I guessed, not sure if that is a good thing todo...

How do I find out, if bootz is supported?

This forum post implies that bootz should be supported

https://imx.solid-run.com/forums/viewtopic.php?f=10&t=995#p7419

(but not sure if it is true)


  Then I manually set the u-boot (setenv) and got the the
sytem up and running.

The are a few open issues left though. Any feedback and guidance if I am
on the right track here is welcome.

1) For each reboot, I manually have to enter the u-boot setup

I could use the u-boot cmd interface to save to set the settings when
once configured correctly. Is that the way to go?

Is there a way to set the proper settings from Debian itself (e.g.
create a u-boot.img and dd it into the mmc) ?

2) For each kernel update, I have to convert them to u-boot images using
mkimage

Would creating a flash-kernel db here be the way to go?
I think so, yes.

The best answer to #1 would be that flash-kernel would create/populate
the right thing that the factory default u-boot settings would find and
boot it (what this involves depends very, much on the platform it might
mean writing /boot/boot.scr or it might mean writing uImage to a
specific flash partition etc)
3) The functionality is limited, e.g. no video out, only serial console

Not a serious issue for me, because that is enough is running for my
usecase right now. But I wanted to mention that in case others follow
that way and only find out at the end that their usecase is not supported.
It would be useful to record this stuff via wiki.debian.org/DebianOn.

I have a lot of notes. As soon as I have a process which is reasonably stable, I plan to update

https://wiki.debian.org/ArmHardFloatPort/CuBox-i

Does it make sense to add a link from

wiki.debian.org/DebianOn

or should the entire stuff moved?

Thanks,
Rainer

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


Reply to: