aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAlexander Egorenkov <Alexander.Egorenkov@ibm.com>2020-09-12 11:06:48 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-09-14 13:09:25 +0200
commitdf4f5a9c4a22ded414b447d4d790c53d4d2a86e2 (patch)
treed647f11ba0833677e806871c89f8f319ed90729d /tools
parentdfb4c36914169af0be6302dc30134475ea3f301b (diff)
tools/create-gce-image.sh: support s390x
Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/create-gce-image.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/create-gce-image.sh b/tools/create-gce-image.sh
index 80be8686a..aad89e586 100755
--- a/tools/create-gce-image.sh
+++ b/tools/create-gce-image.sh
@@ -58,7 +58,7 @@ if [ ! -e $1/sbin/init ]; then
fi
case "$IMG_ARCH" in
- 386|amd64)
+ 386|amd64|s390x)
KERNEL_IMAGE_BASENAME=bzImage
;;
ppc64le)
@@ -114,7 +114,7 @@ elif [ "$BLOCK_DEVICE" == "nbd" ]; then
fi
case "$IMG_ARCH" in
- 386|amd64)
+ 386|amd64|s390x)
echo -en "o\nn\np\n1\n\n\na\nw\n" | sudo fdisk $DISKDEV
PARTDEV=$DISKDEV"p1"
;;
@@ -220,4 +220,9 @@ menuentry 'linux' --class gnu-linux --class gnu --class os {
EOF
sudo grub-install --target=powerpc-ieee1275 --boot-directory=disk.mnt/boot $DISKDEV"p1"
;;
+s390x)
+ sudo zipl -V -t disk.mnt/boot -i disk.mnt/vmlinuz \
+ -P "root=/dev/vda1 console=ttyS0 earlyprintk=serial rodata=n oops=panic panic_on_warn=1 nmi_watchdog=panic panic=86400 net.ifnames=0 sysctl.kernel.hung_task_all_cpu_backtrace=1 net.ifnames=0 biosdevname=0 $CMDLINE" \
+ --targetbase=$DISKDEV --targettype=SCSI --targetblocksize=512 --targetoffset=2048
+ ;;
esac