From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Ahmad Fatoum Date: Mon, 12 Oct 2020 21:36:01 +0200 Message-Id: <20201012193604.9394-4-a.fatoum@pengutronix.de> In-Reply-To: <20201012193604.9394-1-a.fatoum@pengutronix.de> References: <20201012193604.9394-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 Subject: [DistroKit] [PATCH v2 4/7] v7a: generate image for sama5d27 SOM1 Evaluation Kit List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: distrokit-bounces@pengutronix.de Sender: "DistroKit" To: distrokit@pengutronix.de Cc: Ahmad Fatoum With the previous barebox and kernel changes, we can combine it with the DistroKit-v7a rootfs to get an image to boot on the sama5d27-som1-ek. Do this. Signed-off-by: Ahmad Fatoum --- v1 -> v2: no changes --- .../platform-v7a/config/images/at91-sd.config | 30 ++++++++++++++++ configs/platform-v7a/platformconfig | 4 ++- .../platforms/blspec-sama5d27-som1-ek.in | 5 +++ .../platforms/image-sama5d27-som1-ek.in | 11 ++++++ .../loader/entries/sama5d27-som1-ek.conf | 6 ++++ .../rules/blspec-sama5d27-som1-ek.make | 36 +++++++++++++++++++ .../rules/image-sama5d27-som1-ek.make | 36 +++++++++++++++++++ 7 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 configs/platform-v7a/config/images/at91-sd.config create mode 100644 configs/platform-v7a/platforms/blspec-sama5d27-som1-ek.in create mode 100644 configs/platform-v7a/platforms/image-sama5d27-som1-ek.in create mode 100644 configs/platform-v7a/projectroot/loader/entries/sama5d27-som1-ek.conf create mode 100644 configs/platform-v7a/rules/blspec-sama5d27-som1-ek.make create mode 100644 configs/platform-v7a/rules/image-sama5d27-som1-ek.make diff --git a/configs/platform-v7a/config/images/at91-sd.config b/configs/platform-v7a/config/images/at91-sd.config new file mode 100644 index 000000000000..6108a20b601d --- /dev/null +++ b/configs/platform-v7a/config/images/at91-sd.config @@ -0,0 +1,30 @@ +image @IMAGE@-boot.vfat { + vfat { + file BOOT.BIN { image = @FSBL@ } + file barebox.bin { image = @SSBL@ } + } + size = 3M +} + +image @IMAGE@ { + hdimage { + align = 1M + disk-signature = 0x67823abf + } + partition boot { + image = @IMAGE@-boot.vfat + size = 3M + 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 139d0fd10965..add98b21b759 100644 --- a/configs/platform-v7a/platformconfig +++ b/configs/platform-v7a/platformconfig @@ -144,7 +144,7 @@ PTXCONF_KERNEL_EXTRA_MAKEVARS="" PTXCONF_DTC=y PTXCONF_DTC_INSTALL_OFTREE=y PTXCONF_DTC_OFTREE_DTS_PATH="${PTXDIST_PLATFORMCONFIGDIR}/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" +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" PTXCONF_DTC_EXTRA_ARGS="" PTXCONF_HOST_DTC=y PTXCONF_HOST_DTC_VERSION="1.5.1" @@ -217,6 +217,7 @@ PTXCONF_BLSPEC_RIOTBOARD=y PTXCONF_BLSPEC_RPI2=y PTXCONF_BLSPEC_RPI3=y PTXCONF_BLSPEC_SABRELITE=y +PTXCONF_BLSPEC_SAMA5D27_SOM1_EK=y PTXCONF_BLSPEC_STM32MP157C_DK2=y PTXCONF_BLSPEC_UDOO_NEO=y PTXCONF_BLSPEC_VEXPRESS=y @@ -264,6 +265,7 @@ PTXCONF_IMAGE_ROOT_TGZ_LABEL="" PTXCONF_IMAGE_RPI2=y PTXCONF_IMAGE_RPI3=y PTXCONF_IMAGE_SABRELITE=y +PTXCONF_IMAGE_SAMA5D27_SOM1_EK=y PTXCONF_IMAGE_STM32MP157C_DK2=y PTXCONF_IMAGE_UDOO_NEO=y PTXCONF_IMAGE_VEXPRESS_NOR=y diff --git a/configs/platform-v7a/platforms/blspec-sama5d27-som1-ek.in b/configs/platform-v7a/platforms/blspec-sama5d27-som1-ek.in new file mode 100644 index 000000000000..942fc77a81c5 --- /dev/null +++ b/configs/platform-v7a/platforms/blspec-sama5d27-som1-ek.in @@ -0,0 +1,5 @@ +## SECTION=blspec + +config BLSPEC_SAMA5D27_SOM1_EK + tristate + prompt "/loader/entries/sama5d27-som1-ek.conf bootloader spec entry" diff --git a/configs/platform-v7a/platforms/image-sama5d27-som1-ek.in b/configs/platform-v7a/platforms/image-sama5d27-som1-ek.in new file mode 100644 index 000000000000..1170cb858359 --- /dev/null +++ b/configs/platform-v7a/platforms/image-sama5d27-som1-ek.in @@ -0,0 +1,11 @@ +## SECTION=image + +config IMAGE_SAMA5D27_SOM1_EK + tristate + select HOST_GENIMAGE + select IMAGE_ROOT_EXT + select HOST_DOSFSTOOLS + select BAREBOX_AT91 + prompt "Generate images/sama5d27-som1-ek.hdimg" + help + Includes DistroKit support for the Microchip sama5d27 SOM1 evaluation Kit diff --git a/configs/platform-v7a/projectroot/loader/entries/sama5d27-som1-ek.conf b/configs/platform-v7a/projectroot/loader/entries/sama5d27-som1-ek.conf new file mode 100644 index 000000000000..3cbcf54294b3 --- /dev/null +++ b/configs/platform-v7a/projectroot/loader/entries/sama5d27-som1-ek.conf @@ -0,0 +1,6 @@ +title PTXdist - Pengutronix-DistroKit +version @VERSION@ +options rootwait +linux /boot/zImage +devicetree /boot/at91-sama5d27_som1_ek.dtb +linux-appendroot true diff --git a/configs/platform-v7a/rules/blspec-sama5d27-som1-ek.make b/configs/platform-v7a/rules/blspec-sama5d27-som1-ek.make new file mode 100644 index 000000000000..1c84bc7936f6 --- /dev/null +++ b/configs/platform-v7a/rules/blspec-sama5d27-som1-ek.make @@ -0,0 +1,36 @@ +# -*-makefile-*- +# +# Copyright (C) 2020 by Ahmad Fatoum +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_BLSPEC_SAMA5D27_SOM1_EK) += blspec-sama5d27-som1-ek + +BLSPEC_SAMA5D27_SOM1_EK_VERSION := 5.8 + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/blspec-sama5d27-som1-ek.targetinstall: + @$(call targetinfo) + + @$(call install_init, blspec-sama5d27-som1-ek) + @$(call install_fixup,blspec-sama5d27-som1-ek,PRIORITY,optional) + @$(call install_fixup,blspec-sama5d27-som1-ek,SECTION,base) + @$(call install_fixup,blspec-sama5d27-som1-ek,AUTHOR,"Ahmad Fatoum ") + @$(call install_fixup,blspec-sama5d27-som1-ek,DESCRIPTION,missing) + + @$(call install_alternative, blspec-sama5d27-som1-ek, 0, 0, 0644, \ + /loader/entries/sama5d27-som1-ek.conf) + + @$(call install_finish,blspec-sama5d27-som1-ek) + + @$(call touch) + +# vim: syntax=make diff --git a/configs/platform-v7a/rules/image-sama5d27-som1-ek.make b/configs/platform-v7a/rules/image-sama5d27-som1-ek.make new file mode 100644 index 000000000000..66ac025606db --- /dev/null +++ b/configs/platform-v7a/rules/image-sama5d27-som1-ek.make @@ -0,0 +1,36 @@ +# -*-makefile-*- +# +# Copyright (C) 2020 by Ahmad Fatoum +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +IMAGE_PACKAGES-$(PTXCONF_IMAGE_SAMA5D27_SOM1_EK) += image-sama5d27-som1-ek + +# +# Paths and names +# +IMAGE_SAMA5D27_SOM1_EK := image-sama5d27-som1-ek +IMAGE_SAMA5D27_SOM1_EK_DIR := $(BUILDDIR)/$(IMAGE_SAMA5D27_SOM1_EK) +IMAGE_SAMA5D27_SOM1_EK_IMAGE := $(IMAGEDIR)/sama5d27-som1-ek.hdimg +IMAGE_SAMA5D27_SOM1_EK_FILES := $(IMAGEDIR)/root.tgz +IMAGE_SAMA5D27_SOM1_EK_CONFIG := at91-sd.config + +# ---------------------------------------------------------------------------- +# Image +# ---------------------------------------------------------------------------- + +IMAGE_SAMA5D27_SOM1_EK_ENV := \ + FSBL=barebox-sama5d27-som1-ek-xload-mmc.img \ + SSBL=barebox-sama5d27-som1-ek.img + +$(IMAGE_SAMA5D27_SOM1_EK_IMAGE): + @$(call targetinfo) + @$(call image/genimage, IMAGE_SAMA5D27_SOM1_EK) + @$(call finish) + +# vim: syntax=make -- 2.28.0 _______________________________________________ DistroKit mailing list DistroKit@pengutronix.de