Merge ~xnox/debian-cd/+git/ubuntu:x13s into ~ubuntu-cdimage/debian-cd/+git/ubuntu:main

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 72db360403757614bae4cde65d7d8afeacb1a5c7
Proposed branch: ~xnox/debian-cd/+git/ubuntu:x13s
Merge into: ~ubuntu-cdimage/debian-cd/+git/ubuntu:main
Diff against target: 66 lines (+26/-8)
1 file modified
tools/boot/mantic/boot-arm64 (+26/-8)
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Review via email: mp+452187@code.launchpad.net

Commit message

Implement x13s boot support

Extract and use a dtb. Currently done inside menu entries, such that it
is visible to end user editing the menu entry interactively.

Expecting no changes on any other arm64 images, specifically server
image, preinstalled uefi and tegra.

EXTRA_CMDLINE explicitly does not use args _after_ ---, such that
this setting can be managed with package upgrades and grub.d snippets.

Note yet tested

To post a comment you must log in.
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
1diff --git a/tools/boot/mantic/boot-arm64 b/tools/boot/mantic/boot-arm64
2index fd7fbbe..cc96a63 100755
3--- a/tools/boot/mantic/boot-arm64
4+++ b/tools/boot/mantic/boot-arm64
5@@ -15,10 +15,19 @@ cd $CDDIR/..
6
7 > $N.mkisofs_opts
8
9-FLAVOUR=generic
10-if [ "$SUBARCH" = "tegra" ]; then
11- FLAVOUR=nvidia-tegra
12-fi
13+case "$SUBARCH" in
14+ tegra)
15+ FLAVOUR=nvidia-tegra
16+ ;;
17+ x13s)
18+ FLAVOUR=laptop
19+ DTB="usr/lib/firmware/*/device-tree/qcom/sc8280xp-lenovo-thinkpad-x13s.dtb"
20+ EXTRA_CMDLINE="clk_ignore_unused pd_ignore_unused"
21+ ;;
22+ *)
23+ FLAVOUR=generic
24+ ;;
25+esac
26
27 # rename kernel+initrd
28 mv $CDDIR/casper/filesystem.kernel-$FLAVOUR $CDDIR/casper/vmlinuz
29@@ -30,6 +39,15 @@ if [ -e $CDDIR/casper/filesystem.kernel-$FLAVOUR-hwe ]; then
30 mv $CDDIR/casper/filesystem.initrd-$FLAVOUR-hwe $CDDIR/casper/hwe-initrd
31 fi
32
33+# extract dtb
34+if [ -n "$DTB" ]; then
35+ unsquashfs -i -d $CDDIR/casper/squashfs-root $CDDIR/casper/minimal.squashfs -e "$DTB"
36+ mv $CDDIR/casper/squashfs-root/$DTB $CDDIR/casper/
37+ rm -rf $CDDIR/casper/squashfs-root
38+ DTB_COMMAND="
39+ devicetree /casper/$(basename $DTB)"
40+fi
41+
42 # download, extract and include cd-boot-images
43 mkdir cd-boot-images
44 $BASEDIR/tools/apt-selection download cd-boot-images-arm64
45@@ -48,8 +66,8 @@ set menu_color_highlight=black/light-gray
46
47 menuentry "Try or Install $HUMANPROJECT" {
48 set gfxpayload=keep
49- linux /casper/vmlinuz quiet ---
50- initrd /casper/initrd
51+ linux /casper/vmlinuz"${EXTRA_CMDLINE+ $EXTRA_CMDLINE}" quiet ---
52+ initrd /casper/initrd$DTB_COMMAND
53 }
54 EOF
55
56@@ -57,8 +75,8 @@ if [ "$HWE" ]; then
57 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
58 menuentry "$HUMANPROJECT with the HWE kernel" {
59 set gfxpayload=keep
60- linux /casper/hwe-vmlinuz quiet ---
61- initrd /casper/hwe-initrd
62+ linux /casper/hwe-vmlinuz"${EXTRA_CMDLINE+ $EXTRA_CMDLINE}" quiet ---
63+ initrd /casper/hwe-initrd$DTB_COMMAND
64 }
65 EOF
66 fi

Subscribers

People subscribed via source and target branches