summaryrefslogtreecommitdiff
path: root/target/device
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf.samuelsson@atmel.com>2007-07-20 07:54:21 +0000
committerUlf Samuelsson <ulf.samuelsson@atmel.com>2007-07-20 07:54:21 +0000
commit3c9ebe81c2a8d0d855e6e62b663da57f2198033a (patch)
tree40dda093adb40b5611c476a2a3b3196868813c77 /target/device
parentfd9db1bd81957b69f334cb20cdf24359475ca595 (diff)
U-Boot cleanup
Diffstat (limited to 'target/device')
-rw-r--r--target/device/Atmel/u-boot/u-boot.mk45
1 files changed, 32 insertions, 13 deletions
diff --git a/target/device/Atmel/u-boot/u-boot.mk b/target/device/Atmel/u-boot/u-boot.mk
index 0fa931bf4..c1e428423 100644
--- a/target/device/Atmel/u-boot/u-boot.mk
+++ b/target/device/Atmel/u-boot/u-boot.mk
@@ -45,13 +45,12 @@ $(DL_DIR)/$(UBOOT_PATCH_SOURCE):
$(UBOOT_DIR)/.unpacked: $(DL_DIR)/$(UBOOT_SOURCE)
mkdir -p $(BUILD_DIR)
$(UBOOT_CAT) $(DL_DIR)/$(UBOOT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
- touch $(UBOOT_DIR)/.unpacked
- ls $(UBOOT_DIR)/.unpacked
+ 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 $(UBOOT_PATCHES)/.unpacked
+ touch $@
$(UBOOT_DIR)/.patched.$(UBOOT_PATCH_SOURCE): $(UBOOT_DIR)/.unpacked $(UBOOT_PATCHES)/.unpacked
toolchain/patch-kernel.sh $(UBOOT_DIR) $(UBOOT_PATCHES) *.patch
@@ -105,10 +104,10 @@ uboot-bin: $(BINARIES_DIR)/$(UBOOT_BIN) /tftpboot/$(UBOOT_BIN)
$(UBOOT_BUILD_DIR)/.customized: .config $(UBOOT_BUILD_DIR)/.configured
echo "/* Automatically generated file, do not edit */" > $(UBOOT_CUSTOM)
-ifneq ($(HOSTNAME),)
+ifneq ($(TARGET_HOSTNAME),)
echo "#if defined(CONFIG_HOSTNAME)" >> $(UBOOT_CUSTOM)
echo "#undef CONFIG_HOSTNAME" >> $(UBOOT_CUSTOM)
- echo "#define CONFIG_HOSTNAME $(HOSTNAME)" >> $(UBOOT_CUSTOM)
+ echo "#define CONFIG_HOSTNAME $(TARGET_HOSTNAME)" >> $(UBOOT_CUSTOM)
echo "#endif" >> $(UBOOT_CUSTOM)
endif
ifneq ($(TARGET_UBOOT_IPADDR),)
@@ -144,7 +143,7 @@ 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 $(HOSTNAME) >> $(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)
@@ -159,7 +158,7 @@ endif
echo setargs >> $(UBOOT_SCR)
echo saveenv >> $(UBOOT_SCR)
-$(UBOOT_SCR).$(HOSTNAME): $(UBOOT_SCR) $(MKIMAGE)
+$(UBOOT_SCR).$(PROJECT): $(UBOOT_SCR) $(MKIMAGE)
$(MKIMAGE) -A arm \
-O linux \
-T script \
@@ -168,13 +167,13 @@ $(UBOOT_SCR).$(HOSTNAME): $(UBOOT_SCR) $(MKIMAGE)
-e 0 \
-n "autoscr config" \
-d $(UBOOT_SCR) \
- $(UBOOT_SCR).$(HOSTNAME)
- cp $(UBOOT_SCR).$(HOSTNAME) /tftpboot
+ $(UBOOT_SCR).$(PROJECT)
+ cp $(UBOOT_SCR).$(PROJECT) /tftpboot
$(MKIMAGE): $(MKIMAGE_BINLOC)
cp -f $(MKIMAGE_BINLOC) $(MKIMAGE)
-uboot: $(MKIMAGE) uboot-bin $(UBOOT_SCR).$(HOSTNAME)
+uboot: $(MKIMAGE) uboot-bin $(UBOOT_SCR).$(PROJECT)
uboot-source: $(DL_DIR)/$(UBOOT_SOURCE)
@@ -184,7 +183,7 @@ uboot-clean:
rm -f $(BINARIES_DIR)/$(UBOOT_BIN)
rm -fr $(UBOOT_DIR)
rm -f $(UBOOT_SCR)
- rm -f $(UBOOT_SCR).$(HOSTNAME)
+ rm -f $(UBOOT_SCR).$(PROJECT)
# -$(MAKE) -C $(UBOOT_DIR)/uboot-tools clean
uboot-dirclean: uboot-clean
@@ -246,10 +245,30 @@ 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).$(HOSTNAME)"
- -@ls $(UBOOT_SCR).$(HOSTNAME)
+ -@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)"