summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf.samuelsson@atmel.com>2009-01-03 15:50:38 +0000
committerUlf Samuelsson <ulf.samuelsson@atmel.com>2009-01-03 15:50:38 +0000
commitc7066b18079daef160592168e51479e82ae4f586 (patch)
tree132fbd0483eaa5c11c438cb6ff28b2b6ddc575a1 /target
parent98eefe7074bd385eb5b9f41de97e97587bf15d9d (diff)
downloadbuildroot-novena-c7066b18079daef160592168e51479e82ae4f586.tar.gz
buildroot-novena-c7066b18079daef160592168e51479e82ae4f586.zip
Generate an autoscript for configuring u-boot in $(BINARIES_DIR)
mkimage the autoscript to autoscript.$(PROJECT)- Move build of u-boot-1.2.0-atmel to target/u-boot Only visible for AT91 targets. Fetch prepatched 1.2.0-atmel tarball from $(BR2_ATMEL_MIRROR) Rest from normal location. Introduce U_BOOT_CONFIGURE_OPTS Set to NOSOFT_FLOAT for u-boot-1.2.0-atmel Disable target/device/Atmel/u-boot Keep files in target/device/Atmel/u-boot during a test period. Files: M target/device/Atmel/Makefile.in M target/device/Atmel/Config.in M target/u-boot/Makefile.in M target/u-boot/Config.in A target/u-boot/1.2.0-atmel
Diffstat (limited to 'target')
-rw-r--r--target/device/Atmel/Config.in2
-rw-r--r--target/device/Atmel/Makefile.in8
-rw-r--r--target/u-boot/Config.in18
-rw-r--r--target/u-boot/Makefile.in86
4 files changed, 100 insertions, 14 deletions
diff --git a/target/device/Atmel/Config.in b/target/device/Atmel/Config.in
index 9f6305b7d..d19234549 100644
--- a/target/device/Atmel/Config.in
+++ b/target/device/Atmel/Config.in
@@ -65,7 +65,7 @@ config BR2_BOARD_PATH
endmenu
-source "target/device/Atmel/u-boot/Config.in"
+# source "target/device/Atmel/u-boot/Config.in"
source "target/device/Atmel/DataFlashBoot/Config.in"
diff --git a/target/device/Atmel/Makefile.in b/target/device/Atmel/Makefile.in
index 44eec8928..b6ca1be1a 100644
--- a/target/device/Atmel/Makefile.in
+++ b/target/device/Atmel/Makefile.in
@@ -54,6 +54,8 @@ DFB_BOARD_NAME:=$(BOARD_NAME)
#BR2_PACKAGE_BUSYBOX_CONFIG:=$(BR2_BOARD_PATH)/busybox-$(BR2_BUSYBOX_VERSION).config
+U_BOOT_VERSION:=$(strip $(subst ",,$(BR2_UBOOT_VERSION)))
+#"))
# Update things in board specific makefiles
include target/device/Atmel/*/Makefile.in
@@ -63,9 +65,9 @@ include target/device/Atmel/*/Makefile.in
UBOOT_CONFIG:=$(UBOOT_BOARD_NAME)_config
UBOOT_CONFIG_FILE:=$(BOARD_PATH)/u-boot/$(UBOOT_BOARD_NAME).h
-ifeq ($(BR2_TARGET_UBOOT_AT91),y)
-include $(ATMEL_PATH)/u-boot/u-boot.mk
-endif
+#ifeq ($(BR2_TARGET_UBOOT_AT91),y)
+#include $(ATMEL_PATH)/u-boot/u-boot.mk
+#endif
ifeq ($(BR2_TARGET_DATAFLASHBOOT),y)
include $(ATMEL_PATH)/DataFlashBoot/DataflashBoot.mk
diff --git a/target/u-boot/Config.in b/target/u-boot/Config.in
index a58542ba4..2f3963b15 100644
--- a/target/u-boot/Config.in
+++ b/target/u-boot/Config.in
@@ -1,12 +1,5 @@
-config BR2_TARGET_CUSTOM_UBOOT
- bool
- help
- A target can "select" this to disable
- the build of vanilla u-boot.
-
menuconfig BR2_TARGET_UBOOT
bool "Das U-Boot Boot Monitor"
- depends on !BR2_TARGET_CUSTOM_UBOOT
help
Build "Das U-Boot" Boot Monitor
@@ -37,6 +30,11 @@ config BR2_TARGET_UBOOT_1_3_4
bool "u-boot-1.3.4"
depends on BR2_TARGET_UBOOT
+config BR2_TARGET_UBOOT_1_2_0_ATMEL
+ bool "u-boot-1.2.0-atmel"
+ depends on BR2_TARGET_AT91
+ depends on BR2_TARGET_UBOOT
+
config BR2_TARGET_UBOOT_2009_01
bool "u-boot-2009.01"
depends on BR2_TARGET_UBOOT
@@ -48,8 +46,14 @@ config BR2_UBOOT_VERSION
default "2009.01-rc1" if BR2_TARGET_UBOOT_2009_01_RC1
default "2008.10" if BR2_TARGET_UBOOT_2008_10
default "1.3.4" if BR2_TARGET_UBOOT_1_3_4
+ default "1.2.0-atmel" if BR2_TARGET_UBOOT_1_2_0_ATMEL
default "2009.01" if BR2_TARGET_UBOOT_2009_01
+config BR2_U_BOOT_SITE
+ string
+ default "$(BR2_ATMEL_MIRROR)" if BR2_TARGET_UBOOT_1_2_0_ATMEL
+ default "ftp://ftp.denx.de/pub/u-boot"
+
config BR2_TARGET_UBOOT_CUSTOM_PATCH
string "custom patch"
depends on BR2_TARGET_UBOOT
diff --git a/target/u-boot/Makefile.in b/target/u-boot/Makefile.in
index 84b4911dc..fb1ba6c90 100644
--- a/target/u-boot/Makefile.in
+++ b/target/u-boot/Makefile.in
@@ -7,14 +7,30 @@ U_BOOT_VERSION:=$(strip $(subst ",,$(BR2_UBOOT_VERSION)))
#"))
U_BOOT_SOURCE:=u-boot-$(U_BOOT_VERSION).tar.bz2
-U_BOOT_SITE:=ftp://ftp.denx.de/pub/u-boot
+
+U_BOOT_SITE:=$(strip $(subst ",,$(BR2_U_BOOT_SITE)))
+#"))
U_BOOT_DIR:=$(PROJECT_BUILD_DIR)/u-boot-$(U_BOOT_VERSION)
-U_BOOT_PATCH_DIR:=$(PROJECT_BUILD_DIR)/u-boot-patches
+U_BOOT_PATCH_DIR:=$(PROJECT_BUILD_DIR)/u-boot-$(U_BOOT_VERSION)-patches
U_BOOT_CAT:=$(BZCAT)
U_BOOT_BIN:=u-boot.bin
U_BOOT_TARGET:=$(BOARD_NAME)-u-boot-$(U_BOOT_VERSION)-$(DATE).bin
U_BOOT_TOOLS_BIN:=mkimage
U_BOOT_TOOLS:=$(STAGING_DIR)/usr/bin/$(U_BOOT_TOOLS_BIN)
+MKIMAGE:=$(U_BOOT_TOOLS)
+
+U_BOOT_AUTOSCRIPT=$(BINARIES_DIR)/autoscript
+TARGET_UBOOT_IPADDR:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_IPADDR)))
+#"))
+TARGET_UBOOT_SERVERIP:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_SERVERIP)))
+#"))
+TARGET_UBOOT_GATEWAY:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_GATEWAY)))
+#"))
+TARGET_UBOOT_NETMASK:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_NETMASK)))
+#"))
+TARGET_UBOOT_ETHADDR:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_ETHADDR)))
+#"))
+
# u-boot still uses arch=ppc for powerpc
U_BOOT_ARCH=$(KERNEL_ARCH:powerpc=ppc)
ifeq ($(UBOOT_BOARD_NAME),"")
@@ -36,6 +52,11 @@ ifeq ($(BR2_TARGET_UBOOT_TOOL_ENV),y)
U_BOOT_TARGET_TOOLS+=$(TARGET_DIR)/usr/sbin/fw_printenv
endif
+U_BOOT_CONFIGURE_OPTS :=
+
+ifneq ($(BR2_TARGET_UBOOT_1_2_0_ATMEL),)
+U_BOOT_CONFIGURE_OPTS += CONFIG_NOSOFTFLOAT=1
+endif
# Define a helper function
define insert_define
@@ -52,6 +73,7 @@ $(DL_DIR)/$(U_BOOT_SOURCE):
$(U_BOOT_DIR)/.unpacked: $(DL_DIR)/$(U_BOOT_SOURCE)
$(U_BOOT_CAT) $(DL_DIR)/$(U_BOOT_SOURCE) \
| tar -C $(PROJECT_BUILD_DIR) $(TAR_OPTIONS) -
+ mkdir -p $(U_BOOT_DIR)
touch $@
$(U_BOOT_DIR)/.patched: $(U_BOOT_DIR)/.unpacked
@@ -75,6 +97,7 @@ $(U_BOOT_DIR)/.configured: $(U_BOOT_DIR)/.header_copied
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
+ $(U_BOOT_CONFIGURE_OPTS) \
$(MAKE) -C $(U_BOOT_DIR) \
$(UBOOT_BOARD_NAME)_config
touch $@
@@ -151,6 +174,7 @@ $(U_BOOT_DIR)/$(U_BOOT_BIN): $(U_BOOT_DIR)/.header_modified
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
+ $(U_BOOT_CONFIGURE_OPTS) \
$(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) \
-C $(U_BOOT_DIR)
@@ -178,7 +202,9 @@ $(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/$(U_BOOT_BIN)
$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv
-u-boot: $(BINARIES_DIR)/$(U_BOOT_BIN) $(U_BOOT_TOOLS) $(U_BOOT_TARGET_TOOLS)
+u-boot: $(BINARIES_DIR)/$(U_BOOT_BIN) $(U_BOOT_TOOLS) $(U_BOOT_TARGET_TOOLS) u-boot-autoscript
+
+u-boot-autoscript: $(U_BOOT_AUTOSCRIPT).$(PROJECT)
u-boot-clean:
-$(MAKE) -C $(U_BOOT_DIR) clean
@@ -195,6 +221,60 @@ u-boot-configured: $(U_BOOT_DIR)/.header_modified
#############################################################
#
+# Generate an autoscript with the configration items
+#
+#############################################################
+
+$(U_BOOT_AUTOSCRIPT): .config
+ rm -f $(U_BOOT_AUTOSCRIPT)
+ifneq ($(TARGET_UBOOT_IPADDR),)
+ echo setenv ipaddr $(TARGET_UBOOT_IPADDR) > $(U_BOOT_AUTOSCRIPT)
+else
+ echo TARGET_UBOOT_IPADDR="$(TARGET_UBOOT_IPADDR)"
+endif
+ifneq ($(TARGET_UBOOT_SERVERIP),)
+ echo setenv serverip $(TARGET_UBOOT_SERVERIP) >> $(U_BOOT_AUTOSCRIPT)
+endif
+ifneq ($(TARGET_UBOOT_GATEWAY),)
+ echo setenv gatewayip $(TARGET_UBOOT_GATEWAY) >> $(U_BOOT_AUTOSCRIPT)
+endif
+ifneq ($(TARGET_UBOOT_NETMASK),)
+ echo setenv netmask $(TARGET_UBOOT_NETMASK) >> $(U_BOOT_AUTOSCRIPT)
+endif
+ echo setenv linux $(BOARD_NAME)-linux-$(LINUX26_VERSION)-$(DATE).gz >> $(U_BOOT_AUTOSCRIPT)
+ echo setenv kernel-version $(LINUX26_VERSION) >> $(U_BOOT_AUTOSCRIPT)
+ echo setenv kernel-date $(DATE) >> $(U_BOOT_AUTOSCRIPT)
+ echo setenv hostname $(TARGET_HOSTNAME) >> $(U_BOOT_AUTOSCRIPT)
+ echo setenv fs-date $(DATE) >> $(U_BOOT_AUTOSCRIPT)
+ echo setenv rd-1 rootfs.$(BR2_ARCH)-$(DATE).ext2 >> $(U_BOOT_AUTOSCRIPT)
+ echo setenv rd-2 rootfs.$(BR2_ARCH)-$(DATE).jffs2 >> $(U_BOOT_AUTOSCRIPT)
+ echo setenv rd rootfs.$(BR2_ARCH)-$(DATE).ext2 >> $(U_BOOT_AUTOSCRIPT)
+ echo setenv ver 1 >> $(U_BOOT_AUTOSCRIPT)
+ifneq ($(TARGET_UBOOT_ETHADDR),)
+ echo setenv ethaddr $(TARGET_UBOOT_ETHADDR) >> $(U_BOOT_AUTOSCRIPT)
+endif
+ echo setenv fstype ram >> $(U_BOOT_AUTOSCRIPT)
+ echo fs >> $(U_BOOT_AUTOSCRIPT)
+ echo os >> $(U_BOOT_AUTOSCRIPT)
+ echo setargs >> $(U_BOOT_AUTOSCRIPT)
+ echo saveenv >> $(U_BOOT_AUTOSCRIPT)
+
+$(U_BOOT_AUTOSCRIPT).$(PROJECT): $(U_BOOT_AUTOSCRIPT) $(MKIMAGE)
+ $(MKIMAGE) -A arm \
+ -O linux \
+ -T script \
+ -C none \
+ -a 0 \
+ -e 0 \
+ -n "autoscr config" \
+ -d $(U_BOOT_AUTOSCRIPT) \
+ $(U_BOOT_AUTOSCRIPT).$(PROJECT)
+ cp $(U_BOOT_AUTOSCRIPT).$(PROJECT) $(TARGET_ATMEL_COPYTO)
+
+
+
+#############################################################
+#
# Toplevel Makefile options
#
#############################################################