Commit 22b80a23 authored by Peter Korsgaard's avatar Peter Korsgaard
Browse files

Merge branch 'bootloaders-cleanup' of git://git.busybox.net/~tpetazzoni/git/buildroot

parents f4b7efe5 fa2a311b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -293,4 +293,6 @@ source "package/Config.in"

source "fs/Config.in"

source "boot/Config.in"

source "target/Config.in"
+2 −1
Original line number Diff line number Diff line
@@ -320,8 +320,9 @@ ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
TARGETS+=target-purgelocales
endif

# target stuff is last so it can override anything else
include boot/common.mk
include target/Makefile.in
include fs/common.mk

TARGETS+=erase-fakeroots

boot/Config.in

0 → 100644
+12 −0
Original line number Diff line number Diff line
menu "Bootloaders"

source "boot/barebox/Config.in"
source "boot/grub/Config.in"
source "boot/grub2/Config.in"
source "boot/syslinux/Config.in"
source "boot/u-boot/Config.in"
source "boot/at91bootstrap/Config.in"
source "boot/at91dataflashboot/Config.in"

endmenu
+4 −22
Original line number Diff line number Diff line
menuconfig BR2_TARGET_AT91BOOTSTRAP
	depends on BR2_TARGET_AT91SAM9260EK || BR2_TARGET_AT91SAM9260DFC || BR2_TARGET_AT91SAM9260PF || \
	BR2_TARGET_AT91SAM9261EK || BR2_TARGET_AT91SAM9263EK || BR2_TARGET_AT91SAM9XEEK || BR2_TARGET_AT91SAM9G20DFC
	bool "Build AT91 Bootstrap for selected chip"
	depends on BR2_arm
	bool "AT91 Bootstrap"

if	BR2_TARGET_AT91BOOTSTRAP

config BR2_TARGET_AT91BOOTSTRAP_BOARD
	string "Bootstrap board"
	default "$(BOARD_NAME)"
	default ""
	help
	  This is used to do a make <board>_config

choice
	prompt "Boot Memory"
	default BR2_TARGET_AT91BOOT_DATAFLASHCARD
	depends on BR2_TARGET_AT91BOOTSTRAP
	help
	  Select Chip for which AT91 bootstrap should be built

config BR2_TARGET_AT91BOOT_DATAFLASH
	bool "AT45 Dataflash"
	depends on BR2_BOOTSOURCE_DATAFLASH

config BR2_TARGET_AT91BOOT_DATAFLASHCARD
	bool "AT45 Dataflash Card"
	depends on BR2_BOOTSOURCE_DATAFLASHCARD

config BR2_TARGET_AT91BOOT_NANDFLASH
	bool "NAND Flash"
	depends on BR2_BOOTSOURCE_NANDFLASH

config BR2_TARGET_AT91BOOT_FLASH
	bool "Internal Flash or external parallel flash"
	depends on BR2_BOOTSOURCE_FLASH

config BR2_TARGET_AT91BOOT_SDCARD
	bool "SD-Card"
	depends on BR2_BOOTSOURCE_SDCARD

config BR2_TARGET_AT91BOOT_EEPROM
	bool "EEPROM"
	depends on BR2_BOOTSOURCE_EEPROM

endchoice

config BR2_TARGET_AT91BOOTSTRAP_MEMORY
	string
	depends on BR2_TARGET_AT91BOOTSTRAP
	default	"dataflash"	if	BR2_TARGET_AT91BOOT_DATAFLASH
	default	"dataflashcard"	if	BR2_TARGET_AT91BOOT_DATAFLASHCARD
	default	"nandflash"	if	BR2_TARGET_AT91BOOT_NANDFLASH
@@ -56,7 +47,6 @@ config BR2_TARGET_AT91BOOTSTRAP_MEMORY

config	BR2_AT91BOOTSTRAP_IMG_SIZE
	string	"Image Size to copy to SDRAM"
	depends on BR2_TARGET_AT91BOOTSTRAP
	default	"0x32000"	if	BR2_TARGET_AT91BOOT_DATAFLASH
	default	"0x32000"	if	BR2_TARGET_AT91BOOT_DATAFLASHCARD
	default	"0x30000"	if	BR2_TARGET_AT91BOOT_NANDFLASH
@@ -70,12 +60,8 @@ config BR2_AT91BOOTSTRAP_IMG_SIZE
choice
	prompt "Start address of application"
	default BR2_AT91BOOTSTRAP_JUMP_TO_DEFAULT
	depends on BR2_TARGET_AT91BOOTSTRAP
	help
	  Select Chip for which AT91 bootstrap should be built
	  Currently supports AT91SAM9260EK, AT91SAM9261EK,
	  AT91SAM9XEEK, AT91SAM9263EK

	  Location of the application start address

config	BR2_AT91BOOTSTRAP_JUMP_TO_DEFAULT
	bool "Copy to the default U-Boot start location in the SDRAM"
@@ -98,10 +84,6 @@ config BR2_AT91BOOTSTRAP_JUMP_ADDR
	default	"0x23F00000" if BR2_AT91BOOTSTRAP_JUMP_TO_DEFAULT
	default	"0x23F00000" if BR2_AT91BOOTSTRAP_JUMP_TO_HIGH_SDRAM
	default "0x20000000" if BR2_AT91BOOTSTRAP_JUMP_TO_START_OF_SDRAM
	depends on BR2_TARGET_AT91BOOTSTRAP

comment "It will be copied to $(BR2_AT91BOOTSTRAP_JUMP_ADDR)"
	depends on BR2_TARGET_AT91BOOTSTRAP

endif

+13 −34
Original line number Diff line number Diff line
@@ -3,25 +3,18 @@
# at91bootstrap
#
#############################################################
AT91BOOTSTRAP_VERSION:=2.10
AT91BOOTSTRAP_PATCH_LEVEL:=
AT91BOOTSTRAP_PATCHED_VERSION:=$(AT91BOOTSTRAP_VERSION)$(AT91BOOTSTRAP_PATCH_LEVEL)
AT91BOOTSTRAP_VERSION:=2.13
AT91BOOTSTRAP_NAME:=at91bootstrap-$(AT91BOOTSTRAP_VERSION)
ATMEL_MIRROR:=$(call qstrip,$(BR2_ATMEL_MIRROR))
AT91BOOTSTRAP_SITE:=$(ATMEL_MIRROR)
AT91BOOTSTRAP_SITE:=ftp://www.at91.com/pub/buildroot/
AT91BOOTSTRAP_SOURCE:=$(AT91BOOTSTRAP_NAME).tar.bz2
AT91BOOTSTRAP_DIR:=$(BUILD_DIR)/$(AT91BOOTSTRAP_NAME)
AT91BOOTSTRAP:=$(call qstrip,$(BR2_AT91BOOTSTRAP))
AT91BOOTSTRAP_ZCAT:=$(BZCAT)

AT91BOOTSTRAP_BOARD:=$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD))

AT91BOOTSTRAP_MEMORY:=$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY))

AT91BOOTSTRAP_BINARY:=$(BOARD_NAME)-$(AT91BOOTSTRAP_MEMORY)boot-$(AT91BOOTSTRAP_PATCHED_VERSION).bin

AT91BOOTSTRAP_BINARY:=$(AT91BOOTSTRAP_BOARD)-$(AT91BOOTSTRAP_MEMORY)boot.bin
AT91BOOTSTRAP_TARGET:=$(AT91BOOTSTRAP_DIR)/binaries/$(AT91BOOTSTRAP_BINARY)

AT91BOOTSTRAP_JUMP_ADDR:=$(call qstrip,$(BR2_AT91BOOTSTRAP_JUMP_ADDR))
AT91BOOTSTRAP_IMG_SIZE:=$(call qstrip,$(BR2_AT91BOOTSTRAP_IMG_SIZE))

@@ -39,7 +32,7 @@ $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE):
$(AT91BOOTSTRAP_DIR)/.unpacked: $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE)
	mkdir -p $(BUILD_DIR)
	$(AT91BOOTSTRAP_ZCAT) $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
	toolchain/patch-kernel.sh $(AT91BOOTSTRAP_DIR) target/device/Atmel/at91bootstrap/ at91bootstrap-$(AT91BOOTSTRAP_VERSION)\*.patch
	toolchain/patch-kernel.sh $(AT91BOOTSTRAP_DIR) boot/at91bootstrap/ at91bootstrap-$(AT91BOOTSTRAP_VERSION)\*.patch
	touch $(AT91BOOTSTRAP_DIR)/.unpacked

$(AT91BOOTSTRAP_DIR)/.configured: $(AT91BOOTSTRAP_DIR)/.unpacked .config
@@ -50,8 +43,6 @@ $(AT91BOOTSTRAP_DIR)/.configured: $(AT91BOOTSTRAP_DIR)/.unpacked .config
		$(AT91BOOTSTRAP_BOARD)_defconfig
	touch $(AT91BOOTSTRAP_DIR)/.configured

#		$(BOARD_NAME)_defconfig

$(AT91BOOTSTRAP_TARGET): $(AT91BOOTSTRAP_DIR)/.configured
	$(MAKE) \
		MEMORY=$(AT91BOOTSTRAP_MEMORY) \
@@ -61,25 +52,12 @@ $(AT91BOOTSTRAP_TARGET): $(AT91BOOTSTRAP_DIR)/.configured

$(AT91BOOTSTRAP_DIR)/.installed:: $(AT91BOOTSTRAP_TARGET)
	mkdir -p $(BINARIES_DIR)
ifeq	($(AT91BOOTSTRAP_VERSION),2.3)
	cp $(AT91BOOTSTRAP_TARGET) $(BINARIES_DIR)/$(AT91BOOTSTRAP_BINARY)
	$(call COPY_FILE, $(AT91BOOTSTRAP_TARGET), $(BR2_TARGET_ATMEL_COPYTO), $(AT91BOOTSTRAP_BINARY))
else
	make MEMORY=$(AT91BOOTSTRAP_MEMORY) 	\
		CROSS_COMPILE=$(TARGET_CROSS) 	\
		-C $(AT91BOOTSTRAP_DIR) boot
	make DESTDIR=$(BINARIES_DIR) -C $(AT91BOOTSTRAP_DIR) install || \
		echo "Could not copy bootstrap to BINARIES_DIR"
ifneq ($(BR2_TARGET_ATMEL_COPYTO),)
	make DESTDIR=$(BR2_TARGET_ATMEL_COPYTO) -C $(AT91BOOTSTRAP_DIR) install || \
		echo "Could not copy bootstrap to BR2_ATMEL_COPYTO"
endif
endif
		DESTDIR=$(BINARIES_DIR) 	\
		-C $(AT91BOOTSTRAP_DIR) install
	touch $@

#	cp $(AT91BOOTSTRAP_TARGET) $(BINARIES_DIR)/$(AT91BOOTSTRAP_BINARY)
#	cp $(AT91BOOTSTRAP_TARGET) $(BR2_TARGET_ATMEL_COPYTO)/$(AT91BOOTSTRAP_BINARY)

.PHONY: at91bootstrap at91bootstrap-source

at91bootstrap: $(AT91BOOTSTRAP_DIR)/.installed
@@ -103,8 +81,9 @@ at91bootstrap-dirclean:
#############################################################
ifeq ($(BR2_TARGET_AT91BOOTSTRAP),y)
TARGETS+=at91bootstrap
endif

at91bootstrap-status:
	@echo AT91BOOTSTRAP_BOARD=$(AT91BOOTSTRAP_BOARD)

# we NEED a board name
ifeq ($(AT91BOOTSTRAP_BOARD),)
$(error No AT91Bootstrap board name set. Check your BR2_TARGET_AT91BOOTSTRAP_BOARD setting)
endif
endif
Loading