Skip to content

Commit

Permalink
Merge pull request #242 from rsalveti/grub
Browse files Browse the repository at this point in the history
 grub: drop custom recipe and migrate to the upstream grub-efi version
  • Loading branch information
fboudra authored Jun 1, 2018
2 parents 4028844 + cc59834 commit 200a756
Show file tree
Hide file tree
Showing 17 changed files with 52 additions and 730 deletions.
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.
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

0 comments on commit 200a756

Please sign in to comment.