summaryrefslogtreecommitdiff
path: root/target/device/Atmel/u-boot
diff options
context:
space:
mode:
Diffstat (limited to 'target/device/Atmel/u-boot')
-rw-r--r--target/device/Atmel/u-boot/u-boot.mk231
1 files changed, 116 insertions, 115 deletions
diff --git a/target/device/Atmel/u-boot/u-boot.mk b/target/device/Atmel/u-boot/u-boot.mk
index 4a8967f37..35b9f2166 100644
--- a/target/device/Atmel/u-boot/u-boot.mk
+++ b/target/device/Atmel/u-boot/u-boot.mk
@@ -49,14 +49,14 @@ $(DL_DIR)/$(UBOOT_PATCH_SOURCE):
$(WGET) -P $(DL_DIR) $(UBOOT_PATCH_SITE)/$(UBOOT_PATCH_SOURCE)
$(UBOOT_DIR)/.unpacked: $(DL_DIR)/$(UBOOT_SOURCE)
- mkdir -p $(BUILD_DIR)
+ mkdir -p $(BUILD_DIR)
$(UBOOT_CAT) $(DL_DIR)/$(UBOOT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
- touch $@
+ touch $@
$(UBOOT_PATCHES)/.unpacked: $(DL_DIR)/$(UBOOT_PATCH_SOURCE)
mkdir -p $(UBOOT_PATCHES)
- bzcat $(DL_DIR)/$(UBOOT_PATCH_SOURCE) | tar -C $(UBOOT_PATCHES) -xvf -
- touch $@
+ bzcat $(DL_DIR)/$(UBOOT_PATCH_SOURCE) | tar -C $(UBOOT_PATCHES) -xvf -
+ touch $@
$(UBOOT_DIR)/.patched.$(UBOOT_PATCH_SOURCE): $(UBOOT_DIR)/.unpacked $(UBOOT_PATCHES)/.unpacked
toolchain/patch-kernel.sh $(UBOOT_DIR) $(UBOOT_PATCHES) *.patch
@@ -66,106 +66,107 @@ $(UBOOT_DIR)/.patched.$(UBOOT_PATCH_SOURCE): $(UBOOT_DIR)/.unpacked $(UBOOT_PATC
# cp $(UBOOT_ATMEL_BMP) $(UBOOT_DIR)/tools/logos/.
$(UBOOT_BUILD_DIR)/.configured: $(UBOOT_DIR)/.patched.$(UBOOT_PATCH_SOURCE)
-ifneq ($(strip $(UBOOT_CONFIG_FILE)),)
+ifneq ($(strip $(UBOOT_CONFIG_FILE)),)
cp $(UBOOT_CONFIG_FILE) $(UBOOT_DIR)/include/configs/.
endif
- $(MAKE) \
- O=$(UBOOT_BUILD_DIR) \
- CONFIG_NOSOFTFLOAT=1 \
- -C $(UBOOT_DIR) \
+ $(MAKE) \
+ O=$(UBOOT_BUILD_DIR) \
+ CONFIG_NOSOFTFLOAT=1 \
+ -C $(UBOOT_DIR) \
$(UBOOT_CONFIG)
$(SED) 's/ $$(SREC) $$(BIN)//' $(UBOOT_DIR)/examples/Makefile
touch $(UBOOT_BUILD_DIR)/.configured
-# $(MAKE) O=$(UBOOT_BUILD_DIR) -C $(UBOOT_DIR)
+# $(MAKE) O=$(UBOOT_BUILD_DIR) -C $(UBOOT_DIR)
$(MKIMAGE_BINLOC): $(UBOOT_BUILD_DIR)/.configured
$(MAKE) \
- O=$(UBOOT_BUILD_DIR) \
- CROSS_COMPILE= \
- CONFIG_NOSOFTFLOAT=1 \
- TOPDIR=$(UBOOT_DIR) \
- SRCTREE=$(UBOOT_DIR) \
- -C $(UBOOT_DIR) tools
+ O=$(UBOOT_BUILD_DIR) \
+ CROSS_COMPILE= \
+ CONFIG_NOSOFTFLOAT=1 \
+ TOPDIR=$(UBOOT_DIR) \
+ SRCTREE=$(UBOOT_DIR) \
+ -C $(UBOOT_DIR) tools
touch $(MKIMAGE_BINLOC)
-$(UBOOT_BUILD_DIR)/u-boot.bin: $(UBOOT_BUILD_DIR)/.configured $(UBOOT_CUSTOM)
+$(UBOOT_BUILD_DIR)/u-boot.bin: $(UBOOT_BUILD_DIR)/.configured $(UBOOT_CUSTOM)
echo TARGET_CROSS=$(TARGET_CROSS)
- $(MAKE) O=$(UBOOT_BUILD_DIR) \
- CROSS_COMPILE=$(TARGET_CROSS) \
- CONFIG_NOSOFTFLOAT=1 \
- TOPDIR=$(UBOOT_DIR) \
- SRCTREE=$(UBOOT_DIR) \
- TFTPBOOT=/tftpboot \
+ $(MAKE) O=$(UBOOT_BUILD_DIR) \
+ CROSS_COMPILE=$(TARGET_CROSS) \
+ CONFIG_NOSOFTFLOAT=1 \
+ TOPDIR=$(UBOOT_DIR) \
+ SRCTREE=$(UBOOT_DIR) \
+ TFTPBOOT=/tftpboot \
-C $(UBOOT_DIR)
-$(BINARIES_DIR)/$(UBOOT_BIN): $(UBOOT_BUILD_DIR)/u-boot.bin
+$(BINARIES_DIR)/$(UBOOT_BIN): $(UBOOT_BUILD_DIR)/u-boot.bin
mkdir -p $(BINARIES_DIR)
cp $(UBOOT_BUILD_DIR)/u-boot.bin $(BINARIES_DIR)/$(UBOOT_BIN)
-/tftpboot/$(UBOOT_BIN): $(UBOOT_BUILD_DIR)/u-boot.bin
+/tftpboot/$(UBOOT_BIN): $(UBOOT_BUILD_DIR)/u-boot.bin
mkdir -p /tftpboot
cp $(UBOOT_BUILD_DIR)/u-boot.bin /tftpboot/$(UBOOT_BIN)
-uboot-bin: $(BINARIES_DIR)/$(UBOOT_BIN) /tftpboot/$(UBOOT_BIN)
+uboot-bin: $(BINARIES_DIR)/$(UBOOT_BIN) /tftpboot/$(UBOOT_BIN)
-$(UBOOT_CUSTOM).test: .config $(UBOOT_BUILD_DIR)/.configured
- echo "/* Automatically generated file, do not edit */" > $(UBOOT_CUSTOM).test
-ifneq ($(TARGET_HOSTNAME),)
- echo "#if defined(CONFIG_HOSTNAME)" >> $(UBOOT_CUSTOM).test
- echo "#undef CONFIG_HOSTNAME" >> $(UBOOT_CUSTOM).test
- echo "#define CONFIG_HOSTNAME $(TARGET_HOSTNAME)" >> $(UBOOT_CUSTOM).test
- echo "#endif" >> $(UBOOT_CUSTOM).test
+$(UBOOT_CUSTOM).test: .config $(UBOOT_BUILD_DIR)/.configured
+ echo "/* Automatically generated file, do not edit */" \
+ > $(UBOOT_CUSTOM).test
+ifneq ($(TARGET_HOSTNAME),)
+ echo "#if defined(CONFIG_HOSTNAME)">> $(UBOOT_CUSTOM).test
+ echo "#undef CONFIG_HOSTNAME">> $(UBOOT_CUSTOM).test
+ echo "#define CONFIG_HOSTNAME $(TARGET_HOSTNAME)">> $(UBOOT_CUSTOM).test
+ echo "#endif">> $(UBOOT_CUSTOM).test
endif
-ifneq ($(TARGET_UBOOT_IPADDR),)
- echo "#define CONFIG_IPADDR $(TARGET_UBOOT_IPADDR)" >> $(UBOOT_CUSTOM).test
+ifneq ($(TARGET_UBOOT_IPADDR),)
+ echo "#define CONFIG_IPADDR $(TARGET_UBOOT_IPADDR)">> $(UBOOT_CUSTOM).test
endif
-ifneq ($(TARGET_UBOOT_SERVERIP),)
- echo "#define CONFIG_SERVERIP $(TARGET_UBOOT_SERVERIP)" >> $(UBOOT_CUSTOM).test
+ifneq ($(TARGET_UBOOT_SERVERIP),)
+ echo "#define CONFIG_SERVERIP $(TARGET_UBOOT_SERVERIP)">> $(UBOOT_CUSTOM).test
endif
-ifneq ($(TARGET_UBOOT_GATEWAY),)
- echo "#define CONFIG_GATEWAYIP $(TARGET_UBOOT_GATEWAY)" >> $(UBOOT_CUSTOM).test
+ifneq ($(TARGET_UBOOT_GATEWAY),)
+ echo "#define CONFIG_GATEWAYIP $(TARGET_UBOOT_GATEWAY)">> $(UBOOT_CUSTOM).test
endif
-ifneq ($(TARGET_UBOOT_NETMASK),)
- echo "#define CONFIG_NETMASK $(TARGET_UBOOT_NETMASK)" >> $(UBOOT_CUSTOM).test
+ifneq ($(TARGET_UBOOT_NETMASK),)
+ echo "#define CONFIG_NETMASK $(TARGET_UBOOT_NETMASK)">> $(UBOOT_CUSTOM).test
endif
-ifneq ($(TARGET_UBOOT_ETHADDR),)
- echo "#define CONFIG_ETHADDR $(TARGET_UBOOT_ETHADDR)" >> $(UBOOT_CUSTOM).test
+ifneq ($(TARGET_UBOOT_ETHADDR),)
+ echo "#define CONFIG_ETHADDR $(TARGET_UBOOT_ETHADDR)">> $(UBOOT_CUSTOM).test
endif
diff -q $(UBOOT_CUSTOM).test $(UBOOT_CUSTOM) || cp -af $(UBOOT_CUSTOM).test $(UBOOT_CUSTOM)
-$(UBOOT_SCR): .config
-ifneq ($(TARGET_UBOOT_IPADDR),)
- echo setenv ipaddr $(TARGET_UBOOT_IPADDR) > $(UBOOT_SCR)
+$(UBOOT_SCR): .config
+ifneq ($(TARGET_UBOOT_IPADDR),)
+ echo setenv ipaddr $(TARGET_UBOOT_IPADDR)> $(UBOOT_SCR)
endif
-ifneq ($(TARGET_UBOOT_SERVERIP),)
- echo setenv serverip $(TARGET_UBOOT_SERVERIP) >> $(UBOOT_SCR)
+ifneq ($(TARGET_UBOOT_SERVERIP),)
+ echo setenv serverip $(TARGET_UBOOT_SERVERIP)>> $(UBOOT_SCR)
endif
-ifneq ($(TARGET_UBOOT_GATEWAY),)
- echo setenv gatewayip $(TARGET_UBOOT_GATEWAY) >> $(UBOOT_SCR)
+ifneq ($(TARGET_UBOOT_GATEWAY),)
+ echo setenv gatewayip $(TARGET_UBOOT_GATEWAY)>> $(UBOOT_SCR)
endif
-ifneq ($(TARGET_UBOOT_NETMASK),)
- echo setenv netmask $(TARGET_UBOOT_NETMASK) >> $(UBOOT_SCR)
+ifneq ($(TARGET_UBOOT_NETMASK),)
+ echo setenv netmask $(TARGET_UBOOT_NETMASK)>> $(UBOOT_SCR)
endif
- echo setenv linux $(LINUX26_KERNEL) >> $(UBOOT_SCR)
- echo setenv kernel-version $(LINUX26_VERSION) >> $(UBOOT_SCR)
- echo setenv kernel-date $(DATE) >> $(UBOOT_SCR)
- echo setenv hostname $(TARGET_HOSTNAME) >> $(UBOOT_SCR)
- echo setenv fs-date $(DATE) >> $(UBOOT_SCR)
- echo setenv rd-1 rootfs.$(BR2_ARCH)-$(DATE).ext2 >> $(UBOOT_SCR)
- echo setenv rd-2 rootfs.$(BR2_ARCH)-$(DATE).jffs2 >> $(UBOOT_SCR)
- echo setenv rd rootfs.$(BR2_ARCH)-$(DATE).ext2 >> $(UBOOT_SCR)
- echo setenv ver 1 >> $(UBOOT_SCR)
-ifneq ($(TARGET_UBOOT_ETHADDR),)
- echo setenv ethaddr $(TARGET_UBOOT_ETHADDR) >> $(UBOOT_SCR)
+ echo setenv linux $(LINUX26_KERNEL)>> $(UBOOT_SCR)
+ echo setenv kernel-version $(LINUX26_VERSION)>> $(UBOOT_SCR)
+ echo setenv kernel-date $(DATE)>> $(UBOOT_SCR)
+ echo setenv hostname $(TARGET_HOSTNAME) >> $(UBOOT_SCR)
+ echo setenv fs-date $(DATE)>> $(UBOOT_SCR)
+ echo setenv rd-1 rootfs.$(BR2_ARCH)-$(DATE).ext2>> $(UBOOT_SCR)
+ echo setenv rd-2 rootfs.$(BR2_ARCH)-$(DATE).jffs2>> $(UBOOT_SCR)
+ echo setenv rd rootfs.$(BR2_ARCH)-$(DATE).ext2>> $(UBOOT_SCR)
+ echo setenv ver 1>> $(UBOOT_SCR)
+ifneq ($(TARGET_UBOOT_ETHADDR),)
+ echo setenv ethaddr $(TARGET_UBOOT_ETHADDR)>> $(UBOOT_SCR)
endif
- echo setenv fstype ram >> $(UBOOT_SCR)
- echo fs >> $(UBOOT_SCR)
- echo os >> $(UBOOT_SCR)
- echo setargs >> $(UBOOT_SCR)
- echo saveenv >> $(UBOOT_SCR)
-
-$(UBOOT_SCR).$(PROJECT): $(UBOOT_SCR) $(MKIMAGE)
- $(MKIMAGE) -A arm \
+ echo setenv fstype ram>> $(UBOOT_SCR)
+ echo fs >> $(UBOOT_SCR)
+ echo os >> $(UBOOT_SCR)
+ echo setargs>> $(UBOOT_SCR)
+ echo saveenv>> $(UBOOT_SCR)
+
+$(UBOOT_SCR).$(PROJECT): $(UBOOT_SCR) $(MKIMAGE)
+ $(MKIMAGE) -A arm \
-O linux \
-T script \
-C none \
@@ -174,35 +175,35 @@ $(UBOOT_SCR).$(PROJECT): $(UBOOT_SCR) $(MKIMAGE)
-n "autoscr config" \
-d $(UBOOT_SCR) \
$(UBOOT_SCR).$(PROJECT)
- cp $(UBOOT_SCR).$(PROJECT) /tftpboot
+ cp $(UBOOT_SCR).$(PROJECT) /tftpboot
-$(MKIMAGE): $(MKIMAGE_BINLOC)
- cp -f $(MKIMAGE_BINLOC) $(MKIMAGE)
+$(MKIMAGE): $(MKIMAGE_BINLOC)
+ cp -f $(MKIMAGE_BINLOC) $(MKIMAGE)
-uboot: $(MKIMAGE) uboot-bin $(UBOOT_SCR).$(PROJECT)
+uboot: $(MKIMAGE) uboot-bin $(UBOOT_SCR).$(PROJECT)
uboot-source: $(DL_DIR)/$(UBOOT_SOURCE)
uboot-clean:
- rm -fr $(UBOOT_BUILD_DIR)
- rm -fr $(UBOOT_PATCHES)
- rm -f $(BINARIES_DIR)/$(UBOOT_BIN)
- rm -fr $(UBOOT_DIR)
- rm -f $(UBOOT_SCR)
- rm -f $(UBOOT_SCR).$(PROJECT)
+ rm -fr $(UBOOT_BUILD_DIR)
+ rm -fr $(UBOOT_PATCHES)
+ rm -f $(BINARIES_DIR)/$(UBOOT_BIN)
+ rm -fr $(UBOOT_DIR)
+ rm -f $(UBOOT_SCR)
+ rm -f $(UBOOT_SCR).$(PROJECT)
# -$(MAKE) -C $(UBOOT_DIR)/uboot-tools clean
-uboot-dirclean: uboot-clean
+uboot-dirclean: uboot-clean
rm -rf $(UBOOT_DIR)
uboot-new:
- rm -fr $(UBOOT_BUILD_DIR)/u-boot
- rm -fr $(UBOOT_BUILD_DIR)/u-boot.gz
- rm -fr $(UBOOT_BUILD_DIR)/u-boot.bin
- rm -fr /tftpboot/$(UBOOT_BIN)
- rm -fr $(BINARIES_DIR)/$(UBOOT_BIN)
+ rm -fr $(UBOOT_BUILD_DIR)/u-boot
+ rm -fr $(UBOOT_BUILD_DIR)/u-boot.gz
+ rm -fr $(UBOOT_BUILD_DIR)/u-boot.bin
+ rm -fr /tftpboot/$(UBOOT_BIN)
+ rm -fr $(BINARIES_DIR)/$(UBOOT_BIN)
-.PHONY: uboot-bin
+.PHONY: uboot-bin
#############################################################
#
# Build the uboot root filesystem image
@@ -251,31 +252,31 @@ TARGETS+=uboot
endif
uboot-test:
- -@echo source=$(DL_DIR)/$(UBOOT_SOURCE)
- -@ls $(DL_DIR)/$(UBOOT_SOURCE)
- -@echo patch=$(DL_DIR)/$(UBOOT_PATCH_SOURCE)
- -@ls $(DL_DIR)/$(UBOOT_PATCH_SOURCE)
- -@echo unpacked=$(UBOOT_PATCHES)/.unpacked
- -@ls $(UBOOT_PATCHES)/.unpacked
- -@echo patch-unpacked=$(UBOOT_PATCHES)/.unpacked
- -@ls $(UBOOT_PATCHES)/.unpacked
- -@echo patched-source=$(UBOOT_DIR)/.patched.$(UBOOT_PATCH_SOURCE)
- -@ls $(UBOOT_DIR)/.patched.$(UBOOT_PATCH_SOURCE)
- -@echo configured=$(UBOOT_BUILD_DIR)/.configured
- -@ls $(UBOOT_BUILD_DIR)/.configured
- -@echo mkimage=$(MKIMAGE_BINLOC)
- -@ls $(MKIMAGE_BINLOC)
- -@echo u-boot.bin=$(UBOOT_BUILD_DIR)/u-boot.bin
- -@ls $(UBOOT_BUILD_DIR)/u-boot.bin
- -@echo binaries-u-boot.bin=$(BINARIES_DIR)/$(UBOOT_BIN)
- -@ls $(BINARIES_DIR)/$(UBOOT_BIN)
- -@echo tftpboot=/tftpboot/$(UBOOT_BIN)
- -@ls /tftpboot/$(UBOOT_BIN)
- -@echo "mkimage = $(MKIMAGE)"
- -@ls $(MKIMAGE)
- -@echo "u-boot script=$(UBOOT_SCR).$(PROJECT)"
- -@ls $(UBOOT_SCR).$(PROJECT)
- -@echo "u-boot script (ASCII)=$(UBOOT_SCR)"
- -@ls $(UBOOT_SCR)
+ -@echo source=$(DL_DIR)/$(UBOOT_SOURCE)
+ -@ls $(DL_DIR)/$(UBOOT_SOURCE)
+ -@echo patch=$(DL_DIR)/$(UBOOT_PATCH_SOURCE)
+ -@ls $(DL_DIR)/$(UBOOT_PATCH_SOURCE)
+ -@echo unpacked=$(UBOOT_PATCHES)/.unpacked
+ -@ls $(UBOOT_PATCHES)/.unpacked
+ -@echo patch-unpacked=$(UBOOT_PATCHES)/.unpacked
+ -@ls $(UBOOT_PATCHES)/.unpacked
+ -@echo patched-source=$(UBOOT_DIR)/.patched.$(UBOOT_PATCH_SOURCE)
+ -@ls $(UBOOT_DIR)/.patched.$(UBOOT_PATCH_SOURCE)
+ -@echo configured=$(UBOOT_BUILD_DIR)/.configured
+ -@ls $(UBOOT_BUILD_DIR)/.configured
+ -@echo mkimage=$(MKIMAGE_BINLOC)
+ -@ls $(MKIMAGE_BINLOC)
+ -@echo u-boot.bin=$(UBOOT_BUILD_DIR)/u-boot.bin
+ -@ls $(UBOOT_BUILD_DIR)/u-boot.bin
+ -@echo binaries-u-boot.bin=$(BINARIES_DIR)/$(UBOOT_BIN)
+ -@ls $(BINARIES_DIR)/$(UBOOT_BIN)
+ -@echo tftpboot=/tftpboot/$(UBOOT_BIN)
+ -@ls /tftpboot/$(UBOOT_BIN)
+ -@echo "mkimage = $(MKIMAGE)"
+ -@ls $(MKIMAGE)
+ -@echo "u-boot script=$(UBOOT_SCR).$(PROJECT)"
+ -@ls $(UBOOT_SCR).$(PROJECT)
+ -@echo "u-boot script (ASCII)=$(UBOOT_SCR)"
+ -@ls $(UBOOT_SCR)
-@echo "mkimage binary=$(MKIMAGE_BINLOC)"
- -@ls $(MKIMAGE_BINLOC)
+ -@ls $(MKIMAGE_BINLOC)