From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [DistroKit] [PATCH 4/6] v7a: generate image for sama5d27 SOM1 Evaluation Kit
Date: Tue, 29 Sep 2020 08:02:34 +0200 [thread overview]
Message-ID: <20200929060236.17471-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20200929060236.17471-1-a.fatoum@pengutronix.de>
With the previous barebox and kernel changes, we can combine it with the
DistroKit-v7a rootfs to get an image to boot on the sama5d27-som1-ek.
Do this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
.../platform-v7a/config/images/at91-sd.config | 30 ++++++++++++++++
configs/platform-v7a/platformconfig | 4 ++-
.../platforms/blspec-sama5d27-som1-ek.in | 5 +++
.../platforms/image-sama5d27-som1-ek.in | 11 ++++++
.../loader/entries/sama5d27-som1-ek.conf | 6 ++++
.../rules/blspec-sama5d27-som1-ek.make | 36 +++++++++++++++++++
.../rules/image-sama5d27-som1-ek.make | 36 +++++++++++++++++++
7 files changed, 127 insertions(+), 1 deletion(-)
create mode 100644 configs/platform-v7a/config/images/at91-sd.config
create mode 100644 configs/platform-v7a/platforms/blspec-sama5d27-som1-ek.in
create mode 100644 configs/platform-v7a/platforms/image-sama5d27-som1-ek.in
create mode 100644 configs/platform-v7a/projectroot/loader/entries/sama5d27-som1-ek.conf
create mode 100644 configs/platform-v7a/rules/blspec-sama5d27-som1-ek.make
create mode 100644 configs/platform-v7a/rules/image-sama5d27-som1-ek.make
diff --git a/configs/platform-v7a/config/images/at91-sd.config b/configs/platform-v7a/config/images/at91-sd.config
new file mode 100644
index 000000000000..6108a20b601d
--- /dev/null
+++ b/configs/platform-v7a/config/images/at91-sd.config
@@ -0,0 +1,30 @@
+image @IMAGE@-boot.vfat {
+ vfat {
+ file BOOT.BIN { image = @FSBL@ }
+ file barebox.bin { image = @SSBL@ }
+ }
+ size = 3M
+}
+
+image @IMAGE@ {
+ hdimage {
+ align = 1M
+ disk-signature = 0x67823abf
+ }
+ partition boot {
+ image = @IMAGE@-boot.vfat
+ size = 3M
+ partition-type = 0xc
+ bootable = true
+ }
+ partition root-A {
+ image = root.ext2
+ partition-type = 0x83
+ size = 512M
+ }
+ partition data {
+ partition-type = 0x83
+ size = 512M
+ }
+}
+/* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 139d0fd10965..add98b21b759 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -144,7 +144,7 @@ PTXCONF_KERNEL_EXTRA_MAKEVARS=""
PTXCONF_DTC=y
PTXCONF_DTC_INSTALL_OFTREE=y
PTXCONF_DTC_OFTREE_DTS_PATH="${PTXDIST_PLATFORMCONFIGDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts"
-PTXCONF_DTC_OFTREE_DTS="am335x-bone.dts am335x-boneblack.dts vexpress-v2p-ca9.dts bcm2836-rpi-2-b.dts imx6q-sabrelite.dts imx6sx-udoo-neo-full.dts imx6dl-riotboard.dts imx6q-nitrogen6x.dts imx6qp-nitrogen6_max.dts bcm2837-rpi-3-b.dts stm32mp157c-dk2.dts stm32mp157c-lxa-mc1.dts"
+PTXCONF_DTC_OFTREE_DTS="am335x-bone.dts am335x-boneblack.dts vexpress-v2p-ca9.dts bcm2836-rpi-2-b.dts imx6q-sabrelite.dts imx6sx-udoo-neo-full.dts imx6dl-riotboard.dts imx6q-nitrogen6x.dts imx6qp-nitrogen6_max.dts bcm2837-rpi-3-b.dts stm32mp157c-dk2.dts stm32mp157c-lxa-mc1.dts at91-sama5d27_som1_ek.dts"
PTXCONF_DTC_EXTRA_ARGS=""
PTXCONF_HOST_DTC=y
PTXCONF_HOST_DTC_VERSION="1.5.1"
@@ -217,6 +217,7 @@ PTXCONF_BLSPEC_RIOTBOARD=y
PTXCONF_BLSPEC_RPI2=y
PTXCONF_BLSPEC_RPI3=y
PTXCONF_BLSPEC_SABRELITE=y
+PTXCONF_BLSPEC_SAMA5D27_SOM1_EK=y
PTXCONF_BLSPEC_STM32MP157C_DK2=y
PTXCONF_BLSPEC_UDOO_NEO=y
PTXCONF_BLSPEC_VEXPRESS=y
@@ -264,6 +265,7 @@ PTXCONF_IMAGE_ROOT_TGZ_LABEL=""
PTXCONF_IMAGE_RPI2=y
PTXCONF_IMAGE_RPI3=y
PTXCONF_IMAGE_SABRELITE=y
+PTXCONF_IMAGE_SAMA5D27_SOM1_EK=y
PTXCONF_IMAGE_STM32MP157C_DK2=y
PTXCONF_IMAGE_UDOO_NEO=y
PTXCONF_IMAGE_VEXPRESS_NOR=y
diff --git a/configs/platform-v7a/platforms/blspec-sama5d27-som1-ek.in b/configs/platform-v7a/platforms/blspec-sama5d27-som1-ek.in
new file mode 100644
index 000000000000..942fc77a81c5
--- /dev/null
+++ b/configs/platform-v7a/platforms/blspec-sama5d27-som1-ek.in
@@ -0,0 +1,5 @@
+## SECTION=blspec
+
+config BLSPEC_SAMA5D27_SOM1_EK
+ tristate
+ prompt "/loader/entries/sama5d27-som1-ek.conf bootloader spec entry"
diff --git a/configs/platform-v7a/platforms/image-sama5d27-som1-ek.in b/configs/platform-v7a/platforms/image-sama5d27-som1-ek.in
new file mode 100644
index 000000000000..1170cb858359
--- /dev/null
+++ b/configs/platform-v7a/platforms/image-sama5d27-som1-ek.in
@@ -0,0 +1,11 @@
+## SECTION=image
+
+config IMAGE_SAMA5D27_SOM1_EK
+ tristate
+ select HOST_GENIMAGE
+ select IMAGE_ROOT_EXT
+ select HOST_DOSFSTOOLS
+ select BAREBOX_AT91
+ prompt "Generate images/sama5d27-som1-ek.hdimg"
+ help
+ Includes DistroKit support for the Microchip sama5d27 SOM1 evaluation Kit
diff --git a/configs/platform-v7a/projectroot/loader/entries/sama5d27-som1-ek.conf b/configs/platform-v7a/projectroot/loader/entries/sama5d27-som1-ek.conf
new file mode 100644
index 000000000000..3cbcf54294b3
--- /dev/null
+++ b/configs/platform-v7a/projectroot/loader/entries/sama5d27-som1-ek.conf
@@ -0,0 +1,6 @@
+title PTXdist - Pengutronix-DistroKit
+version @VERSION@
+options rootwait
+linux /boot/zImage
+devicetree /boot/at91-sama5d27_som1_ek.dtb
+linux-appendroot true
diff --git a/configs/platform-v7a/rules/blspec-sama5d27-som1-ek.make b/configs/platform-v7a/rules/blspec-sama5d27-som1-ek.make
new file mode 100644
index 000000000000..1c84bc7936f6
--- /dev/null
+++ b/configs/platform-v7a/rules/blspec-sama5d27-som1-ek.make
@@ -0,0 +1,36 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2020 by Ahmad Fatoum <a.fatoum@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_BLSPEC_SAMA5D27_SOM1_EK) += blspec-sama5d27-som1-ek
+
+BLSPEC_SAMA5D27_SOM1_EK_VERSION := 5.8
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/blspec-sama5d27-som1-ek.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, blspec-sama5d27-som1-ek)
+ @$(call install_fixup,blspec-sama5d27-som1-ek,PRIORITY,optional)
+ @$(call install_fixup,blspec-sama5d27-som1-ek,SECTION,base)
+ @$(call install_fixup,blspec-sama5d27-som1-ek,AUTHOR,"Ahmad Fatoum <afa@pengutronix.de>")
+ @$(call install_fixup,blspec-sama5d27-som1-ek,DESCRIPTION,missing)
+
+ @$(call install_alternative, blspec-sama5d27-som1-ek, 0, 0, 0644, \
+ /loader/entries/sama5d27-som1-ek.conf)
+
+ @$(call install_finish,blspec-sama5d27-som1-ek)
+
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/configs/platform-v7a/rules/image-sama5d27-som1-ek.make b/configs/platform-v7a/rules/image-sama5d27-som1-ek.make
new file mode 100644
index 000000000000..66ac025606db
--- /dev/null
+++ b/configs/platform-v7a/rules/image-sama5d27-som1-ek.make
@@ -0,0 +1,36 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2020 by Ahmad Fatoum <a.fatoum@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+IMAGE_PACKAGES-$(PTXCONF_IMAGE_SAMA5D27_SOM1_EK) += image-sama5d27-som1-ek
+
+#
+# Paths and names
+#
+IMAGE_SAMA5D27_SOM1_EK := image-sama5d27-som1-ek
+IMAGE_SAMA5D27_SOM1_EK_DIR := $(BUILDDIR)/$(IMAGE_SAMA5D27_SOM1_EK)
+IMAGE_SAMA5D27_SOM1_EK_IMAGE := $(IMAGEDIR)/sama5d27-som1-ek.hdimg
+IMAGE_SAMA5D27_SOM1_EK_FILES := $(IMAGEDIR)/root.tgz
+IMAGE_SAMA5D27_SOM1_EK_CONFIG := at91-sd.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+IMAGE_SAMA5D27_SOM1_EK_ENV := \
+ FSBL=barebox-sama5d27-som1-ek-xload-mmc.img \
+ SSBL=barebox-sama5d27-som1-ek.img
+
+$(IMAGE_SAMA5D27_SOM1_EK_IMAGE):
+ @$(call targetinfo)
+ @$(call image/genimage, IMAGE_SAMA5D27_SOM1_EK)
+ @$(call finish)
+
+# vim: syntax=make
--
2.28.0
_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de
next prev parent reply other threads:[~2020-09-29 6:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 6:02 [DistroKit] [PATCH 1/6] v7a: barebox: version bump v2020.08.1 → v2020.09.0 Ahmad Fatoum
2020-09-29 6:02 ` [DistroKit] [PATCH 2/6] v7a: barebox: add new rule for sama5d2 support Ahmad Fatoum
2020-09-29 10:33 ` Roland Hieber
2020-09-29 6:02 ` [DistroKit] [PATCH 3/6] v7a: kernel: extend " Ahmad Fatoum
2020-09-29 10:36 ` Roland Hieber
2020-09-29 13:29 ` Ahmad Fatoum
2020-09-29 6:02 ` Ahmad Fatoum [this message]
2020-09-29 6:02 ` [DistroKit] [PATCH 5/6] v7a: at91: add sama5d2-based giant board device tree Ahmad Fatoum
2020-09-29 6:02 ` [DistroKit] [PATCH 6/6] v7a: sama5d2: generate image for Groboard Giantboard as well Ahmad Fatoum
2020-09-29 10:40 ` Roland Hieber
2020-09-29 13:39 ` [DistroKit] [PATCH] doc: document the new SAMA5D2 boards Ahmad Fatoum
2020-09-30 9:30 ` Roland Hieber
2020-10-11 22:38 ` Roland Hieber
2020-10-11 22:53 ` Ahmad Fatoum
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=20200929060236.17471-4-a.fatoum@pengutronix.de \
--to=a.fatoum@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