2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-12-12 17:37:35 +01:00
|
|
|
#
|
|
|
|
# uboot-tools
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-06-06 01:53:25 +02:00
|
|
|
|
2014-01-21 14:26:15 +01:00
|
|
|
UBOOT_TOOLS_VERSION = 2014.01
|
2011-07-18 15:22:13 +02:00
|
|
|
UBOOT_TOOLS_SOURCE = u-boot-$(UBOOT_TOOLS_VERSION).tar.bz2
|
|
|
|
UBOOT_TOOLS_SITE = ftp://ftp.denx.de/pub/u-boot
|
2012-12-12 17:37:35 +01:00
|
|
|
UBOOT_TOOLS_LICENSE = GPLv2+
|
2013-10-22 18:46:40 +02:00
|
|
|
UBOOT_TOOLS_LICENSE_FILES = Licenses/gpl-2.0.txt
|
2011-07-18 15:22:13 +02:00
|
|
|
|
|
|
|
define UBOOT_TOOLS_BUILD_CMDS
|
|
|
|
$(MAKE) -C $(@D) \
|
|
|
|
HOSTCC="$(TARGET_CC)" \
|
|
|
|
HOSTCFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
HOSTLDFLAGS="$(TARGET_LDFLAGS)" \
|
|
|
|
HOSTSTRIP=true \
|
|
|
|
tools env
|
|
|
|
endef
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE),y)
|
|
|
|
define UBOOT_TOOLS_INSTALL_MKIMAGE
|
2011-12-16 21:08:59 +01:00
|
|
|
$(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(TARGET_DIR)/usr/bin/mkimage
|
2011-07-18 15:22:13 +02:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2012-12-20 03:47:17 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE),y)
|
|
|
|
define UBOOT_TOOLS_INSTALL_MKENVIMAGE
|
|
|
|
$(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(TARGET_DIR)/usr/bin/mkenvimage
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2011-07-18 15:22:13 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV),y)
|
|
|
|
define UBOOT_TOOLS_INSTALL_FWPRINTENV
|
2011-12-16 21:08:59 +01:00
|
|
|
$(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv $(TARGET_DIR)/usr/sbin/fw_printenv
|
2011-07-18 15:22:13 +02:00
|
|
|
ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
define UBOOT_TOOLS_INSTALL_TARGET_CMDS
|
|
|
|
$(UBOOT_TOOLS_INSTALL_MKIMAGE)
|
2012-12-20 03:47:17 +01:00
|
|
|
$(UBOOT_TOOLS_INSTALL_MKENVIMAGE)
|
2011-07-18 15:22:13 +02:00
|
|
|
$(UBOOT_TOOLS_INSTALL_FWPRINTENV)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_UBOOT_TOOLS_BUILD_CMDS
|
|
|
|
$(MAKE1) -C $(@D) \
|
|
|
|
HOSTCC="$(HOSTCC)" \
|
|
|
|
HOSTCFLAGS="$(HOST_CFLAGS)" \
|
|
|
|
HOSTLDFLAGS="$(HOST_LDFLAGS)" \
|
|
|
|
tools
|
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_UBOOT_TOOLS_INSTALL_CMDS
|
2011-12-16 21:08:59 +01:00
|
|
|
$(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/usr/bin/mkimage
|
2012-12-20 03:47:17 +01:00
|
|
|
$(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(HOST_DIR)/usr/bin/mkenvimage
|
2011-07-18 15:22:13 +02:00
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|
2012-07-03 00:06:54 +02:00
|
|
|
$(eval $(host-generic-package))
|
2013-11-07 00:12:35 +01:00
|
|
|
|
|
|
|
# Convenience variables for other mk files that make use of mkimage
|
|
|
|
|
|
|
|
MKIMAGE = $(HOST_DIR)/usr/bin/mkimage
|
|
|
|
|
|
|
|
# mkimage supports arm avr32 blackfin m68k microblaze mips mips64 nios2 powerpc ppc sh sparc sparc64 x86
|
|
|
|
# KERNEL_ARCH can be arm64 arc arm avr32 blackfin m68k microblaze mips nios2 powerpc sh sparc i386 x86_64 xtensa
|
|
|
|
# For arm64, arc, xtensa we'll just keep KERNEL_ARCH
|
|
|
|
# For mips64, we'll just keep mips
|
|
|
|
# For i386 and x86_64, we need to convert
|
|
|
|
ifeq ($(KERNEL_ARCH),x86_64)
|
|
|
|
MKIMAGE_ARCH = x86
|
|
|
|
else ifeq ($(KERNEL_ARCH),i386)
|
|
|
|
MKIMAGE_ARCH = x86
|
|
|
|
else
|
|
|
|
MKIMAGE_ARCH = $(KERNEL_ARCH)
|
|
|
|
endif
|