Merge lp:~xnox/debian-cd/cd-boot-images-ppc64el into lp:~ubuntu-cdimage/debian-cd/ubun3

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 2066
Proposed branch: lp:~xnox/debian-cd/cd-boot-images-ppc64el
Merge into: lp:~ubuntu-cdimage/debian-cd/ubun3
Diff against target: 224 lines (+43/-147)
2 files modified
tools/apt-selection (+1/-1)
tools/boot/groovy/boot-ppc64el (+42/-146)
To merge this branch: bzr merge lp:~xnox/debian-cd/cd-boot-images-ppc64el
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Review via email: mp+385700@code.launchpad.net

Commit message

Switch boot-ppc64el script to simply apt download cd-boot-images, unpack it, and include its contents on the iso.

That's all there is to it, to make ppc64le machines bootable with an ISO.

And a very straight forward grub.cfg.

Tested by booting in a qemu-kvm VM on a ppc64el host.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) :
review: Needs Fixing
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Respond to some comments.

Revision history for this message
Steve Langasek (vorlon) wrote :

Thanks, those explanations make sense. Still needs the handful of code fixes in order to be merged.

2062. By Steve Langasek

Merge lp:~xnox/debian-cd/drop-unused-imagesums

2063. By Steve Langasek

Merge lp:~vorlon/debian-cd/drop-archaic-install_languages

2064. By Steve Langasek

Merge lp:~xnox/debian-cd/drop-unused-preseeds

2065. By Dimitri John Ledkov

tools/apt-selection: add support for download action

2066. By Dimitri John Ledkov

groovy: switch ppc64el to cd-boot-images-ppc64el

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

@vorlon

Address review feedback, and rebased. Should be ready to merge.

