Merge lp:~daniel-thewatkins/livecd-rootfs/s390x_cloud_images into lp:livecd-rootfs

Proposed by Dan Watkins on 2016-01-13
Status: Merged
Merged at revision: 1260
Proposed branch: lp:~daniel-thewatkins/livecd-rootfs/s390x_cloud_images
Merge into: lp:livecd-rootfs
Diff against target: 72 lines (+33/-1)
3 files modified
debian/changelog (+3/-0)
live-build/ubuntu-cpc/hooks/032-disk-image.binary (+26/-1)
live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot (+4/-0)
To merge this branch: bzr merge lp:~daniel-thewatkins/livecd-rootfs/s390x_cloud_images
Reviewer Review Type Date Requested Status
Colin Watson 2016-01-13 Approve on 2016-01-13
Review via email: mp+282413@code.launchpad.net
To post a comment you must log in.
1260. By Dan Watkins on 2016-01-13

Enable building of s390x cloud images.

Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2016-01-08 21:51:54 +0000
3+++ debian/changelog 2016-01-13 10:19:24 +0000
4@@ -8,6 +8,9 @@
5 * live-build/ubuntu-core/hooks/11-remove-extra-packages.chroot:
6 - remove libicu52 hook
7
8+ [ Daniel Watkins ]
9+ * Enable building of s390x cloud images.
10+
11 -- Ɓukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> Mon, 14 Dec 2015 10:13:31 +0100
12
13 livecd-rootfs (2.368) xenial; urgency=medium
14
15=== modified file 'live-build/ubuntu-cpc/hooks/032-disk-image.binary'
16--- live-build/ubuntu-cpc/hooks/032-disk-image.binary 2015-11-06 09:54:59 +0000
17+++ live-build/ubuntu-cpc/hooks/032-disk-image.binary 2016-01-13 10:19:24 +0000
18@@ -34,7 +34,7 @@
19
20 should_install_grub() {
21 case $architecture in
22- armhf|arm64)
23+ armhf|arm64|s390x)
24 return 1
25 ;;
26 *)
27@@ -56,5 +56,30 @@
28 rmdir mountpoint
29 fi
30
31+if [ "$architecture" = "s390x" ]; then
32+ # Do ZIPL install bits
33+ mkdir mountpoint
34+ mount_partition "${rootfs_dev_mapper}" mountpoint
35+
36+ # Write out cloudy zipl.conf for future kernel updates
37+ cat << EOF > mountpoint/etc/zipl.conf
38+# This has been modified by the cloud image build process
39+[defaultboot]
40+default=ubuntu
41+
42+[ubuntu]
43+target = /boot
44+image = /boot/vmlinuz
45+ramdisk = /boot/initrd.img
46+parameters = root=LABEL=cloudimg-rootfs
47+EOF
48+
49+ # Create bootmap file
50+ mountpoint/sbin/zipl -V --image=mountpoint/boot/vmlinuz --ramdisk=mountpoint/boot/initrd.img --parameters='root=LABEL=cloudimg-rootfs' --target=mountpoint/boot/ --targetbase=/dev/loop0 --targettype=SCSI --targetblocksize=512 --targetoffset=2048
51+
52+ umount_partition mountpoint
53+ rmdir mountpoint
54+fi
55+
56 clean_loops
57 trap - EXIT
58
59=== modified file 'live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot'
60--- live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot 2015-11-06 09:54:59 +0000
61+++ live-build/ubuntu-cpc/hooks/999-cpc-fixes.chroot 2016-01-13 10:19:24 +0000
62@@ -142,6 +142,10 @@
63 exit 0
64 fi
65
66+if [ "$arch" = "s390x" ]; then
67+ exit 0
68+fi
69+
70 ## Add ttyS0 for i386/amd64 for Trusty and newer
71 if [ "$arch" = "i386" -o "$arch" = "amd64" ]; then
72 add_serial_console ttyS0

Subscribers

People subscribed via source and target branches