DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: distrokit@pengutronix.de
Subject: [DistroKit] [PATCH 09/14] blspec-entry: import from upstream ptxdist-2022.12.0
Date: Fri, 10 Feb 2023 20:36:07 +0100	[thread overview]
Message-ID: <20230210193612.2143905-10-m.felsch@pengutronix.de> (raw)
In-Reply-To: <20230210193612.2143905-1-m.felsch@pengutronix.de>

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>
---
 platforms/blspec-entry.in               | 19 ++++++++
 projectroot/loader/entries/default.conf |  5 ++
 rules/blspec-entry.make                 | 65 +++++++++++++++++++++++++
 3 files changed, 89 insertions(+)
 create mode 100644 platforms/blspec-entry.in
 create mode 100644 projectroot/loader/entries/default.conf
 create mode 100644 rules/blspec-entry.make

diff --git a/platforms/blspec-entry.in b/platforms/blspec-entry.in
new file mode 100644
index 0000000..aed65d4
--- /dev/null
+++ b/platforms/blspec-entry.in
@@ -0,0 +1,19 @@
+## SECTION=blspec
+
+menuconfig BLSPEC_ENTRY
+	tristate
+	select KERNEL
+	select KERNEL_INSTALL if !KERNEL_FIT
+	prompt "default bootloader spec entry "
+
+if BLSPEC_ENTRY
+
+config BLSPEC_ENTRY_DEVICETREE
+	bool
+	default KERNEL_DTB && !KERNEL_FIT
+
+config BLSPEC_ENTRY_CMDLINE
+	string
+	prompt "kernel command-line"
+
+endif
diff --git a/projectroot/loader/entries/default.conf b/projectroot/loader/entries/default.conf
new file mode 100644
index 0000000..5650907
--- /dev/null
+++ b/projectroot/loader/entries/default.conf
@@ -0,0 +1,5 @@
+title		@TITLE@
+version		@VERSION@
+options		@CMDLINE@
+linux		@KERNEL@
+@DEVICETREE@
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
-- 
2.30.2




  parent reply	other threads:[~2023-02-10 19:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10 19:35 [DistroKit] [PATCH 00/14] Mainline TF-A support and blspec-entry cleanups Marco Felsch
2023-02-10 19:35 ` [DistroKit] [PATCH 01/14] v7a: tf-a: version bump v2.7 -> 2.8/customers/pengutronix/distrokit/20230210-1 Marco Felsch
2023-02-10 19:36 ` [DistroKit] [PATCH 02/14] v8a: tf-a: enable package Marco Felsch
2023-02-10 19:36 ` [DistroKit] [PATCH 03/14] v8a: replace imx-atf with tf-a Marco Felsch
2023-02-10 19:36 ` [DistroKit] [PATCH 04/14] v8a: firmware-imx: fix dest path Marco Felsch
2023-02-10 19:36 ` [DistroKit] [PATCH 05/14] v8a: firmware-imx: fix destition path Marco Felsch
2023-02-10 19:36 ` [DistroKit] [PATCH 06/14] v8a: barebox-imx8m: fix firmware-imx dependencies Marco Felsch
2023-02-10 19:36 ` [DistroKit] [PATCH 07/14] v8a: barebox-imx8m: make use of the INJECT_FILES mechanism Marco Felsch
2023-02-10 19:36 ` [DistroKit] [PATCH 08/14] v8a: barebox: version sync to 2023.01.0 Marco Felsch
2023-02-10 19:36 ` Marco Felsch [this message]
2023-02-10 19:36 ` [DistroKit] [PATCH 10/14] blspec-entry: add linux-appendroot support Marco Felsch
2023-02-13  9:00   ` Michael Olbrich
2023-02-13 10:20     ` Marco Felsch
2023-02-10 19:36 ` [DistroKit] [PATCH 11/14] v8a: blspec: switch to default blspec entry Marco Felsch
2023-02-10 19:36 ` [DistroKit] [PATCH 12/14] v7a: blspec: drop incomplete Gute Fee support Marco Felsch
2023-02-10 19:36 ` [DistroKit] [PATCH 13/14] v7a: vexpress: remove console from blspec config Marco Felsch
2023-02-10 19:36 ` [DistroKit] [PATCH 14/14] v7a: blspec: convert to ptxdist default entries Marco Felsch
2023-02-11 20:59 ` [DistroKit] [PATCH 00/14] Mainline TF-A support and blspec-entry cleanups Robert Schwebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230210193612.2143905-10-m.felsch@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox