summaryrefslogtreecommitdiffstats
path: root/configs/platform-v7a
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-03-02 12:03:56 +0100
committerRobert Schwebel <r.schwebel@pengutronix.de>2020-03-05 18:27:07 +0100
commit3bce747e47170b219334f57102560a24cd67e6e0 (patch)
treeeba033c13b7822c3589e1b2ecca61cd5599e7d73 /configs/platform-v7a
parentf2ef6f09ce1af63587cebaea120bb0a102879843 (diff)
downloadDistroKit-3bce747e47170b219334f57102560a24cd67e6e0.tar.gz
DistroKit-3bce747e47170b219334f57102560a24cd67e6e0.tar.xz
v7a: add stm32mp157c-dk2 SD-Card image
Both STM32MP BootROM and TF-A expect the subsequent bootloader stage to come from a GPT partition when booting from SD-Card. Add a genimage config that describes this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Diffstat (limited to 'configs/platform-v7a')
-rw-r--r--configs/platform-v7a/config/images/stm32mp.config31
-rw-r--r--configs/platform-v7a/platformconfig4
-rw-r--r--configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in5
-rw-r--r--configs/platform-v7a/platforms/image-stm32mp157c-dk2.in11
-rw-r--r--configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf6
-rw-r--r--configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make36
-rw-r--r--configs/platform-v7a/rules/image-stm32mp157c-dk2.make38
7 files changed, 130 insertions, 1 deletions
diff --git a/configs/platform-v7a/config/images/stm32mp.config b/configs/platform-v7a/config/images/stm32mp.config
new file mode 100644
index 0000000..0b9cfe8
--- /dev/null
+++ b/configs/platform-v7a/config/images/stm32mp.config
@@ -0,0 +1,31 @@
+image @IMAGE@ {
+ hdimage {
+ align = 1M
+ gpt = "true"
+ }
+ partition fsbl1 {
+ image = "tf-a-@STM32MP_BOARD@.stm32"
+ size = 256K
+ }
+ partition fsbl2 {
+ image = "tf-a-@STM32MP_BOARD@.stm32"
+ size = 256K
+ }
+ partition ssbl {
+ image = "barebox-@STM32MP_BOARD@.img"
+ size = 1M
+ }
+ partition barebox-environment {
+ size = 1M
+ }
+ partition root {
+ image = root.ext2
+ partition-type = 0x83
+ size = 512M
+ }
+ partition data {
+ partition-type = 0x83
+ size = 100M
+ }
+}
+/* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 02111f2..d4dbc9a 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -143,7 +143,7 @@ PTXCONF_KERNEL_EXTRA_MAKEVARS=""
PTXCONF_DTC=y
PTXCONF_DTC_INSTALL_OFTREE=y
PTXCONF_DTC_OFTREE_DTS_PATH="${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"
+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"
PTXCONF_DTC_EXTRA_ARGS=""
PTXCONF_HOST_DTC=y
PTXCONF_HOST_DTC_VERSION="1.5.1"
@@ -214,6 +214,7 @@ PTXCONF_BLSPEC_RIOTBOARD=y
PTXCONF_BLSPEC_RPI2=y
PTXCONF_BLSPEC_RPI3=y
PTXCONF_BLSPEC_SABRELITE=y
+PTXCONF_BLSPEC_STM32MP157C_DK2=y
PTXCONF_BLSPEC_UDOO_NEO=y
PTXCONF_BLSPEC_VEXPRESS=y
@@ -258,6 +259,7 @@ PTXCONF_IMAGE_ROOT_TGZ_LABEL=""
PTXCONF_IMAGE_RPI2=y
PTXCONF_IMAGE_RPI3=y
PTXCONF_IMAGE_SABRELITE=y
+PTXCONF_IMAGE_STM32MP157C_DK2=y
PTXCONF_IMAGE_UDOO_NEO=y
PTXCONF_IMAGE_VEXPRESS_NOR=y
PTXCONF_IMAGE_VEXPRESS=y
diff --git a/configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in b/configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in
new file mode 100644
index 0000000..fc14295
--- /dev/null
+++ b/configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in
@@ -0,0 +1,5 @@
+## SECTION=blspec
+
+config BLSPEC_STM32MP157C_DK2
+ tristate
+ prompt "/loader/entries/stm32mp157c-dk2.conf bootloader spec entry"
diff --git a/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in b/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in
new file mode 100644
index 0000000..d7b9c23
--- /dev/null
+++ b/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in
@@ -0,0 +1,11 @@
+## SECTION=image
+
+config IMAGE_STM32MP157C_DK2
+ tristate
+ select HOST_GENIMAGE
+ select IMAGE_ROOT_EXT
+ select BAREBOX_STM32MP
+ select TF_A
+ prompt "Generate images/stm32mp157c-dk2.hdimg"
+ help
+ Generate GPT image for the STM32MP157C-DK2
diff --git a/configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf b/configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf
new file mode 100644
index 0000000..1fbba65
--- /dev/null
+++ b/configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf
@@ -0,0 +1,6 @@
+title PTXdist - Pengutronix-DistroKit
+version 5.3
+options rootwait rw
+linux /boot/zImage
+devicetree /boot/stm32mp157c-dk2.dtb
+linux-appendroot true
diff --git a/configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make b/configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make
new file mode 100644
index 0000000..e057fa9
--- /dev/null
+++ b/configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make
@@ -0,0 +1,36 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_BLSPEC_STM32MP157C_DK2) += blspec-stm32mp157c-dk2
+
+BLSPEC_STM32MP157C_DK2_VERSION := 4.11
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/blspec-stm32mp157c-dk2.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, blspec-stm32mp157c-dk2)
+ @$(call install_fixup,blspec-stm32mp157c-dk2,PRIORITY,optional)
+ @$(call install_fixup,blspec-stm32mp157c-dk2,SECTION,base)
+ @$(call install_fixup,blspec-stm32mp157c-dk2,AUTHOR,"Sascha Hauer <s.hauer@pengutronix.de>")
+ @$(call install_fixup,blspec-stm32mp157c-dk2,DESCRIPTION,missing)
+
+ @$(call install_alternative, blspec-stm32mp157c-dk2, 0, 0, 0644, \
+ /loader/entries/stm32mp157c-dk2.conf)
+
+ @$(call install_finish,blspec-stm32mp157c-dk2)
+
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/configs/platform-v7a/rules/image-stm32mp157c-dk2.make b/configs/platform-v7a/rules/image-stm32mp157c-dk2.make
new file mode 100644
index 0000000..d5e5246
--- /dev/null
+++ b/configs/platform-v7a/rules/image-stm32mp157c-dk2.make
@@ -0,0 +1,38 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+IMAGE_PACKAGES-$(PTXCONF_IMAGE_STM32MP157C_DK2) += image-stm32mp157c-dk2
+
+IMAGE_STM32MP157C_DK2_ENV := \
+ STM32MP_BOARD=stm32mp157c-dk2
+
+#
+# Paths and names
+#
+IMAGE_STM32MP157C_DK2 := image-stm32mp157c-dk2
+IMAGE_STM32MP157C_DK2_DIR := $(BUILDDIR)/$(IMAGE_STM32MP157C_DK2)
+IMAGE_STM32MP157C_DK2_IMAGE := $(IMAGEDIR)/stm32mp157c-dk2.hdimg
+IMAGE_STM32MP157C_DK2_FILES := $(IMAGEDIR)/root.tgz
+IMAGE_STM32MP157C_DK2_CONFIG := stm32mp.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+$(IMAGE_STM32MP157C_DK2_IMAGE):
+ @$(call targetinfo)
+ @$(call image/genimage, IMAGE_STM32MP157C_DK2)
+ @$(call finish)
+
+# vim: syntax=make
+