pmaports/main/msm-firmware-loader/msm-firmware-loader-unpack.initd
Nikita Travkin bc50dd0279
main/msm-firmware-loader: add a package to load firmware on msm devices (MR 2431)
Many devices need proprietary firmware blobs. So far those blobs were
packaged and installed from the repository but this approach has many
drawbacks:

- The rootfs can only be used on a single device model.
 - If a model has multiple variants that have diferent secire-boot key,
   each must have it's own firmware blobs.

This makes maintaining packaged firmware very hard and outweights the
benefits of having a repeatable installation in most cases.

Instead we can load blobs dynamically from preexisting firmware
partitions that usually have same structure and contain the blobs we are
interested in.

The proposed scripts place symlinks to the blobs in a special dir that
then given to the kernel. Blobs from firmware/postmarketos (or another
dir that was set as extra path prior the script execution) will take
priority which allows to override some blobs (e.g. for deviecs with no
secure-boot)
2021-09-27 15:23:47 +03:00

16 lines
334 B
Text

#!/sbin/openrc-run
name="Firmware Unpacker"
description="Unpack dynamically loaded firmware"
depend() {
before rmtfs
}
start() {
ebegin "Starting msm-firmware-loader (Unpacking the firmware)"
# This script must be executed before rmtfs, block other services until it's done.
/usr/sbin/msm-firmware-loader-unpack.sh
eend $?
}