diff options
Diffstat (limited to 'meta-phosphor/classes')
4 files changed, 20 insertions, 12 deletions
diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass index 23ff3475c..e29f4ff47 100644 --- a/meta-phosphor/classes/image_types_phosphor.bbclass +++ b/meta-phosphor/classes/image_types_phosphor.bbclass @@ -57,6 +57,8 @@ SIGNING_KEY ?= "${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv" INSECURE_KEY = "${@'${SIGNING_KEY}' == '${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv'}" SIGNING_KEY_DEPENDS = "${@oe.utils.conditional('INSECURE_KEY', 'True', 'phosphor-insecure-signing-key-native:do_populate_sysroot', '', d)}" +VERSION_PURPOSE ?= "xyz.openbmc_project.Software.Version.VersionPurpose.BMC" + UBOOT_SUFFIX ?= "bin" python() { @@ -418,10 +420,11 @@ def get_pubkey_path(d): 'publickey') python do_generate_phosphor_manifest() { + purpose = d.getVar('VERSION_PURPOSE', True) version = do_get_version(d) target_machine = d.getVar('MACHINE', True) with open('MANIFEST', 'w') as fd: - fd.write('purpose=xyz.openbmc_project.Software.Version.VersionPurpose.BMC\n') + fd.write('purpose={}\n'.format(purpose)) fd.write('version={}\n'.format(version.strip('"'))) fd.write('KeyType={}\n'.format(get_pubkey_type(d))) fd.write('HashType=RSA-SHA256\n') diff --git a/meta-phosphor/classes/image_types_phosphor_nuvoton.bbclass b/meta-phosphor/classes/image_types_phosphor_nuvoton.bbclass index 16112e638..d9d179ee6 100644 --- a/meta-phosphor/classes/image_types_phosphor_nuvoton.bbclass +++ b/meta-phosphor/classes/image_types_phosphor_nuvoton.bbclass @@ -4,17 +4,19 @@ FULL_SUFFIX = "full" MERGED_SUFFIX = "merged" UBOOT_SUFFIX_append = ".${MERGED_SUFFIX}" +IGPS_DIR = "${STAGING_DIR_NATIVE}/${datadir}/npcm7xx-igps" + # Prepare the Bootblock and U-Boot images using npcm7xx-bingo do_prepare_bootloaders() { local olddir="$(pwd)" cd ${DEPLOY_DIR_IMAGE} - bingo ${STAGING_DIR_NATIVE}/${bindir}/BootBlockAndHeader_EB.xml \ + bingo ${IGPS_DIR}/BootBlockAndHeader_${IGPS_MACHINE}.xml \ -o ${DEPLOY_DIR_IMAGE}/${BOOTBLOCK}.${FULL_SUFFIX} - bingo ${STAGING_DIR_NATIVE}/${bindir}/UbootHeader_EB.xml \ + bingo ${IGPS_DIR}/UbootHeader_${IGPS_MACHINE}.xml \ -o ${DEPLOY_DIR_IMAGE}/${UBOOT_BINARY}.${FULL_SUFFIX} - bingo ${STAGING_DIR_NATIVE}/${bindir}/mergedBootBlockAndUboot.xml \ + bingo ${IGPS_DIR}/mergedBootBlockAndUboot.xml \ -o ${DEPLOY_DIR_IMAGE}/${UBOOT_BINARY}.${MERGED_SUFFIX} cd "$olddir" } @@ -22,6 +24,7 @@ do_prepare_bootloaders() { do_prepare_bootloaders[depends] += " \ npcm7xx-bootblock:do_deploy \ npcm7xx-bingo-native:do_populate_sysroot \ + npcm7xx-igps-native:do_populate_sysroot \ " addtask do_prepare_bootloaders before do_generate_static after do_generate_rwfs_static diff --git a/meta-phosphor/classes/phosphor-rootfs-postcommands.bbclass b/meta-phosphor/classes/phosphor-rootfs-postcommands.bbclass new file mode 100644 index 000000000..3485661b3 --- /dev/null +++ b/meta-phosphor/classes/phosphor-rootfs-postcommands.bbclass @@ -0,0 +1,10 @@ +# +# This function is intended to add root to corresponding groups if 'debug-tweaks' or 'allow-root-login' is in IMAGE_FEATURES. +# +update_root_user_groups () { + if [ -e ${IMAGE_ROOTFS}/etc/group ]; then + sed -i '/^\(ipmi\|web\|redfish\|priv-admin\):.*:.*:$/s/$/root/' ${IMAGE_ROOTFS}/etc/group + fi +} +# Add root user to the needed groups +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], "update_root_user_groups; ", "", d)}' diff --git a/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass b/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass index 0280133fe..17b50da0e 100644 --- a/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass +++ b/meta-phosphor/classes/phosphor-software-manager-ubi-fs.bbclass @@ -6,10 +6,6 @@ RDEPENDS_phosphor-software-manager-updater-ubi += " \ mtd-utils-ubifs \ " -FILES_${PN}-updater-ubi += " \ - /usr/local \ - " - # Remove default configs EXTRA_OECONF_remove_df-obmc-ubi-fs += " \ ACTIVE_BMC_MAX_ALLOWED=1 \ @@ -34,7 +30,6 @@ SYSTEMD_SERVICE_phosphor-software-manager-updater-ubi += " \ reboot-guard-enable.service \ reboot-guard-disable.service \ force-reboot.service \ - usr-local.mount \ " # Name of the mtd device where the ubi volumes should be created @@ -50,6 +45,3 @@ SYSTEMD_SUBSTITUTIONS += "RO_MTD:${BMC_RO_MTD}:obmc-flash-bmc-ubiro@.service" SYSTEMD_SUBSTITUTIONS += "KERNEL_MTD:${BMC_KERNEL_MTD}:obmc-flash-bmc-ubiro@.service" SYSTEMD_SUBSTITUTIONS += "RW_SIZE:${BMC_RW_SIZE}:obmc-flash-bmc-ubirw.service" -do_install_append() { - install -d ${D}/usr/local -} |