Revision history for this message
Steve Langasek (vorlon) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tools/apt-selection'
2--- tools/apt-selection 2019-10-16 10:25:30 +0000
3+++ tools/apt-selection 2020-06-17 18:47:25 +0000
4@@ -148,7 +148,7 @@
5 temp=$APTTMP/$CODENAME-$FULLARCH/temp.apt-selection
6
7 # Launch the command
8-if [ "$1" = "update" -o "$1" = "check" ]; then
9+if [ "$1" = "update" -o "$1" = "check" -o "$1" = "download" ]; then
10 apt-get $options $@
11 exit $?
12 elif [ "$1" = "cache" ]; then
13
14=== modified file 'tools/boot/groovy/boot-ppc64el'
15--- tools/boot/groovy/boot-ppc64el 2020-05-21 21:59:34 +0000
16+++ tools/boot/groovy/boot-ppc64el 2020-06-17 18:47:25 +0000
17@@ -6,165 +6,61 @@
18 # $1 is the CD number
19 # $2 is the temporary CD build dir
20
21+# Using for HUMANPROJECT
22 . $BASEDIR/tools/boot/$DI_CODENAME/common.sh
23
24 set -e
25
26 N=$1
27 CDDIR=$2
28-INSTALLDIR=$CDDIR/install
29-if [ ! "$DI_DIST" ]; then
30- export DI_DIST="$DI_CODENAME"
31-fi
32-if [ -z "$DI_PATH" ]; then
33- DI_PATH="$($BASEDIR/tools/find-newest-installer)"
34-fi
35-
36-default_preseed
37-default_language
38
39 cd $CDDIR/..
40
41-# Only disk 1* bootable
42-if [ $N != 1 ] && [ $N != 1_NONUS ] && [ -z "$CDIMAGE_ADDON" ]; then
43- # we don't need HFS cruft on anything but CD 1
44- :> $N.mkisofs_opts
45- exit 0
46-fi
47-
48-echo -n "--netatalk -hfs -probe -map $BASEDIR/data/hfs.map" \
49- > $N.mkisofs_opts
50-echo -n " -chrp-boot -iso-level 4" >> $N.mkisofs_opts
51-# For newworld Mac booting - Note, no spaces in volid!
52-echo -n " -part -no-desktop -hfs-bless CD$N/install -hfs-volid ${CAPPROJECT}_PPC64EL_${CODENAME} " \
53- >> $N.mkisofs_opts
54-# Recommended size for a HFS Catalog is 4 megas per giga, defaults to 4 megas
55-if [ "$CDIMAGE_DVD" = 1 ]; then
56- if [ -n "$SIZELIMIT1" ];then
57- if [ "$SIZELIMIT1" -gt 1000000000 ];then
58- let newsize="$SIZELIMIT1"/256
59- echo -n " -hfs-parms MAX_XTCSIZE=$newsize" >> $N.mkisofs_opts
60- fi
61- else
62- if [ -n "$SIZELIMIT" ];then
63- if [ "$SIZELIMIT" -gt 1000000000 ];then
64- let newsize="$SIZELIMIT"/256
65- echo -n " -hfs-parms MAX_XTCSIZE=$newsize" >> $N.mkisofs_opts
66- fi
67- else
68- if [ -n "$DEFBINSIZE" ] && [ "$DEFBINSIZE" -gt 1000 ];then
69- let newsize="$DEFBINSIZE"*4096
70- echo -n " -hfs-parms MAX_XTCSIZE=$newsize" >> $N.mkisofs_opts
71- fi
72- fi
73- fi
74-fi
75-
76+# TODO add better weights
77 "$BASEDIR/tools/sorting_weights" "$N"
78 echo -n " -sort $(pwd)/$N.weights " >> $N.mkisofs_opts
79
80-PREFIX_PRESEED="$(dirname "$DEFAULT_PRESEED")/"
81-PREFIX_GA=""
82-PREFIX_HWE=""
83-KERNEL_PREFIXES="PREFIX_GA"
84-if [ "$BACKPORT_KERNEL" ]; then
85- PREFIX_HWE="hwe-"
86- if [ "$PROJECT" = ubuntu-server ]; then
87- KERNEL_PREFIXES="$KERNEL_PREFIXES PREFIX_HWE"
88- fi
89-fi
90-
91-BOOT_IMAGES=""
92-TAR_IMAGES=""
93-for kp in $KERNEL_PREFIXES; do
94- BOOT_IMAGES="$BOOT_IMAGES ${!kp}cdrom/vmlinux ${!kp}cdrom/initrd.gz ${!kp}cdrom/debian-cd_info.tar.gz"
95- TAR_IMAGES="$TAR_IMAGES ${!kp}netboot/netboot.tar.gz"
96-done
97-
98-(cd $CDDIR/..;
99- cp -a "$DI_PATH/current/legacy-images/MANIFEST.udebs" .
100- list_kernel_abis $BOOT_IMAGES | check_kernel_sync)
101-
102-DI_DIR="$DI_PATH/current/legacy-images"
103-if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
104-for kp in $KERNEL_PREFIXES; do
105- cp -lf "$DI_DIR/${!kp}cdrom/vmlinux" "$CDDIR/install/${!kp}vmlinux"
106- cp -lf "$DI_DIR/${!kp}cdrom/initrd.gz" "$CDDIR/install/${!kp}initrd.gz"
107-done
108-fi
109-if [ "$CDIMAGE_LIVE" = 1 ]; then
110- mv $CDDIR/casper/filesystem.kernel-generic $CDDIR/casper/vmlinux
111- mv $CDDIR/casper/filesystem.initrd-generic $CDDIR/casper/initrd.gz
112-fi
113-
114-if [ "$CDIMAGE_INSTALL" = 1 ]; then
115- for tar in $TAR_IMAGES; do
116- dir=$(dirname $tar)
117- mkdir -p $CDDIR/install/$dir
118- tar -C $CDDIR/install/$dir -xzpf "$DI_DIR/$tar"
119- done
120-fi
121-
122-tar -C "$CDDIR" -xf "$DI_DIR/cdrom/debian-cd_info.tar.gz"
123-
124-# setup grub menu
125-sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg
126-
127-# Set a timeout for GRUB
128+# rename kernel+initrd
129+mv $CDDIR/casper/filesystem.kernel-generic $CDDIR/casper/vmlinux
130+mv $CDDIR/casper/filesystem.initrd-generic $CDDIR/casper/initrd
131+HWE=
132+if [ -e $CDDIR/casper/filesystem.kernel-generic-hwe ]; then
133+ HWE="true"
134+ mv $CDDIR/casper/filesystem.kernel-generic-hwe $CDDIR/casper/hwe-vmlinux
135+ mv $CDDIR/casper/filesystem.initrd-generic-hwe $CDDIR/casper/hwe-initrd
136+fi
137+
138+# download, extract and include cd-boot-images
139+mkdir cd-boot-images
140+$BASEDIR/tools/apt-selection download cd-boot-images-ppc64el
141+dpkg --fsys-tarfile cd-boot-images-ppc64el*_all.deb | tar xf - -C cd-boot-images
142+echo -n " cd-boot-images/usr/share/cd-boot-images-ppc64el/tree" >> $N.mkisofs_opts
143+
144+# generate grub.cfg
145+mkdir -p $CDDIR/boot/grub/
146 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
147 set timeout=30
148-EOF
149-
150-if [ "$BACKPORT_KERNEL" ]; then
151- cat > $CDDIR/boot/grub/hwe-grub.cfg <<EOF
152-submenu 'Boot and Install with the HWE kernel' {
153-EOF
154-fi
155-
156-for kp in $KERNEL_PREFIXES; do
157- if [ "$CDIMAGE_LIVE" = 1 ]; then
158- cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
159-menuentry "Install $HUMANPROJECT${!kp:+ (HWE)}" {
160- set gfxpayload=keep
161- linux /casper/${!kp}vmlinux $KERNEL_PARAMS quiet ---
162- initrd /casper/${!kp}initrd.gz
163-}
164-EOF
165- fi
166- if [ "$CDIMAGE_INSTALL" = 1 ]; then
167- cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
168-menuentry "Install $HUMANPROJECT${!kp:+ (HWE)}" {
169- set gfxpayload=keep
170- linux /install/${!kp}vmlinux $KERNEL_PARAMS ${DEFAULT_PRESEED/$PREFIX_PRESEED/$PREFIX_PRESEED${!kp}} quiet ---
171- initrd /install/${!kp}initrd.gz
172-}
173-EOF
174- fi
175-
176- if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
177- cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
178-menuentry "Check disc for defects${!kp:+ (HWE)}" {
179- set gfxpayload=keep
180- linux /install/${!kp}vmlinux $KERNEL_PARAMS MENU=/bin/cdrom-checker-menu quiet ---
181- initrd /install/${!kp}initrd.gz
182-}
183-EOF
184- cat >> $CDDIR/boot/grub/${!kp}grub.cfg <<EOF
185-menuentry "Rescue a broken system${!kp:+ (HWE)}" {
186- set gfxpayload=keep
187- linux /install/${!kp}vmlinux $KERNEL_PARAMS rescue/enable=true ---
188- initrd /install/${!kp}initrd.gz
189-}
190-EOF
191- fi
192-done # KERNEL_PREFIXES
193-
194-if [ "$BACKPORT_KERNEL" ] && [ "$PROJECT" = ubuntu-server ]; then
195- cat >> $CDDIR/boot/grub/hwe-grub.cfg <<EOF
196-}
197-EOF
198- cat $CDDIR/boot/grub/hwe-grub.cfg >> $CDDIR/boot/grub/grub.cfg
199-fi
200-rm -f $CDDIR/boot/grub/hwe-grub.cfg
201+
202+loadfont unicode
203+
204+set menu_color_normal=white/black
205+set menu_color_highlight=black/light-gray
206+
207+menuentry "$HUMANPROJECT" {
208+ set gfxpayload=keep
209+ linux /casper/vmlinux quiet ---
210+ initrd /casper/initrd
211+}
212+EOF
213+
214+if [ "$HWE" ]; then
215+ cat >> $CDDIR/boot/grub/grub.cfg <<EOF
216+menuentry "$HUMANPROJECT with the HWE kernel" {
217+ set gfxpayload=keep
218+ linux /casper/hwe-vmlinux quiet ---
219+ initrd /casper/hwe-initrd
220+}
221+EOF
222+fi
223
224 exit 0

Subscribers

People subscribed via source and target branches