mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 07:37:54 +00:00
Merge branch 'simple-framebuffer-modules' into 'debian/latest'
Handle simple-framebuffer drivers and framebuffer_coreboot built as modules See merge request kernel-team/initramfs-tools!142
This commit is contained in:
commit
e375f529c8
@ -630,20 +630,29 @@ dep_add_modules()
|
||||
fi
|
||||
done
|
||||
|
||||
# May be necessary to use firmware framebuffers, if built as modules
|
||||
modules="$modules simpledrm simplefb"
|
||||
|
||||
# Sys walk graphics for machines that don't have a generic framebuffer
|
||||
# device and wouldn't have a working video console otherwise.
|
||||
walk_graphics=yes
|
||||
for device in /sys/bus/platform/drivers/efi-framebuffer/* \
|
||||
/sys/bus/platform/drivers/platform-framebuffer/* \
|
||||
/sys/bus/platform/drivers/simple-framebuffer/* \
|
||||
/sys/bus/platform/drivers/vesa-framebuffer/* \
|
||||
/sys/bus/coreboot/drivers/framebuffer/*; do
|
||||
if [ -d "$device" ]; then
|
||||
/sys/bus/platform/drivers/vesa-framebuffer/*; do
|
||||
if [ -d "$device" ] && [ "$(basename "$device")" != "module" ]; then
|
||||
walk_graphics=no
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
for device in /sys/bus/coreboot/drivers/framebuffer/*; do
|
||||
if [ -d "$device" ] && [ "$(basename "$device")" != "module" ]; then
|
||||
modules="$modules framebuffer_coreboot"
|
||||
walk_graphics=no
|
||||
fi
|
||||
done
|
||||
|
||||
# It's possible that a generic framebuffer device works, but is taken
|
||||
# over by a more capable driver and no longer available in /sys. We
|
||||
# have no reliable consistent way to detect that, so apply heuristics.
|
||||
@ -847,6 +856,7 @@ auto_add_modules()
|
||||
modules="$modules =drivers/usb/storage"
|
||||
;;
|
||||
fb)
|
||||
modules="$modules simpledrm simplefb framebuffer_coreboot"
|
||||
# For machines that don't have a generic framebuffer device.
|
||||
modules="$modules rockchipdrm pwm-cros-ec pwm_bl pwm-rockchip panel-simple"
|
||||
modules="$modules analogix-anx6345 pwm-sun4i sun4i-drm sun8i-mixer panel-edp"
|
||||
@ -938,6 +948,10 @@ hidden_dep_add_modules()
|
||||
# DP devices which don't have devlinks
|
||||
echo pmic_glink_altmode gpio_sbu_mux qrtr
|
||||
;;
|
||||
framebuffer_coreboot)
|
||||
# Either one, we don't know which is a module
|
||||
echo simpledrm simplefb
|
||||
;;
|
||||
esac
|
||||
done
|
||||
)
|
||||
|
||||
@ -103,6 +103,7 @@ maybe_break()
|
||||
/sbin/modprobe ${opts} -a i8042 atkbd ehci-pci ehci-orion \
|
||||
ehci-hcd ohci-hcd ohci-pci uhci-hcd usbhid xhci \
|
||||
xhci-pci xhci-hcd
|
||||
/sbin/modprobe ${opts} -a simpledrm simplefb framebuffer_coreboot
|
||||
sleep 2
|
||||
for modalias in /sys/bus/hid/devices/*/modalias; do
|
||||
if [ -f "${modalias}" ]; then
|
||||
|
||||
20
scripts/init-top/simple-framebuffer
Executable file
20
scripts/init-top/simple-framebuffer
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
PREREQ=""
|
||||
|
||||
prereqs()
|
||||
{
|
||||
echo "$PREREQ"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
# get pre-requisites
|
||||
prereqs)
|
||||
prereqs
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# These sometimes don't get probed automatically, but we need them
|
||||
# for efifb etc. when SYSFB_SIMPLEFB=y, or with framebuffer-coreboot
|
||||
/sbin/modprobe simpledrm || /sbin/modprobe simplefb || true
|
||||
Loading…
x
Reference in New Issue
Block a user