diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-04-17 15:11:37 +0200 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2023-04-17 15:57:30 +0200 |
commit | 3abe69351845e1f58195b19de73c99c758467f81 (patch) | |
tree | 14708899dd8cf71c1f5aa694818a5873cc910172 /rules | |
parent | 0a47ea9cebecb031579aca2ccea1b817aaf4ba36 (diff) | |
download | DistroKit-3abe69351845e1f58195b19de73c99c758467f81.tar.gz DistroKit-3abe69351845e1f58195b19de73c99c758467f81.tar.xz |
at91bootstrap2: make targetinstall v4.x compatible
The binaries directory, where artifacts were previously written to is
now beneath build/ by default[1]:
BUILDDIR ?= ./build
BINDIR:=$(BUILDDIR)/binaries
Supply BUILDDIR=. after the make command to return to the old directory
scheme. This should have no effect on AT91Bootstrap v3.x and older
as BUILDDIR was first added in v4.0.0[1].
This has already been submitted for PTXdist inclusion[2].
[1]: https://github.com/linux4sam/at91bootstrap/commit/814f3bdab515287fbb0d972d89d228748613ae91
[2]: https://lore.ptxdist.org/ptxdist/20230417115146.745019-1-a.fatoum@pengutronix.de/T/#u
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.pengutronix.de/20230417131141.908678-2-a.fatoum@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'rules')
-rw-r--r-- | rules/at91bootstrap2.make | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/rules/at91bootstrap2.make b/rules/at91bootstrap2.make new file mode 100644 index 0000000..c36e303 --- /dev/null +++ b/rules/at91bootstrap2.make @@ -0,0 +1,90 @@ +# -*-makefile-*- +# +# Copyright (C) 2011 by Michael Olbrich <m.olbrich@pengutronix.de> +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_AT91BOOTSTRAP2) += at91bootstrap2 + +# +# Paths and names +# +AT91BOOTSTRAP2_VERSION := $(call ptx/config-version, PTXCONF_AT91BOOTSTRAP2) +AT91BOOTSTRAP2_MD5 := $(call ptx/config-md5, PTXCONF_AT91BOOTSTRAP2) +AT91BOOTSTRAP2 := at91bootstrap-$(AT91BOOTSTRAP2_VERSION) +AT91BOOTSTRAP2_SUFFIX := tar.gz +AT91BOOTSTRAP2_URL := https://github.com/linux4sam/at91bootstrap/archive/v$(AT91BOOTSTRAP2_VERSION).$(AT91BOOTSTRAP2_SUFFIX) +AT91BOOTSTRAP2_SOURCE := $(SRCDIR)/$(AT91BOOTSTRAP2).$(AT91BOOTSTRAP2_SUFFIX) +AT91BOOTSTRAP2_DIR := $(BUILDDIR)/$(AT91BOOTSTRAP2) +AT91BOOTSTRAP2_CONFIG := $(call ptx/in-platformconfigdir, \ + $(call remove_quotes, $(PTXCONF_AT91BOOTSTRAP2_CONFIG))) +AT91BOOTSTRAP2_LICENSE := unknown + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +AT91BOOTSTRAP2_WRAPPER_BLACKLIST := \ + $(PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST) + +AT91BOOTSTRAP2_MAKE_ENV := \ + CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \ + HOSTCC=$(HOSTCC) +AT91BOOTSTRAP2_MAKE_OPT := V=$(PTXDIST_VERBOSE) BUILDDIR=. + +ifdef PTXCONF_AT91BOOTSTRAP2 +$(AT91BOOTSTRAP2_CONFIG): + @echo + @echo "***********************************************************************************" + @echo "* Please generate a at91bootstrap config with 'ptxdist menuconfig at91bootstrap2' *" + @echo "***********************************************************************************" + @echo + @echo + @exit 1 +endif + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/at91bootstrap2.install: + @$(call targetinfo) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/at91bootstrap2.targetinstall: + @$(call targetinfo) + @if [ -e $(AT91BOOTSTRAP2_DIR)/binaries/at91bootstrap.bin ]; then \ + install -vD -m644 $(AT91BOOTSTRAP2_DIR)/binaries/at91bootstrap.bin \ + $(IMAGEDIR)/at91bootstrap.bin; \ + else \ + install -vD -m644 $(AT91BOOTSTRAP2_DIR)/binaries/*boot-$(AT91BOOTSTRAP2_VERSION).bin \ + $(IMAGEDIR)/at91bootstrap.bin; \ + fi + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +$(STATEDIR)/at91bootstrap2.clean: + @$(call targetinfo) + @$(call clean_pkg, AT91BOOTSTRAP2) + @rm -rf $(IMAGEDIR)/at91bootstrap.bin + +# ---------------------------------------------------------------------------- +# oldconfig / menuconfig +# ---------------------------------------------------------------------------- + +at91bootstrap2_oldconfig at91bootstrap2_menuconfig: $(STATEDIR)/at91bootstrap2.extract + @$(call world/kconfig, AT91BOOTSTRAP2, $(subst at91bootstrap2_,,$@)) + +# vim: syntax=make |