Merge ~bdrung/ubuntu/+source/initramfs-tools:ubuntu/devel-drm into ubuntu/+source/initramfs-tools:ubuntu/devel

Proposed by Benjamin Drung
Status: Superseded
Proposed branch: ~bdrung/ubuntu/+source/initramfs-tools:ubuntu/devel-drm
Merge into: ubuntu/+source/initramfs-tools:ubuntu/devel
Diff against target: 123 lines (+61/-0) (has conflicts)
5 files modified
.gitignore (+2/-0)
debian/.gitignore (+7/-0)
debian/tests/test-common (+9/-0)
hook-functions (+19/-0)
hooks/framebuffer (+24/-0)
Conflict in debian/tests/test-common
Conflict in hook-functions
Conflict in hooks/framebuffer
Reviewer Review Type Date Requested Status
Daniel van Vugt Pending
Review via email: mp+462690@code.launchpad.net

This proposal has been superseded by a proposal from 2024-03-19.

Description of the change

Implement https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/1970069/comments/95

There is an alternative: Only pick the first two commits (move framebuffer drivers into auto_add_modules) and then drop the framebuffer hook (Debian dropped that hook a long time ago) and just let Plymouth call:

```
if [ "${MODULES-}" = "dep" ]; then
 if [ -e /sys/class/drm ]; then
  class_add_modules drm
 fi
elif [ "$MODULES" != "list" ]; then
 auto_add_modules drm fbdev

 for x in "${MODULESDIR}"/initrd/*; do
  x=${x##*/}
  x=${x%.*}
  case ${x} in
  '*')
   break
   ;;
  *fb)
   ;;
  esac

  manual_add_modules "${x}"
 done
fi
```

The clear separation to initramfs-tools are auto_add_modules and class_add_modules in this case.

To post a comment you must log in.

Unmerged commits

46930e7... by Benjamin Drung

Support MODULES=dep in framebuffer hook

Import MODULES=dep logic from plymouth except for excluding specific
modules in this case. The git history did not reveal a reason for
excluding those modules and we want the system loaded modules in the
`MODULES=dep` mode.

LP: #1970069

b9b76a9... by Benjamin Drung

Move adding framebuffer drivers into auto_add_modules

The hook function `auto_add_modules` contains all the logic for
selecting kernel modules. So move adding the framebuffer drivers from
the framebuffer hook into `auto_add_modules`.

fbb52a3... by Benjamin Drung

framebuffer: Drop not existing fbcon video kernel module

`fbcon` is not a kernel module. `fbcon.o` is compiled into the kernel if
`CONFIG_FRAMEBUFFER_CONSOLE` is set to yes.

0b771f4... by Benjamin Drung

autopkgtest: Increase QEMU timeouts on arm64/armhf

In case the arm64/armhf autopkgtest runners are under load, the
autopkgtests can run into the QEMU timeout.

Signed-off-by: Benjamin Drung <email address hidden>

8a45f5d... by Daniel van Vugt

hooks/framebuffer: Only add simple/tiny framebuffer drivers

