On 10.09.2013, at 16:46, Stefan Seyfried wrote:
Am 10.09.2013 15:58, schrieb Guillaume Gardet:
Hi,
Le 10/09/2013 15:43, Stefan Seyfried a écrit :
Hi all,
I'm trying to get RasPi to boot with U-Boot, streamlined with the other ARM platforms (I guess).
Raspberry Pi is a bit special. ;)
I know :-)
boot.scr is a compiled version of boot.script. So it depends what you put in boot.script. We should use zImage from /boot in rootfs if possible.
I managed to do that.
Steps to achieve this:
1) I patched U-Boot to preserve the command line that the bootcode.bin passed to it (the bootcode.bin is loading the u-boot as a kernel, so it passes the commandline) and expose it as $bootargs_orig. Additionally I enabled ext2/ext4 Filesytems. Result is in home:seife:ARM/u-boot-rpib
2) installed my u-boot-rpib.rpm, copied /boot/u-boot.bin onto the FAT-partition (not renamed).
3) edit config.txt on the FAT partition, add the line
kernel=u-boot.bin
4) create a script, e.g. /tmp/boot.scr:
# u-boot script to boot from second partition, can be / or /boot prefixes="/boot/ /" kernel="zImage" dev=mmc part=0:2 # second partition # the boot args we got from the firmware loader setenv bootargs \"$bootargs_orig\" echo echo "searching for kernel in..." for prefix in $prefixes; do echo "\\c $prefix " # hush has no "break" command, so we must put this inside the loop... if load $dev $part $kernel_addr_r ${prefix}zImage; then echo echo "booting the kernel... good luck :-)" echo bootz $kernel_addr_r fi done
5) create a u-boot image from the script:
mkimage -A arm -T script -C none -n "RaspberryPi boot helper" \ -d /tmp/boot.scr /tmp/boot.scr.uimg
6) copy /boot.scr.uimg onto the FAT partition.
7) reboot, enjoy! :-)
The script searches zImage in the second partition, which should be ext2 or ext4. It searches first in /boot, if this fails it tries /, so that a setup with 3 partitions, first FAT, second ext2 /boot, third for rootfs will also work.
* who creates boot.scr.img?
It is you in the u-boot rpm build.
Well, I did not find anything in the u-boot build / spec file that would do this. I notice that other architectures also use a boot.scr, wo I was wondering which part of the build process actually creates this script / image file.
It's part of the JeOS package :). Oh, and thanks a lot for sitting down on this! I'm looking very much forward to a full ARMv6 tree with u-boot enabled Raspberry PI support :). Alex -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org