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

Bug#839595: flash-kernel: Please add support for SolidRun Clearfog



On Mon, Oct 03, 2016 at 11:32:15AM +0200, Christoph Egger wrote:
> Karsten Merker <merker@debian.org> writes:
> > is this the environment from mainline u-boot or the environment
> > from the original Marvell u-boot?  I ask because there are a few
> > things that look a bit uncommon to me:
> 
> This is a mainline 2016.9 u-boot (clearfog_defconfig)
> 
> > - The bootcmd loads the kernel as a zImage but the initrd as a
> >   uImage, which is a very unusual combination and I am unsure
> >   whether that could even work properly.  The normal case is
> >   either loading the kernel as a zImage and the initrd as a plain
> >   initrd image and booting them with bootz, or loading both the
> >   kernel and the initrd as uImages and booting them with bootm.
> 
> Works fine:
> 
> | => ext4load mmc 0:2 0x100000 armada-388-clearfog.dtb ; ext4load mmc 0:2 0x800000 vmlinuz-4.7.0-1-armmp ; ext4load mmc 0:2 0x1800000 initrd.img-4.7.0-1-armmp.uimage ; bootz 0x800000 0x1800000 0x100000
> | 18060 bytes read in 79 ms (222.7 KiB/s)
> | 3699848 bytes read in 237 ms (14.9 MiB/s)
> | 15982059 bytes read in 787 ms (19.4 MiB/s)
> | ## Loading init Ramdisk from Legacy Image at 01800000 ...
> |    Image Name:   initrd.img-4.7.0-1-armmp
> |    Image Type:   ARM Linux RAMDisk Image (uncompressed)
> |    Data Size:    15981995 Bytes = 15.2 MiB
> |    Load Address: 00000000
> |    Entry Point:  00000000
> |    Verifying Checksum ... OK
> | ## Flattened Device Tree blob at 00100000
> |    Booting using the fdt blob at 0x100000
> |    Loading Ramdisk to 0f0c2000, end 0ffffdab ... OK
> |    Loading Device Tree to 0f0ba000, end 0f0c168b ... OK
> | 
> | Starting kernel ...
> 
> With plain initrd:
> 
> | => ext4load mmc 0:2 0x100000 armada-388-clearfog.dtb ; ext4load mmc 0:2 0x800000 vmlinuz-4.7.0-1-armmp ; ext4load mmc 0:2 0x1800000 initrd.img-4.7.0-1-armmp ; bootz 0x800000 0x1800000 0x100000
> | 18060 bytes read in 79 ms (222.7 KiB/s)
> | 3699848 bytes read in 237 ms (14.9 MiB/s)
> | 15981995 bytes read in 796 ms (19.1 MiB/s)
> | Wrong Ramdisk Image Format
> | Ramdisk image is corrupt or invalid

When using bootz with a standard format initrd, one must pass the
initrd size to bootz.  Could you try the following command to
boot with a plain initrd?

ext4load mmc 0:2 0x100000 armada-388-clearfog.dtb ; ext4load mmc 0:2 0x800000 vmlinuz-4.7.0-1-armmp ; ext4load mmc 0:2 0x1800000 initrd.img-4.7.0-1-armmp ; bootz 0x800000 0x1800000:${filesize} 0x100000

> > You could try running "env default -f -a" at the u-boot prompt,
> > which would reset your active environment to the default
> > environment of the u-boot version you are currently running.
> 
> | => env default -f -a
> | ## Resetting to default environment
> | => printenv
> | baudrate=115200
> | bootdelay=3
> | fdt_high=0x10000000
> | initrd_high=0x10000000
> | 
> | Environment size: 80/65532 bytes

Well, that is a _very_ minimalistic default environment ;-).
So there isn't any boot command handling at all in the default
environment of mainline u-boot for this system, which poses a
problem for supporting this setup in flash-kernel.

The proper solution would be to setup the default environment for
this board in mainline u-boot by including distro_bootcmd.h:

http://git.denx.de/?p=u-boot.git;a=blob;f=include/config_distro_bootcmd.h;h=9ecaf38a3300c3efd68e3f00f353b91c4dbe14f2;hb=HEAD

This provides a cross-platform boot environment with standardized
interfaces as documented in

http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.distro;h=77d5c6d4d56f90f6ba1ed237ca3927901f47d936;hb=HEAD

Once this standard environment is present, flash-kernel can
make use of the infrastructure provided by it.

Regards,
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: