Why does u-boot calls GRUB on my embedded system?

I have a RaspberryPi3.

This situation is under embedded system. The rpi reference shows how to boot Ubuntu.

It shows the way that u-boot calls GRUB and GRUB calls Linux...

and I have tried this chain loading.

In that situation, I wonder why u-boot calls GRUB? Can it not directly call Linux? Is it possible that GRUB could call Linux without u-boot?

2 Answers

Yes rpi3 can boot linux directly from U-Boot. I'm not sure why it uses grub2. U-Boot has EFI support now so it can boot grub2. It might help with distributions that are mostly designed for x86.

1

I have seen this on an rpi3 with newer versions of Fedora, too. Prior versions used U-Boot only, with a script arrangement called 'distro boot'.

Grub is what is used on x86 and (for better or worse) some distros like to use it on ARM also.

U-Boot is a full bootloader but grub is only a 'second-stage' loader, i.e. it needs something to load it. In this case U-Boot also provides the EFI support needed by grub to work.

So, yes, U-Boot can directly call linux. The distro you are using presumably wants to support only one way of booting for x86 and ARM, so grub has been added in the middle to provide the boot menu.

If you want to change this, you can likely add a custom 'bootcmd' to U-Boot which loads your kernel, etc. But every time you update you will need to update that too.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like