From aab12c535ef3f511eafc25f331e431fe8f6ee98a Mon Sep 17 00:00:00 2001 From: Vineeth Raveendran Date: Mon, 9 Dec 2019 12:01:47 +0000 Subject: [PATCH] Use += where ever possible instead of append Exceptions will be cases involving overrides, machine specific varible expansion and cases where variable modification needed to be done after all += operations. Change-Id: I7c76a77949d0a012238d488d5a75c489c54abf68 Signed-off-by: Vineeth Raveendran --- .../classes/image_types_disk_img.bbclass | 4 +-- meta-arm-bsp/conf/machine/fvp-common/fvp.inc | 5 ---- meta-arm-bsp/conf/machine/gem5-arm64.conf | 2 +- meta-arm-bsp/conf/machine/juno.conf | 7 +---- .../boot-wrapper-aarch64.inc | 30 +++++++++---------- .../fvp-common/fvp-native.inc | 2 +- .../gem5/gem5-aarch64-native.inc | 2 +- .../recipes-devtools/gem5/gem5-native.inc | 5 ++-- .../linux/linux-yocto-arm-platforms.inc | 2 +- 9 files changed, 24 insertions(+), 35 deletions(-) diff --git a/meta-arm-bsp/classes/image_types_disk_img.bbclass b/meta-arm-bsp/classes/image_types_disk_img.bbclass index 57a0549c..ea7ba86c 100644 --- a/meta-arm-bsp/classes/image_types_disk_img.bbclass +++ b/meta-arm-bsp/classes/image_types_disk_img.bbclass @@ -41,8 +41,8 @@ DISK_IMG_PARTITION4_CONTENT ??= "" DISK_IMG_SECTOR_SIZE ??= "512" # We need mkfs.ext and parted tools to create our image (dd is always there) -do_image_disk_img[depends] += " e2fsprogs-native:do_populate_sysroot \ - parted-native:do_populate_sysroot" +do_image_disk_img[depends] += "e2fsprogs-native:do_populate_sysroot \ + parted-native:do_populate_sysroot" DISK_IMG_FILE = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.disk.img" diff --git a/meta-arm-bsp/conf/machine/fvp-common/fvp.inc b/meta-arm-bsp/conf/machine/fvp-common/fvp.inc index 68f5c13e..606ea328 100644 --- a/meta-arm-bsp/conf/machine/fvp-common/fvp.inc +++ b/meta-arm-bsp/conf/machine/fvp-common/fvp.inc @@ -39,8 +39,3 @@ UBOOT_MACHINE = "vexpress_aemv8a_dram_defconfig" # Xen configuration XEN_CONFIG_EARLY_PRINTK = "fastmodel" - -# parameters for xen dtb generation in meta-auto -XEN_DOM0_BOOTARGS_append = " root=/dev/vda2" -XEN_XEN_BOOTARGS_append = " console=dtuart dtuart=serial0 bootscrub=0" - diff --git a/meta-arm-bsp/conf/machine/gem5-arm64.conf b/meta-arm-bsp/conf/machine/gem5-arm64.conf index 4f58d056..54f7ede9 100644 --- a/meta-arm-bsp/conf/machine/gem5-arm64.conf +++ b/meta-arm-bsp/conf/machine/gem5-arm64.conf @@ -17,7 +17,7 @@ IMAGE_FSTYPES += "tar.bz2 ext4" SERIAL_CONSOLES = "115200;ttyAMA0" -EXTRA_IMAGEDEPENDS += " virtual/gem5-bootloader" +EXTRA_IMAGEDEPENDS += "virtual/gem5-bootloader" PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" PREFERRED_VERSION_linux-yocto ?= "4.19%" diff --git a/meta-arm-bsp/conf/machine/juno.conf b/meta-arm-bsp/conf/machine/juno.conf index 4d11c463..53a115ed 100644 --- a/meta-arm-bsp/conf/machine/juno.conf +++ b/meta-arm-bsp/conf/machine/juno.conf @@ -25,12 +25,7 @@ EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a u-boot" # Juno u-boot configuration UBOOT_MACHINE = "vexpress_aemv8a_juno_defconfig" -DISTRO_FEATURES_append = " usbhost usbgadget" +DISTRO_FEATURES += "usbhost usbgadget" # Xen configuration XEN_CONFIG_EARLY_PRINTK = "juno" - -# parameters for xen dtb generation in meta-auto -XEN_DOM0_BOOTARGS_append = " root=/dev/sda1 rootwait" -XEN_XEN_BOOTARGS_append = " console=dtuart dtuart=serial0 bootscrub=0 iommu=no" - diff --git a/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64.inc b/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64.inc index d52490fd..b5397cf7 100644 --- a/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64.inc +++ b/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64.inc @@ -35,30 +35,30 @@ BOOT_WRAPPER_AARCH64_XEN_CMDLINE ??= "noreboot dom0_mem=256M" BOOT_WRAPPER_AARCH64_IMAGE ?= "${@bb.utils.contains('DISTRO_FEATURES', 'xen', \ 'xen-system.axf', 'linux-system.axf', d)}" -DEPENDS += " virtual/kernel dtc-native" +DEPENDS += "virtual/kernel dtc-native" -EXTRA_OECONF_append = " --with-kernel-dir=${WORKDIR}/kernel" -EXTRA_OECONF_append = " --with-dtb=${WORKDIR}/kernel/dummy.dtb" -EXTRA_OECONF_append = " --with-cmdline=\"\"" -EXTRA_OECONF_append = " --enable-psci --enable-gicv3" -EXTRA_OECONF_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'xen', \ +EXTRA_OECONF += "--with-kernel-dir=${WORKDIR}/kernel" +EXTRA_OECONF += "--with-dtb=${WORKDIR}/kernel/dummy.dtb" +EXTRA_OECONF += "--with-cmdline=\"\"" +EXTRA_OECONF += "--enable-psci --enable-gicv3" +EXTRA_OECONF += " ${@bb.utils.contains('DISTRO_FEATURES', 'xen', \ '--with-xen=${WORKDIR}/kernel/arch/arm64/boot/Image', '', d)}" -EXTRA_OECONF_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'xen', \ +EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', \ '--with-xen-cmdline=\"\"', '', d)}" # unset LDFLAGS solves this error when compiling kernel modules: # aarch64-poky-linux-ld: unrecognized option '-Wl,-O1' -EXTRA_OEMAKE_append = " 'LDFLAGS= --gc-sections '" +EXTRA_OEMAKE += "'LDFLAGS= --gc-sections '" # Strip prefix if any REAL_DTB = "${@os.path.basename(d.getVar('BOOT_WRAPPER_AARCH64_DEVICETREE'))}" -EXTRA_OEMAKE_append = " 'KERNEL_DTB=${DEPLOY_DIR_IMAGE}/${REAL_DTB}'" -EXTRA_OEMAKE_append = " 'KERNEL_IMAGE=${DEPLOY_DIR_IMAGE}/${BOOT_WRAPPER_AARCH64_KERNEL}'" -EXTRA_OEMAKE_append = " 'CMDLINE=${BOOT_WRAPPER_AARCH64_CMDLINE}'" -EXTRA_OEMAKE_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'xen', \ +EXTRA_OEMAKE += "'KERNEL_DTB=${DEPLOY_DIR_IMAGE}/${REAL_DTB}'" +EXTRA_OEMAKE += "'KERNEL_IMAGE=${DEPLOY_DIR_IMAGE}/${BOOT_WRAPPER_AARCH64_KERNEL}'" +EXTRA_OEMAKE += "'CMDLINE=${BOOT_WRAPPER_AARCH64_CMDLINE}'" +EXTRA_OEMAKE += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', \ 'XEN_IMAGE=${DEPLOY_DIR_IMAGE}/${BOOT_WRAPPER_AARCH64_XEN}', '', d)}" -EXTRA_OEMAKE_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'xen', \ +EXTRA_OEMAKE += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', \ 'XEN_CMDLINE=\"${BOOT_WRAPPER_AARCH64_XEN_CMDLINE}\"', '', d)}" @@ -77,10 +77,10 @@ do_compile[noexec] = "1" do_install[noexec] = "1" # We need the kernel to create an image -do_deploy[depends] += " virtual/kernel:do_deploy" +do_deploy[depends] += "virtual/kernel:do_deploy" # We need xen if it is activated -do_deploy[depends] += " ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen:do_deploy', '', d)}" +do_deploy[depends] += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen:do_deploy', '', d)}" do_deploy() { if [ ! -f ${DEPLOY_DIR_IMAGE}/${REAL_DTB} ]; then diff --git a/meta-arm-bsp/recipes-devtools/fvp-common/fvp-native.inc b/meta-arm-bsp/recipes-devtools/fvp-common/fvp-native.inc index 2cda4569..727254db 100644 --- a/meta-arm-bsp/recipes-devtools/fvp-common/fvp-native.inc +++ b/meta-arm-bsp/recipes-devtools/fvp-common/fvp-native.inc @@ -20,7 +20,7 @@ do_install() { install -d ${D}${bindir} } FILES_${PN} = "${datadir}/fvp/* ${bindir}/*" -INSANE_SKIP_${PN}_append = "already-stripped" +INSANE_SKIP_${PN} += "already-stripped" # This is required so that our binaries are in the sysroot. We need this # to have both fvp required libraries and fvp in the same sysroot. diff --git a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native.inc b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native.inc index 301a225e..898fa23c 100644 --- a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native.inc +++ b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native.inc @@ -4,7 +4,7 @@ GEM5_BUILD_CONFIGS ?= "build/ARM/gem5.opt build/ARM/gem5.fast \ build/ARM/gem5.debug" -SRC_URI += " file://start-gem5.sh" +SRC_URI += "file://start-gem5.sh" inherit deploy diff --git a/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc b/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc index a43723da..4b02d13e 100644 --- a/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc +++ b/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc @@ -24,9 +24,8 @@ inherit native pythonnative # google protobuf # pkgconfig # hdf5 -DEPENDS_append = " python-native python-scons-native python-six-native \ - protobuf-native hdf5-native pkgconfig-native boost-native \ - libpng-native" +DEPENDS += "python-native python-scons-native python-six-native \ + protobuf-native hdf5-native pkgconfig-native boost-native libpng-native" do_configure[noexec] = "1" diff --git a/meta-arm-bsp/recipes-kernel/linux/linux-yocto-arm-platforms.inc b/meta-arm-bsp/recipes-kernel/linux/linux-yocto-arm-platforms.inc index 41efb8a7..eeb05713 100644 --- a/meta-arm-bsp/recipes-kernel/linux/linux-yocto-arm-platforms.inc +++ b/meta-arm-bsp/recipes-kernel/linux/linux-yocto-arm-platforms.inc @@ -8,7 +8,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}:${THISDIR}/files:" # Arm platforms kmeta -SRC_URI_append = " file://arm-platforms-kmeta;type=kmeta;name=arm-platforms-kmeta;destsuffix=arm-platforms-kmeta" +SRC_URI += "file://arm-platforms-kmeta;type=kmeta;name=arm-platforms-kmeta;destsuffix=arm-platforms-kmeta" # # FVP FOUNDATION KMACHINE