Doing it directly doesn’t work. It still use the kernel from debian and doesn’t boot from mender uboot.
I changed the config.txt to do that, just deleted kernel and initramfs definition and then it boot the uboot from mender-convert. The problem then is that it doesn’t boot any kernel.
I’m doing something wrong? how do I make this work?
I don’t know if the mender convert is prepared to use the initramfs and kernel from debian.
You can also have a look at the boot.scr file which contains the logic that U-Boot will execute to boot the device. It for sure does not contain anything initramfs related, so might need to tweak this one.
Thanks for replying. Yes, I took some time and follow the scripts on mender convert. I finally get the uboot running, the problem was that the config.txt file of debian defines the kernel and initramfs and the mender_convert script doesn’t override that value. I changed that (commented all) and then I have uboot running.
My problem now is that the bootscr is looking for a kernel to boot (zImage or uImage) and debian uses initramfs and vmlinux. My line of work will follow that. Any comment or help is appreciated .
First I had to build uboot from your fork to ARCH=arm64. With this bootloader I could boot the debian kernel.
Then I had to change the bootscript to add the initramfs like this:
setenv kernel_addr_r 0x20000000
setenv ramdisk_addr_r 0x30000000
load mmc 0 ${fdt_addr_r} bcm2837-rpi-3-b.dtb
fdt addr ${fdt_addr_r}
fdt get value bootargs /chosen bootargs
run mender_setup
mmc dev ${mender_uboot_dev}
setenv bootargs "root=${mender_kernel_root} rw elevator=deadline fsck.repair=yes net.ifnames=0 cma=64M rootwait"
if load ${mender_uboot_root} ${kernel_addr_r} /vmlinuz; then
if load ${mender_uboot_root} ${ramdisk_addr_r} /initrd.img; then
booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
else
echo "No initramfs found."
fi
else
echo "No bootable Kernel found."
fi
run mender_try_to_recover
Using mender-convert I convert the debian image and then copy this files.
With this I have a debian imagen booting using kernel and initramfs from debian.
I’m having a problem now when using mender-client. When I try to execute it I get an error from fw_printenv:
$ mender show-artifact
WARN[0000] No server URL(s) specified in mender configuration.
WARN[0000] Server entry 1 has no associated server URL.
ERRO[0000] Failed to read the current active partition: No match between boot and root partitions.: fork/exec /usr/sbin/fw_printenv: no such file or directory
The fw_printenv binary is there and if I try to execute it I get the same error.
Hey @drewmoseley! Yes, that was the problem. I Checked the /usr/bin/fw_printenv but the system is using the /usr/sbin/fw_printenv installed by mender-convert and this one is 32bits.
I’m working on my scripts to delete the binaries installed by mender-convert and use the system ones. Thanks!