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
1=== modified file 'tools/boot/focal/boot-arm64'
2--- tools/boot/focal/boot-arm64 2020-04-15 12:15:16 +0000
3+++ tools/boot/focal/boot-arm64 2020-04-26 15:11:47 +0000
4@@ -112,7 +112,7 @@
5 CASPER_INITRD="/casper/initrd$(initrd_suffix "$CDDIR/casper/filesystem.initrd-$FLAVOUR")"
6 mv $CDDIR/casper/filesystem.initrd-$FLAVOUR "$CDDIR$CASPER_INITRD"
7 fi
8- echo -n "-J -l -c boot/boot.cat -partition_offset 16 " >> $N.mkisofs_opts
9+ echo -n "-J -l -c boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table" >> $N.mkisofs_opts
10 # Once we move to xorriso >= 1.4.4, we should consider changing from
11 # "-e boot/grub/efi.img"
12 # to
13@@ -120,7 +120,7 @@
14 # This will point the el torito catalog to the appended partition instead
15 # of the in-ISO file, which will allow us to remove efi.img from the ISO
16 # filesystem and recover it's space.
17- echo -n "-append_partition 2 0xef $CDDIR/boot/grub/efi.img -e boot/grub/efi.img -no-emul-boot " >> $N.mkisofs_opts
18+ echo -n "-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus" >> $N.mkisofs_opts
19 fi
20
21 #install_languages $CDDIR
22@@ -148,10 +148,41 @@
23 mkdir -p $CDDIR/boot
24 cat cdrom/debian-cd_info.tar.gz | (cd $CDDIR/boot/; tar xz)
25 # If we want a copy of grub on the ISO as well, seems redundant:
26-#mkdir -p $CDDIR/EFI/BOOT
27-#mcopy -i $CDDIR/boot/grub/efi.img ::EFI/BOOT/bootaa64.efi $CDDIR/EFI/BOOT/bootaa64.efi
28+mkdir -p $CDDIR/EFI/BOOT
29+mcopy -i $CDDIR/boot/grub/efi.img ::EFI/BOOT/bootaa64.efi $CDDIR/EFI/BOOT/bootaa64.efi
30 sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg
31
32+### aarch64-laptops-support
33+if [ "$CDIMAGE_LIVE" = 1 ] && [ "$PROJECT" = ubuntu ]; then
34+ cat >> $CDDIR/boot/grub/grub.cfg <<EOF
35+insmod smbios
36+smbios --type 1 --get-string 4 --linux --set dmi_svn # DMI_SYS_VENDOR
37+smbios --type 1 --get-string 5 --linux --set dmi_pn # DMI_PRODUCT_NAME
38+dmi_product=svn\${dmi_svn}:pn\${dmi_pn}
39+dtb=
40+if [ \${dmi_product} = "svnASUSTeKCOMPUTERINC.:pnNovaGoTP370QL"]; then
41+ dtb="msm8998-asus-novago-tp370ql.dtb"
42+fi
43+if [ \${dmi_product} = "svnLENOVO:pn81JL"]; then
44+ dtb="sdm850-lenovo-yoga-c630.dtb"
45+fi
46+if loadfont /boot/grub/font.pf2 ; then
47+ set gfxmode=auto
48+ insmod efi_gop
49+ insmod efi_uga
50+ insmod gfxterm
51+ terminal_output gfxterm
52+fi
53+EOF
54+ cp $DI_PATH/current/legacy-images/device-tree/msm8998-asus-novago-tp370ql.dtb $CDDIR/boot/
55+ cp $DI_PATH/current/legacy-images/device-tree/sdm850-lenovo-yoga-c630.dtb $CDDIR/boot/
56+ LAPTOP_PARAMS=" efi=novamap clk_ignore_unused pd_ignore_unused module_blacklist=hid_sensor_hub initcall_blacklist=acpi_button_driver_init
57+ if [ \"\$dtb\" ]; then
58+ devicetree /boot/\$dtb
59+ fi"
60+fi
61+### aarch64-laptops-support end
62+
63 # Set a timeout for grub.
64 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
65 set timeout=30
66@@ -176,14 +207,14 @@
67 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
68 menuentry "${livelabel#^}" {
69 set gfxpayload=keep
70- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT quiet splash ---
71+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT quiet splash ---${LAPTOP_PARAMS}
72 initrd $CASPER_INITRD
73 }
74 EOF
75 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
76 menuentry "${livelabel#^}" {
77 set gfxpayload=keep
78- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} quiet splash ---
79+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} quiet splash ---${LAPTOP_PARAMS}
80 initrd $CASPER_INITRD
81 }
82 EOF
83@@ -191,13 +222,13 @@
84 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
85 menuentry "Install $HUMANPROJECT" {
86 set gfxpayload=keep
87- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash ---
88+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash ---${LAPTOP_PARAMS}
89 initrd $CASPER_INITRD
90 }
91 EOF
92 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
93 menuentry "Install $HUMANPROJECT" {
94- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} quiet splash ---
95+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} quiet splash ---${LAPTOP_PARAMS}
96 initrd $CASPER_INITRD
97 }
98 EOF
99@@ -232,7 +263,7 @@
100 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
101 menuentry "OEM install (for manufacturers)" {
102 set gfxpayload=keep
103- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash oem-config/enable=true ---
104+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash oem-config/enable=true ---${LAPTOP_PARAMS}
105 initrd $CASPER_INITRD
106 }
107 EOF
108
109=== modified file 'tools/boot/groovy/boot-arm64'
110--- tools/boot/groovy/boot-arm64 2020-04-24 14:51:48 +0000
111+++ tools/boot/groovy/boot-arm64 2020-04-26 15:11:47 +0000
112@@ -112,7 +112,7 @@
113 CASPER_INITRD="/casper/initrd$(initrd_suffix "$CDDIR/casper/filesystem.initrd-$FLAVOUR")"
114 mv $CDDIR/casper/filesystem.initrd-$FLAVOUR "$CDDIR$CASPER_INITRD"
115 fi
116- echo -n "-J -l -c boot/boot.cat -partition_offset 16 " >> $N.mkisofs_opts
117+ echo -n "-J -l -c boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table" >> $N.mkisofs_opts
118 # Once we move to xorriso >= 1.4.4, we should consider changing from
119 # "-e boot/grub/efi.img"
120 # to
121@@ -120,7 +120,7 @@
122 # This will point the el torito catalog to the appended partition instead
123 # of the in-ISO file, which will allow us to remove efi.img from the ISO
124 # filesystem and recover it's space.
125- echo -n "-append_partition 2 0xef $CDDIR/boot/grub/efi.img -e boot/grub/efi.img -no-emul-boot " >> $N.mkisofs_opts
126+ echo -n "-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus" >> $N.mkisofs_opts
127 fi
128
129 #install_languages $CDDIR
130@@ -148,10 +148,41 @@
131 mkdir -p $CDDIR/boot
132 cat cdrom/debian-cd_info.tar.gz | (cd $CDDIR/boot/; tar xz)
133 # If we want a copy of grub on the ISO as well, seems redundant:
134-#mkdir -p $CDDIR/EFI/BOOT
135-#mcopy -i $CDDIR/boot/grub/efi.img ::EFI/BOOT/bootaa64.efi $CDDIR/EFI/BOOT/bootaa64.efi
136+mkdir -p $CDDIR/EFI/BOOT
137+mcopy -i $CDDIR/boot/grub/efi.img ::EFI/BOOT/bootaa64.efi $CDDIR/EFI/BOOT/bootaa64.efi
138 sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg
139
140+### aarch64-laptops-support
141+if [ "$CDIMAGE_LIVE" = 1 ] && [ "$PROJECT" = ubuntu ]; then
142+ cat >> $CDDIR/boot/grub/grub.cfg <<EOF
143+insmod smbios
144+smbios --type 1 --get-string 4 --linux --set dmi_svn # DMI_SYS_VENDOR
145+smbios --type 1 --get-string 5 --linux --set dmi_pn # DMI_PRODUCT_NAME
146+dmi_product=svn\${dmi_svn}:pn\${dmi_pn}
147+dtb=
148+if [ \${dmi_product} = "svnASUSTeKCOMPUTERINC.:pnNovaGoTP370QL"]; then
149+ dtb="msm8998-asus-novago-tp370ql.dtb"
150+fi
151+if [ \${dmi_product} = "svnLENOVO:pn81JL"]; then
152+ dtb="sdm850-lenovo-yoga-c630.dtb"
153+fi
154+if loadfont /boot/grub/font.pf2 ; then
155+ set gfxmode=auto
156+ insmod efi_gop
157+ insmod efi_uga
158+ insmod gfxterm
159+ terminal_output gfxterm
160+fi
161+EOF
162+ cp $DI_PATH/current/legacy-images/device-tree/msm8998-asus-novago-tp370ql.dtb $CDDIR/boot/
163+ cp $DI_PATH/current/legacy-images/device-tree/sdm850-lenovo-yoga-c630.dtb $CDDIR/boot/
164+ LAPTOP_PARAMS=" efi=novamap clk_ignore_unused pd_ignore_unused module_blacklist=hid_sensor_hub initcall_blacklist=acpi_button_driver_init
165+ if [ \"\$dtb\" ]; then
166+ devicetree /boot/\$dtb
167+ fi"
168+fi
169+### aarch64-laptops-support end
170+
171 # Set a timeout for grub.
172 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
173 set timeout=30
174@@ -176,14 +207,14 @@
175 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
176 menuentry "${livelabel#^}" {
177 set gfxpayload=keep
178- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT quiet splash ---
179+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT quiet splash ---${LAPTOP_PARAMS}
180 initrd $CASPER_INITRD
181 }
182 EOF
183 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
184 menuentry "${livelabel#^}" {
185 set gfxpayload=keep
186- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} quiet splash ---
187+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} quiet splash ---${LAPTOP_PARAMS}
188 initrd $CASPER_INITRD
189 }
190 EOF
191@@ -191,13 +222,13 @@
192 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
193 menuentry "Install $HUMANPROJECT" {
194 set gfxpayload=keep
195- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash ---
196+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash ---${LAPTOP_PARAMS}
197 initrd $CASPER_INITRD
198 }
199 EOF
200 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
201 menuentry "Install $HUMANPROJECT" {
202- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} quiet splash ---
203+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} quiet splash ---${LAPTOP_PARAMS}
204 initrd $CASPER_INITRD
205 }
206 EOF
207@@ -232,7 +263,7 @@
208 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
209 menuentry "OEM install (for manufacturers)" {
210 set gfxpayload=keep
211- linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash oem-config/enable=true ---
212+ linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity quiet splash oem-config/enable=true ---${LAPTOP_PARAMS}
213 initrd $CASPER_INITRD
214 }
215 EOF

Subscribers

People subscribed via source and target branches