Explorar el Código

package/panel-mipi-dbi-firmware: new package

This package supports building and installing initialization command
firmware files for use with the panel-mipi-dbi DRM driver. To use the
package, initialization commands for the specific display(s) must be
provided in text form.

See:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/tiny/Kconfig?id=7004a2e46d1693848370809aa3d9c340a209edbb#n70
https://github.com/notro/panel-mipi-dbi/wiki

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Fiona Klute (WIWA) hace 6 meses
padre
commit
52521e4ec4

+ 1 - 0
DEVELOPERS

@@ -1091,6 +1091,7 @@ F:	package/python-pymodbus/
 
 N:	Fiona Klute <fiona.klute@gmx.de>
 F:	package/*/S*
+F:	package/panel-mipi-dbi-firmware/
 F:	package/python-aiomqtt/
 F:	package/python-dunamai/
 F:	package/python-poetry-dynamic-versioning/

+ 1 - 0
package/Config.in

@@ -449,6 +449,7 @@ menu "Firmware"
 	source "package/linux-firmware/Config.in"
 	source "package/murata-cyw-fw/Config.in"
 	source "package/odroidc2-firmware/Config.in"
+	source "package/panel-mipi-dbi-firmware/Config.in"
 	source "package/qcom-db410c-firmware/Config.in"
 	source "package/qoriq-fm-ucode/Config.in"
 	source "package/rcw-smarc-sal28/Config.in"

+ 29 - 0
package/panel-mipi-dbi-firmware/Config.in

@@ -0,0 +1,29 @@
+config BR2_PACKAGE_PANEL_MIPI_DBI_FIRMWARE
+	bool "panel-mipi-dbi firmware"
+	help
+	  Build and install firmware files for the panel-mipi-dbi DRM
+	  driver. The driver requires firmware file(s) to provide
+	  initialization commands for the specific display(s) in
+	  use. The initialization commands are written in text form
+	  and converted to the binary format during the build.
+
+	  If you select this package you will be prompted for the
+	  initialization command file(s) to build firmware from.
+
+	  https://github.com/notro/panel-mipi-dbi
+
+if BR2_PACKAGE_PANEL_MIPI_DBI_FIRMWARE
+
+config BR2_PACKAGE_PANEL_MIPI_DBI_FIRMWARE_SOURCE
+	string "Source files for panel-mipi-dbi firmware"
+	default ""
+	help
+	  Space separated list of initialization command files for
+	  displays used with the panel-mipi-dbi driver. The files will
+	  be converted to binary format and installed to /lib/firmware
+	  in the rootfs. The binary files will use the basenames of
+	  the input files, plus a .bin ending. The basename of each
+	  file must match the first element of the "compatible" device
+	  tree property of the display the file is for.
+
+endif # BR2_PACKAGE_PANEL_MIPI_DBI_FIRMWARE

+ 3 - 0
package/panel-mipi-dbi-firmware/panel-mipi-dbi-firmware.hash

@@ -0,0 +1,3 @@
+# Locally computed
+sha256  6d57b140dca0241079b186027e72a9168843bd1b6427536dcd422b7a9b6dc53f  panel-mipi-dbi-firmware-1cbd40135a8c7f25d7b444a7fac77fd3c3ad471e-git4.tar.gz
+sha256  e3f98ddc0b15dae65c5661d6c8403a007f30e2f04bcb6170526da609e3fcfd05  mipi-dbi-cmd

+ 35 - 0
package/panel-mipi-dbi-firmware/panel-mipi-dbi-firmware.mk

@@ -0,0 +1,35 @@
+################################################################################
+#
+# panel-mipi-dbi-firmware
+#
+################################################################################
+
+PANEL_MIPI_DBI_FIRMWARE_VERSION = 1cbd40135a8c7f25d7b444a7fac77fd3c3ad471e
+PANEL_MIPI_DBI_FIRMWARE_SITE = https://github.com/notro/panel-mipi-dbi.git
+PANEL_MIPI_DBI_FIRMWARE_SITE_METHOD = git
+PANEL_MIPI_DBI_FIRMWARE_LICENSE = CC0-1.0
+# license info is directly in the only source file
+PANEL_MIPI_DBI_FIRMWARE_LICENSE_FILES = mipi-dbi-cmd
+
+PANEL_MIPI_DBI_FIRMWARE_DEPENDENCIES = host-python3
+
+BR2_PACKAGE_PANEL_MIPI_DBI_FIRMWARE_BIN = $(addsuffix .bin,$(basename $(notdir $(shell echo $(BR2_PACKAGE_PANEL_MIPI_DBI_FIRMWARE_SOURCE)))))
+
+define PANEL_MIPI_DBI_FIRMWARE_BUILD_CMDS
+	for source in $(shell echo $(BR2_PACKAGE_PANEL_MIPI_DBI_FIRMWARE_SOURCE)) ; do \
+		$(HOST_DIR)/bin/python $(@D)/mipi-dbi-cmd "$(@D)/$$(basename $${source%.*}).bin" "$${source}" ; \
+	done
+endef
+
+define PANEL_MIPI_DBI_FIRMWARE_INSTALL_TARGET_CMDS
+	for bin in $(shell echo $(BR2_PACKAGE_PANEL_MIPI_DBI_FIRMWARE_BIN)); do \
+		$(INSTALL) -m 0644 -D "$(@D)/$${bin}" "$(TARGET_DIR)/lib/firmware/$${bin}" ; \
+	done
+endef
+
+# installing firmware requires source, give a clear error message if missing
+ifeq ($(BR2_PACKAGE_PANEL_MIPI_DBI_FIRMWARE)$(call qstrip,$(BR2_PACKAGE_PANEL_MIPI_DBI_FIRMWARE_SOURCE)),y)
+$(error No panel-mipi-dbi firmware source selected, check your BR2_PACKAGE_PANEL_MIPI_DBI_FIRMWARE_SOURCE setting)
+endif
+
+$(eval $(generic-package))