diff options
author | Marco Felsch <m.felsch@pengutronix.de> | 2023-02-10 20:36:07 +0100 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2023-02-11 17:19:20 +0100 |
commit | 9b2d00e413c5ff166e60be82d107be3ea8883334 (patch) | |
tree | 2e848e49217b2f944d9a6e6591279a64fa37958c /rules | |
parent | 6d5e2fe5fdc268b0a7e0dfb227e271b29877d059 (diff) | |
download | DistroKit-9b2d00e413c5ff166e60be82d107be3ea8883334.tar.gz DistroKit-9b2d00e413c5ff166e60be82d107be3ea8883334.tar.xz |
blspec-entry: import from upstream ptxdist-2022.12.0
Import all required files from upstream ptxdist-2022.12.0 for further
adaptions. No functional changes done.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.pengutronix.de/20230210193612.2143905-10-m.felsch@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'rules')
-rw-r--r-- | rules/blspec-entry.make | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/rules/blspec-entry.make b/rules/blspec-entry.make new file mode 100644 index 0000000..f393b1b --- /dev/null +++ b/rules/blspec-entry.make @@ -0,0 +1,65 @@ +# -*-makefile-*- +# +# Copyright (C) 2014 by Michael Olbrich <m.olbrich@pengutronix.de> +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_BLSPEC_ENTRY) += blspec-entry + +BLSPEC_ENTRY_VERSION := $(KERNEL_VERSION) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +BLSPEC_ENTRY_TITLE := PTXdist - $(call remove_quotes,$(PTXCONF_PROJECT_VENDOR)-$(PTXCONF_PROJECT)) +ifdef PTXCONF_BLSPEC_ENTRY_DEVICETREE +BLSPEC_ENTRY_NAMES = $(basename $(notdir $(KERNEL_DTS))) +blspec/title = $(BLSPEC_ENTRY_TITLE) $(strip $(1)) +blspec/devicetree = devicetree\t/boot/$(strip $(1)).dtb +else +BLSPEC_ENTRY_NAMES = default +blspec/title = $(BLSPEC_ENTRY_TITLE) +blspec/devicetree = +endif +BLSPEC_ENTRY_LICENSE = ignore + +ifdef PTXCONF_KERNEL_FIT +BLSPEC_KERNEL_IMAGE = /boot/linux.fit +else +BLSPEC_KERNEL_IMAGE = $(KERNEL_IMAGE) +endif + +$(STATEDIR)/blspec-entry.targetinstall: + @$(call targetinfo) + + @$(call install_init, blspec-entry) + @$(call install_fixup,blspec-entry,PRIORITY,optional) + @$(call install_fixup,blspec-entry,SECTION,base) + @$(call install_fixup,blspec-entry,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>") + @$(call install_fixup,blspec-entry,DESCRIPTION,missing) + + @$(foreach name, $(BLSPEC_ENTRY_NAMES), \ + $(call install_alternative, blspec-entry, 0, 0, 0644, \ + /loader/entries/default.conf,n,/loader/entries/$(name).conf)$(ptx/nl) \ + $(call install_replace, blspec-entry, /loader/entries/$(name).conf, \ + @TITLE@,'$(call blspec/title,$(name))')$(ptx/nl) \ + $(call install_replace, blspec-entry, /loader/entries/$(name).conf, \ + @VERSION@,'$(BLSPEC_ENTRY_VERSION)')$(ptx/nl) \ + $(call install_replace, blspec-entry, /loader/entries/$(name).conf, \ + @CMDLINE@,$(PTXCONF_BLSPEC_ENTRY_CMDLINE))$(ptx/nl) \ + $(call install_replace, blspec-entry, /loader/entries/$(name).conf, \ + @KERNEL@,'/boot/$(BLSPEC_KERNEL_IMAGE)')$(ptx/nl) \ + $(call install_replace, blspec-entry, /loader/entries/$(name).conf, \ + @DEVICETREE@,'$(call blspec/devicetree,$(name))')$(ptx/nl)) + + @$(call install_finish,blspec-entry) + + @$(call touch) + +# vim: syntax=make |