Message ID | 20211201024555.1102657-1-raj.khem@gmail.com |
---|---|
State | New |
Headers | show |
Series | [1/2] edk2-firmware: Use --platform option only when EDK2_PLATFORM_DSC is set | expand |
My understanding is that --platform is pretty much mandatory. The recipe shouldn't be built if those are unset, so I'll add blanket COMPATIBLE_MACHINES to the base recipe instead. Ross On Wed, 1 Dec 2021 at 02:45, Khem Raj <raj.khem@gmail.com> wrote: > > This ensures that --platform is not left dangling for platforms which do > not set EDK2_PLATFORM_DSC > > Fixes build errors like > build.exe: error: --platform option requires 1 argument > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > --- > meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc > index 66e0cc3..0a1275e 100644 > --- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc > +++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc > @@ -29,8 +29,8 @@ EDK2_PLATFORM_DSC = "" > EDK2_BIN_NAME = "" > # build --arch > EDK2_ARCH = "" > -# Extra arguments passed to build > -EDK2_EXTRA_BUILD = "" > +# Extra arguments passed to build. Pass --platform if it is set > +EDK2_EXTRA_BUILD:append = "${@' --platform ${EDK2_PLATFORM_DSC}' if '${EDK2_PLATFORM_DSC}' else ''}" > > # build --buildtarget > EDK2_BUILD_MODE ?= "${@bb.utils.contains('EDK2_BUILD_RELEASE', '1', 'RELEASE', 'DEBUG', d)}" > @@ -84,7 +84,6 @@ do_compile() { > --arch "${EDK2_ARCH}" \ > --buildtarget ${EDK2_BUILD_MODE} \ > --tagname ${EDK_COMPILER} \ > - --platform ${EDK2_PLATFORM_DSC} \ > ${EDK2_EXTRA_BUILD} > } > > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#2495): https://lists.yoctoproject.org/g/meta-arm/message/2495 > Mute This Topic: https://lists.yoctoproject.org/mt/87419544/1676615 > Group Owner: meta-arm+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [ross@burtonini.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Wed, Dec 1, 2021 at 2:37 AM Ross Burton <ross@burtonini.com> wrote: > > My understanding is that --platform is pretty much mandatory. The > recipe shouldn't be built if those are unset, so I'll add blanket > COMPATIBLE_MACHINES to the base recipe instead. > thats fine too, as long as its build for machines it should be built for. > Ross > > On Wed, 1 Dec 2021 at 02:45, Khem Raj <raj.khem@gmail.com> wrote: > > > > This ensures that --platform is not left dangling for platforms which do > > not set EDK2_PLATFORM_DSC > > > > Fixes build errors like > > build.exe: error: --platform option requires 1 argument > > > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > > --- > > meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc > > index 66e0cc3..0a1275e 100644 > > --- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc > > +++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc > > @@ -29,8 +29,8 @@ EDK2_PLATFORM_DSC = "" > > EDK2_BIN_NAME = "" > > # build --arch > > EDK2_ARCH = "" > > -# Extra arguments passed to build > > -EDK2_EXTRA_BUILD = "" > > +# Extra arguments passed to build. Pass --platform if it is set > > +EDK2_EXTRA_BUILD:append = "${@' --platform ${EDK2_PLATFORM_DSC}' if '${EDK2_PLATFORM_DSC}' else ''}" > > > > # build --buildtarget > > EDK2_BUILD_MODE ?= "${@bb.utils.contains('EDK2_BUILD_RELEASE', '1', 'RELEASE', 'DEBUG', d)}" > > @@ -84,7 +84,6 @@ do_compile() { > > --arch "${EDK2_ARCH}" \ > > --buildtarget ${EDK2_BUILD_MODE} \ > > --tagname ${EDK_COMPILER} \ > > - --platform ${EDK2_PLATFORM_DSC} \ > > ${EDK2_EXTRA_BUILD} > > } > > > > -- > > 2.34.1 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#2495): https://lists.yoctoproject.org/g/meta-arm/message/2495 > > Mute This Topic: https://lists.yoctoproject.org/mt/87419544/1676615 > > Group Owner: meta-arm+owner@lists.yoctoproject.org > > Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [ross@burtonini.com] > > -=-=-=-=-=-=-=-=-=-=-=- > >
diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc index 66e0cc3..0a1275e 100644 --- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc +++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc @@ -29,8 +29,8 @@ EDK2_PLATFORM_DSC = "" EDK2_BIN_NAME = "" # build --arch EDK2_ARCH = "" -# Extra arguments passed to build -EDK2_EXTRA_BUILD = "" +# Extra arguments passed to build. Pass --platform if it is set +EDK2_EXTRA_BUILD:append = "${@' --platform ${EDK2_PLATFORM_DSC}' if '${EDK2_PLATFORM_DSC}' else ''}" # build --buildtarget EDK2_BUILD_MODE ?= "${@bb.utils.contains('EDK2_BUILD_RELEASE', '1', 'RELEASE', 'DEBUG', d)}" @@ -84,7 +84,6 @@ do_compile() { --arch "${EDK2_ARCH}" \ --buildtarget ${EDK2_BUILD_MODE} \ --tagname ${EDK_COMPILER} \ - --platform ${EDK2_PLATFORM_DSC} \ ${EDK2_EXTRA_BUILD} }
This ensures that --platform is not left dangling for platforms which do not set EDK2_PLATFORM_DSC Fixes build errors like build.exe: error: --platform option requires 1 argument Signed-off-by: Khem Raj <raj.khem@gmail.com> --- meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)