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

Re: flash-kernel and dtb



Hi Ian,

On Saturday 14 June 2014 14:23:33 you wrote:
> On Sat, 2014-06-14 at 14:42 +0200, Rainer Dorsch wrote:
> > On Saturday 14 June 2014 13:35:40 Ian Campbell wrote:
> > > Your boot command should load and then source the boot.scr which
> > > flash-kernel has created, it contains the right things and is
> > > automatically updated when the kernel/initramfs/etc changes.
> > 
> > Wow, that is a nice solution. Is there somewhere the boot.cmd out of which
> > mkimage generates the boot.scr ?
> 
> I don't think it is preserved anywhere. You can extract it with
>     dd if=/boot/boot.scr bs=64 skip=1 of=/tmp/boot.cmd

That is very helpful.

root@bokocube:~# cat /root/boot.cmd 
5# boot script for CuBox-i

setenv device mmc
setenv partition ${mmcdev}:${mmcpart}
setenv bootargs 'quiet'

image_locations='/boot/ /'
kvers='3.15-rc8-armmp'

for pathprefix in ${image_locations}
do
  load ${device} ${partition} ${loadaddr} ${pathprefix}vmlinuz-${kvers} \
  && load ${device} ${partition} ${fdt_addr} ${pathprefix}dtb-${kvers} \
  && load ${device} ${partition} ${ramdiskaddr} 
${pathprefix}initrd.img-${kvers} \
  && echo "Booting Debian ${kvers} from ${device} ${partition}..." \
  && bootz ${loadaddr} ${ramdiskaddr}:${filesize} ${fdt_addr}
done
root@bokocube:~# 

I try to get the kernel up with manual tweaks in u-boot first:

CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: POR
Board: MX6-CuBox-i
DRAM:  2 GiB
MMC:   FSL_SDHC: 0
In:    serial
Out:   vga
Err:   vga
Net:   FEC
(Re)start USB...
USB0:   lowlevel init failed
USB1:   USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
Hit any key to stop autoboot:  0 
CuBox-i U-Boot >  setenv mmcdev 0
CuBox-i U-Boot > setenv mmcpart 2
CuBox-i U-Boot > setenv ramdiskaddr 0x11800000
CuBox-i U-Boot > setenv fdt_addr 0x18000000
CuBox-i U-Boot > setenv scr_addr 0x19900000
CuBox-i U-Boot > ext4load mmc 0:2 0x19900000 /boot/boot.scr
637 bytes read in 94 ms (5.9 KiB/s)
CuBox-i U-Boot > source 0x19900000
## Executing script at 19900000
2857680 bytes read in 248 ms (11 MiB/s)
28603 bytes read in 126 ms (221.7 KiB/s)
10934444 bytes read in 620 ms (16.8 MiB/s)
Booting Debian 3.15-rc8-armmp from mmc 0:2...
Kernel image @ 0x10800000 [ 0x000000 - 0x2b9ad0 ]
## Flattened Device Tree blob at 18000000
   Booting using the fdt blob at 0x18000000
EHCI failed to shut down host controller.
   Loading Ramdisk to 8ecf1000, end 8f75e8ac ... OK
   Using Device Tree in place at 18000000, end 18009fba

Starting kernel ...


but then the boot process is stuck.

What looks weired is the location the ramdisk is loaded to....

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


Reply to: