From 61eb09cded6b4d67ea01c053d53465e2585bf794 Mon Sep 17 00:00:00 2001 From: Scott Little Date: Wed, 27 Jun 2018 16:05:37 -0400 Subject: [PATCH] Rename mwa-* subdirectories to match the git repo name mwa-delphia -> stx-clients mwa-pitta -> stx-config mwa-cleo -> stx-fault mwa-gplv2 -> stx-gplv2 mwa-gplv3 -> stx-gplv3 mwa-solon -> stx-ha mwa-sparta -> stx-integ mwa-beas -> stx-metal mwa-thales -> stx-nfv mwa-chilon -> stx-update mwa-perian -> stx-upstream 1) Change build-iso and update-efiboot-image to use BSP_FILES_PATH macro to find board support files. 2) Point BSP_FILES_PATH at stx-metal rather than mwa-beas, per the directory renaming above. Depends-On: https://review.openstack.org/579954 Depends-On: https://review.openstack.org/579957 Change-Id: Id8a855ab3c9674d59bb5225ce7a4d338a1e4e22a Signed-off-by: Scott Little --- build-tools/build-iso | 28 ++++++++++++++++++---------- build-tools/update-efiboot-image | 2 +- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/build-tools/build-iso b/build-tools/build-iso index 18e0856b..9ef0c0ea 100755 --- a/build-tools/build-iso +++ b/build-tools/build-iso @@ -129,6 +129,10 @@ function init_vars { # Where all CentOS packages live # Where essential CentOS (minimal install) packages live INTERNAL_REPO_ROOT= + + # Where BSP files live + export BSP_FILES_PATH= + # Where our own packages live CGCS_REPO_DIR=$MY_WORKSPACE/std/rpmbuild/RPMS CGCS_RT_REPO_DIR=$MY_WORKSPACE/rt/rpmbuild/RPMS @@ -248,6 +252,9 @@ function check_vars { RELEASE_INFO=$INTERNAL_REPO_ROOT/addons/wr-cgcs/layers/cgcs/middleware/recipes-common/build-info/release-info.inc export PLATFORM_RELEASE=$(source $RELEASE_INFO && echo $PLATFORM_RELEASE) + # Where BSP files live + export BSP_FILES_PATH="$INTERNAL_REPO_ROOT/addons/wr-cgcs/layers/cgcs/stx-metal/bsp-files" + echo " Done" echo "" } @@ -276,8 +283,8 @@ function init_output_dir { echo " Installing startup files" - \cp -L $INTERNAL_REPO_ROOT/addons/wr-cgcs/layers/cgcs/mwa-beas/bsp-files/centos.syslinux.cfg $OUTPUT_DIST_DIR/isolinux/syslinux.cfg - \cp -L $INTERNAL_REPO_ROOT/addons/wr-cgcs/layers/cgcs/mwa-beas/bsp-files/centos.syslinux.cfg $OUTPUT_DIST_DIR/isolinux/isolinux.cfg + \cp -L "$BSP_FILES_PATH/centos.syslinux.cfg" "$OUTPUT_DIST_DIR/isolinux/syslinux.cfg" + \cp -L "$BSP_FILES_PATH/centos.syslinux.cfg" "$OUTPUT_DIST_DIR/isolinux/isolinux.cfg" sed -i 's/wr_usb_boot/oe_iso_boot/' $OUTPUT_DIST_DIR/isolinux/isolinux.cfg # Modify the isolinux.cfg to auto install if requested @@ -298,8 +305,8 @@ function init_output_dir { # Copy UEFI files \cp -L -ru $DISTRO_REPO_DIR/EFI/* $OUTPUT_DIST_DIR/isolinux/EFI/ - \cp -L $INTERNAL_REPO_ROOT/addons/wr-cgcs/layers/cgcs/mwa-beas/bsp-files/grub.cfg $OUTPUT_DIST_DIR/isolinux/EFI/BOOT/grub.cfg - \cp -L $INTERNAL_REPO_ROOT/addons/wr-cgcs/layers/cgcs/mwa-beas/bsp-files/pxeboot_grub.cfg $OUTPUT_DIST_DIR/isolinux/pxeboot/pxeboot_grub.cfg + \cp -L "$BSP_FILES_PATH/grub.cfg" "$OUTPUT_DIST_DIR/isolinux/EFI/BOOT/grub.cfg" + \cp -L "$BSP_FILES_PATH/pxeboot_grub.cfg" "$OUTPUT_DIST_DIR/isolinux/pxeboot/pxeboot_grub.cfg" # Update the efiboot.img (See https://wiki.archlinux.org/index.php/Remastering_the_Install_ISO) # We need to mount the image file, replace the grub.cfg file with the Titanium Cloud one, and unmount. @@ -318,6 +325,7 @@ function init_output_dir { export MY_MOCK_ROOT=$MY_MOCK_ROOT; \ export PATH=$MY_REPO/build-tools:\$PATH; \ export BUILD_ISO_USE_UDEV=$BUILD_ISO_USE_UDEV; \ + export BSP_FILES_PATH=$BSP_FILES_PATH; \ update-efiboot-image" echo $CMD @@ -377,8 +385,8 @@ function init_output_dir { \rm -f $OUTPUT_DIR/efiboot.img # Copy and set up pxeboot setup files - \cp $INTERNAL_REPO_ROOT/addons/wr-cgcs/layers/cgcs/mwa-beas/bsp-files/pxeboot_setup.sh $OUTPUT_DIST_DIR/isolinux/pxeboot_setup.sh - \cp $INTERNAL_REPO_ROOT/addons/wr-cgcs/layers/cgcs/mwa-beas/bsp-files/pxeboot.cfg $OUTPUT_DIST_DIR/isolinux/pxeboot/pxeboot.cfg + \cp "$BSP_FILES_PATH/pxeboot_setup.sh" "$OUTPUT_DIST_DIR/isolinux/pxeboot_setup.sh" + \cp "$BSP_FILES_PATH/pxeboot.cfg" "$OUTPUT_DIST_DIR/isolinux/pxeboot/pxeboot.cfg" chmod +x $OUTPUT_DIST_DIR/isolinux/pxeboot_setup.sh \rm -f $OUTPUT_DIST_DIR/comps.xml @@ -401,9 +409,9 @@ function final_touches { \cp $OUTPUT_DIST_DIR/comps.xml $OUTPUT_DIST_DIR/comps.xml.bak fi - python $INTERNAL_REPO_ROOT/addons/wr-cgcs/layers/cgcs/mwa-beas/bsp-files/platform_comps.py \ - --pkgdir $OUTPUT_DIST_DIR/isolinux/Packages \ - --groups $OUTPUT_DIST_DIR/comps.xml + python "$BSP_FILES_PATH/platform_comps.py" \ + --pkgdir "$OUTPUT_DIST_DIR/isolinux/Packages" \ + --groups "$OUTPUT_DIST_DIR/comps.xml" if [ $? -ne 0 ]; then echo "Failed to update comps.xml" exit 1 @@ -579,7 +587,7 @@ function setup_upgrades_files { UPGRADES_DIR="$OUTPUT_DIST_DIR/isolinux/upgrades" \rm -rf $UPGRADES_DIR \mkdir -p $UPGRADES_DIR - \cp $INTERNAL_REPO_ROOT/addons/wr-cgcs/layers/cgcs/mwa-beas/bsp-files/upgrades/* $UPGRADES_DIR + \cp "$BSP_FILES_PATH/bsp-files/upgrades/*" "$UPGRADES_DIR" sed -i "s/xxxSW_VERSIONxxx/${PLATFORM_RELEASE}/g" $UPGRADES_DIR/metadata.xml chmod +x $UPGRADES_DIR/*.sh # Write the version out (used in upgrade scripts - this is the same as SW_VERSION) diff --git a/build-tools/update-efiboot-image b/build-tools/update-efiboot-image index 31e10bc3..8ae23ba4 100755 --- a/build-tools/update-efiboot-image +++ b/build-tools/update-efiboot-image @@ -131,7 +131,7 @@ else fi # Update the vanilla UEFI Centos grub.cfg with the Titanium Cloud version -${SUDOPREFIX} cp $INTERNAL_REPO_ROOT/addons/wr-cgcs/layers/cgcs/mwa-beas/bsp-files/grub.cfg $EFI_MOUNT/EFI/BOOT/grub.cfg +${SUDOPREFIX} cp "$BSP_FILES_PATH/grub.cfg" "$EFI_MOUNT/EFI/BOOT/grub.cfg" # Update the grub and shim executables with the Titanium Cloud signed versions #