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

Re: 4.5.0-0.bpo.2-armmp does not boot on cubox-i



On Sat, Jun 04, 2016 at 12:43:00PM +0200, Rainer Dorsch wrote:
> On Saturday 04 June 2016 11:46:28 K. Merker wrote:
> > On Thu, Jun 02, 2016 at 09:30:35PM +0200, Rainer Dorsch wrote:
> > > after the upgrade to kernel 4.5.0-0.bpo.2-armmp, my cubox-i does not
> > > boot anymore. Can anybody tell if I can easlily boot the previous
> > > kernel when I enter u-boot (I used 4.5.0-0.bpo.1-armmp)?
> > 
> > Hello,
> > 
> > you can use the u-boot environment variable "fk_kvers" to
> > override the default kernel version of the boot script.
> > 
> > To do that, stop the autoboot process by pressing a key when
> > u-boot says so and enter the following commands at the u-boot
> > prompt:
> > 
> >    setenv fk_kvers 4.5.0-0.bpo.1-armmp
> >    run bootcmd
> 
> Hmm....I tried that, but that did not have any effect on the booting kernel:
> 
> Hit any key to stop autoboot:  0 
> CuBox-i U-Boot > setenv fk_kvers 4.5.0-0.bpo.1-armmp
> CuBox-i U-Boot > run bootcmd 
> switch to partitions #0, OK
> mmc0 is current device
> ** File not found /boot.scr **
> ** File not found uEnv.txt **
> ** File not found /zImage **
> ** File not found /uImage **
> 940 bytes read in 91 ms (9.8 KiB/s)
> Running bootscript from mmc ...
> ## Executing script at 10800000
> 3579032 bytes read in 358 ms (9.5 MiB/s)
> 34233 bytes read in 223 ms (149.4 KiB/s)
> 15068303 bytes read in 889 ms (16.2 MiB/s)
> Booting Debian 4.5.0-0.bpo.2-armmp from mmc 0:2...
[...]
> I booted again and printed the environment:
> 
> CuBox-i U-Boot > printenv
> autoboot=echo Booting ${boot_file}; if test ${boot_file} = zImage; then bootz 
> ${loadaddr} ${ramdiskaddr}; else bootm ${loadaddr} ${ramdiskaddr}; fi;
> autobootfdt=echo Booting ${boot_file}; if test ${boot_file} = zImage; then 
> bootz ${loadaddr} ${ramdiskaddr} ${fdt_addr}; else bootm ${loadaddr} 
> ${ramdiskadd;
> autodetectfdt=if test ${cpu} = 6SOLO || test ${cpu} = 6DL; then setenv 
> fdt_prefix imx6dl; else setenv fdt_prefix imx6q; fi; if test ${board} = mx6-
> cubox-i; ;
> baudrate=115200
> board=mx6-cubox-i
> boot_fdt=try
> boot_prefixes=/ /boot/
> bootcmd=mmc dev ${mmcdev}; if mmc rescan; then for prefix in ${boot_prefixes}; 
> do setenv file_prefix ${prefix}; if run loadbootscript; then run bootscript; ;
> bootdelay=3
> bootenv=uEnv.txt
> bootfile=auto
> bootit=setenv boot_file ${bootfile}; if test ${boot_file} = zImage; then if 
> test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then 
> run ;
> bootscript=echo Running bootscript from mmc ...; source;
> console=ttymxc0
> cpu=6D
> ethact=FEC
> ethaddr=D0:63:B4:00:2B:AC
> ethprime=FEC
> fdt_addr=0x18000000
> fdt_high=0xffffffff
> importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t 
> ${loadaddr} ${filesize};
> initrd_high=0xffffffff
> ip_dyn=yes
> loadaddr=0x10800000
> loadbootenv=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootenv};
> loadbootfile=load mmc ${mmcdev}:${mmcpart} ${loadaddr} 
> ${file_prefix}${bootfile};
> loadbootscript=load mmc ${mmcdev}:${mmcpart} ${loadaddr} 
> ${file_prefix}${script};
> loadfdt=if test ${boottype} = mmc; then load mmc ${mmcdev}:${mmcpart} 
> ${fdt_addr} ${file_prefix}${fdt_file}; else ${get_cmd} ${fdt_addr} 
> ${fdt_file}; fi;
> loadramdisk=if test -n ${ramdisk}; then if load mmc ${mmcdev}:${mmcpart} 
> ${ramdiskaddr} ${file_prefix}${ramdisk}; then; else setenv ramdiskaddr -; fi; 
> else ;
> mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot};
> mmcboot=echo Booting from mmc ...; run mmcargs; setenv boottype mmc; run 
> bootit;
> mmcdev=0
> mmcpart=2
> mmcroot=/dev/mmcblk0p2 rootwait rw
> netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp 
> nfsroot=${serverip}:${nfsroot},v3,tcp;
> netboot=echo Booting from net ...; run netargs; setenv boottype net; if test 
> ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; if 
> tes;
> preboot=usb start
> ramdisk=uInitrd
> ramdiskaddr=0x11800000
> script=boot.scr
> splashpos=m,m
> stderr=serial,vga
> stdin=serial,usbkbd
> stdout=serial,vga
> update_sd_firmware=if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else 
> setenv get_cmd tftp; fi; if mmc dev ${mmcdev}; then if ${get_cmd} 
> ${update_sd_fir;
> update_sd_firmware_filename=u-boot.imx
> 
> Environment size: 3809/8188 bytes
> CuBox-i U-Boot > 
> 
> 
> I did not see fk_kvers in there? Where is that variable supposed to be 
> evaluated? Or does the u-boot in stable not yet have fk_kvers to select the 
> kernel to boot?

The "fk_kvers" variable isn't evaluated by u-boot itself, but by
the Debian-provided default bootscript.  Therefore it isn't
defined as part of the default u-boot environment.

"Stable" is probably the correct point in here, though. As you
use backports I had wrongly assumed that you also have the
flash-kernel package from backports (3.60~bpo8+1) installed, but
it looks like you use flash-kernel 3.35+deb8u3 from stable. The
version in stable indeed doesn't support fk_kvers while the one
in backports does.

You could run the necessary commands from the current cubox-i
bootscript

https://anonscm.debian.org/cgit/d-i/flash-kernel.git/plain/bootscript/armhf/bootscr.cubox-i

by hand, but probably the easiest way is to replace the
bootscript ("boot.scr") in the boot partition of your SD card
with the current version.  U-Boot expects the boot script to be
wrapped in a u-boot-specific format, so to create the new
boot.scr, run the following commands on another system:

$ sudo apt-get install u-boot-tools
$ wget https://anonscm.debian.org/cgit/d-i/flash-kernel.git/plain/bootscript/armhf/bootscr.cubox-i
$ mkimage -T script -A arm -d bootscr.cubox-i boot.scr

and then replace the boot.scr on your SD card with the result.
With this boot script, using fk_kvers should work without
problems. Once the system is up, I would like to recommend
to upgrade flash-kernel to the version from backports; otherwise
the next flash-kernel run would reinstall the boot script from
stable again.

HTH,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.


Reply to: