Merge lp:~xnox/debian-cd/hwe-focal into lp:~ubuntu-cdimage/debian-cd/ubuntu

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 2110
Proposed branch: lp:~xnox/debian-cd/hwe-focal
Merge into: lp:~ubuntu-cdimage/debian-cd/ubuntu
Diff against target: 284 lines (+85/-20)
5 files modified
CONF.sh (+1/-0)
tools/boot/focal/boot-amd64 (+32/-15)
tools/boot/focal/boot-arm64 (+32/-5)
tools/boot/focal/boot-ppc64el (+11/-0)
tools/boot/focal/boot-s390x (+9/-0)
To merge this branch: bzr merge lp:~xnox/debian-cd/hwe-focal
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Łukasz Zemczak Needs Information
Review via email: mp+397181@code.launchpad.net

Commit message

Add subiquity hwe support for .2 release

we are building subiquity hwe support for the first time on s390x, arm64, ppc64el.

amd64 support is kind of new, due to all the changes in menus since bionic.

and bionic's .2 was done after cosmic was forked.

also I had to back out amd64 failed "generic & oem" kernel support that we had there for a little while for the desktop, but dropped before going GA. Otherwise the hwe kernel/initrd names were weird as "-generic-hwe" suffix, instead of "hwe-" prefix.

With these changes all subiquity isos build fine for me.

I did not check that flavours & desktop are not broken by these on amd64 & arm64.

But at least all the files look to be named correctly everywhere, and all the grub.cfg look kind of correct.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

also trying to not generate "ubiquity OEM install" and "safe graphics" menus on the SUbiquity isos, as that's not a thing for them.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Ok, the amd64 bits scare me, arm64 a bit less (but still). What is scariest is that ppc64el looked most 'ready' from the three, with HWE support basically there as-is. s390x is a different story.
At first it was hard to read the code with the indenting as it is, but actually it makes the diff much more readable.

This generally looks good. There's one inline question I have.

review: Needs Information
Revision history for this message
Steve Langasek (vorlon) :
Revision history for this message
Dimitri John Ledkov (xnox) :
Revision history for this message
Steve Langasek (vorlon) :
review: Needs Fixing
Revision history for this message
Steve Langasek (vorlon) :
review: Needs Fixing
Revision history for this message
Steve Langasek (vorlon) :
review: Needs Fixing
Revision history for this message
Steve Langasek (vorlon) wrote :

