Merge lp:~xnox/debian-cd/aarch64-laptops into lp:~ubuntu-cdimage/debian-cd/ubun3

Proposed by Dimitri John Ledkov
Status: Superseded
Proposed branch: lp:~xnox/debian-cd/aarch64-laptops
Merge into: lp:~ubuntu-cdimage/debian-cd/ubun3
Diff against target: 215 lines (+80/-18)
2 files modified
tools/boot/focal/boot-arm64 (+40/-9)
tools/boot/groovy/boot-arm64 (+40/-9)
To merge this branch: bzr merge lp:~xnox/debian-cd/aarch64-laptops
Reviewer Review Type Date Requested Status
Steve Langasek Needs Information
Review via email: mp+382968@code.launchpad.net

This proposal has been superseded by a proposal from 2020-10-02.

Commit message

Improve aarch64-laptops boot

Description of the change

Improve aarch64-laptops boot

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

Dimitri, is this still applicable?

review: Needs Information

Unmerged revisions

2057. By Dimitri John Ledkov

Improve aarch64-laptops boot

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tools/boot/focal/boot-arm64'
--- tools/boot/focal/boot-arm64 2020-04-15 12:15:16 +0000
+++ tools/boot/focal/boot-arm64 2020-04-26 15:11:47 +0000
@@ -112,7 +112,7 @@
112 CASPER_INITRD="/casper/initrd$(initrd_suffix "$CDDIR/casper/filesystem.initrd-$FLAVOUR")"112 CASPER_INITRD="/casper/initrd$(initrd_suffix "$CDDIR/casper/filesystem.initrd-$FLAVOUR")"
113 mv $CDDIR/casper/filesystem.initrd-$FLAVOUR "$CDDIR$CASPER_INITRD"113 mv $CDDIR/casper/filesystem.initrd-$FLAVOUR "$CDDIR$CASPER_INITRD"
114 fi114 fi
115 echo -n "-J -l -c boot/boot.cat -partition_offset 16 " >> $N.mkisofs_opts115 echo -n "-J -l -c boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table" >> $N.mkisofs_opts
116 # Once we move to xorriso >= 1.4.4, we should consider changing from116 # Once we move to xorriso >= 1.4.4, we should consider changing from
117 # "-e boot/grub/efi.img"117 # "-e boot/grub/efi.img"
118 # to118 # to
@@ -120,7 +120,7 @@
120 # This will point the el torito catalog to the appended partition instead120 # This will point the el torito catalog to the appended partition instead
121 # of the in-ISO file, which will allow us to remove efi.img from the ISO121 # of the in-ISO file, which will allow us to remove efi.img from the ISO
122 # filesystem and recover it's space.122 # filesystem and recover it's space.
123 echo -n "-append_partition 2 0xef $CDDIR/boot/grub/efi.img -e boot/grub/efi.img -no-emul-boot " >> $N.mkisofs_opts123 echo -n "-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus" >> $N.mkisofs_opts
124fi124fi
125125
126#install_languages $CDDIR126#install_languages $CDDIR
@@ -148,10 +148,41 @@
148mkdir -p $CDDIR/boot148mkdir -p $CDDIR/boot
149cat cdrom/debian-cd_info.tar.gz | (cd $CDDIR/boot/; tar xz)149cat cdrom/debian-cd_info.tar.gz | (cd $CDDIR/boot/; tar xz)
150# If we want a copy of grub on the ISO as well, seems redundant:150# If we want a copy of grub on the ISO as well, seems redundant:
151#mkdir -p $CDDIR/EFI/BOOT151mkdir -p $CDDIR/EFI/BOOT
152#mcopy -i $CDDIR/boot/grub/efi.img ::EFI/BOOT/bootaa64.efi $CDDIR/EFI/BOOT/bootaa64.efi152mcopy -i $CDDIR/boot/grub/efi.img ::EFI/BOOT/bootaa64.efi $CDDIR/EFI/BOOT/bootaa64.efi
153sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg153sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg
154154
155### aarch64-laptops-support
156if [ "$CDIMAGE_LIVE" = 1 ] && [ "$PROJECT" = ubuntu ]; then
157 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
158insmod smbios
159smbios --type 1 --get-string 4 --linux --set dmi_svn # DMI_SYS_VENDOR
160smbios --type 1 --get-string 5 --linux --set dmi_pn # DMI_PRODUCT_NAME
161dmi_product=svn\${dmi_svn}:pn\${dmi_pn}
162dtb=
163if [ \${dmi_product} = "svnASUSTeKCOMPUTERINC.:pnNovaGoTP370QL"]; then
164 dtb="msm8998-asus-novago-tp370ql.dtb"
165fi
166if [ \${dmi_product} = "svnLENOVO:pn81JL"]; then
167 dtb="sdm850-lenovo-yoga-c630.dtb"
168fi
169if loadfont /boot/grub/font.pf2 ; then
170 set gfxmode=auto
171 insmod efi_gop
172 insmod efi_uga
173 insmod gfxterm
174 terminal_output gfxterm
175fi
176EOF
177 cp $DI_PATH/current/legacy-images/device-tree/msm8998-asus-novago-tp370ql.dtb $CDDIR/boot/
178 cp $DI_PATH/current/legacy-images/device-tree/sdm850-lenovo-yoga-c630.dtb $CDDIR/boot/
179 LAPTOP_PARAMS=" efi=novamap clk_ignore_unused pd_ignore_unused module_blacklist=hid_sensor_hub initcall_blacklist=acpi_button_driver_init
180 if [ \"\$dtb\" ]; then
181 devicetree /boot/\$dtb
182 fi"
183fi
184### aarch64-laptops-support end
185
155# Set a timeout for grub.186# Set a timeout for grub.
156cat >> $CDDIR/boot/grub/grub.cfg <<EOF187cat >> $CDDIR/boot/grub/grub.cfg <<EOF
157set timeout=30188set timeout=30
@@ -176,14 +207,14 @@
176 cat >> $CDDIR/boot/grub/grub.cfg <<EOF207 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
177menuentry "${livelabel#^}" {208menuentry "${livelabel#^}" {
178 set gfxpayload=keep209 set gfxpayload=keep
179 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT quiet splash ---210 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT quiet splash ---${LAPTOP_PARAMS}
180 initrd $CASPER_INITRD211 initrd $CASPER_INITRD
181}212}
182EOF213EOF
183 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF214 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
184menuentry "${livelabel#^}" {215menuentry "${livelabel#^}" {
185 set gfxpayload=keep216 set gfxpayload=keep
186 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} quiet splash ---217 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} quiet splash ---${LAPTOP_PARAMS}
187 initrd $CASPER_INITRD218 initrd $CASPER_INITRD
188}219}
189EOF220EOF
@@ -191,13 +222,13 @@
191 cat >> $CDDIR/boot/grub/grub.cfg <<EOF222 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
192menuentry "Install $HUMANPROJECT" {223menuentry "Install $HUMANPROJECT" {
193 set gfxpayload=keep224 set gfxpayload=keep
194 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash ---225 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash ---${LAPTOP_PARAMS}
195 initrd $CASPER_INITRD226 initrd $CASPER_INITRD
196}227}
197EOF228EOF
198 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF229 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
199menuentry "Install $HUMANPROJECT" {230menuentry "Install $HUMANPROJECT" {
200 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} quiet splash ---231 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} quiet splash ---${LAPTOP_PARAMS}
201 initrd $CASPER_INITRD232 initrd $CASPER_INITRD
202}233}
203EOF234EOF
@@ -232,7 +263,7 @@
232 cat >> $CDDIR/boot/grub/grub.cfg <<EOF263 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
233menuentry "OEM install (for manufacturers)" {264menuentry "OEM install (for manufacturers)" {
234 set gfxpayload=keep265 set gfxpayload=keep
235 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash oem-config/enable=true ---266 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash oem-config/enable=true ---${LAPTOP_PARAMS}
236 initrd $CASPER_INITRD267 initrd $CASPER_INITRD
237}268}
238EOF269EOF
239270
=== modified file 'tools/boot/groovy/boot-arm64'
--- tools/boot/groovy/boot-arm64 2020-04-24 14:51:48 +0000
+++ tools/boot/groovy/boot-arm64 2020-04-26 15:11:47 +0000
@@ -112,7 +112,7 @@
112 CASPER_INITRD="/casper/initrd$(initrd_suffix "$CDDIR/casper/filesystem.initrd-$FLAVOUR")"112 CASPER_INITRD="/casper/initrd$(initrd_suffix "$CDDIR/casper/filesystem.initrd-$FLAVOUR")"
113 mv $CDDIR/casper/filesystem.initrd-$FLAVOUR "$CDDIR$CASPER_INITRD"113 mv $CDDIR/casper/filesystem.initrd-$FLAVOUR "$CDDIR$CASPER_INITRD"
114 fi114 fi
115 echo -n "-J -l -c boot/boot.cat -partition_offset 16 " >> $N.mkisofs_opts115 echo -n "-J -l -c boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table" >> $N.mkisofs_opts
116 # Once we move to xorriso >= 1.4.4, we should consider changing from116 # Once we move to xorriso >= 1.4.4, we should consider changing from
117 # "-e boot/grub/efi.img"117 # "-e boot/grub/efi.img"
118 # to118 # to
@@ -120,7 +120,7 @@
120 # This will point the el torito catalog to the appended partition instead120 # This will point the el torito catalog to the appended partition instead
121 # of the in-ISO file, which will allow us to remove efi.img from the ISO121 # of the in-ISO file, which will allow us to remove efi.img from the ISO
122 # filesystem and recover it's space.122 # filesystem and recover it's space.
123 echo -n "-append_partition 2 0xef $CDDIR/boot/grub/efi.img -e boot/grub/efi.img -no-emul-boot " >> $N.mkisofs_opts123 echo -n "-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus" >> $N.mkisofs_opts
124fi124fi
125125
126#install_languages $CDDIR126#install_languages $CDDIR
@@ -148,10 +148,41 @@
148mkdir -p $CDDIR/boot148mkdir -p $CDDIR/boot
149cat cdrom/debian-cd_info.tar.gz | (cd $CDDIR/boot/; tar xz)149cat cdrom/debian-cd_info.tar.gz | (cd $CDDIR/boot/; tar xz)
150# If we want a copy of grub on the ISO as well, seems redundant:150# If we want a copy of grub on the ISO as well, seems redundant:
151#mkdir -p $CDDIR/EFI/BOOT151mkdir -p $CDDIR/EFI/BOOT
152#mcopy -i $CDDIR/boot/grub/efi.img ::EFI/BOOT/bootaa64.efi $CDDIR/EFI/BOOT/bootaa64.efi152mcopy -i $CDDIR/boot/grub/efi.img ::EFI/BOOT/bootaa64.efi $CDDIR/EFI/BOOT/bootaa64.efi
153sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg153sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg
154154
155### aarch64-laptops-support
156if [ "$CDIMAGE_LIVE" = 1 ] && [ "$PROJECT" = ubuntu ]; then
157 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
158insmod smbios
159smbios --type 1 --get-string 4 --linux --set dmi_svn # DMI_SYS_VENDOR
160smbios --type 1 --get-string 5 --linux --set dmi_pn # DMI_PRODUCT_NAME
161dmi_product=svn\${dmi_svn}:pn\${dmi_pn}
162dtb=
163if [ \${dmi_product} = "svnASUSTeKCOMPUTERINC.:pnNovaGoTP370QL"]; then
164 dtb="msm8998-asus-novago-tp370ql.dtb"
165fi
166if [ \${dmi_product} = "svnLENOVO:pn81JL"]; then
167 dtb="sdm850-lenovo-yoga-c630.dtb"
168fi
169if loadfont /boot/grub/font.pf2 ; then
170 set gfxmode=auto
171 insmod efi_gop
172 insmod efi_uga
173 insmod gfxterm
174 terminal_output gfxterm
175fi
176EOF
177 cp $DI_PATH/current/legacy-images/device-tree/msm8998-asus-novago-tp370ql.dtb $CDDIR/boot/
178 cp $DI_PATH/current/legacy-images/device-tree/sdm850-lenovo-yoga-c630.dtb $CDDIR/boot/
179 LAPTOP_PARAMS=" efi=novamap clk_ignore_unused pd_ignore_unused module_blacklist=hid_sensor_hub initcall_blacklist=acpi_button_driver_init
180 if [ \"\$dtb\" ]; then
181 devicetree /boot/\$dtb
182 fi"
183fi
184### aarch64-laptops-support end
185
155# Set a timeout for grub.186# Set a timeout for grub.
156cat >> $CDDIR/boot/grub/grub.cfg <<EOF187cat >> $CDDIR/boot/grub/grub.cfg <<EOF
157set timeout=30188set timeout=30
@@ -176,14 +207,14 @@
176 cat >> $CDDIR/boot/grub/grub.cfg <<EOF207 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
177menuentry "${livelabel#^}" {208menuentry "${livelabel#^}" {
178 set gfxpayload=keep209 set gfxpayload=keep
179 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT quiet splash ---210 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT quiet splash ---${LAPTOP_PARAMS}
180 initrd $CASPER_INITRD211 initrd $CASPER_INITRD
181}212}
182EOF213EOF
183 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF214 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
184menuentry "${livelabel#^}" {215menuentry "${livelabel#^}" {
185 set gfxpayload=keep216 set gfxpayload=keep
186 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} quiet splash ---217 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} quiet splash ---${LAPTOP_PARAMS}
187 initrd $CASPER_INITRD218 initrd $CASPER_INITRD
188}219}
189EOF220EOF
@@ -191,13 +222,13 @@
191 cat >> $CDDIR/boot/grub/grub.cfg <<EOF222 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
192menuentry "Install $HUMANPROJECT" {223menuentry "Install $HUMANPROJECT" {
193 set gfxpayload=keep224 set gfxpayload=keep
194 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash ---225 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash ---${LAPTOP_PARAMS}
195 initrd $CASPER_INITRD226 initrd $CASPER_INITRD
196}227}
197EOF228EOF
198 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF229 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
199menuentry "Install $HUMANPROJECT" {230menuentry "Install $HUMANPROJECT" {
200 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} quiet splash ---231 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} quiet splash ---${LAPTOP_PARAMS}
201 initrd $CASPER_INITRD232 initrd $CASPER_INITRD
202}233}
203EOF234EOF
@@ -232,7 +263,7 @@
232 cat >> $CDDIR/boot/grub/grub.cfg <<EOF263 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
233menuentry "OEM install (for manufacturers)" {264menuentry "OEM install (for manufacturers)" {
234 set gfxpayload=keep265 set gfxpayload=keep
235 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash oem-config/enable=true ---266 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash oem-config/enable=true ---${LAPTOP_PARAMS}
236 initrd $CASPER_INITRD267 initrd $CASPER_INITRD
237}268}
238EOF269EOF

Subscribers

People subscribed via source and target branches