summaryrefslogtreecommitdiffstats
path: root/configs
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-03-11 19:12:54 +0100
committerRobert Schwebel <r.schwebel@pengutronix.de>2021-03-15 09:42:42 +0100
commite9c32bad6e9f7dcf226c9c91cb84f458af0847a5 (patch)
tree2e7689282ef2fca93a0f8355bf34010355058976 /configs
parent61be023775ab1ccef072bd8116f0ccf740bf8708 (diff)
downloadDistroKit-e9c32bad6e9f7dcf226c9c91cb84f458af0847a5.tar.gz
DistroKit-e9c32bad6e9f7dcf226c9c91cb84f458af0847a5.tar.xz
v7a: Add support for Raspberry Pi CM3
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'configs')
-rw-r--r--configs/platform-v7a/barebox-rpi2.config2
-rw-r--r--configs/platform-v7a/barebox-rpi2.config.diff1
-rw-r--r--configs/platform-v7a/config/images/rpicm3.config30
-rw-r--r--configs/platform-v7a/platformconfig4
-rw-r--r--configs/platform-v7a/platforms/blspec-rpicm3.in5
-rw-r--r--configs/platform-v7a/platforms/image-rpicm3.in12
-rw-r--r--configs/platform-v7a/projectroot/loader/entries/rpicm3.conf6
-rw-r--r--configs/platform-v7a/rules/barebox-rpi2.make2
-rw-r--r--configs/platform-v7a/rules/blspec-rpicm3.make36
-rw-r--r--configs/platform-v7a/rules/image-rpicm3.make46
10 files changed, 141 insertions, 3 deletions
diff --git a/configs/platform-v7a/barebox-rpi2.config b/configs/platform-v7a/barebox-rpi2.config
index 4535c29..f71bd9e 100644
--- a/configs/platform-v7a/barebox-rpi2.config
+++ b/configs/platform-v7a/barebox-rpi2.config
@@ -57,7 +57,7 @@ CONFIG_MACH_RPI_COMMON=y
# CONFIG_MACH_RPI is not set
CONFIG_MACH_RPI2=y
CONFIG_MACH_RPI3=y
-# CONFIG_MACH_RPI_CM3 is not set
+CONFIG_MACH_RPI_CM3=y
# end of select Broadcom BCM283X boards to be built
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff
diff --git a/configs/platform-v7a/barebox-rpi2.config.diff b/configs/platform-v7a/barebox-rpi2.config.diff
index 98f0915..6cada67 100644
--- a/configs/platform-v7a/barebox-rpi2.config.diff
+++ b/configs/platform-v7a/barebox-rpi2.config.diff
@@ -23,6 +23,7 @@ CONFIG_GPIO_RASPBERRYPI_EXP=y
# CONFIG_KEYBOARD_QT1070 is undefined
# CONFIG_LED_PCA955X is undefined
CONFIG_MACH_RPI2=y
+CONFIG_MACH_RPI_CM3=y
CONFIG_MCI_BCM283X=y
CONFIG_MCI_BCM283X_SDHOST=y
# CONFIG_MCI_MMCI is not set
diff --git a/configs/platform-v7a/config/images/rpicm3.config b/configs/platform-v7a/config/images/rpicm3.config
new file mode 100644
index 0000000..4c10ac4
--- /dev/null
+++ b/configs/platform-v7a/config/images/rpicm3.config
@@ -0,0 +1,30 @@
+image rpicm3-boot.vfat {
+ vfat {
+ files = { @FIRMWARE_RPI3@ }
+ file barebox.img { image = barebox-raspberry-pi-cm3.img }
+ }
+ size = 32M
+}
+
+image @IMAGE@ {
+ hdimage {
+ align = 1M
+ disk-signature = 0xbedf7893
+ }
+ partition boot {
+ image = rpicm3-boot.vfat
+ size = 32M
+ 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 2ef8b8e..a42e598 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -152,7 +152,7 @@ PTXCONF_KERNEL_EXTRA_MAKEVARS=""
PTXCONF_DTC=y
PTXCONF_DTC_INSTALL_OFTREE=y
PTXCONF_DTC_OFTREE_DTS_PATH="${PTXDIST_PLATFORMCONFIG_SUBDIR}/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 at91-sama5d27_som1_ek.dts at91-sama5d27_giantboard.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 bcm2837-rpi-cm3-io3.dts stm32mp157c-dk2.dts stm32mp157c-lxa-mc1.dts at91-sama5d27_som1_ek.dts at91-sama5d27_giantboard.dts"
PTXCONF_DTC_EXTRA_ARGS=""
PTXCONF_HOST_DTC=y
PTXCONF_HOST_DTC_VERSION="1.6.0"
@@ -226,6 +226,7 @@ PTXCONF_BLSPEC_NITROGEN6X=y
PTXCONF_BLSPEC_RIOTBOARD=y
PTXCONF_BLSPEC_RPI2=y
PTXCONF_BLSPEC_RPI3=y
+PTXCONF_BLSPEC_RPICM3=y
PTXCONF_BLSPEC_SABRELITE=y
PTXCONF_BLSPEC_SAMA5D27_GIANTBOARD=y
PTXCONF_BLSPEC_SAMA5D27_SOM1_EK=y
@@ -278,6 +279,7 @@ PTXCONF_IMAGE_ROOT_TGZ_LABEL=""
# PTXCONF_IMAGE_ROOT_UBIFS is not set
PTXCONF_IMAGE_RPI2=y
PTXCONF_IMAGE_RPI3=y
+PTXCONF_IMAGE_RPICM3=y
PTXCONF_IMAGE_SABRELITE=y
PTXCONF_IMAGE_SAMA5D27_GIANTBOARD=y
PTXCONF_IMAGE_SAMA5D27_SOM1_EK=y
diff --git a/configs/platform-v7a/platforms/blspec-rpicm3.in b/configs/platform-v7a/platforms/blspec-rpicm3.in
new file mode 100644
index 0000000..430346c
--- /dev/null
+++ b/configs/platform-v7a/platforms/blspec-rpicm3.in
@@ -0,0 +1,5 @@
+## SECTION=blspec
+
+config BLSPEC_RPICM3
+ tristate
+ prompt "/loader/entries/rpicm3.conf bootloader spec entry"
diff --git a/configs/platform-v7a/platforms/image-rpicm3.in b/configs/platform-v7a/platforms/image-rpicm3.in
new file mode 100644
index 0000000..5cecf9a
--- /dev/null
+++ b/configs/platform-v7a/platforms/image-rpicm3.in
@@ -0,0 +1,12 @@
+## SECTION=image
+
+config IMAGE_RPICM3
+ tristate
+ select HOST_GENIMAGE
+ select HOST_DOSFSTOOLS
+ select HOST_MTOOLS
+ select IMAGE_ROOT_EXT
+ select BAREBOX_RPI2
+ prompt "Generate images/rpiCM3.hdimg"
+ help
+ SD card image for the Raspberry Pi Compute Module 3
diff --git a/configs/platform-v7a/projectroot/loader/entries/rpicm3.conf b/configs/platform-v7a/projectroot/loader/entries/rpicm3.conf
new file mode 100644
index 0000000..ada8d99
--- /dev/null
+++ b/configs/platform-v7a/projectroot/loader/entries/rpicm3.conf
@@ -0,0 +1,6 @@
+title Raspberry Pi CM3 - Pengutronix-DistroKit
+version 4.6
+options rootwait rw
+linux /boot/zImage
+devicetree /boot/bcm2837-rpi-cm3-io3.dtb
+linux-appendroot true
diff --git a/configs/platform-v7a/rules/barebox-rpi2.make b/configs/platform-v7a/rules/barebox-rpi2.make
index 5f16584..636ffeb 100644
--- a/configs/platform-v7a/rules/barebox-rpi2.make
+++ b/configs/platform-v7a/rules/barebox-rpi2.make
@@ -45,7 +45,7 @@ BAREBOX_RPI2_CONF_OPT := \
BAREBOX_RPI2_MAKE_OPT := $(BAREBOX_RPI2_CONF_OPT)
-BAREBOX_RPI2_IMAGES := images/barebox-raspberry-pi-2.img images/barebox-raspberry-pi-3.img
+BAREBOX_RPI2_IMAGES := images/barebox-raspberry-pi-2.img images/barebox-raspberry-pi-3.img images/barebox-raspberry-pi-cm3.img
BAREBOX_RPI2_IMAGES := $(addprefix $(BAREBOX_RPI2_BUILD_DIR)/,$(BAREBOX_RPI2_IMAGES))
ifdef PTXCONF_BAREBOX_RPI2
diff --git a/configs/platform-v7a/rules/blspec-rpicm3.make b/configs/platform-v7a/rules/blspec-rpicm3.make
new file mode 100644
index 0000000..4908a8b
--- /dev/null
+++ b/configs/platform-v7a/rules/blspec-rpicm3.make
@@ -0,0 +1,36 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2021 by Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_BLSPEC_RPICM3) += blspec-rpicm3
+
+BLSPEC_RPICM3_VERSION := 4.6
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/blspec-rpicm3.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, blspec-rpicm3)
+ @$(call install_fixup,blspec-rpicm3,PRIORITY,optional)
+ @$(call install_fixup,blspec-rpicm3,SECTION,base)
+ @$(call install_fixup,blspec-rpicm3,AUTHOR,"Uwe Kleine-König <u.kleine-koenig@pengutronix.de>")
+ @$(call install_fixup,blspec-rpicm3,DESCRIPTION,missing)
+
+ @$(call install_alternative, blspec-rpicm3, 0, 0, 0644, \
+ /loader/entries/rpicm3.conf)
+
+ @$(call install_finish,blspec-rpicm3)
+
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/configs/platform-v7a/rules/image-rpicm3.make b/configs/platform-v7a/rules/image-rpicm3.make
new file mode 100644
index 0000000..81cdd26
--- /dev/null
+++ b/configs/platform-v7a/rules/image-rpicm3.make
@@ -0,0 +1,46 @@
+# -*-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
+#
+IMAGE_PACKAGES-$(PTXCONF_IMAGE_RPICM3) += image-rpicm3
+
+#
+# Paths and names
+#
+IMAGE_RPICM3 := image-rpicm3
+IMAGE_RPICM3_DIR := $(BUILDDIR)/$(IMAGE_RPICM3)
+IMAGE_RPICM3_IMAGE := $(IMAGEDIR)/rpicm3.hdimg
+IMAGE_RPICM3_FILES := $(IMAGEDIR)/root.tgz
+IMAGE_RPICM3_CONFIG := rpicm3.config
+IMAGE_RPICM3_DATA_DIR := $(call ptx/in-platformconfigdir, rpi-firmware)
+IMAGE_RPICM3_DATA := \
+ $(wildcard $(IMAGE_RPICM3_DATA_DIR)/*.bin) \
+ $(wildcard $(IMAGE_RPICM3_DATA_DIR)/*.elf) \
+ $(wildcard $(IMAGE_RPICM3_DATA_DIR)/*.dat) \
+ $(wildcard $(IMAGE_RPICM3_DATA_DIR)/*.dtb) \
+ $(wildcard $(IMAGE_RPICM3_DATA_DIR)/config.txt)
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+define squote_and_comma
+$(subst $(ptx/def/space),$(comma) ,$(addsuffix $(ptx/def/squote),$(addprefix $(ptx/def/squote),$(1))))
+endef
+
+IMAGE_RPICM3_ENV := \
+ FIRMWARE_RPI3="$(call squote_and_comma,$(IMAGE_RPICM3_DATA))"
+
+$(IMAGE_RPICM3_IMAGE):
+ @$(call targetinfo)
+ @$(call image/genimage, IMAGE_RPICM3)
+ @$(call finish)
+
+# vim: syntax=make