Will merge this and drop the dead code, per the comments.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CONF.sh'
2--- CONF.sh 2021-01-29 12:20:16 +0000
3+++ CONF.sh 2021-01-29 18:11:58 +0000
4@@ -304,6 +304,7 @@
5 export CODENAME=focal
6 export CAPCODENAME='Focal Fossa'
7 export DEBVERSION="20.04.2 LTS"
8+ export BACKPORT_KERNEL="hwe-20.04"
9 export OFFICIAL="Release"
10 ;;
11 groovy)
12
13=== modified file 'tools/boot/focal/boot-amd64'
14--- tools/boot/focal/boot-amd64 2021-01-25 15:52:03 +0000
15+++ tools/boot/focal/boot-amd64 2021-01-29 18:11:58 +0000
16@@ -70,6 +70,7 @@
17 THISTYPE=${KTYPE[$NN]}
18
19 PREFIX_PRESEED="$(dirname "$DEFAULT_PRESEED")/"
20+PREFIX_CASPER="casper/"
21 PREFIX_GA=""
22 PREFIX_HWE=""
23 KERNEL_PREFIXES="PREFIX_GA"
24@@ -83,10 +84,18 @@
25 DISK_IMAGES=""
26 BOOT_IMAGES=""
27 TAR_IMAGES=""
28+
29+# We only use d-i kernels for legacy-iso, everything else only needs
30+# debian-cd_info and possibly netboot (not sure how and if it is used)
31+if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
32 for kp in $KERNEL_PREFIXES; do
33 BOOT_IMAGES="$BOOT_IMAGES ${!kp}cdrom/initrd.gz ${!kp}cdrom/vmlinuz ${!kp}cdrom/debian-cd_info.tar.gz"
34 TAR_IMAGES="$TAR_IMAGES ${!kp}netboot/netboot.tar.gz"
35 done
36+else
37+ BOOT_IMAGES="$BOOT_IMAGES cdrom/debian-cd_info.tar.gz"
38+ TAR_IMAGES="$TAR_IMAGES netboot/netboot.tar.gz"
39+fi
40
41 case $PROJECT in
42 ubuntustudio)
43@@ -115,7 +124,9 @@
44 done
45
46 if [ "$NN" = "1" ]; then
47- list_kernel_abis $BOOT_IMAGES | check_kernel_sync $FLAVOUR
48+ if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
49+ list_kernel_abis $BOOT_IMAGES | check_kernel_sync $FLAVOUR
50+ fi
51
52 echo "Using ISOLINUX boot-disks image on CD$N"
53 mkdir -p $CDDIR/../syslinux boot$N/isolinux
54@@ -153,13 +164,14 @@
55 if [ "$CDIMAGE_LIVE" = 1 ]; then
56 CASPER_KERNEL=/casper/vmlinuz
57 CASPER_INITRD=/casper/initrd
58- for kernel in $CDDIR/casper/filesystem.kernel-*; do
59- flavour=${kernel##*filesystem.kernel-}
60- flavour2="-${flavour}"
61- [ "$flavour" = "${FLAVOUR}" ] && flavour2=""
62- mv $CDDIR/casper/filesystem.kernel-$flavour $CDDIR$CASPER_KERNEL${flavour2}
63- mv $CDDIR/casper/filesystem.initrd-$flavour $CDDIR$CASPER_INITRD${flavour2}
64- done
65+ mv $CDDIR/casper/filesystem.kernel-$FLAVOUR $CDDIR$CASPER_KERNEL
66+ mv $CDDIR/casper/filesystem.initrd-$FLAVOUR $CDDIR$CASPER_INITRD
67+ if [ -e "$CDDIR/casper/filesystem.kernel-${FLAVOUR}-hwe" ]; then
68+ mv $CDDIR/casper/filesystem.kernel-${FLAVOUR}-hwe $CDDIR/casper/hwe-vmlinuz
69+ fi
70+ if [ -e "$CDDIR/casper/filesystem.initrd-${FLAVOUR}-hwe" ]; then
71+ mv $CDDIR/casper/filesystem.initrd-${FLAVOUR}-hwe $CDDIR/casper/hwe-initrd
72+ fi
73 fi
74 echo -n "-cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table " >> $N.mkisofs_opts
75 case "$MKISOFS" in
76@@ -461,23 +473,28 @@
77
78 LAYERFS_PATH_OPT=$(add_layerfs_path_opt)
79
80+for kp in $KERNEL_PREFIXES; do
81 for variant in "" " (safe graphics)^ nomodeset"; do
82 suffix="${variant%^*}"
83 extra_kopt="${variant#*^}"
84+ if [ "$PROJECT" = "ubuntu-server" ] && [ "$extra_kopt" = " nomodeset" ]; then
85+ continue
86+ fi
87 cat >> boot$N/isolinux/txt.cfg <<EOF
88-label live$(echo "${extra_kopt}"|tr ' ' '-')
89- menu label ${livelabel}${suffix}
90- kernel $CASPER_KERNEL
91- append $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT initrd=$CASPER_INITRD $QUIET $SPLASH$extra_kopt ---
92+label ${!kp}live$(echo "${extra_kopt}"|tr ' ' '-')
93+ menu label ${livelabel}${suffix}${!kp:+ with the HWE kernel}
94+ kernel ${CASPER_KERNEL/$PREFIX_CASPER/$PREFIX_CASPER${!kp}}
95+ append $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT initrd=${CASPER_INITRD/$PREFIX_CASPER/$PREFIX_CASPER${!kp}} $QUIET $SPLASH$extra_kopt ---
96 EOF
97- cat >> $CDDIR/boot/grub/grub.cfg <<EOF
98+ cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
99 menuentry "${livelabelgrub#^}${suffix}" {
100 set gfxpayload=keep
101- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparamsgrub$LAYERFS_PATH_OPT $QUIET $SPLASH$extra_kopt ---
102- initrd $CASPER_INITRD
103+ linux ${CASPER_KERNEL/$PREFIX_CASPER/$PREFIX_CASPER${!kp}} $KERNEL_PARAMS $DEFAULT_PRESEED$liveparamsgrub$LAYERFS_PATH_OPT $QUIET $SPLASH$extra_kopt ---
104+ initrd ${CASPER_INITRD/$PREFIX_CASPER/$PREFIX_CASPER${!kp}}
105 }
106 EOF
107 done
108+done
109 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
110 menuentry "${livelabelgrub#^}" {
111 set gfxpayload=keep
112
113=== modified file 'tools/boot/focal/boot-arm64'
114--- tools/boot/focal/boot-arm64 2020-04-15 12:15:16 +0000
115+++ tools/boot/focal/boot-arm64 2021-01-29 18:11:58 +0000
116@@ -58,6 +58,7 @@
117 THISTYPE=${KTYPE[$NN]}
118
119 PREFIX_PRESEED="$(dirname "$DEFAULT_PRESEED")/"
120+PREFIX_CASPER="casper/"
121 PREFIX_GA=""
122 PREFIX_HWE=""
123 KERNEL_PREFIXES="PREFIX_GA"
124@@ -71,10 +72,15 @@
125 BOOT_IMAGES=""
126 TAR_IMAGES=""
127 DISK_IMAGES=""
128+if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
129 for kp in $KERNEL_PREFIXES; do
130 BOOT_IMAGES="$BOOT_IMAGES ${!kp}cdrom/vmlinuz ${!kp}cdrom/initrd.gz ${!kp}cdrom/debian-cd_info.tar.gz"
131 TAR_IMAGES="$TAR_IMAGES ${!kp}netboot/netboot.tar.gz"
132 done
133+else
134+ BOOT_IMAGES="$BOOT_IMAGES cdrom/debian-cd_info.tar.gz"
135+ TAR_IMAGES="$TAR_IMAGES netboot/netboot.tar.gz"
136+fi
137
138 FLAVOUR=generic
139
140@@ -92,9 +98,9 @@
141 done
142
143 if [ "$NN" = "1" ]; then
144+ if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
145 list_kernel_abis $BOOT_IMAGES | check_kernel_sync $FLAVOUR
146
147- if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
148 for kp in $KERNEL_PREFIXES; do
149 cp -lf "${!kp}cdrom/vmlinuz" "$CDDIR/install/${!kp}vmlinuz"
150 cp -lf "${!kp}cdrom/initrd.gz" "$CDDIR/install/${!kp}initrd.gz"
151@@ -111,6 +117,12 @@
152 fi
153 CASPER_INITRD="/casper/initrd$(initrd_suffix "$CDDIR/casper/filesystem.initrd-$FLAVOUR")"
154 mv $CDDIR/casper/filesystem.initrd-$FLAVOUR "$CDDIR$CASPER_INITRD"
155+ if [ -e "$CDDIR/casper/filesystem.kernel-${FLAVOUR}-hwe" ]; then
156+ mv $CDDIR/casper/filesystem.kernel-${FLAVOUR}-hwe $CDDIR/casper/hwe-vmlinuz
157+ fi
158+ if [ -e "$CDDIR/casper/filesystem.initrd-${FLAVOUR}-hwe" ]; then
159+ mv $CDDIR/casper/filesystem.initrd-${FLAVOUR}-hwe "$CDDIR${CASPER_INITRD/$PREFIX_CASPER/${PREFIX_CASPER}hwe-}"
160+ fi
161 fi
162 echo -n "-J -l -c boot/boot.cat -partition_offset 16 " >> $N.mkisofs_opts
163 # Once we move to xorriso >= 1.4.4, we should consider changing from
164@@ -169,17 +181,22 @@
165 if [ "$PROJECT" = kubuntu ] || [ "$PROJECT" = kubuntu-plasma5 ]; then
166 livelabel="^Start $HUMANPROJECT"
167 liveparams=' maybe-ubiquity'
168+ elif [ "$PROJECT" = ubuntu-server ]; then
169+ livelabel="^Install $HUMANPROJECT"
170+ liveparams=
171 else
172 livelabel="^Try $HUMANPROJECT without installing"
173 liveparams=
174 fi
175- cat >> $CDDIR/boot/grub/grub.cfg <<EOF
176+ for kp in $KERNEL_PREFIXES; do
177+ cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
178 menuentry "${livelabel#^}" {
179 set gfxpayload=keep
180- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT quiet splash ---
181- initrd $CASPER_INITRD
182+ linux ${CASPER_KERNEL/$PREFIX_CASPER/$PREFIX_CASPER${!kp}} $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT quiet splash ---
183+ initrd ${CASPER_INITRD/$PREFIX_CASPER/$PREFIX_CASPER${!kp}}
184 }
185 EOF
186+ done
187 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
188 menuentry "${livelabel#^}" {
189 set gfxpayload=keep
190@@ -187,7 +204,7 @@
191 initrd $CASPER_INITRD
192 }
193 EOF
194- if [ "$PROJECT" != ubuntu-mid ] && [ "$PROJECT" != kubuntu ] && [ "$PROJECT" != kubuntu-plasma5 ]; then
195+ if [ "$PROJECT" != ubuntu-mid ] && [ "$PROJECT" != kubuntu ] && [ "$PROJECT" != kubuntu-plasma5 ] && [ "$PROJECT" != ubuntu-server ]; then
196 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
197 menuentry "Install $HUMANPROJECT" {
198 set gfxpayload=keep
199@@ -229,6 +246,7 @@
200 # to have a two-dimensional set of boot options, as is implemented for
201 # isolinux using the gfxboot "applies" keyword.
202 if [ "$CDIMAGE_LIVE" = 1 ]; then
203+ if [ "$PROJECT" != "ubuntu-server" ]; then
204 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
205 menuentry "OEM install (for manufacturers)" {
206 set gfxpayload=keep
207@@ -236,6 +254,7 @@
208 initrd $CASPER_INITRD
209 }
210 EOF
211+ fi
212 else
213 for kp in $KERNEL_PREFIXES; do
214 cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
215@@ -265,6 +284,14 @@
216 EOF
217 done
218 fi
219+cat >> $CDDIR/boot/grub/grub.cfg <<EOF
220+menuentry 'Boot from next volume' {
221+ exit 1
222+}
223+menuentry 'UEFI Firmware Settings' {
224+ fwsetup
225+}
226+EOF
227 if [ "$BACKPORT_KERNEL" ] && [ "$PROJECT" = ubuntu-server ]; then
228 cat >> $CDDIR/boot/grub/hwe-grub.cfg <<EOF
229 }
230
231=== modified file 'tools/boot/focal/boot-ppc64el'
232--- tools/boot/focal/boot-ppc64el 2020-04-15 09:08:10 +0000
233+++ tools/boot/focal/boot-ppc64el 2021-01-29 18:11:58 +0000
234@@ -78,6 +78,7 @@
235
236 BOOT_IMAGES=""
237 TAR_IMAGES=""
238+if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
239 for kp in $KERNEL_PREFIXES; do
240 BOOT_IMAGES="$BOOT_IMAGES ${!kp}cdrom/vmlinux ${!kp}cdrom/initrd.gz ${!kp}cdrom/debian-cd_info.tar.gz"
241 TAR_IMAGES="$TAR_IMAGES ${!kp}netboot/netboot.tar.gz"
242@@ -86,6 +87,10 @@
243 (cd $CDDIR/..;
244 cp -a "$DI_PATH/current/legacy-images/MANIFEST.udebs" .
245 list_kernel_abis $BOOT_IMAGES | check_kernel_sync)
246+else
247+ BOOT_IMAGES="$BOOT_IMAGES cdrom/debian-cd_info.tar.gz"
248+ TAR_IMAGES="$TAR_IMAGES netboot/netboot.tar.gz"
249+fi
250
251 DI_DIR="$DI_PATH/current/legacy-images"
252 if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
253@@ -97,6 +102,12 @@
254 if [ "$CDIMAGE_LIVE" = 1 ]; then
255 mv $CDDIR/casper/filesystem.kernel-generic $CDDIR/casper/vmlinux
256 mv $CDDIR/casper/filesystem.initrd-generic $CDDIR/casper/initrd.gz
257+ if [ -e "$CDDIR/casper/filesystem.kernel-generic-hwe" ]; then
258+ mv $CDDIR/casper/filesystem.kernel-generic-hwe $CDDIR/casper/hwe-vmlinux
259+ fi
260+ if [ -e "$CDDIR/casper/filesystem.initrd-generic-hwe" ]; then
261+ mv $CDDIR/casper/filesystem.initrd-generic-hwe $CDDIR/casper/hwe-initrd.gz
262+ fi
263 fi
264
265 if [ "$CDIMAGE_INSTALL" = 1 ]; then
266
267=== modified file 'tools/boot/focal/boot-s390x'
268--- tools/boot/focal/boot-s390x 2020-04-15 09:08:10 +0000
269+++ tools/boot/focal/boot-s390x 2021-01-29 18:11:58 +0000
270@@ -79,6 +79,15 @@
271 cp -lf "$DI_DIR/hwe-generic/initrd.off" $hwedir
272 cp -lf "$DI_DIR/hwe-generic/initrd.siz" $hwedir
273 fi
274+if [ -e $CDDIR/casper/filesystem.kernel-generic-hwe ]; then
275+ mkdir -p $hwedir
276+ mv $CDDIR/casper/filesystem.initrd-generic-hwe $hwedir/initrd.ubuntu
277+ mv $CDDIR/casper/filesystem.kernel-generic-hwe $hwedir/kernel.ubuntu
278+ echo "$CMDLINE" > $hwedir/parmfile.ubuntu
279+ perl -e "print pack('N', -s '$imagedir/initrd.ubuntu')" > $hwedir/initrd.siz
280+ sed -e 's/boot from CD-ROM or FTP-Server/rolling kernel/' \
281+ "$DI_DIR/generic/ubuntu.ins" > $hwedir/ubuntu.ins
282+fi
283
284 $BASEDIR/tools/gen-s390-cd-kernel.pl --initrd=$imagedir/initrd.ubuntu --kernel=$imagedir/kernel.ubuntu --cmdline="$CMDLINE" --outfile=$imagedir/ubuntu.ikr
285

Subscribers

People subscribed via source and target branches