mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-25 20:26:34 +00:00
u-boot: re-add infrastructure to specify custom tarball
The bootloader being very specific to the hardware, being able to build U-Boot from an arbitrary tarball available on the web might be needed. Therefore, for U-Boot, we provide two methods : * Get a given stable version from U-Boot official FTP server * Get an arbitrary tarball This should hopefully satisfy most needs, without complicating too much the U-Boot build procedure on Buildroot side. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
6db01c1b30
commit
f15702a97f
@ -25,13 +25,24 @@ config BR2_TARGET_UBOOT_2009_11
|
|||||||
config BR2_TARGET_UBOOT_2009_08
|
config BR2_TARGET_UBOOT_2009_08
|
||||||
bool "u-boot-2009.08"
|
bool "u-boot-2009.08"
|
||||||
|
|
||||||
|
config BR2_TARGET_UBOOT_CUSTOM_TARBALL
|
||||||
|
bool "Custom tarball"
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
if BR2_TARGET_UBOOT_CUSTOM_TARBALL
|
||||||
|
|
||||||
|
config BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION
|
||||||
|
string "URL of custom U-Boot tarball"
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
config BR2_UBOOT_VERSION
|
config BR2_UBOOT_VERSION
|
||||||
string
|
string
|
||||||
default "2010.03" if BR2_TARGET_UBOOT_2010_03
|
default "2010.03" if BR2_TARGET_UBOOT_2010_03
|
||||||
default "2009.11" if BR2_TARGET_UBOOT_2009_11
|
default "2009.11" if BR2_TARGET_UBOOT_2009_11
|
||||||
default "2009.08" if BR2_TARGET_UBOOT_2009_08
|
default "2009.08" if BR2_TARGET_UBOOT_2009_08
|
||||||
|
default "custom" if BR2_TARGET_UBOOT_CUSTOM_TARBALL
|
||||||
|
|
||||||
config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
|
config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR
|
||||||
string "custom patch dir"
|
string "custom patch dir"
|
||||||
|
@ -14,9 +14,17 @@ ifeq ($(U_BOOT_VERSION),)
|
|||||||
U_BOOT_VERSION=2010.03
|
U_BOOT_VERSION=2010.03
|
||||||
endif
|
endif
|
||||||
|
|
||||||
U_BOOT_SOURCE:=u-boot-$(U_BOOT_VERSION).tar.bz2
|
ifeq ($(U_BOOT_VERSION),custom)
|
||||||
|
# Handle custom U-Boot tarballs as specified by the configuration
|
||||||
|
U_BOOT_TARBALL=$(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION))
|
||||||
|
U_BOOT_SITE:=$(dir $(U_BOOT_TARBALL))
|
||||||
|
U_BOOT_SOURCE:=$(notdir $(U_BOOT_TARBALL))
|
||||||
|
else
|
||||||
|
# Handle stable official U-Boot versions
|
||||||
U_BOOT_SITE:=ftp://ftp.denx.de/pub/u-boot
|
U_BOOT_SITE:=ftp://ftp.denx.de/pub/u-boot
|
||||||
|
U_BOOT_SOURCE:=u-boot-$(U_BOOT_VERSION).tar.bz2
|
||||||
|
endif
|
||||||
|
|
||||||
U_BOOT_DIR:=$(BUILD_DIR)/u-boot-$(U_BOOT_VERSION)
|
U_BOOT_DIR:=$(BUILD_DIR)/u-boot-$(U_BOOT_VERSION)
|
||||||
U_BOOT_CAT:=$(BZCAT)
|
U_BOOT_CAT:=$(BZCAT)
|
||||||
U_BOOT_BIN:=u-boot.bin
|
U_BOOT_BIN:=u-boot.bin
|
||||||
@ -51,9 +59,9 @@ $(DL_DIR)/$(U_BOOT_SOURCE):
|
|||||||
$(call DOWNLOAD,$(U_BOOT_SITE),$(U_BOOT_SOURCE))
|
$(call DOWNLOAD,$(U_BOOT_SITE),$(U_BOOT_SOURCE))
|
||||||
|
|
||||||
$(U_BOOT_DIR)/.unpacked: $(DL_DIR)/$(U_BOOT_SOURCE)
|
$(U_BOOT_DIR)/.unpacked: $(DL_DIR)/$(U_BOOT_SOURCE)
|
||||||
$(U_BOOT_CAT) $(DL_DIR)/$(U_BOOT_SOURCE) \
|
mkdir -p $(@D)
|
||||||
| tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
$(INFLATE$(suffix $(U_BOOT_SOURCE))) $(DL_DIR)/$(U_BOOT_SOURCE) \
|
||||||
mkdir -p $(U_BOOT_DIR)
|
| tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(U_BOOT_DIR)/.patched: $(U_BOOT_DIR)/.unpacked
|
$(U_BOOT_DIR)/.patched: $(U_BOOT_DIR)/.unpacked
|
||||||
|
Loading…
x
Reference in New Issue
Block a user