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

Madper Xie madper.xie at canonical.com
Thu Mar 16 13:22:02 UTC 2017


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?


Thanks a lot,
Madper



More information about the Snapcraft mailing list