On 28 June 2018 at 00:19, Don Cross <
cosin...@gmail.com> wrote:
Hi!
> I'm working on a non-Yocto integration of Mender and U-Boot on a Raspberry
> Pi 3. Even though this is a 64-bit ARM, the Raspbian kernel is 32-bit
> (armv7l). When I build U-Boot as 64 bit ARM
> (CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64) and copy u-boot.bin to the
> Pi as kernel8.img, the Pi's firmware picks it instead of kernel7.img and
> loads it correctly: I see U-Boot printing stuff to the screen, etc
>
Great that you are hanging in there. Hopefully I can assist in moving
you forward.
First of I would try to avoid 64-bit on raspberrypi, at least
initially because as you have noticed the support is somewhat limited
and generally packages are not as stable as for the 32-bit platform.
Especially GPU drivers.
I do not get the full picture of what commands you have executed but I
would suggest something like this, v2017.09 is used because that is
what we are using in Yocto, so might as well keep the versions the
same.
$ git clone git://
git.denx.de/u-boot.git -b v2017.09
$ cd u-boot/
$ export CROSS_COMPILE=arm-linux-gnueabihf-
$ export ARCH=arm
$ make rpi_3_32b_config
$ make
Above should produce a valid u-boot.bin file.
As you have noticed, the raspberrypi boots either kernel7.img or
kernel8.img from the boot part.
Next steps are to get the u-boot.bin to boot:
- Make a copy of the original kernel7.img > zImage
- Copy u-boot.bin to the boot part on the SD card and call it kernel7.img
That should make sure that U-boot starts up.
Next step is to make sure that U-boot loads the Linux kernel and boots
it, for this you need to provide a boot.scr file which you put it in
the boot partition. U-boot probes for this and will automatically pick
it up.
The script content should be something like this:
fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
fatload mmc 0:1 ${kernel_addr_r} zImage
bootz ${kernel_addr_r} - ${fdt_addr}
You can put above in a file called
boot.cmd.in, then we need to apply
an U-boot header to that file with the mentioned mkimage tool with the
following:
mkimage -A arm -T script -C none -n "Boot script" -d
boot.cmd.in boot.scr
This will create the boot.scr, which you then copy to the boot part on
the SD card and this should result in that your device boots.
Hopefully this will help you progress.
/ Mirza