summaryrefslogtreecommitdiffstats
path: root/configs/platform-v7a/rules
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2016-07-26 22:16:06 +0200
committerRobert Schwebel <r.schwebel@pengutronix.de>2016-07-26 22:16:06 +0200
commit49292bd74f73a260927b7f3f42548e4ee4407237 (patch)
tree3e89c3b02b9d8d9e1114f8f860afb9a1109cc373 /configs/platform-v7a/rules
parentdd2c39349c6e0358cb5dc463cd02e63b0902bcf2 (diff)
downloadDistroKit-49292bd74f73a260927b7f3f42548e4ee4407237.tar.gz
DistroKit-49292bd74f73a260927b7f3f42548e4ee4407237.tar.xz
platform-beaglebone: rename to platform-v7a
In the meantime, in addition to beaglebone, this platform supports the other ARMv7 based boards (rpi2, vexpress), so rename it. Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'configs/platform-v7a/rules')
-rw-r--r--configs/platform-v7a/rules/barebox-rpi2.make92
-rw-r--r--configs/platform-v7a/rules/blspec-boneblack.make38
-rw-r--r--configs/platform-v7a/rules/blspec-bonewhite.make38
-rw-r--r--configs/platform-v7a/rules/blspec-rpi2.make38
-rw-r--r--configs/platform-v7a/rules/image-boot-vfat.make49
-rw-r--r--configs/platform-v7a/rules/post/genimage-fixup.make3
6 files changed, 258 insertions, 0 deletions
diff --git a/configs/platform-v7a/rules/barebox-rpi2.make b/configs/platform-v7a/rules/barebox-rpi2.make
new file mode 100644
index 0000000..218140e
--- /dev/null
+++ b/configs/platform-v7a/rules/barebox-rpi2.make
@@ -0,0 +1,92 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Alexander Aring <aar@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_BAREBOX_RPI2) += barebox-rpi2
+
+#
+# Paths and names
+#
+BAREBOX_RPI2_VERSION := 2016.05.0
+BAREBOX_RPI2_MD5 :=
+BAREBOX_RPI2 := barebox-$(BAREBOX_RPI2_VERSION)
+BAREBOX_RPI2_SUFFIX := tar.bz2
+BAREBOX_RPI2_DIR := $(BUILDDIR)/barebox-rpi2-$(BAREBOX_RPI2_VERSION)
+BAREBOX_RPI2_CONFIG := $(PTXDIST_PLATFORMCONFIGDIR)/barebox-rpi2.config.$(BAREBOX_RPI2_VERSION)
+BAREBOX_RPI2_LICENSE := GPL-2.0
+BAREBOX_RPI2_URL := $(call barebox-url, BAREBOX_RPI2)
+BAREBOX_RPI2_SOURCE := $(SRCDIR)/$(BAREBOX_RPI2).$(BAREBOX_RPI2_SUFFIX)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+BAREBOX_RPI2_BLACKLIST := \
+ TARGET_HARDEN_RELRO \
+ TARGET_HARDEN_BINDNOW \
+ TARGET_HARDEN_PIE \
+ TARGET_DEBUG
+
+BAREBOX_RPI2_CONF_ENV := KCONFIG_NOTIMESTAMP=1
+BAREBOX_RPI2_CONF_OPT := $(call barebox-opts, BAREBOX_RPI2)
+
+BAREBOX_RPI2_MAKE_ENV := $(BAREBOX_RPI2_CONF_ENV)
+BAREBOX_RPI2_MAKE_OPT := $(BAREBOX_RPI2_CONF_OPT)
+
+BAREBOX_RPI2_IMAGES := barebox.bin
+BAREBOX_RPI2_IMAGES := $(addprefix $(BAREBOX_RPI2_DIR)/,$(BAREBOX_RPI2_IMAGES))
+
+ifdef PTXCONF_BAREBOX_RPI2
+$(BAREBOX_RPI2_CONFIG):
+ @echo
+ @echo "****************************************************************************"
+ @echo " Please generate a bareboxconfig with 'ptxdist menuconfig barebox-rpi2'"
+ @echo "****************************************************************************"
+ @echo
+ @echo
+ @exit 1
+endif
+
+$(STATEDIR)/barebox-rpi2.prepare: $(BAREBOX_RPI2_CONFIG)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+BAREBOX_RPI2_INSTALL_OPT := \
+ $(call barebox-opts, BAREBOX_RPI2)
+
+$(STATEDIR)/barebox-rpi2.install:
+ @$(call targetinfo)
+ @$(foreach image, $(BAREBOX_RPI2_IMAGES), \
+ install -m 644 \
+ $(image) $(IMAGEDIR)/$(notdir $(image))-rpi2;)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/barebox-rpi2.clean:
+ @$(call targetinfo)
+ @$(call clean_pkg, BAREBOX_RPI2)
+ @$(foreach image, $(BAREBOX_RPI2_IMAGES), \
+ rm -fv $(IMAGEDIR)/$(notdir $(image))-rpi2;)
+
+# ----------------------------------------------------------------------------
+# oldconfig / menuconfig
+# ----------------------------------------------------------------------------
+
+barebox-rpi2_oldconfig barebox-rpi2_menuconfig barebox-rpi2_nconfig: $(STATEDIR)/barebox-rpi2.extract
+ @$(call world/kconfig, BAREBOX_RPI2, $(subst barebox-rpi2_,,$@))
+
+# vim: syntax=make
diff --git a/configs/platform-v7a/rules/blspec-boneblack.make b/configs/platform-v7a/rules/blspec-boneblack.make
new file mode 100644
index 0000000..841b13a
--- /dev/null
+++ b/configs/platform-v7a/rules/blspec-boneblack.make
@@ -0,0 +1,38 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Michael Grzeschik <mgr@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_BONEBLACK) += blspec-boneblack
+
+BLSPEC_BONEBLACK_VERSION := 4.6
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/blspec-boneblack.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, blspec-boneblack)
+ @$(call install_fixup,blspec-boneblack,PRIORITY,optional)
+ @$(call install_fixup,blspec-boneblack,SECTION,base)
+ @$(call install_fixup,blspec-boneblack,AUTHOR,"Michael Grzeschik <mgr@pengutronix.de>")
+ @$(call install_fixup,blspec-boneblack,DESCRIPTION,missing)
+
+ @$(call install_alternative, blspec-boneblack, 0, 0, 0644, \
+ /loader/entries/boneblack.conf)
+
+ @$(call install_finish,blspec-boneblack)
+
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/configs/platform-v7a/rules/blspec-bonewhite.make b/configs/platform-v7a/rules/blspec-bonewhite.make
new file mode 100644
index 0000000..1d7cbea
--- /dev/null
+++ b/configs/platform-v7a/rules/blspec-bonewhite.make
@@ -0,0 +1,38 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Michael Grzeschik <mgr@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_BONEWHITE) += blspec-bonewhite
+
+BLSPEC_BONEWHITE_VERSION := 4.6
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/blspec-bonewhite.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, blspec-bonewhite)
+ @$(call install_fixup,blspec-bonewhite,PRIORITY,optional)
+ @$(call install_fixup,blspec-bonewhite,SECTION,base)
+ @$(call install_fixup,blspec-bonewhite,AUTHOR,"Michael Grzeschik <mgr@pengutronix.de>")
+ @$(call install_fixup,blspec-bonewhite,DESCRIPTION,missing)
+
+ @$(call install_alternative, blspec-bonewhite, 0, 0, 0644, \
+ /loader/entries/bonewhite.conf)
+
+ @$(call install_finish,blspec-bonewhite)
+
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/configs/platform-v7a/rules/blspec-rpi2.make b/configs/platform-v7a/rules/blspec-rpi2.make
new file mode 100644
index 0000000..4013220
--- /dev/null
+++ b/configs/platform-v7a/rules/blspec-rpi2.make
@@ -0,0 +1,38 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Alexander Aring <aar@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_RPI2) += blspec-rpi2
+
+BLSPEC_RPI2_VERSION := 4.6
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/blspec-rpi2.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, blspec-rpi2)
+ @$(call install_fixup,blspec-rpi2,PRIORITY,optional)
+ @$(call install_fixup,blspec-rpi2,SECTION,base)
+ @$(call install_fixup,blspec-rpi2,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
+ @$(call install_fixup,blspec-rpi2,DESCRIPTION,missing)
+
+ @$(call install_alternative, blspec-rpi2, 0, 0, 0644, \
+ /loader/entries/rpi2.conf)
+
+ @$(call install_finish,blspec-rpi2)
+
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/configs/platform-v7a/rules/image-boot-vfat.make b/configs/platform-v7a/rules/image-boot-vfat.make
new file mode 100644
index 0000000..185c2b7
--- /dev/null
+++ b/configs/platform-v7a/rules/image-boot-vfat.make
@@ -0,0 +1,49 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 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_BOOT_VFAT) += image-boot-vfat
+
+#
+# Paths and names
+#
+IMAGE_BOOT_VFAT := image-boot-vfat
+IMAGE_BOOT_VFAT_DIR := $(BUILDDIR)/$(IMAGE_BOOT_VFAT)
+IMAGE_BOOT_VFAT_IMAGE := $(IMAGEDIR)/boot.vfat
+IMAGE_BOOT_VFAT_DATA := \
+ $(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/*.bin) \
+ $(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/*.elf) \
+ $(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/*.dat) \
+ $(wildcard $(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/config.txt)
+IMAGE_BOOT_VFAT_CONFIG := boot-vfat.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+define squote_and_comma
+$(subst $(ptx/def/space),$(comma) ,$(addsuffix $(ptx/def/squote),$(addprefix $(ptx/def/squote),$(1))))
+endef
+
+
+IMAGE_BOOT_VFAT_ENV := \
+ FIRMWARE_RPI2="$(call squote_and_comma,$(IMAGE_BOOT_VFAT_DATA))"
+
+$(IMAGE_BOOT_VFAT_IMAGE):
+ @$(call targetinfo)
+ @GPU_MEM=$(PTXCONF_IMAGE_BOOT_VFAT_GPU_MEM) \
+ ptxd_replace_magic "$(PTXDIST_PLATFORMCONFIGDIR)/rpi-firmware/config.txt" > \
+ "$(PTXDIST_TEMPDIR)/config.txt"
+ @$(call image/genimage, IMAGE_BOOT_VFAT)
+ @$(call finish)
+
+# vim: syntax=make
diff --git a/configs/platform-v7a/rules/post/genimage-fixup.make b/configs/platform-v7a/rules/post/genimage-fixup.make
new file mode 100644
index 0000000..67c5deb
--- /dev/null
+++ b/configs/platform-v7a/rules/post/genimage-fixup.make
@@ -0,0 +1,3 @@
+$(IMAGEDIR)/boot.vfat: $(STATEDIR)/kernel.targetinstall.post
+$(IMAGEDIR)/boot.vfat: $(STATEDIR)/barebox.targetinstall.post
+$(IMAGEDIR)/boot.vfat: $(STATEDIR)/barebox-rpi2.targetinstall.post