Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
help
Name of the board for which Barebox should be built, without
the _defconfig suffix.
+
+config BR2_TARGET_BAREBOX_BAREBOXENV
+ bool "bareboxenv tool in target"
+ help
+ Install bareboxenv tool in target.
+
endif
cp $(BAREBOX_DIR)/barebox.bin $(BINARIES_DIR)
touch $@
-barebox: $(BAREBOX_DIR)/.installed
+# bareboxenv for the target
+$(TARGET_DIR)/usr/bin/bareboxenv: $(BAREBOX_DIR)/.configured
+ mkdir -p $(@D)
+ $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $@ \
+ $(BAREBOX_DIR)/scripts/bareboxenv.c
+
+barebox: $(BAREBOX_DIR)/.installed \
+ $(if $(BR2_TARGET_BAREBOX_BAREBOXENV),$(TARGET_DIR)/usr/bin/bareboxenv)
ifeq ($(BR2_TARGET_BAREBOX),y)
TARGETS+=barebox