summaryrefslogtreecommitdiffstats
path: root/configs/platform-v7a
diff options
context:
space:
mode:
authorRouven Czerwinski <r.czerwinski@pengutronix.de>2017-06-16 08:58:08 +0200
committerRobert Schwebel <r.schwebel@pengutronix.de>2017-07-03 22:59:34 +0200
commitcc1fee168d497fc1fb2546bf4d3a836208a5b3df (patch)
tree700ee4fd8eaf33d5e0cf2c48ae135137e12f2c2c /configs/platform-v7a
parent421193e8981287d6edc70af6d2996a5296438f87 (diff)
downloadDistroKit-cc1fee168d497fc1fb2546bf4d3a836208a5b3df.tar.gz
DistroKit-cc1fee168d497fc1fb2546bf4d3a836208a5b3df.tar.xz
platform-v7a: vexpress: add board support
Add support for Versatile Express, with the configs+rules for image creation and bootspec entries. Note that vexpress in qemu can currently only boot from nor, so we put the bootloader, environment and boot state there and the rest of the system into mmc. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> [add vexpress.conf] Signed-off-by: Chris Fiege <c.fiege@pengutronix.de> [improve commit description] [split from vexpress patches] [fix and cleanupimage generation] Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'configs/platform-v7a')
-rw-r--r--configs/platform-v7a/config/images/vexpress-nor.config29
-rw-r--r--configs/platform-v7a/config/images/vexpress.config22
-rw-r--r--configs/platform-v7a/platforms/blspec-vexpress.in5
-rw-r--r--configs/platform-v7a/platforms/image-vexpress-nor.in10
-rw-r--r--configs/platform-v7a/platforms/image-vexpress.in10
-rw-r--r--configs/platform-v7a/projectroot/loader/entries/vexpress.conf6
-rw-r--r--configs/platform-v7a/rules/barebox-vexpress.make1
-rw-r--r--configs/platform-v7a/rules/blspec-vexpress.make38
-rw-r--r--configs/platform-v7a/rules/image-vexpress-nor.make37
-rw-r--r--configs/platform-v7a/rules/image-vexpress.make33
10 files changed, 191 insertions, 0 deletions
diff --git a/configs/platform-v7a/config/images/vexpress-nor.config b/configs/platform-v7a/config/images/vexpress-nor.config
new file mode 100644
index 0000000..18e53ed
--- /dev/null
+++ b/configs/platform-v7a/config/images/vexpress-nor.config
@@ -0,0 +1,29 @@
+image @IMAGE@ {
+ hdimage {
+ partition-table = false
+ }
+ partition barebox {
+ image = barebox.bin-vexpress
+ offset = 0
+ in-partition-table = false
+ }
+ partition barebox-environment {
+ /* empty environment -> use barebox builtin */
+ image = barebox-zero-env-vexpress
+ offset = 0x80000 /* 512 KiB */
+ in-partition-table = false
+ }
+ partition barebox-state {
+ image = /dev/null
+ offset = 0x100000 /* 1 MiB */
+ in-partition-table = false
+ size = 0x100000 /* 1 MiB */
+ }
+ /* expand image size to 64 MiB; dummy size, results in 0 bytes length */
+ partition end {
+ image = /dev/null
+ offset = 64M
+ size = 1M
+ in-partition-table = false
+ }
+}
diff --git a/configs/platform-v7a/config/images/vexpress.config b/configs/platform-v7a/config/images/vexpress.config
new file mode 100644
index 0000000..2c23576
--- /dev/null
+++ b/configs/platform-v7a/config/images/vexpress.config
@@ -0,0 +1,22 @@
+image @IMAGE@ {
+ hdimage {
+ align = 1M
+ disk-signature = 0x74823abf
+ }
+ partition root-A {
+ image = root.ext2
+ partition-type = 0x83
+ size = 512M
+ }
+ partition data {
+ partition-type = 0x83
+ size = 512M
+ }
+ /* expand image size to 64 MiB; dummy size, results in 0 bytes length */
+ partition end {
+ image = /dev/null
+ size = 1M
+ offset = 1025M
+ in-partition-table = false
+ }
+}
diff --git a/configs/platform-v7a/platforms/blspec-vexpress.in b/configs/platform-v7a/platforms/blspec-vexpress.in
new file mode 100644
index 0000000..5c4f677
--- /dev/null
+++ b/configs/platform-v7a/platforms/blspec-vexpress.in
@@ -0,0 +1,5 @@
+## SECTION=blspec
+
+config BLSPEC_VEXPRESS
+ tristate
+ prompt "/loader/entries/vexpress.conf bootloader spec entry"
diff --git a/configs/platform-v7a/platforms/image-vexpress-nor.in b/configs/platform-v7a/platforms/image-vexpress-nor.in
new file mode 100644
index 0000000..20593d8
--- /dev/null
+++ b/configs/platform-v7a/platforms/image-vexpress-nor.in
@@ -0,0 +1,10 @@
+## SECTION=image
+
+config IMAGE_VEXPRESS_NOR
+ tristate
+ select HOST_GENIMAGE
+ select BAREBOX_VEXPRESS
+ select KERNEL
+ prompt "Generate images/vexpress.norimg"
+ help
+ Generate image for the nor flash on Versatile Express.
diff --git a/configs/platform-v7a/platforms/image-vexpress.in b/configs/platform-v7a/platforms/image-vexpress.in
new file mode 100644
index 0000000..5739979
--- /dev/null
+++ b/configs/platform-v7a/platforms/image-vexpress.in
@@ -0,0 +1,10 @@
+## SECTION=image
+
+config IMAGE_VEXPRESS
+ tristate
+ select HOST_GENIMAGE
+ select BAREBOX_VEXPRESS
+ select IMAGE_ROOT_EXT
+ prompt "Generate images/vexpress.hdimg"
+ help
+ FIXME
diff --git a/configs/platform-v7a/projectroot/loader/entries/vexpress.conf b/configs/platform-v7a/projectroot/loader/entries/vexpress.conf
new file mode 100644
index 0000000..e916339
--- /dev/null
+++ b/configs/platform-v7a/projectroot/loader/entries/vexpress.conf
@@ -0,0 +1,6 @@
+title PTXdist - Pengutronix-DistroKit
+version 4.11
+options rootwait console=ttyAMA0,115200
+linux /boot/zImage
+devicetree /boot/vexpress-v2p-ca9.dtb
+linux-appendroot true
diff --git a/configs/platform-v7a/rules/barebox-vexpress.make b/configs/platform-v7a/rules/barebox-vexpress.make
index 54275db..c240362 100644
--- a/configs/platform-v7a/rules/barebox-vexpress.make
+++ b/configs/platform-v7a/rules/barebox-vexpress.make
@@ -70,6 +70,7 @@ $(STATEDIR)/barebox-vexpress.install:
@$(foreach image, $(BAREBOX_VEXPRESS_IMAGES), \
install -m 644 \
$(image) $(IMAGEDIR)/$(notdir $(image))-vexpress;)
+ @install -D -m644 $(BAREBOX_VEXPRESS_DIR)/defaultenv/barebox_zero_env $(IMAGEDIR)/barebox-zero-env-vexpress
@$(call touch)
# ----------------------------------------------------------------------------
diff --git a/configs/platform-v7a/rules/blspec-vexpress.make b/configs/platform-v7a/rules/blspec-vexpress.make
new file mode 100644
index 0000000..c723dae
--- /dev/null
+++ b/configs/platform-v7a/rules/blspec-vexpress.make
@@ -0,0 +1,38 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Chris Fiege <c.fiege@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
+#
+PACKAGES-$(PTXCONF_BLSPEC_VEXPRESS) += blspec-vexpress
+
+BLSPEC_VEXPRESS_VERSION := 4.11
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/blspec-vexpress.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, blspec-vexpress)
+ @$(call install_fixup,blspec-vexpress,PRIORITY,optional)
+ @$(call install_fixup,blspec-vexpress,SECTION,base)
+ @$(call install_fixup,blspec-vexpress,AUTHOR,"Chris Fiege <c.fiege@pengutronix.de>")
+ @$(call install_fixup,blspec-vexpress,DESCRIPTION,missing)
+
+ @$(call install_alternative, blspec-vexpress, 0, 0, 0644, \
+ /loader/entries/vexpress.conf)
+
+ @$(call install_finish,blspec-vexpress)
+
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/configs/platform-v7a/rules/image-vexpress-nor.make b/configs/platform-v7a/rules/image-vexpress-nor.make
new file mode 100644
index 0000000..20773e1
--- /dev/null
+++ b/configs/platform-v7a/rules/image-vexpress-nor.make
@@ -0,0 +1,37 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Michael Olbrich <m.olbrich@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_VEXPRESS_NOR) += image-flash
+
+#
+# Paths and names
+#
+IMAGE_VEXPRESS_NOR := image-flash
+IMAGE_VEXPRESS_NOR_DIR := $(BUILDDIR)/$(IMAGE_VEXPRESS_NOR)
+IMAGE_VEXPRESS_NOR_IMAGE := $(IMAGEDIR)/vexpress.norimg
+IMAGE_VEXPRESS_NOR_CONFIG := vexpress-nor.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+# Note: no ':' and only works with one device tree
+IMAGE_VEXPRESS_NOR_ENV = \
+ DTB=$(IMAGEDIR)/vexpress-v2p-ca9.dtb
+
+$(IMAGE_VEXPRESS_NOR_IMAGE):
+ @$(call targetinfo)
+ @$(call image/genimage, IMAGE_VEXPRESS_NOR)
+ @$(call finish)
+
+# vim: syntax=make
diff --git a/configs/platform-v7a/rules/image-vexpress.make b/configs/platform-v7a/rules/image-vexpress.make
new file mode 100644
index 0000000..a5d8674
--- /dev/null
+++ b/configs/platform-v7a/rules/image-vexpress.make
@@ -0,0 +1,33 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Chris Fiege <c.fiege@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_VEXPRESS) += image-vexpress
+
+#
+# Paths and names
+#
+IMAGE_VEXPRESS := image-vexpress
+IMAGE_VEXPRESS_DIR := $(BUILDDIR)/$(IMAGE_VEXPRESS)
+IMAGE_VEXPRESS_IMAGE := $(IMAGEDIR)/vexpress.hdimg
+IMAGE_VEXPRESS_CONFIG := vexpress.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+$(IMAGE_VEXPRESS_IMAGE):
+ @$(call targetinfo)
+ @$(call image/genimage, IMAGE_VEXPRESS)
+ @$(call finish)
+
+# vim: syntax=make