Previously, waveform information was provided by maintainer. Since every device panel is slightly different, waveform information is actually available on the device in a specific partition (partlabel=waveform). We thus use the device waveform information instead of the less appropriate generic binary. We do this by having an initd script extract and prepare the binary from the partition using hrdl's scripts. The rockchip_ebc module expects both ebc.wbf and custom_wf.bin under /lib/firmware/rockchip. Thus, if those files are not detected, the initd runs the necessary operations, regenerates with mkinitfs, and reloads rockchip_ebc. gpio_rockchip is also added to modules-initfs as the kernel now compiles it as a module Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6667 [ci:skip-build]: already built successfully in CI
16 lines
478 B
Diff
16 lines
478 B
Diff
diff --git a/bin/waveform_extract.sh.orig b/bin/waveform_extract.sh
|
|
index e00be1c4ad..8e97749555 100755
|
|
--- a/bin/waveform_extract.sh.orig
|
|
+++ b/bin/waveform_extract.sh
|
|
@@ -3,8 +3,8 @@
|
|
set -e
|
|
|
|
IN=/dev/disk/by-partlabel/waveform
|
|
-OUT=/usr/lib/firmware/rockchip/ebc.wbf
|
|
+OUT=/lib/firmware/rockchip/ebc.wbf
|
|
|
|
-mkdir -p /usr/lib/firmware/rockchip
|
|
+mkdir -p /lib/firmware/rockchip
|
|
size=$(hexdump --skip 4 --length 4 "${IN}" --format '"%u"')
|
|
head -c "${size}" "${IN}" > "${OUT}"
|