Append the grub recipes. Note that due to the fact that grub requires lib gcc it should be built using the bsp machine, otherwise we will get build errors. The actual outputs are part of the Linux image that is built using the glibc/musl machines. For now this is resolved using well defined tmp dirs in the machine configs.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- recipes-bsp/grub/files/grub-config.cfg | 26 ++++++++++++++++++++++++++ recipes-bsp/grub/grub-efi_2.%.bbappend | 22 ++++++++++++++++++++++ recipes-bsp/grub/grub_2.%.bbappend | 10 ++++++++++ 3 files changed, 58 insertions(+) create mode 100644 recipes-bsp/grub/files/grub-config.cfg create mode 100644 recipes-bsp/grub/grub-efi_2.%.bbappend create mode 100644 recipes-bsp/grub/grub_2.%.bbappend
diff --git a/recipes-bsp/grub/files/grub-config.cfg b/recipes-bsp/grub/files/grub-config.cfg new file mode 100644 index 0000000..09fa290 --- /dev/null +++ b/recipes-bsp/grub/files/grub-config.cfg @@ -0,0 +1,26 @@ +set debug="loader,mm" +set term="vt100" +set default="1" +set timeout="5" + +menuentry 'BusyBox Morello Platform (Device Tree)' { + devicetree /morello.dtb + linux /Image \ + acpi=off \ + console=ttyAMA0,115200 \ + debug \ + earlycon=pl011,0x2A400000 \ + ip=dhcp \ + + initrd /initramfs +} + +menuentry 'BusyBox Morello Platform (ACPI)' { + linux /Image \ + acpi=force \ + debug \ + earlycon=pl011,0x2A400000 \ + ip=dhcp \ + + initrd /initramfs +} \ No newline at end of file diff --git a/recipes-bsp/grub/grub-efi_2.%.bbappend b/recipes-bsp/grub/grub-efi_2.%.bbappend new file mode 100644 index 0000000..c03b87c --- /dev/null +++ b/recipes-bsp/grub/grub-efi_2.%.bbappend @@ -0,0 +1,22 @@ +inherit deploy nopackages + +COMPATIBLE_MACHINE = "morello" +OUTPUTS_NAME = "grub-efi" + +PROVIDES += "virtual/${OUTPUTS_NAME}" + +FILESEXTRAPATHS:prepend := "${THISDIR}:" + +GRUB_BUILDIN = " boot chain configfile ext2 fat gzio help linux loadenv \ + lsefi normal ntfs ntfscomp part_gpt part_msdos progress read search \ + search_fs_file search_fs_uuid search_label terminal terminfo \ + " + +SRC_URI += "file://files/grub-config.cfg" + +do_deploy() { + install -d ${DEPLOYDIR}/${OUTPUTS_NAME} + install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} "${DEPLOYDIR}/${OUTPUTS_NAME}/" + install -m 644 ${WORKDIR}/files/grub-config.cfg "${DEPLOYDIR}/${OUTPUTS_NAME}/grub-config.cfg" +} +addtask deploy after do_install before do_build \ No newline at end of file diff --git a/recipes-bsp/grub/grub_2.%.bbappend b/recipes-bsp/grub/grub_2.%.bbappend new file mode 100644 index 0000000..a2f232d --- /dev/null +++ b/recipes-bsp/grub/grub_2.%.bbappend @@ -0,0 +1,10 @@ + + +EXTRA_OECONF+="\ + --disable-efiemu \ + --disable-werror \ + --enable-dependency-tracking \ + --disable-grub-mkfont \ + --disable-grub-themes \ + --disable-grub-mount \ + " \ No newline at end of file