[Dev] How to build and support GRUB for Beaglebone Black?

Andrei Borzenkov arvidjaar at gmail.com
Fri Oct 9 17:46:19 GMT 2015


09.10.2015 09:04, coadde пишет:
> Andrei Borzenkov:
>> How do you start GRUB in the first place? On U-Boot platforms GRUB
>> cannot be run without U-Boot at all (it relies on U-Boot API for
>> disk/net IO), so the simplest way to get back to U-Boot is to exit GRUB :)
>>
>> Otherwise please explain in more details how you build and start GRUB on
>> this platform.
>
> I built grub under this configuration (GRUB for U-Boot platforms):
>
> 	./autogen.sh
>
> 	./configure \
> 		--with-platform="uboot" \
> 		--target="arm" \

OK so you have arm-uboot target. This target requires U-Boot; i.e. 
U-Boot starts GRUB. Let's say you are now in GRUB CLI.

Unfortunately I still fail to understand what you are want to achieve. 
Do you want to get back to U-Boot? Do you try to load and jump to 
completely new U-Boot binary? In the latter case what is the reason for 
it (if you needed U-Boot you could just not load GRUB).

> 		--disable-efiemu \
> 		--enable-mm-debug \
> 		--enable-nls \
> 		--enable-device-mapper \
> 		--enable-cache-stats \
> 		--enable-boot-time \
> 		--enable-grub-mkfont \
> 		--enable-grub-mount \
> 		--prefix="/usr" \
> 		--bindir="/usr/bin" \
> 		--sbindir="/usr/bin" \
> 		--mandir="/usr/share/man" \
> 		--infodir="/usr/share/info" \
> 		--datarootdir="/usr/share" \
> 		--sysconfdir="/etc" \
> 		--program-prefix="" \
> 		--with-bootdir="/boot" \
> 		--with-grubdir="grub" \
> 		--disable-silent-rules \
> 		--disable-werror
>
> 	make
>
>
> Those configurations comes from our grub's PKGBUILD [0] and our patch to
> detect device tree folder [1]. Those files were created to build grub
> for Parabola.
>
> BTW, i created 2 U-Boot packages, the first one called
> uboot-beaglebone-linux-libre to start up U-Boot without GRUB for our
> linux-libre package. Here are the PKGBUILD [2] and a custom patch with
> our custom modifications [3] based on uboot-beaglebone from Arch ARM
> [4][5]. It was tested and works well in Parabola, also we put a
> announcement [6] about it.
>
> Note: we put linux-libre as suffix in our uboot-beaglebone package for
> each specific kernel available in Parabola (eg.
> uboot-beaglebone-linux-libre-lts for linux-libre-lts) because our kernel
> images use custom names (eg. vmlinuz-linux-libre-grsec) in comparison to
> Arch ARM (eg zImage for all kernels) to allow for 2 or more kernels in
> the same system once we add GRUB compatibility for the future.
>
> The second one is called uboot-grub-beaglebone, this uboot package was
> created to start GRUB in ARMv7, it was based on
> uboot-beaglebone-linux-libre. Here are our PKGBUILD [7] and patch [8]
> for this package.
>
> Otherwise, we've created a install file to install GRUB automatically
> after installing [9], it was based on uboot-beaglebone-linux-libre too [10]
>
> [0]:https://projects.parabola.nu/abslibre.git/plain/libre/grub/PKGBUILD
> [1]:https://projects.parabola.nu/abslibre.git/tree/libre/grub/grub-10_linux-20_linux_xen-detect-devicetree-dir.patch
> [2]:https://projects.parabola.nu/abslibre.git/plain/libre/uboot-beaglebone-linux-libre/PKGBUILD
> [3]:https://projects.parabola.nu/abslibre.git/plain/libre/uboot-beaglebone-linux-libre/0001-parabola-arm-modifications.patch
> [4]:https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/master/alarm/uboot-beaglebone/PKGBUILD
> [5]:https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/uboot-beaglebone/0001-arch-linux-arm-modifications.patch
> [6]:https://www.parabola.nu/news/parabola-supports-armv7/
> [7]:https://projects.parabola.nu/abslibre.git/plain/libre-testing/uboot-grub-beaglebone/PKGBUILD
> [8]:https://projects.parabola.nu/abslibre.git/plain/libre-testing/uboot-grub-beaglebone/0001-parabola-arm-modifications+grub-support.patch
> [9]:https://projects.parabola.nu/abslibre.git/plain/libre-testing/uboot-grub-beaglebone/uboot-grub-beaglebone.install
> [10]:https://projects.parabola.nu/abslibre.git/plain/libre/uboot-beaglebone-linux-libre/uboot-beaglebone-linux-libre.install
>
>
>
> _______________________________________________
> Help-grub mailing list
> Help-grub at gnu.org
> https://lists.gnu.org/mailman/listinfo/help-grub
>




More information about the Dev mailing list