Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grub: drop custom recipe and migrate to the upstream grub-efi version #242

Merged
merged 4 commits into from
Jun 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conf/machine/bubblegum.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ KERNEL_DEVICETREE = "s900_96board.dtb"
SERIAL_CONSOLE = "115200 ttyS5"

MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "\
grub \
grub-efi \
"

# Pick the right subpackage, instead of the few hundred megs large main package
Expand All @@ -38,4 +38,4 @@ IMAGE_FSTYPES_append = " ext4.gz"
IMAGE_ROOTFS_ALIGNMENT = "4096"
EXTRA_IMAGECMD_ext4 += " -L SYSTEM "

EXTRA_IMAGEDEPENDS = "grub"
EXTRA_IMAGEDEPENDS = "grub-efi"
4 changes: 2 additions & 2 deletions conf/machine/hikey.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SERIAL_CONSOLES = "115200;${CONSOLE}"

MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "\
edk2-hikey \
grub \
grub-efi \
"

MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "linux-firmware-wl12xx \
Expand All @@ -48,7 +48,7 @@ IMAGE_FSTYPES_append = " ext4.gz"
IMAGE_ROOTFS_ALIGNMENT = "4096"
EXTRA_IMAGECMD_ext4 += " -L rootfs "

EXTRA_IMAGEDEPENDS = "edk2-hikey grub burn-boot"
EXTRA_IMAGEDEPENDS = "edk2-hikey grub-efi burn-boot"

# Ensure we have enough free space to deploy tests
IMAGE_ROOTFS_EXTRA_SPACE = "1048576"
4 changes: 2 additions & 2 deletions conf/machine/hikey960.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SERIAL_CONSOLE = "115200 ttyAMA6"

MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "\
edk2-hikey960 \
grub \
grub-efi \
"

MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "linux-firmware-wl12xx \
Expand All @@ -45,7 +45,7 @@ IMAGE_FSTYPES_append = " ext4.gz"
IMAGE_ROOTFS_ALIGNMENT = "4096"
EXTRA_IMAGECMD_ext4 += " -L rootfs "

EXTRA_IMAGEDEPENDS = "edk2-hikey960 grub"
EXTRA_IMAGEDEPENDS = "edk2-hikey960 grub-efi"

# FIXME unless we set image rootfs extra space, the generated image is corrupted.
IMAGE_ROOTFS_EXTRA_SPACE = "1048576"
File renamed without changes.
30 changes: 30 additions & 0 deletions recipes-bsp/grub/grub-efi_2.%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI += "file://cfg.emmc \
file://cfg.sdcard \
"

GRUB_BUILDIN_append = " chain echo efinet eval font gettext gfxterm gzio help lsefi read regexp search_fs_file search_fs_uuid search_label terminal terminfo tftp time"

python () {
# Standard config provided by OE-Core
grub_cfg = 'cfg'

emmc = d.getVar('CMDLINE_ROOT_EMMC', True)
sdcard = d.getVar('CMDLINE_ROOT_SDCARD', True)
cmdline = d.getVar('CMDLINE', True)
if emmc is not None and emmc in cmdline:
grub_cfg = 'cfg.emmc'
elif sdcard is not None and sdcard in cmdline:
grub_cfg = 'cfg.sdcard'

d.setVar('GRUB_CFG', grub_cfg)
}

do_mkimage_append_class-target() {
# Search for the grub.cfg on the local boot media by using the
# built in cfg file provided via this recipe
grub-mkimage -c ../${GRUB_CFG} -p /EFI/BOOT -d ./grub-core/ \
-O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
${GRUB_BUILDIN}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading