DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [DistroKit] [PATCH 5/5] v7a: add Wifx L1 SD-Card image
Date: Mon, 17 Apr 2023 15:11:41 +0200	[thread overview]
Message-ID: <20230417131141.908678-6-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20230417131141.908678-1-a.fatoum@pengutronix.de>

The Wifx L1 is a SAMA5D4-based LoRaWAN gateway. This commit adds first
support for booting DistroKit on it from SD-Card.

Default boot medium is NAND, but a bootable SD-Card always has precedence
over NAND.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v7a/platformconfig           |  1 +
 .../platforms/image-wifx-l1-sd.in             | 12 +++++++
 .../platform-v7a/rules/image-wifx-l1-sd.make  | 36 +++++++++++++++++++
 doc/hardware.rst                              |  1 +
 doc/hardware_v7a_sama5d4.rst                  | 16 +++++++++
 5 files changed, 66 insertions(+)
 create mode 100644 configs/platform-v7a/platforms/image-wifx-l1-sd.in
 create mode 100644 configs/platform-v7a/rules/image-wifx-l1-sd.make
 create mode 100644 doc/hardware_v7a_sama5d4.rst

diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 9e6ea531f45e..b09c3c77a03e 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -281,6 +281,7 @@ PTXCONF_IMAGE_STM32MP157C_EV1=y
 PTXCONF_IMAGE_UDOO_NEO=y
 PTXCONF_IMAGE_VEXPRESS_NOR=y
 PTXCONF_IMAGE_VEXPRESS=y
+PTXCONF_IMAGE_WIFX_L1_SD=y
 
 #
 # ipkg options                  
diff --git a/configs/platform-v7a/platforms/image-wifx-l1-sd.in b/configs/platform-v7a/platforms/image-wifx-l1-sd.in
new file mode 100644
index 000000000000..7d5938bd44ac
--- /dev/null
+++ b/configs/platform-v7a/platforms/image-wifx-l1-sd.in
@@ -0,0 +1,12 @@
+## SECTION=image
+
+config IMAGE_WIFX_L1_SD
+	tristate
+	select HOST_GENIMAGE
+	select IMAGE_ROOT_EXT
+	select HOST_DOSFSTOOLS
+	select BAREBOX_AT91
+	select AT91BOOTSTRAP2
+	prompt "Generate images/wifx-l1.hdimg (SD-Card)"
+	help
+	  Includes DistroKit support for the Wifx L1 LoRaWAN Gateway.
diff --git a/configs/platform-v7a/rules/image-wifx-l1-sd.make b/configs/platform-v7a/rules/image-wifx-l1-sd.make
new file mode 100644
index 000000000000..3b92a6ed9b3e
--- /dev/null
+++ b/configs/platform-v7a/rules/image-wifx-l1-sd.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_WIFX_L1_SD) += image-wifx-l1-sd
+
+#
+# Paths and names
+#
+IMAGE_WIFX_L1_SD	:= image-wifx-l1-sd
+IMAGE_WIFX_L1_SD_DIR	:= $(BUILDDIR)/$(IMAGE_WIFX_L1_SD)
+IMAGE_WIFX_L1_SD_IMAGE	:= $(IMAGEDIR)/wifx-l1.hdimg
+IMAGE_WIFX_L1_SD_FILES	:= $(IMAGEDIR)/root.tgz
+IMAGE_WIFX_L1_SD_CONFIG	:= at91-sd.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+IMAGE_WIFX_L1_SD_ENV := \
+        FSBL=at91bootstrap.bin \
+        SSBL=barebox-wifx-l1.img
+
+$(IMAGE_WIFX_L1_SD_IMAGE):
+	@$(call targetinfo)
+	@$(call image/genimage, IMAGE_WIFX_L1_SD)
+	@$(call finish)
+
+# vim: syntax=make
diff --git a/doc/hardware.rst b/doc/hardware.rst
index 0e885db35e18..5c9a0df94634 100644
--- a/doc/hardware.rst
+++ b/doc/hardware.rst
@@ -49,6 +49,7 @@ It supports the following hardware:
    hardware_v7a_raspi23
    hardware_v7a_udoo_neo
    hardware_v7a_sama5d2
+   hardware_v7a_sama5d4
 
 If you want to get DistroKit running on your ARMv7-A board which is not
 listed above, here is a short overview of the generic way:
diff --git a/doc/hardware_v7a_sama5d4.rst b/doc/hardware_v7a_sama5d4.rst
new file mode 100644
index 000000000000..6d371b003f56
--- /dev/null
+++ b/doc/hardware_v7a_sama5d4.rst
@@ -0,0 +1,16 @@
+SAMA5D4 boards
+==============
+
+DistroKit currently supports one SAMA5D4 board:
+
+ * Wifx L1 LoRaWAN Gateway
+
+
+Boot Media
+----------
+
+The L1 will boot from a bootable SD-Card if one is inserted and otherwise
+fall back to booting from NAND flash. DistroKit generates only a SD-Card
+image for now:
+
+ * ``platform-v7a/images/wifx-l1-sd.hdimg``.
-- 
2.39.2




  parent reply	other threads:[~2023-04-17 13:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 13:11 [DistroKit] [PATCH 0/5] v7a: add first support for Wifx L1 Ahmad Fatoum
2023-04-17 13:11 ` [DistroKit] [PATCH 1/5] at91bootstrap2: make targetinstall v4.x compatible Ahmad Fatoum
2023-04-17 13:11 ` [DistroKit] [PATCH 2/5] v7a: at91bootstrap: configure v4.0.6-rc1 for Wifx L1 Ahmad Fatoum
2023-04-17 13:11 ` [DistroKit] [PATCH 3/5] v7a: barebox: extend support to SAMA5D4-based " Ahmad Fatoum
2023-04-17 13:11 ` [DistroKit] [PATCH 4/5] v7a: kernel: " Ahmad Fatoum
2023-04-17 13:11 ` Ahmad Fatoum [this message]
2023-04-17 13:59 ` [DistroKit] [PATCH 0/5] v7a: add first support for " 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=20230417131141.908678-6-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