From 4d610e9f230dd23589b18588446c2368f3a99446 Mon Sep 17 00:00:00 2001 From: Anton Gerasimov Date: Tue, 25 Apr 2017 15:21:07 +0200 Subject: Replace includes with bblcasses They are more flexible and allow tricks like conditionally inheriting machine-related classes from the main one which makes things easier for external users like AGL --- conf/distro/poky-sota-systemd.conf | 2 +- conf/distro/poky-sota.conf | 2 +- conf/distro/sota.conf.inc | 25 ------------------------- conf/include/bblayers/sota_intel-corei7-64.inc | 2 ++ conf/include/bblayers/sota_minnowboard.inc | 2 -- conf/include/bblayers/sota_raspberrypi.inc | 2 -- conf/include/bblayers/sota_raspberrypi2.inc | 2 ++ conf/include/bblayers/sota_raspberrypi3.inc | 2 ++ conf/include/local/sota_bleeding.inc | 1 - conf/include/local/sota_minnowboard.inc | 9 --------- conf/include/local/sota_minnowboard_uboot.inc | 10 ---------- conf/include/local/sota_porter.inc | 12 ------------ conf/include/local/sota_qemux86-64.inc | 11 ----------- conf/include/local/sota_raspberrypi.inc | 14 -------------- 14 files changed, 8 insertions(+), 88 deletions(-) delete mode 100644 conf/distro/sota.conf.inc create mode 100644 conf/include/bblayers/sota_intel-corei7-64.inc delete mode 100644 conf/include/bblayers/sota_minnowboard.inc delete mode 100644 conf/include/bblayers/sota_raspberrypi.inc create mode 100644 conf/include/bblayers/sota_raspberrypi2.inc create mode 100644 conf/include/bblayers/sota_raspberrypi3.inc delete mode 100644 conf/include/local/sota_bleeding.inc delete mode 100644 conf/include/local/sota_minnowboard.inc delete mode 100644 conf/include/local/sota_minnowboard_uboot.inc delete mode 100644 conf/include/local/sota_porter.inc delete mode 100644 conf/include/local/sota_qemux86-64.inc delete mode 100644 conf/include/local/sota_raspberrypi.inc (limited to 'conf') diff --git a/conf/distro/poky-sota-systemd.conf b/conf/distro/poky-sota-systemd.conf index 85744ea..e6f43f7 100644 --- a/conf/distro/poky-sota-systemd.conf +++ b/conf/distro/poky-sota-systemd.conf @@ -1,5 +1,4 @@ require conf/distro/poky.conf -require conf/distro/sota.conf.inc DISTRO = "poky-sota" DISTRO_NAME = "OTA-enabled Linux" @@ -9,4 +8,5 @@ DISTRO_CODENAME = "sota" DISTRO_FEATURES_append = " systemd" VIRTUAL-RUNTIME_init_manager = "systemd" +INHERIT += " sota" IMAGE_INSTALL_append = " connman connman-client rvi-sota-client" diff --git a/conf/distro/poky-sota.conf b/conf/distro/poky-sota.conf index 2bbc62b..6972a94 100644 --- a/conf/distro/poky-sota.conf +++ b/conf/distro/poky-sota.conf @@ -1,9 +1,9 @@ require conf/distro/poky.conf -require conf/distro/sota.conf.inc DISTRO = "poky-sota" DISTRO_NAME = "OTA-enabled Linux" DISTRO_VERSION = "1.0" DISTRO_CODENAME = "sota" +INHERIT += " sota" IMAGE_INSTALL_append = " connman connman-client" diff --git a/conf/distro/sota.conf.inc b/conf/distro/sota.conf.inc deleted file mode 100644 index 20946a6..0000000 --- a/conf/distro/sota.conf.inc +++ /dev/null @@ -1,25 +0,0 @@ -DISTRO_FEATURES_append = " sota" -OVERRIDES .= ":sota" - -IMAGE_INSTALL_append = " ostree os-release" - -# live image for OSTree-enabled systems -IMAGE_CLASSES += "image_types_ostree image_types_ota" -IMAGE_FSTYPES += "ostreepush otaimg" - -# if don't build wic image unless IMAGE_BOOT_FILES is set. Prevents build from failing -# on machines that don't support updater yet -IMAGE_FSTYPES += "${@' wic' if (d.getVar("IMAGE_BOOT_FILES", True)) else ''}" -WKS_FILE ?= "sdimage-sota.wks" -do_image_wic[depends] += "${IMAGE_BASENAME}:do_image_otaimg" - -EXTRA_IMAGEDEPENDS += " parted-native mtools-native dosfstools-native" - -# Please redefine OSTREE_REPO in order to have a persistent OSTree repo -OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" -OSTREE_BRANCHNAME ?= "ota-${MACHINE}" -OSTREE_OSNAME ?= "poky" -OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" - -# Prelinking increases the size of downloads and causes build errors -USER_CLASSES_remove = "image-prelink" diff --git a/conf/include/bblayers/sota_intel-corei7-64.inc b/conf/include/bblayers/sota_intel-corei7-64.inc new file mode 100644 index 0000000..1771e6c --- /dev/null +++ b/conf/include/bblayers/sota_intel-corei7-64.inc @@ -0,0 +1,2 @@ + +BBLAYERS += " ${METADIR}/meta-updater-minnowboard ${METADIR}/meta-intel " diff --git a/conf/include/bblayers/sota_minnowboard.inc b/conf/include/bblayers/sota_minnowboard.inc deleted file mode 100644 index 1771e6c..0000000 --- a/conf/include/bblayers/sota_minnowboard.inc +++ /dev/null @@ -1,2 +0,0 @@ - -BBLAYERS += " ${METADIR}/meta-updater-minnowboard ${METADIR}/meta-intel " diff --git a/conf/include/bblayers/sota_raspberrypi.inc b/conf/include/bblayers/sota_raspberrypi.inc deleted file mode 100644 index 11ede20..0000000 --- a/conf/include/bblayers/sota_raspberrypi.inc +++ /dev/null @@ -1,2 +0,0 @@ - -BBLAYERS += " ${METADIR}/meta-updater-raspberrypi ${METADIR}/meta-raspberrypi " diff --git a/conf/include/bblayers/sota_raspberrypi2.inc b/conf/include/bblayers/sota_raspberrypi2.inc new file mode 100644 index 0000000..11ede20 --- /dev/null +++ b/conf/include/bblayers/sota_raspberrypi2.inc @@ -0,0 +1,2 @@ + +BBLAYERS += " ${METADIR}/meta-updater-raspberrypi ${METADIR}/meta-raspberrypi " diff --git a/conf/include/bblayers/sota_raspberrypi3.inc b/conf/include/bblayers/sota_raspberrypi3.inc new file mode 100644 index 0000000..11ede20 --- /dev/null +++ b/conf/include/bblayers/sota_raspberrypi3.inc @@ -0,0 +1,2 @@ + +BBLAYERS += " ${METADIR}/meta-updater-raspberrypi ${METADIR}/meta-raspberrypi " diff --git a/conf/include/local/sota_bleeding.inc b/conf/include/local/sota_bleeding.inc deleted file mode 100644 index fc5947d..0000000 --- a/conf/include/local/sota_bleeding.inc +++ /dev/null @@ -1 +0,0 @@ -SRCREV_pn-aktualizr ?= "${AUTOREV}" diff --git a/conf/include/local/sota_minnowboard.inc b/conf/include/local/sota_minnowboard.inc deleted file mode 100644 index 36d1a17..0000000 --- a/conf/include/local/sota_minnowboard.inc +++ /dev/null @@ -1,9 +0,0 @@ -MACHINE = "intel-corei7-64" - -OSTREE_BOOTLOADER ?= "grub" -EFI_PROVIDER = "grub-efi" - -WKS_FILE = "efiimage-sota.wks" -IMAGE_BOOT_FILES = "" - -OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 console=ttyS0,115200 console=tty0" diff --git a/conf/include/local/sota_minnowboard_uboot.inc b/conf/include/local/sota_minnowboard_uboot.inc deleted file mode 100644 index e64f7eb..0000000 --- a/conf/include/local/sota_minnowboard_uboot.inc +++ /dev/null @@ -1,10 +0,0 @@ -MACHINE = "intel-corei7-64" - -PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ota" -UBOOT_MACHINE = "minnowmax_defconfig" - -EXTRA_IMAGEDEPENDS_append = " minnowboard-bootfiles" -IMAGE_BOOT_FILES = "minnowboard-bootfiles/*" - -OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda console=ttyS0,115200 console=tty0" - diff --git a/conf/include/local/sota_porter.inc b/conf/include/local/sota_porter.inc deleted file mode 100644 index 9828248..0000000 --- a/conf/include/local/sota_porter.inc +++ /dev/null @@ -1,12 +0,0 @@ -MACHINE = "porter" - -# Commit united image to OSTree, not just uImage -OSTREE_KERNEL = "uImage+dtb" - -EXTRA_IMAGEDEPENDS_append_sota = " porter-bootfiles" -IMAGE_CLASSES_append_sota = " image_types_uboot " -IMAGE_BOOT_FILES_sota += "porter-bootfiles/*" - -OSTREE_BOOTLOADER ?= "u-boot" -UBOOT_MACHINE_sota = "porter_config" - diff --git a/conf/include/local/sota_qemux86-64.inc b/conf/include/local/sota_qemux86-64.inc deleted file mode 100644 index b03631b..0000000 --- a/conf/include/local/sota_qemux86-64.inc +++ /dev/null @@ -1,11 +0,0 @@ -MACHINE = "qemux86-64" - -# See https://advancedtelematic.atlassian.net/browse/PRO-2693 -PREFERRED_VERSION_linux-yocto_qemux86-64_sota = "4.4%" - -# U-Boot support for SOTA -PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot-ota" -UBOOT_MACHINE_sota = "qemu-x86_defconfig" -OSTREE_BOOTLOADER ?= "u-boot" - -OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda" diff --git a/conf/include/local/sota_raspberrypi.inc b/conf/include/local/sota_raspberrypi.inc deleted file mode 100644 index ae13b8e..0000000 --- a/conf/include/local/sota_raspberrypi.inc +++ /dev/null @@ -1,14 +0,0 @@ -MACHINE ?= "raspberrypi3" - -IMAGE_CLASSES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'image_types_uboot sdcard_image-rpi-ota', '', d)}" -IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'rpi-sdimg-ota', 'rpi-sdimg', d)}" - -### both rpi-sdimg and rpi-sdimg-ota broken -IMAGE_FSTYPES += "ext4.xz ext4.bmap tar.xz" - -KERNEL_IMAGETYPE_sota = "uImage" -PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" -UBOOT_MACHINE_raspberrypi2_sota ?= "rpi_2_defconfig" -UBOOT_MACHINE_raspberrypi3_sota ?= "rpi_3_32b_defconfig" - -OSTREE_BOOTLOADER ?= "u-boot" -- cgit v1.2.3-54-g00ecf