Nothing is wrong with the core snap but your gadget does not set the proper defaults in the bootloader on the kernel cmdline.
when you use a proper gadget ubuntu-image will configure it during image build and set the right bootloader variables in uboot … do you have a url to the source of the gadget you used ?
but this gadget is used by orangepi zero,how could it be wrong! but the kernel snap is build by my self,could it be something wrong couse this debug info
during image build ubuntu-image calls “snap prepare-image” which reads the snap seed file inside the image to put things like snap_kernel and snap_core into the bootloader config … it also checks that the snaps and model assertion are signed by the right entities to make the image valid (assertion and gadget need to be signed by the same store user IIRC).
hmm this is pretty outdated, the orangepi manufacturers claimed the snap in the store, so i stopped working on it… that said, i just looked at uboot.env.in and the variables should all be correct in there (i see snap_kernel and snap_core inside the “snappy_boot” script line being set correctly)
did you get any errors when building the image with ubuntu-image ?
I sadly do not know where the source for the gadget they use in this image is, you probably have to ask Xunlong for it … i can not find a gadget source at their github repo at
below is the uboot.env ,apparently the snap_core value has been appropriatelly set.
arch=arm baudrate=115200 board=sunxi board_name=sunxi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script};
source ${scriptaddr} boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi;
if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};
fi boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_usb_start=usb start boot_prefixes=/ /boot/ boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr boot_targets=fel mmc0 usb0 pxe dhcp bootcmd=run snappy_boot
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr};
fi;setenv efi_fdtfile ${fdtfile}; if test -z “${fdtfile}” -a -n “${soc}”; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb;
fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00010:UNDI:003000;
setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r};
then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;
setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo ‘(FEL boot)’; source ${fel_scriptaddr};
fi bootcmd_mmc0=setenv devnum 0; run mmc_boot bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot;
fi bootcmd_usb0=setenv devnum 0; run usb_boot bootdelay=2 bootm_size=0xa000000 console=ttyS0,115200
cpu=armv7 dfu_alt_info_ram=kernel ram 0x42000000 0x1000000;fdt ram 0x43000000 0x100000;
ramdisk ram 0x43300000 0x4000000 distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/ eth1addr=12:42:20:3b:f4:2e ethaddr=02:42:20:3b:f4:2e fdt_addr=0x43000000
fdt_addr_r=0x43000000 fdt_file=sun8i-h3-orangepi-plus2e.dtb fdtcontroladdr=5bf3cee8 fdtfile=sun8i-h3-orangepi-plus2e.dtb
initrd_file=initrd.img kernel_addr_r=0x42000000 kernel_file=kernel.img
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadaddr=0x42000000 loadfdt=fatload mmc 0:1 ${fdt_addr} ${snap_kernel}/dtbs/${fdt_file} loadfiles=run loadkernel;
run loadinitrd; run loadfdt loadinitrd=fatload mmc 0:1 ${ramdiskaddr} ${snap_kernel}/${initrd_file};
setenv initrd_size ${filesize} loadkernel=fatload mmc 0:1 ${loadaddr} ${snap_kernel}/${kernel_file}
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
mmcargs=setenv bootargs “console=ttyS0,115200 console=tty0 root=${mmcroot}” preboot=usb start
pxefile_addr_r=0x43200000 ramdisk_addr_r=0x43300000 ramdiskaddr=0x43300000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}…;
for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts;
done;run scan_dev_for_efi; scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist;
env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist};
do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi;
done scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z “${fdtfile}” -a -n “${soc}”;
then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes};
do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb;
fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi;
then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary;
echo EFI LOAD FAILED: continuing…; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf;
then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing…;
fi scan_dev_for_scripts=for script in ${boot_scripts};
do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script};
run boot_a_script; echo SCRIPT FAILED: continuing…; fi; done scriptaddr=0x43100000 snap_core=core_4916.snap
snap_kernel=ftgw-kernel_x1.snap 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 ${loadaddr} ${ramdiskaddr}:${initrd_size} ${fdt_addr}
snappy_cmdline=rng_core.default_quality=700 net.ifnames=0 init=/lib/systemd/systemd ro panic=-1 fixrtc
soc=sunxi stderr=serial stdin=serial,usbkbd stdout=serial usb_boot=usb start; if usb dev ${devnum};
then setenv devtype usb; run scan_dev_for_boot_part; fi