From 9b2d00e413c5ff166e60be82d107be3ea8883334 Mon Sep 17 00:00:00 2001 From: Marco Felsch Date: Fri, 10 Feb 2023 20:36:07 +0100 Subject: 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 Link: https://lore.pengutronix.de/20230210193612.2143905-10-m.felsch@pengutronix.de Signed-off-by: Robert Schwebel --- rules/blspec-entry.make | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 rules/blspec-entry.make (limited to 'rules') 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 +# +# 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 ") + @$(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 -- cgit v1.2.3