Initial support for Panda and PandaES
v3 cover Initial support for Panda and PandaES
Here is my 3rd attempt to add support for TI PandaBoard and PandaBoard ES.
v3:
- added more documentation in uboot/Config.in regarding SPL
- added 'acked-by' as per review
- rebased on master branch as of 2012/03/12
v2:
- typo cleanup as per reviews
- introduce BR2_TARGET_UBOOT_FORMAT_IMG to allow use of u-boot.img on platforms that need it, like OMAP. This is better than v1 since u-boot.img is not stricly dependent on SPL, so making 2 parameters makes more sense.
v1:
Because we want to deprecate x-loader in favor of u-boot SPL:
- my first patch adds support for SPL in BR
- SPL is enabled by default in my panda config.
Both Panda and PandaES have been tested, detection is done at run time in uboot and kernel, so we can have 1 configuration only.
I've used DEVTMPFS by default, as 1) I generally prefer this, and 2) ttyO was missing from the generic dev table...
Nicolas Dechesne (3):
uboot: Add support for U-Boot SPL
uboot: add a new binary format for u-boot.img
configs: add support for PandaBoard and PandaBoard ES
boot/uboot/Config.in | 12 ++++++++++++ boot/uboot/uboot.mk | 4 ++++ configs/pandaboard_defconfig | 25 +++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 0 deletions(-) create mode 100644 configs/pandaboard_defconfig
Signature · 1 line
1.7.9.1
PATCH v3 1/3 uboot: Add support for U-Boot SPL
SPL is a first stage bootloader. On pandaboard it supercedes x-loader, and should now be used.
This patch ensures that either SPL or xloader can be selected
--- boot/uboot/Config.in | 9 +++++++++ boot/uboot/uboot.mk | 2 ++ 2 files changed, 11 insertions(+), 0 deletions(-)
boot/uboot/Config.in +9 -0
@@ -137,4 +137,13 @@ config BR2_TARGET_UBOOT_ETH1ADDR endif # BR2_TARGET_UBOOT_NETWORK +config BR2_TARGET_UBOOT_SPL + bool "U-Boot SPL support" + depends on !BR2_TARGET_XLOADER + help + Enable the U-Boot SPL support. SPL is a first stage + bootloader loaded into internal memory in charge of + enabling and configuring the external memory (DDR), + and load the u-boot program into DDR. + endif # BR2_TARGET_UBOOT
boot/uboot/uboot.mk +2 -0
@@ -88,6 +88,8 @@ endef define UBOOT_INSTALL_IMAGES_CMDS cp -dpf $(@D)/$(UBOOT_BIN) $(BINARIES_DIR)/ + $(if $(BR2_TARGET_UBOOT_SPL), + cp -dpf $(@D)/MLO $(BINARIES_DIR)/) endef $(eval $(call GENTARGETS))
Signature · 1 line
1.7.9.1
PATCH v3 1/3 uboot: Add support for U-Boot SPL
Quoted 35 lines · On Monday 12 March 2012 23:41:10 Nicolas Dechesne wrote:
SPL is a first stage bootloader. On pandaboard it supercedes x-loader, and should now be used.
This patch ensures that either SPL or xloader can be selected
Signed-off-by Nicolas Dechesne <[email protected]>--- boot/uboot/Config.in | 9 +++++++++ boot/uboot/uboot.mk | 2 ++ 2 files changed, 11 insertions(+), 0 deletions(-)boot/uboot/Config.in +9
-0@@ -137,4 +137,13 @@ config BR2_TARGET_UBOOT_ETH1ADDR endif # BR2_TARGET_UBOOT_NETWORK +config BR2_TARGET_UBOOT_SPL + bool "U-Boot SPL support" + depends on !BR2_TARGET_XLOADER + help + Enable the U-Boot SPL support. SPL is a first stage + bootloader loaded into internal memory in charge of + enabling and configuring the external memory (DDR), + and load the u-boot program into DDR. + endif # BR2_TARGET_UBOOTboot/uboot/uboot.mk +0
-0
boot/uboot/uboot.mk endef · line 92
Quoted 5 lines
boot/uboot/uboot.mk +2
-0@@ -88,6 +88,8 @@ endef define UBOOT_INSTALL_IMAGES_CMDS cp -dpf $(@D)/$(UBOOT_BIN) $(BINARIES_DIR)/ + $(if $(BR2_TARGET_UBOOT_SPL), + cp -dpf $(@D)/MLO $(BINARIES_DIR)/)
I didn't realize before, but it's only on OMAP that the SPL is called
MLO. Its normal name is u-boot-spl.bin.
I'm not sure how this could be solved. The simplest way would be
something like (untested, as usual):
ifeq ($(BR2_TARGET_UBOOT_SPL),y)
define UBOOT_INSTALL_IMAGES_SPL
if [ -e $(@D)/MLO ]; then \ cp -dpf $(@D)/MLO $(BINARIES_DIR)/; \ else \ cp -dpf $(@D)/u-boot-spl.bin $(BINARIES_DIR)/; \ fi
endef
endif
The alternative would be to make a separate config entry for MLO and
other SPLs. Which does make some kind of sense, I guess.
Regards,
Arnout
Quoted 4 lines
boot/uboot/uboot.mk +0
-0endef $(eval $(call GENTARGETS))
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
Dechesne
PATCH v3 1/3 uboot: Add support for U-Boot SPL
Quoted 13 lines · Arnout Vandecappelle
I didn't realize before, but it's only on OMAP that the SPL is called
MLO. Its normal name is u-boot-spl.bin.I'm not sure how this could be solved. The simplest way would be
something like (untested, as usual):ifeq ($(BR2_TARGET_UBOOT_SPL),y)
defineUBOOT_INSTALL_IMAGES_SPLif [ -e $(@D)/MLO ]; then \ cp -dpf $(@D)/MLO $(BINARIES_DIR)/; \ else \ cp -dpf $(@D)/u-boot-spl.bin $(BINARIES_DIR)/; \ fi
Quoted 7 lines
endef
endifThe alternative would be to make a separate config entry for MLO and
other SPLs. Which does make some kind of sense, I guess.
argh.. thx for pointing this out!
i just tried to implement the 2nd option (adding a new CONFIG var), and it seems to work fine. I am going to send an updated series.
The reason why I think that a variable is better is that the solution is
more scalable, in case others platforms do the same thing... also because i
know that on OMAP5 for SATA boot the 2st bootloader will be called HLO, not
MLO ;-) so this solution is scalable at least for the next gen OMAP5 boards
...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120318/05281dd2/attachment.html>
PATCH v3 2/3 uboot: add a new binary format for u-boot.img
In reply to Nicolas DechesneFor some platforms like OMAP, a new binary format is now being used for u-boot: u-boot.img. It is basically u-boot.bin which has been processed with mkimage.
--- boot/uboot/Config.in | 3 +++ boot/uboot/uboot.mk | 2 ++ 2 files changed, 5 insertions(+), 0 deletions(-)
boot/uboot/Config.in +3 -0
@@ -79,6 +79,9 @@ choice config BR2_TARGET_UBOOT_FORMAT_BIN bool "u-boot.bin" +config BR2_TARGET_UBOOT_FORMAT_IMG + bool "u-boot.img" + config BR2_TARGET_UBOOT_FORMAT_NAND_BIN bool "u-boot-nand.bin"
boot/uboot/uboot.mk +2 -0
@@ -29,6 +29,8 @@ else ifeq ($(BR2_TARGET_UBOOT_FORMAT_LDR),y) UBOOT_BIN = u-boot.ldr else ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND_BIN),y) UBOOT_BIN = u-boot-nand.bin +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMG),y) +UBOOT_BIN = u-boot.img else UBOOT_BIN = u-boot.bin endif
Signature · 1 line
1.7.9.1
PATCH v3 3/3 configs: add support for PandaBoard and PandaBoard ES
In reply to Nicolas DechesneThis is a default configuration for Panda and PandaES, tested on both platforms.
DEVTMPFS is enabled, to use static dev configuration one would need to update the generic dev table for ttyO driver.
Panda is well supported in mainline kernel with omap2plus_defconfig, so this should be safe.
U-boot SPL support is enabled by default as x-loader is now deprecated.
With OMAP platforms u-boot,img format is prefered now, so it's enabled by default as well.
--- configs/pandaboard_defconfig | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) create mode 100644 configs/pandaboard_defconfig
configs/pandaboard_defconfig new file +25 -0
@@ -0,0 +1,25 @@ +# Architecture +BR2_arm=y +BR2_cortex_a9=y + +# system +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyO2" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y + +# filesystem +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus" + +# GCC +BR2_GCC_VERSION_4_6_X=y + +# Bootloaders +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_BOARDNAME="omap4_panda" +BR2_TARGET_UBOOT_SPL=y
Signature · 1 line
1.7.9.1