Skip to content

Commit e229060

Browse files
committed
Update setup_swift script to pick up op-build changes automatically
This commit updates how the setup_swift script creates swift_defconfig. It now copies down the witherspoon_defconfig file, but removes all witherspoon-specific settings. It then adds the swift-specific settings to create the final swift_defconfig that will be used for building the swift configuration in the op-build repo.
1 parent 267495c commit e229060

File tree

3 files changed

+61
-73
lines changed

3 files changed

+61
-73
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Ignore op-build directory
22
op-build*
3+
swift_defconfig

setup_swift

+60-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,72 @@
22

33
echo "Cloning open-power/op-build and setting up Swift Config Files ...";
44

5+
###################################################################
6+
# Setup constants used below
7+
#
8+
# a) This constant is likely to change:
9+
SWIFT_BR2_OPENPOWER_MACHINE_XML_VERSION=180a43b301fd880125152e17ba51616545263933
510

11+
# b) These contants are unlikely to change
12+
WD_FILE=op-build/openpower/configs/witherspoon_defconfig
13+
SD_FILE=swift_defconfig
14+
15+
16+
###################################################################
617
# Exit from the script on any fail
718
set -e
819

20+
21+
###################################################################
922
# Clone open-power/op-build. Using master branch for now
1023
git clone --recursive https://github.com/open-power/op-build.git
1124

25+
26+
###################################################################
27+
# Create swift_defconfig from witherspoon_defconfig
28+
# 1) Remove witherspoon-specific values:
29+
cat $WD_FILE \
30+
|grep -v BR2_HOSTBOOT_CONFIG_FILE \
31+
|grep -v BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT \
32+
|grep -v BR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE \
33+
|grep -v BR2_OPENPOWER_MACHINE_XML_CUSTOM_GIT \
34+
|grep -v BR2_OPENPOWER_MACHINE_XML_CUSTOM_GIT_VALUE \
35+
|grep -v BR2_OPENPOWER_MACHINE_XML_VERSION \
36+
|grep -v BR2_OPENPOWER_MACHINE_XML_FILENAME \
37+
|grep -v BR2_OPENPOWER_SYSTEM_XML_FILENAME \
38+
|grep -v BR2_OPENPOWER_MRW_XML_FILENAME \
39+
|grep -v BR2_OPENPOWER_BIOS_XML_FILENAME \
40+
|grep -v BR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME \
41+
|grep -v BR2_OPENPOWER_CONFIG_NAME \
42+
|grep -v BR2_OPENPOWER_PNOR_FILENAME \
43+
|grep -v BR2_HOSTBOOT_BINARY_SBE_FILENAME \
44+
|grep -v BR2_HOSTBOOT_BINARY_WINK_FILENAME \
45+
|grep -v BR2_OPENPOWER_TARGETING_BIN_FILENAME \
46+
|grep -v BR2_OPENPOWER_TARGETING_ECC_FILENAME \
47+
> $SD_FILE
48+
49+
# 2) Set swift-specific values:
50+
sed -i '1iBR2_OPENPOWER_CONFIG_NAME=\"swift\"' $SD_FILE
51+
sed -i '2iBR2_HOSTBOOT_CONFIG_FILE=\"swift.config\"' $SD_FILE
52+
sed -i '3iBR2_OPENPOWER_MACHINE_XML_VERSION="'$SWIFT_BR2_OPENPOWER_MACHINE_XML_VERSION'"' $SD_FILE
53+
sed -i '4iBR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT=n' $SD_FILE
54+
sed -i '4iBR2_OPENPOWER_MACHINE_XML_GITHUB_PROJECT_VALUE=\"swift-xml\"' $SD_FILE
55+
sed -i '4iBR2_OPENPOWER_MACHINE_XML_CUSTOM_GIT=y' $SD_FILE
56+
sed -i '4iBR2_OPENPOWER_MACHINE_XML_CUSTOM_GIT_VALUE=\"[email protected]:open-power/swift-xml.git\"' $SD_FILE
57+
sed -i '4iBR2_OPENPOWER_MACHINE_XML_FILENAME=\"swift.xml\"' $SD_FILE
58+
sed -i '4iBR2_OPENPOWER_SYSTEM_XML_FILENAME=\"SWIFT_hb.system.xml\"' $SD_FILE
59+
sed -i '4iBR2_OPENPOWER_MRW_XML_FILENAME=\"SWIFT_hb.mrw.xml\"' $SD_FILE
60+
sed -i '4iBR2_OPENPOWER_BIOS_XML_FILENAME=\"SWIFT_bios.xml\"' $SD_FILE
61+
sed -i '4iBR2_OPENPOWER_PNOR_XML_LAYOUT_FILENAME=\"axonePnorLayout_64.xml\"' $SD_FILE
62+
sed -i '4iBR2_OPENPOWER_PNOR_FILENAME=\"swift.pnor\"' $SD_FILE
63+
sed -i '4iBR2_HOSTBOOT_BINARY_SBE_FILENAME=\"axone_sbe.img.ecc\"' $SD_FILE
64+
sed -i '4iBR2_HOSTBOOT_BINARY_WINK_FILENAME=\"p9a.ref_image.hdr.bin.ecc\"' $SD_FILE
65+
sed -i '4iBR2_OPENPOWER_TARGETING_BIN_FILENAME=\"SWIFT_HB.targeting.bin\"' $SD_FILE
66+
sed -i '4iBR2_OPENPOWER_TARGETING_ECC_FILENAME=\"SWIFT_HB.targeting.bin.ecc\"' $SD_FILE
67+
68+
69+
###################################################################
1270
# Add symbolic links inside op-build for the swift config files
13-
ln -s ../../../swift_defconfig -t op-build/openpower/configs/
14-
ln -s ../../../../swift.config -t op-build/openpower/configs/hostboot/
71+
ln -fs ../../../swift_defconfig -t op-build/openpower/configs/
72+
ln -fs ../../../../swift.config -t op-build/openpower/configs/hostboot/
1573

swift_defconfig

-71
This file was deleted.

0 commit comments

Comments
 (0)