1 ################################################################################
5 ################################################################################
7 UBOOT_TOOLS_VERSION
= 2017.01
8 UBOOT_TOOLS_SOURCE
= u-boot-
$(UBOOT_TOOLS_VERSION
).
tar.bz2
9 UBOOT_TOOLS_SITE
= ftp
://ftp.denx.de
/pub
/u-boot
10 UBOOT_TOOLS_LICENSE
= GPLv2
+
11 UBOOT_TOOLS_LICENSE_FILES
= Licenses
/gpl-2.0.txt
12 UBOOT_TOOLS_INSTALL_STAGING
= YES
14 define UBOOT_TOOLS_CONFIGURE_CMDS
15 mkdir
-p
$(@D
)/include/config
16 touch
$(@D
)/include/config
/auto.conf
19 UBOOT_TOOLS_MAKE_OPTS
= CROSS_COMPILE
="$(TARGET_CROSS)" \
20 CFLAGS
="$(TARGET_CFLAGS)" \
21 LDFLAGS
="$(TARGET_LDFLAGS)" \
24 ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT
),y
)
25 UBOOT_TOOLS_MAKE_OPTS
+= CONFIG_FIT
=y
26 UBOOT_TOOLS_DEPENDENCIES
+= dtc
29 ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT
),y
)
30 UBOOT_TOOLS_MAKE_OPTS
+= CONFIG_FIT_SIGNATURE
=y
31 UBOOT_TOOLS_DEPENDENCIES
+= openssl host-pkgconf
34 define UBOOT_TOOLS_BUILD_CMDS
35 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) $(UBOOT_TOOLS_MAKE_OPTS
) \
36 CROSS_BUILD_TOOLS
=y tools-only
37 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) $(UBOOT_TOOLS_MAKE_OPTS
) \
38 env no-dot-config-targets
=env
41 ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE
),y
)
42 define UBOOT_TOOLS_INSTALL_MKIMAGE
43 $(INSTALL
) -m
0755 -D
$(@D
)/tools
/mkimage
$(TARGET_DIR
)/usr
/bin
/mkimage
47 ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE
),y
)
48 define UBOOT_TOOLS_INSTALL_MKENVIMAGE
49 $(INSTALL
) -m
0755 -D
$(@D
)/tools
/mkenvimage
$(TARGET_DIR
)/usr
/bin
/mkenvimage
53 ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV
),y
)
54 define UBOOT_TOOLS_INSTALL_FWPRINTENV
55 $(INSTALL
) -m
0755 -D
$(@D
)/tools
/env
/fw_printenv
$(TARGET_DIR
)/usr
/sbin
/fw_printenv
56 ln
-sf fw_printenv
$(TARGET_DIR
)/usr
/sbin
/fw_setenv
60 ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_DUMPIMAGE
),y
)
61 define UBOOT_TOOLS_INSTALL_DUMPIMAGE
62 $(INSTALL
) -m
0755 -D
$(@D
)/tools
/dumpimage
$(TARGET_DIR
)/usr
/sbin
/dumpimage
66 define UBOOT_TOOLS_INSTALL_LIBUBOOTENV
69 define UBOOT_TOOLS_INSTALL_STAGING_CMDS
70 $(INSTALL
) -D
-m
0755 $(@D
)/tools
/env
/lib.a
$(STAGING_DIR
)/usr
/lib
/libubootenv.a
71 $(INSTALL
) -D
-m
0644 $(@D
)/tools
/env
/fw_env.h
$(STAGING_DIR
)/usr
/include/fw_env.h
74 define UBOOT_TOOLS_INSTALL_TARGET_CMDS
75 $(UBOOT_TOOLS_INSTALL_MKIMAGE
)
76 $(UBOOT_TOOLS_INSTALL_MKENVIMAGE
)
77 $(UBOOT_TOOLS_INSTALL_FWPRINTENV
)
78 $(UBOOT_TOOLS_INSTALL_DUMPIMAGE
)
81 define HOST_UBOOT_TOOLS_CONFIGURE_CMDS
82 mkdir
-p
$(@D
)/include/config
83 touch
$(@D
)/include/config
/auto.conf
86 HOST_UBOOT_TOOLS_MAKE_OPTS
= HOSTCC
="$(HOSTCC)" \
87 HOSTCFLAGS
="$(HOST_CFLAGS)" \
88 HOSTLDFLAGS
="$(HOST_LDFLAGS)"
90 ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT
),y
)
91 HOST_UBOOT_TOOLS_MAKE_OPTS
+= CONFIG_FIT
=y
92 HOST_UBOOT_TOOLS_DEPENDENCIES
+= host-dtc
95 ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT
),y
)
96 HOST_UBOOT_TOOLS_MAKE_OPTS
+= CONFIG_FIT_SIGNATURE
=y
97 HOST_UBOOT_TOOLS_DEPENDENCIES
+= host-openssl
100 define HOST_UBOOT_TOOLS_BUILD_CMDS
101 $(MAKE1
) -C
$(@D
) $(HOST_UBOOT_TOOLS_MAKE_OPTS
) tools-only
104 define HOST_UBOOT_TOOLS_INSTALL_CMDS
105 $(INSTALL
) -m
0755 -D
$(@D
)/tools
/mkimage
$(HOST_DIR
)/usr
/bin
/mkimage
106 $(INSTALL
) -m
0755 -D
$(@D
)/tools
/mkenvimage
$(HOST_DIR
)/usr
/bin
/mkenvimage
107 $(INSTALL
) -m
0755 -D
$(@D
)/tools
/dumpimage
$(HOST_DIR
)/usr
/bin
/dumpimage
110 $(eval
$(generic-package
))
111 $(eval
$(host-generic-package
))
113 # Convenience variables for other mk files that make use of mkimage
115 MKIMAGE
= $(HOST_DIR
)/usr
/bin
/mkimage
117 # mkimage supports arm blackfin m68k microblaze mips mips64 nios2 powerpc ppc sh sparc sparc64 x86
118 # KERNEL_ARCH can be arm64 arc arm blackfin m68k microblaze mips nios2 powerpc sh sparc i386 x86_64 xtensa
119 # For arm64, arc, xtensa we'll just keep KERNEL_ARCH
120 # For mips64, we'll just keep mips
121 # For i386 and x86_64, we need to convert
122 ifeq ($(KERNEL_ARCH
),x86_64
)
124 else ifeq ($(KERNEL_ARCH
),i386
)
127 MKIMAGE_ARCH
= $(KERNEL_ARCH
)