# -----------------------------------------------------------------------------
# Has to be set by the target/device
+LINUX26_MKIMAGE_DIR:=
+LINUX26_MKIMAGE_DEP:=
+
# --------------
# VMLINUX
ifeq ($(LINUX26_FORMAT),vmlinux)
# --------------
# UIMAGE
ifeq ($(LINUX26_FORMAT),uImage)
+LINUX26_MKIMAGE_DIR:=$(PROJECT_BUILD_DIR)/u-boot-tools
+LINUX26_MKIMAGE_DEP:=linux26-mkimage
ifeq ($(LINUX26_BINLOC),)
LINUX26_BINLOC:=arch/$(KERNEL_ARCH)/boot/$(LINUX26_FORMAT)
endif
CROSS_COMPILE=$(KERNEL_CROSS) \
LDFLAGS="$(TARGET_LDFLAGS)" \
LZMA="$(LZMA)" \
- PATH=$(STAGING_DIR)/usr/bin:$(PATH)
+ PATH=$(LINUX26_MKIMAGE_DIR):$(PATH)
# =============================================================================
# ifneq ($(strip $(LINUX26_VERSION)),$(strip $(LINUX_HEADERS_VERSION)))
touch $@
# -----------------------------------------------------------------------------
-$(LINUX26_DIR)/.depend_done: $(LINUX26_DIR)/.configured
+$(LINUX26_DIR)/.depend_done: $(LINUX26_DIR)/.configured $(LINUX26_MKIMAGE_DEP)
$(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) prepare
touch $@
-mkdir -p /tftpboot
-cp -dpf $(LINUX26_KERNEL) /tftpboot/$(LINUX26_KERNEL_NAME)
+ifneq ($(LINUX_COPYTO),/tftpboot)
$(LINUX_COPYTO)/$(LINUX26_KERNEL_NAME): $(LINUX26_KERNEL)
mkdir -p $(LINUX_COPYTO)
cp -dpf $(LINUX26_KERNEL) $(LINUX_COPYTO)/$(LINUX26_KERNEL_NAME)
+endif
+
+linux26-mkimage: u-boot
+ mkdir -p $(LINUX26_MKIMAGE_DIR)
+ cp $(MKIMAGE) $(LINUX26_MKIMAGE_DIR)
linux26: $(LINUX26_TARGETS)