On 12.10.2012, at 10:05, Marcus Schäfer wrote:
Hi,
setenv ramdisk initrd setenv kernel uImage setenv initrd_high "0xffffffff" setenv fdt_high "0xffffffff" printenv kerneladdr || setenv kerneladdr ${kernel_addr_r} printenv ramdiskaddr|| setenv ramdiskaddr ${ramdisk_addr_r} setenv bootcmd "ext2load scsi 0:1 ${kerneladdr} uImage; ext2load scsi 0:1 ${ramdiskaddr} initrd; bootm ${kerneladdr} ${ramdiskaddr} ${fdt_addr}" setenv bootargs root=0 loader=uboot disk=/dev/disk/by-id/ata-VM0500EBQHB_91NST05UT resume=openSUSE-12.2-ARM-JeOS-highbank console=ttyAMA0; boot
The question is just whether our uboot setup scripts are wrong or whether kiwi calls them incorrectly :).
Have you changed / fixed anything in that area recently?
The setup and install of uboot on first boot is no longer kiwi's task which you should know because we discussed it :) In kiwi's linuxrc code there is now only:
#====================================== # setupBootLoaderUBoot #-------------------------------------- function setupBootLoaderUBoot { # /.../ # The setup of the uboot boot.script can't be done # in a generic way because each arm board behaves # differently. Thus we are only calling a hook # script here # ---- runHook setupUBoot "$@" }
#====================================== # installBootLoaderUBoot #-------------------------------------- function installBootLoaderUBoot { # /.../ # installation of uboot can't be done in a generic # way because each arm board behaves differently. # Thus we are only calling a hook script here # ---- runHook installUBoot "$@" }
The hook scripts setupUBoot.sh and installUBoot.sh must be provided with the image description. In my kiwi provided template from the kiwi-template package you will find:
uboot-setup.tgz
and in the XML:
<!-- custom hook scripts for uboot --> <archive name="uboot-setup.tgz" bootinclude="true"/>
So I suggest to check if all this is done in your image descriptions as well. The boot log file /var/log/boot.kiwi shows exactly what code was called
Thanks
PS: I really like this... I'm no longer the culprit if the boot fails on arm :-)))
Haha :). Yeah, the problem looks like a mismatch of boot script arguments. Check out the root=0 in the boot.script in the setenv bootargs line. Now check out the setupUBoot.sh script (which I copied 1:1 from your kiwi example source ;))
#!/bin/bash
mountPrefix=$1 # mount path of the image destsPrefix=$2 # base dir for the config files unum=$3 # boot partition ID rdev=$4 # root partition ufix=$5 # title postfix swap=$6 # optional swap partition conf=$destsPrefix/boot/boot.script kernel="" initrd=""
#====================================== # make sure conf dir exists #-------------------------------------- mkdir -p $destsPrefix/boot #====================================== # check for device by ID #-------------------------------------- local diskByID=`getDiskID $rdev` local swapByID=`getDiskID $swap swap` #====================================== # check for system image .profile #-------------------------------------- if [ -f $mountPrefix/image/.profile ];then importFile < $mountPrefix/image/.profile fi #====================================== # check for kernel options #-------------------------------------- if [ ! -z "$kiwi_cmdline" ];then KIWI_KERNEL_OPTIONS="$KIWI_KERNEL_OPTIONS $kiwi_cmdline" fi #====================================== # create standard entry #-------------------------------------- IFS="," ; for i in $KERNEL_LIST;do if test -z "$i";then continue fi # /.../ # On other systems which supports a boot menu we add # the linux kernel and initrd with its file names # like this: # # kernel=`echo $i | cut -f1 -d:` # initrd=`echo $i | cut -f2 -d:` # # But on arm systems there can only be one kernel because # uboot doesn't support a menu. Thus perl-bootloader also # doesn't support updating the uboot configuration and # that's the reason why we use the links created by # mkinitrd to point to the kernel and initrd in order # to support kernel updates # ---- kernel=uImage initrd=initrd echo "setenv ramdisk $initrd" > $conf echo "setenv kernel $kernel" >> $conf echo "setenv initrd_high \"0xffffffff\"" >> $conf echo "setenv fdt_high \"0xffffffff\"" >> $conf echo 'printenv kerneladdr || setenv kerneladdr ${kernel_addr_r}' \ >> $conf echo 'printenv ramdiskaddr|| setenv ramdiskaddr ${ramdisk_addr_r}' \ >> $conf echo -n "setenv bootcmd \"" >> $conf echo -n "ext2load scsi 0:1 \${kerneladdr} $kernel; " >> $conf echo -n "ext2load scsi 0:1 \${ramdiskaddr} $initrd; " >> $conf echo "bootm \${kerneladdr} \${ramdiskaddr} \${fdt_addr}\"" >> $conf echo -n "setenv bootargs root=$diskByID loader=$loader" >> $conf
So here we set it to $diskByID. Which means this one was "0" during the setupUBoot.sh phase :). Sounds odd, no? Alex
if [ ! -z "$imageDiskDevice" ];then echo -n " disk=$(getDiskID $imageDiskDevice)" >> $conf fi if [ ! -z "$swap" ];then echo -n " resume=$swapByID" >> $conf fi if [ "$haveLVM" = "yes" ];then echo -n " VGROUP=$VGROUP" >> $conf fi echo -n " $KIWI_INITRD_PARAMS" >> $conf echo -n " $KIWI_KERNEL_OPTIONS" >> $conf echo ";" >> $conf echo "boot" >> $conf # only one entry... break done
Regards, Marcus -- Public Key available gpg --keyserver gpg-keyserver.de --recv-keys 0xCCE3C6A2 ------------------------------------------------------- Marcus Schäfer (Res. & Dev.) SUSE LINUX Products GmbH Tel: 0911-740 53 0 Maxfeldstrasse 5 FAX: 0911-740 53 479 D-90409 Nürnberg GF: Jeff Hawn,Jennifer Guild, Felix Imendörffer HRB: 21284 (AG Nürnberg) Germany http://www.suse.de -------------------------------------------------------
-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org