Re: How to convert the initrd.img during buiding the kernel snap.

2017-03-21 Thread Oliver Grawert
hi,
Am Dienstag, den 21.03.2017, 18:26 +0800 schrieb Madper Xie:
> 
> > Yes I noticed that in the README.txt. So I modified the boot cmd to
> `autoboot=bootz ${loadaddr} ${ramdisk_addr}:1c5 ${fdt_addr}`  ...
> Still
> doesn't boot.
where does that 1c5 come from ?
please take a look at [1] where we use:

loadinitrd=fatload mmc 1:8 ${ramdisk_addr}\
${snap_kernel}/${initrd_file}; setenv initrd_size ${filesize}

and:

booti ${linux_addr} ${ramdisk_addr}:${initrd_size} ${fdt_addr}

that way the initrd_size variable has the correct value...

> 
> > 
> > also a look at your boot.env.in and a serial log might be useful
> > ...
> > 
> The serial log doesn't provide useful message:
> 
heh, i was hoping for a full log so i could also see your uboot version
etc :) perhaps it is to old and does not support raw initrds yet.

ciao
oli


[1] https://github.com/snapcore/dragonboard-gadget/blob/master/prebuilt
/uboot.env.in

signature.asc
Description: This is a digitally signed message part
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: How to convert the initrd.img during buiding the kernel snap.

2017-03-21 Thread Madper Xie
Hi Ogra,

On Tue, Mar 21, 2017 at 6:20 PM, Oliver Grawert  wrote:

> hi,
> Am Dienstag, den 21.03.2017, 18:13 +0800 schrieb Madper Xie:
> > Hi Ogra,
> >
> > After adding the `#define CONFIG_SUPPORT_RAW_INITRD` the uboot still
> > complains `Wrong Ramdisk Image Format Ramdisk image is corrupt or
> > invalid`
> > ...
> >
> > Is there any other macros should be defined?
>
> well, your initrd.img needs to indeed just be that, not an uInitrd, the
> boot command your board uses (bootm, booti, bootz or whatever) will
> need to use the right syntax (usually you need to pass the size)...
>
> Yes I noticed that in the README.txt. So I modified the boot cmd to
`autoboot=bootz ${loadaddr} ${ramdisk_addr}:1c5 ${fdt_addr}`  ... Still
doesn't boot.

> also a look at your boot.env.in and a serial log might be useful ...
>
The serial log doesn't provide useful message:

```
Booting from mmc ...
file_prefix: /hummingboard-kernel_x1.snap/
4648094 bytes read in 262 ms (16.9 MiB/s)
Loaded initrd.img
loading fdt: /hummingboard-kernel_x1.snap/dtbs/imx6q-hummingboard.dtb
38636 bytes read in 21 ms (1.8 MiB/s)
Loaded imx6q-hummingboard.dtb
Kernel image @ 0x1080 [ 0x00 - 0x5fa120 ]
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid
```


>
> ciao
> oli
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: How to convert the initrd.img during buiding the kernel snap.

2017-03-21 Thread Oliver Grawert
hi,
Am Dienstag, den 21.03.2017, 11:20 +0100 schrieb Oliver Grawert:
> 
> also a look at your boot.env.in

indeed i meant uboot.env.in 
:)

ciao
oli

signature.asc
Description: This is a digitally signed message part
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: How to convert the initrd.img during buiding the kernel snap.

2017-03-21 Thread Oliver Grawert
hi,
Am Dienstag, den 21.03.2017, 18:13 +0800 schrieb Madper Xie:
> Hi Ogra,
> 
> After adding the `#define CONFIG_SUPPORT_RAW_INITRD` the uboot still
> complains `Wrong Ramdisk Image Format Ramdisk image is corrupt or
> invalid`
> ...
> 
> Is there any other macros should be defined?

well, your initrd.img needs to indeed just be that, not an uInitrd, the
boot command your board uses (bootm, booti, bootz or whatever) will
need to use the right syntax (usually you need to pass the size)... 

also a look at your boot.env.in and a serial log might be useful ...

ciao
oli

signature.asc
Description: This is a digitally signed message part
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: How to convert the initrd.img during buiding the kernel snap.

2017-03-20 Thread Oliver Grawert
hi,
On Do, 2017-03-16 at 21:22 +0800, Madper Xie wrote:
> Hi all,
> 
> My u-boot do not support the format of the initrd.img. So I need to
> manually convert it via mkimage every time.
> 
> I tried to use scriptlet to convert the initrd.img file but failed.
> 
> ```
> install: |
>   mkimage -n 'RamdiskImage' -A arm -O linux -T ramdisk -C gzip -d
> initrd.img ramfs.img
>   rm initrd.img
> ```
> 
> I got:
> mkimage: Can't open initrd.img: No such file or directory
> rm: cannot remove 'initrd.img': No such file or directory
> 
> It seems the scriptlet executed before downloading the initrd.img.
> Do we have any way to run a command after downloading the initrd.img?
> 

please fix your u-boot instead, one of the required uboot config
options we have is:

#define CONFIG_SUPPORT_RAW_INITRD

in your include/configs/.h file ...

the others are:

#define CONFIG_ENV_IS_IN_FAT
#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
and 
#define CONFIG_ENV_SIZESZ_128K

to make the rollback function work.

ciao
oli

signature.asc
Description: This is a digitally signed message part
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft