diff options
author | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2009-01-03 15:50:38 +0000 |
---|---|---|
committer | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2009-01-03 15:50:38 +0000 |
commit | c7066b18079daef160592168e51479e82ae4f586 (patch) | |
tree | 132fbd0483eaa5c11c438cb6ff28b2b6ddc575a1 /target/u-boot | |
parent | 98eefe7074bd385eb5b9f41de97e97587bf15d9d (diff) | |
download | buildroot-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/u-boot')
-rw-r--r-- | target/u-boot/Config.in | 18 | ||||
-rw-r--r-- | target/u-boot/Makefile.in | 86 |
2 files changed, 94 insertions, 10 deletions
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 # ############################################################# |