|
2 | 2 |
|
3 | 3 | echo "Cloning open-power/op-build and setting up Swift Config Files ...";
|
4 | 4 |
|
| 5 | +################################################################### |
| 6 | +# Setup constants used below |
| 7 | +# |
| 8 | +# a) This constant is likely to change: |
| 9 | +SWIFT_BR2_OPENPOWER_MACHINE_XML_VERSION=180a43b301fd880125152e17ba51616545263933 |
5 | 10 |
|
| 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 | +################################################################### |
6 | 17 | # Exit from the script on any fail
|
7 | 18 | set -e
|
8 | 19 |
|
| 20 | + |
| 21 | +################################################################### |
9 | 22 | # Clone open-power/op-build. Using master branch for now
|
10 | 23 | git clone --recursive https://github.com/open-power/op-build.git
|
11 | 24 |
|
| 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 | +################################################################### |
12 | 70 | # 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/ |
15 | 73 |
|
0 commit comments