This is to limit the size of initrd when FRAMEBUFFER=y is soon enabled
for desktop installations (LP: #1970069, LP: #1869655).

bc091d3... by Benjamin Drung

Release initramfs-tools 0.142ubuntu22

Signed-off-by: Benjamin Drung <email address hidden>

e3dd2c8... by Benjamin Drung

autopkgtest: update systemd-udevd path from /lib to /usr/lib

03f6b0c... by Benjamin Drung

Release initramfs-tools 0.142ubuntu21

Signed-off-by: Benjamin Drung <email address hidden>

65085fe... by Benjamin Drung

Replace obsolete pkg-config build-dependency by pkgconf

22b0b82... by Benjamin Drung

Copy /etc/passwd into the initramfs to allow dhcpcd running as dhcpcd user

`ps_init` from `dhcpcd` will spit out this warning in case there is no
busybox included it the initramfs:

```
getpwnam: No such file or directory
```

If busybox is included in the initramfs, the error message from `ps_init` changes to:

```
no such user dhcpcd
```

See https://github.com/NetworkConfiguration/dhcpcd/issues/305

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.gitignore b/.gitignore
2new file mode 100644
3index 0000000..42eda44
4--- /dev/null
5+++ b/.gitignore
6@@ -0,0 +1,2 @@
7+*~
8+.#*
9diff --git a/debian/.gitignore b/debian/.gitignore
10new file mode 100644
11index 0000000..bc79963
12--- /dev/null
13+++ b/debian/.gitignore
14@@ -0,0 +1,7 @@
15+/*.debhelper
16+/*.debhelper.log
17+/*.substvars
18+/.debhelper
19+/files
20+/initramfs-tools/
21+/initramfs-tools-core/
22diff --git a/debian/tests/test-common b/debian/tests/test-common
23index 2b5a52f..ae3da72 100644
24--- a/debian/tests/test-common
25+++ b/debian/tests/test-common
26@@ -15,12 +15,21 @@ fi
27
28 case "$(dpkg --print-architecture)" in
29 arm64)
30+<<<<<<< debian/tests/test-common
31 # Slowest execution seen in Ubuntu arm64 autopkgtest: 562 seconds
32 QEMU_TIMEOUT=1200
33 ;;
34 armhf)
35 # Slowest execution seen in Ubuntu armhf autopkgtest: 145 seconds
36 QEMU_TIMEOUT=300
37+=======
38+ # The Ubuntu arm64 autopkgtest runs rarely into the 1200 seconds timeout.
39+ QEMU_TIMEOUT=1800
40+ ;;
41+armhf)
42+ # qemu-busybox on Ubuntu armhf runs into the 300 seconds timeout.
43+ QEMU_TIMEOUT=600
44+>>>>>>> debian/tests/test-common
45 ;;
46 ppc64el)
47 # Slowest execution seen in Ubuntu ppc64el autopkgtest: 230 seconds
48diff --git a/hook-functions b/hook-functions
49index 33e03e6..be645f3 100644
50--- a/hook-functions
51+++ b/hook-functions
52@@ -691,6 +691,18 @@ auto_add_modules()
53 ;;
54 esac
55 ;;
56+<<<<<<< hook-functions
57+=======
58+ drm)
59+ # Direct Rendering Manager (DRM) drivers for video
60+ modules="$modules =drivers/gpu/drm/tiny vboxvideo virtio-gpu"
61+ # if there is a privacy screen then its driver must be loaded before the
62+ # kms driver will bind, otherwise its probe() will return -EPROBE_DEFER
63+ # So include privacy screen providers
64+ # atm all providers live under drivers/platform/x86
65+ manual_add_modules -s "drm_privacy_screen_register" "=drivers/platform/x86"
66+ ;;
67+>>>>>>> hook-functions
68 hw_random)
69 modules="$modules =drivers/char/hw_random"
70 ;;
71@@ -747,6 +759,13 @@ auto_add_modules()
72 modules="$modules pwm_imx27 nwl-dsi ti-sn65dsi86 imx-dcss"
73 modules="$modules mux-mmio mxsfb imx8mq-interconnect"
74 ;;
75+<<<<<<< hook-functions
76+=======
77+ fbdev)
78+ # Video drivers from drivers/video/fbdev
79+ modules="$modules efifb simplefb vesafb vga16fb"
80+ ;;
81+>>>>>>> hook-functions
82 virtual)
83 # Hyper-V
84 modules="$modules hv_vmbus hv_utils hv_netvsc hv_mouse hv_storvsc hyperv-keyboard"
85diff --git a/hooks/framebuffer b/hooks/framebuffer
86index 7820fd6..79ca27e 100755
87--- a/hooks/framebuffer
88+++ b/hooks/framebuffer
89@@ -19,6 +19,7 @@ esac
90
91 . /usr/share/initramfs-tools/hook-functions
92
93+<<<<<<< hooks/framebuffer
94 manual_add_modules "=drivers/char/agp" "=drivers/gpu" "=ubuntu/i915" \
95 fbcon vesafb vga16fb vboxvideo
96
97@@ -41,3 +42,26 @@ for x in "${MODULESDIR}"/initrd/*; do
98
99 manual_add_modules "${x}"
100 done
101+=======
102+if [ "${MODULES-}" = "dep" ]; then
103+ if [ -e /sys/class/drm ]; then
104+ class_add_modules drm
105+ fi
106+elif [ "$MODULES" != "list" ]; then
107+ auto_add_modules drm fbdev
108+
109+ for x in "${MODULESDIR}"/initrd/*; do
110+ x=${x##*/}
111+ x=${x%.*}
112+ case ${x} in
113+ '*')
114+ break
115+ ;;
116+ *fb)
117+ ;;
118+ esac
119+
120+ manual_add_modules "${x}"
121+ done
122+fi
123+>>>>>>> hooks/framebuffer

Subscribers

People subscribed via source and target branches