summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/grub/_ignore_grub-efi_2.02.bbappend
blob: 630cc6868d629c35e14100453293ec90d5d82b1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# because entire grub folder was taken from newer branch(rocko) we are using a separate bbappend
# just to facilitate the move of changes(keep only this file) when switch to new branch
#
# Determine the target arch for the grub modules
python __anonymous_prepend () {
    import re
    target = d.getVar('TARGET_ARCH')
    if target == "x86_64":
        grubtarget = 'x86_64'
        grubimage = "grub-efi-bootx64.efi"
    elif re.match('i.86', target):
        grubtarget = 'i386'
        grubimage = "grub-efi-bootia32.efi"
    elif re.match('aarch64', target):
        grubtarget = 'arm64'
        grubimage = "grub-efi-bootaa64.efi"
    else:
        raise bb.parse.SkipPackage("grub-efi is incompatible with target %s" % target)
    d.setVar("GRUB_TARGET", grubtarget)
    d.setVar("GRUB_IMAGE", grubimage)
}

COMPATIBLE_HOST = "aarch64-enea-linux"