diff options
author | Oleksij Rempel <o.rempel@pengutronix.de> | 2022-04-26 10:38:21 +0200 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2022-04-26 15:23:37 +0200 |
commit | 17e0620b641f671a91a4e439e2789a87b9124d41 (patch) | |
tree | eed77846af3cf990a4e20630500d35a27437ef4a /configs/platform-v7a/rules | |
parent | f586445a24ac00dd841deb6b2d8e365a99d9f870 (diff) | |
download | DistroKit-17e0620b641f671a91a4e439e2789a87b9124d41.tar.gz DistroKit-17e0620b641f671a91a4e439e2789a87b9124d41.tar.xz |
v7a: rpi: unify rpi{2, 3, cm3}.hdimg into common rpi.hdimg
barebox has had the ability to generate an extra image that's bootable
like a kernel for a while now. With small adjustment, we can let the
videocore use this image and pass it the appropriate device tree
depending on the board used. Moving this decision into the VideoCore
allows us to use the same image for both Raspberry Pi 2, Rasperry Pi 3
and Raspberry Pi CM3.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.pengutronix.de/20220426083821.1829442-3-a.fatoum@pengutronix.de
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.make | 14 | ||||
-rw-r--r-- | configs/platform-v7a/rules/image-rpi2.make | 2 | ||||
-rw-r--r-- | configs/platform-v7a/rules/image-rpi3.make | 46 | ||||
-rw-r--r-- | configs/platform-v7a/rules/image-rpicm3.make | 46 |
4 files changed, 9 insertions, 99 deletions
diff --git a/configs/platform-v7a/rules/barebox-rpi2.make b/configs/platform-v7a/rules/barebox-rpi2.make index 17f7a33..f1dff40 100644 --- a/configs/platform-v7a/rules/barebox-rpi2.make +++ b/configs/platform-v7a/rules/barebox-rpi2.make @@ -46,8 +46,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 images/barebox-raspberry-pi-cm3.img -BAREBOX_RPI2_IMAGES := $(addprefix $(BAREBOX_RPI2_BUILD_DIR)/,$(BAREBOX_RPI2_IMAGES)) +BAREBOX_RPI2_DTB_DIR := $(BAREBOX_RPI2_BUILD_DIR)/arch/arm/dts ifdef PTXCONF_BAREBOX_RPI2 $(BAREBOX_RPI2_CONFIG): @@ -82,9 +81,11 @@ $(STATEDIR)/barebox-rpi2.install: $(STATEDIR)/barebox-rpi2.targetinstall: @$(call targetinfo) - @$(foreach image, $(BAREBOX_RPI2_IMAGES), \ + @$(foreach dtb, $(wildcard $(BAREBOX_RPI2_DTB_DIR)/*.dtb), \ install -m 644 \ - $(image) $(IMAGEDIR)/$(notdir $(image))$(ptx/nl)) + $(dtb) $(IMAGEDIR)/barebox-$(notdir $(dtb))$(ptx/nl)) + @install -m 644 $(BAREBOX_RPI2_BUILD_DIR)/images/barebox-dt-2nd.img \ + $(IMAGEDIR)/barebox-dt-2nd-rpi.img @$(call touch) # ---------------------------------------------------------------------------- @@ -94,8 +95,9 @@ $(STATEDIR)/barebox-rpi2.targetinstall: $(STATEDIR)/barebox-rpi2.clean: @$(call targetinfo) @$(call clean_pkg, BAREBOX_RPI2) - @$(foreach image, $(BAREBOX_RPI2_IMAGES), \ - rm -fv $(IMAGEDIR)/$(notdir $(image))$(ptx/nl)) + @$(foreach dtb, $(wildcard $(BAREBOX_RPI2_DTB_DIR)/*.dtb), \ + rm -fv $(IMAGEDIR)/barebox-$(notdir $(dtb))$(ptx/nl)) + @rm -fv $(IMAGEDIR)/barebox-dt-2nd-rpi.img # ---------------------------------------------------------------------------- # oldconfig / menuconfig diff --git a/configs/platform-v7a/rules/image-rpi2.make b/configs/platform-v7a/rules/image-rpi2.make index 8e192e4..db5cbc1 100644 --- a/configs/platform-v7a/rules/image-rpi2.make +++ b/configs/platform-v7a/rules/image-rpi2.make @@ -16,7 +16,7 @@ IMAGE_PACKAGES-$(PTXCONF_IMAGE_RPI2) += image-rpi2 # IMAGE_RPI2 := image-rpi2 IMAGE_RPI2_DIR := $(BUILDDIR)/$(IMAGE_RPI2) -IMAGE_RPI2_IMAGE := $(IMAGEDIR)/rpi2.hdimg +IMAGE_RPI2_IMAGE := $(IMAGEDIR)/rpi.hdimg IMAGE_RPI2_FILES := $(IMAGEDIR)/root.tgz IMAGE_RPI2_CONFIG := rpi2.config IMAGE_RPI2_DATA_DIR := $(call ptx/in-platformconfigdir, rpi-firmware) diff --git a/configs/platform-v7a/rules/image-rpi3.make b/configs/platform-v7a/rules/image-rpi3.make deleted file mode 100644 index 5c56c3a..0000000 --- a/configs/platform-v7a/rules/image-rpi3.make +++ /dev/null @@ -1,46 +0,0 @@ -# -*-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_RPI3) += image-rpi3 - -# -# Paths and names -# -IMAGE_RPI3 := image-rpi3 -IMAGE_RPI3_DIR := $(BUILDDIR)/$(IMAGE_RPI3) -IMAGE_RPI3_IMAGE := $(IMAGEDIR)/rpi3.hdimg -IMAGE_RPI3_FILES := $(IMAGEDIR)/root.tgz -IMAGE_RPI3_CONFIG := rpi3.config -IMAGE_RPI3_DATA_DIR := $(call ptx/in-platformconfigdir, rpi-firmware) -IMAGE_RPI3_DATA := \ - $(wildcard $(IMAGE_RPI3_DATA_DIR)/*.bin) \ - $(wildcard $(IMAGE_RPI3_DATA_DIR)/*.elf) \ - $(wildcard $(IMAGE_RPI3_DATA_DIR)/*.dat) \ - $(wildcard $(IMAGE_RPI3_DATA_DIR)/*.dtb) \ - $(wildcard $(IMAGE_RPI3_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_RPI3_ENV := \ - FIRMWARE_RPI3="$(call squote_and_comma,$(IMAGE_RPI3_DATA))" - -$(IMAGE_RPI3_IMAGE): - @$(call targetinfo) - @$(call image/genimage, IMAGE_RPI3) - @$(call finish) - -# vim: syntax=make diff --git a/configs/platform-v7a/rules/image-rpicm3.make b/configs/platform-v7a/rules/image-rpicm3.make deleted file mode 100644 index 81cdd26..0000000 --- a/configs/platform-v7a/rules/image-rpicm3.make +++ /dev/null @@ -1,46 +0,0 @@ -# -*-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 |