Skip to content

Commit

Permalink
multi-arch-pipeline: hack in ttyS0 for aarch64 aws image
Browse files Browse the repository at this point in the history
This is a workaround to get console=ttyS0,115200n8 into the
aarch64 AWS image. It does so by applying the following patch
to gf-platformid:

```diff
diff --git a/usr/lib/coreos-assembler/gf-platformid b/usr/lib/coreos-assembler/gf-platformid
index 2912b322c..36d089651 100755
--- a/usr/lib/coreos-assembler/gf-platformid
+++ b/usr/lib/coreos-assembler/gf-platformid
@@ -46,7 +46,11 @@ blscfg_path=$(coreos_gf glob-expand /boot/loader/entries/ostree-*.conf)
 coreos_gf download "${blscfg_path}" "${tmpd}"/bls.conf
 # Remove any platformid currently there
 sed -i -e 's, ignition.platform.id=[a-zA-Z0-9]*,,g' "${tmpd}"/bls.conf
-sed -i -e 's,^\(options .*\),\1 ignition.platform.id='"${platformid}"',' "${tmpd}"/bls.conf
+if [ "${platformid}" == 'aws' ]; then
+    sed -i -e 's|^\(options .*\)|\1 ignition.platform.id='"${platformid}"' console=ttyS0,115200n8|' "${tmpd}"/bls.conf
+else
+    sed -i -e 's,^\(options .*\),\1 ignition.platform.id='"${platformid}"',' "${tmpd}"/bls.conf
+fi
 coreos_gf upload "${tmpd}"/bls.conf "${blscfg_path}"

 if [ "$basearch" = "s390x" ] ; then
```

Once coreos/fedora-coreos-config#1181 and
coreos/coreos-assembler#2400 land then we
won't need this any longer.

This implements a fix for coreos/fedora-coreos-tracker#920
  • Loading branch information
dustymabe committed Sep 5, 2021
1 parent 61dab50 commit f8cfc5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jobs/multi-arch-pipeline.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,9 @@ stages:
- cosa buildextend-live
- kola testiso -S --output-dir tmp/kola-metal
- kola testiso -SP --qemu-native-4k --scenarios iso-install --output-dir tmp/kola-metal4k
- cosa buildextend-aws
- cosa buildextend-openstack
- echo 'ZGlmZiAtLWdpdCBhL3Vzci9saWIvY29yZW9zL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2Jscy5jb25mCitmaQogY29yZW9zX2dmIHVwbG9hZCAiJHt0bXBkfSIvYmxzLmNvbmYgIiR7YmxzY2ZnX3BhdGh9IgogCiBpZiBbICIkYmFzZWFyY2giID0gInMzOTB4IiBdIDsgdGhlbiAK' | base64 --decode | sudo patch /usr/lib/coreos-assembler/gf-platformid
- cosa buildextend-aws
post_commands:
- cosa compress --compressor xz
- tar --xz -cf tmp/kola.tar.xz tmp/kola{-basic,,-metal,-metal4k} || true
Expand Down

0 comments on commit f8cfc5b

Please sign in to comment.