a mechanism to make the snap kernel updrade failed

Nicolino Curalli n.curalli at domotz.com
Tue Mar 28 09:31:32 UTC 2017


Hi all,

we are testing the our kernel snap (Linux4.9) for a orangepi plus 2e board.

We use the example showed at https://github.com/snapcore/pi3-gadget/blob/master/prebuilt/uboot.env.in for configuring u-boot to support the kernel update.

This is the code that we use for configuring uboot to support the kernel update:

snappy_boot=if test "${snap_mode}" = "try"; then setenv snap_mode "trying"; saveenv; if test "${snap_try_core}" != ""; then setenv snap_core "${snap_try_core}"; fi; if test "${snap_try_kernel}" != ""; then setenv snap_kernel "${snap_try_kernel}"; fi; elif test "${snap_mode}" = "trying"; then setenv snap_mode ""; saveenv; fi; run loadfiles; setenv mmcroot "/dev/disk/by-label/writable ${snappy_cmdline} snap_core=${snap_core} snap_kernel=${snap_kernel}"; run mmcargs; bootz ${kernel_addr} ${initrd_addr}:${initrd_size} ${fdt_addr}
snappy_cmdline=net.ifnames=0 init=/lib/systemd/systemd ro panic=-1 fixrtc
snappy_mode=regular
snappy_trial_boot=0

This is the starting point.

1) is it the correct way to get to declare u-boot boot.cmd  and setting for first gadget deploy? what are the defconfig to use? U-boot version? patch to apply to u-boot code?

We already tested successful upgrade of the kernel snap.

Now our goal is the possibility to simulate or provocate a failed upgrade for kernel snap.

2) Any suggestions on how to trigger this situation?


PS: some other question about u-boot configuration:

3) we don't find documentation about snap_ variable usage: it seem that the glue between this type of variable and update process is some action made by snapd;

   Where could we find this mechanism in the code or other place - e.g test ?


Thanks in advance for any help.

Cheers,

Nicolino









More information about the Snapcraft mailing list