All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/3 v2] Initial support for Panda and PandaES
@ 2012-02-15 22:04 Nicolas Dechesne
  2012-02-15 22:04 ` [Buildroot] [PATCH 1/3 v2] uboot: Add support for U-Boot SPL Nicolas Dechesne
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Nicolas Dechesne @ 2012-02-15 22:04 UTC (permalink / raw)
  To: buildroot

Here is my 2nd attempt to add support for TI PandaBoard and PandaBoard ES.

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         |    9 +++++++++
 boot/uboot/uboot.mk          |    4 ++++
 configs/pandaboard_defconfig |   25 +++++++++++++++++++++++++
 3 files changed, 38 insertions(+), 0 deletions(-)
 create mode 100644 configs/pandaboard_defconfig

-- 
1.7.9

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/3 v2] uboot: Add support for U-Boot SPL
  2012-02-15 22:04 [Buildroot] [PATCH 0/3 v2] Initial support for Panda and PandaES Nicolas Dechesne
@ 2012-02-15 22:04 ` Nicolas Dechesne
  2012-02-15 23:57   ` Arnout Vandecappelle
  2012-02-15 22:04 ` [Buildroot] [PATCH 2/3 v2] uboot: add a new binary format for u-boot.img Nicolas Dechesne
  2012-02-15 22:04 ` [Buildroot] [PATCH 3/3 v2] configs: add support for PandaBoard and PandaBoard ES Nicolas Dechesne
  2 siblings, 1 reply; 8+ messages in thread
From: Nicolas Dechesne @ 2012-02-15 22:04 UTC (permalink / raw)
  To: buildroot

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 <n-dechesne@ti.com>
---
 boot/uboot/Config.in |    6 ++++++
 boot/uboot/uboot.mk  |    2 ++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index c8db9fb..3661407 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -137,4 +137,10 @@ 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
+
 endif # BR2_TARGET_UBOOT
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index db9de8d..41745c9 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -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))
-- 
1.7.9

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/3 v2] uboot: add a new binary format for u-boot.img
  2012-02-15 22:04 [Buildroot] [PATCH 0/3 v2] Initial support for Panda and PandaES Nicolas Dechesne
  2012-02-15 22:04 ` [Buildroot] [PATCH 1/3 v2] uboot: Add support for U-Boot SPL Nicolas Dechesne
@ 2012-02-15 22:04 ` Nicolas Dechesne
  2012-02-16  0:01   ` Arnout Vandecappelle
  2012-02-15 22:04 ` [Buildroot] [PATCH 3/3 v2] configs: add support for PandaBoard and PandaBoard ES Nicolas Dechesne
  2 siblings, 1 reply; 8+ messages in thread
From: Nicolas Dechesne @ 2012-02-15 22:04 UTC (permalink / raw)
  To: buildroot

For 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.

Signed-off-by: Nicolas Dechesne <n-dechesne@ti.com>
---
 boot/uboot/Config.in |    3 +++
 boot/uboot/uboot.mk  |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 3661407..d99d6c8 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -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"
 
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 41745c9..590eb6f 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -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
-- 
1.7.9

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 3/3 v2] configs: add support for PandaBoard and PandaBoard ES
  2012-02-15 22:04 [Buildroot] [PATCH 0/3 v2] Initial support for Panda and PandaES Nicolas Dechesne
  2012-02-15 22:04 ` [Buildroot] [PATCH 1/3 v2] uboot: Add support for U-Boot SPL Nicolas Dechesne
  2012-02-15 22:04 ` [Buildroot] [PATCH 2/3 v2] uboot: add a new binary format for u-boot.img Nicolas Dechesne
@ 2012-02-15 22:04 ` Nicolas Dechesne
  2 siblings, 0 replies; 8+ messages in thread
From: Nicolas Dechesne @ 2012-02-15 22:04 UTC (permalink / raw)
  To: buildroot

This 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.

Signed-off-by: Nicolas Dechesne <n-dechesne@ti.com>
---
 configs/pandaboard_defconfig |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 configs/pandaboard_defconfig

diff --git a/configs/pandaboard_defconfig b/configs/pandaboard_defconfig
new file mode 100644
index 0000000..61d9e00
--- /dev/null
+++ b/configs/pandaboard_defconfig
@@ -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
-- 
1.7.9

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/3 v2] uboot: Add support for U-Boot SPL
  2012-02-15 22:04 ` [Buildroot] [PATCH 1/3 v2] uboot: Add support for U-Boot SPL Nicolas Dechesne
@ 2012-02-15 23:57   ` Arnout Vandecappelle
  2012-02-16 14:10     ` Dechesne, Nicolas
  0 siblings, 1 reply; 8+ messages in thread
From: Arnout Vandecappelle @ 2012-02-15 23:57 UTC (permalink / raw)
  To: buildroot

On Wednesday 15 February 2012 23:04:13 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 <n-dechesne@ti.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

> ---
>  boot/uboot/Config.in |    6 ++++++
>  boot/uboot/uboot.mk  |    2 ++
>  2 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> index c8db9fb..3661407 100644
> --- a/boot/uboot/Config.in
> +++ b/boot/uboot/Config.in
> @@ -137,4 +137,10 @@ 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

 The help text could be a bit more verbose.  E.g. explain what SPL stands
for.  At least mention that the SPL binary is called MLO (the logic of
which escapes me :-)

> +
>  endif # BR2_TARGET_UBOOT
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index db9de8d..41745c9 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -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

 I didn't know it was possible to split functions over several lines
without \.  Nice to know!

 Regards,
 Arnout

-- 
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/3 v2] uboot: add a new binary format for u-boot.img
  2012-02-15 22:04 ` [Buildroot] [PATCH 2/3 v2] uboot: add a new binary format for u-boot.img Nicolas Dechesne
@ 2012-02-16  0:01   ` Arnout Vandecappelle
  2012-02-16 14:17     ` Dechesne, Nicolas
  0 siblings, 1 reply; 8+ messages in thread
From: Arnout Vandecappelle @ 2012-02-16  0:01 UTC (permalink / raw)
  To: buildroot

On Wednesday 15 February 2012 23:04:14 Nicolas Dechesne wrote:
> For 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.

 Isn't this mainly SPL that requires the .img?  If so, I would make
IMG the default format if SPL is selected.  I'm not sure if that's
possible in Kconfig, though.

> 
> Signed-off-by: Nicolas Dechesne <n-dechesne@ti.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>


 Regards,
 Arnout

-- 
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/3 v2] uboot: Add support for U-Boot SPL
  2012-02-15 23:57   ` Arnout Vandecappelle
@ 2012-02-16 14:10     ` Dechesne, Nicolas
  0 siblings, 0 replies; 8+ messages in thread
From: Dechesne, Nicolas @ 2012-02-16 14:10 UTC (permalink / raw)
  To: buildroot

On Thu, Feb 16, 2012 at 12:57 AM, Arnout Vandecappelle <arnout@mind.be>wrote:

> On Wednesday 15 February 2012 23:04:13 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 <n-dechesne@ti.com>
> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>

thx.


>
> > ---
> >  boot/uboot/Config.in |    6 ++++++
> >  boot/uboot/uboot.mk  |    2 ++
> >  2 files changed, 8 insertions(+), 0 deletions(-)
> >
> > diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
> > index c8db9fb..3661407 100644
> > --- a/boot/uboot/Config.in
> > +++ b/boot/uboot/Config.in
> > @@ -137,4 +137,10 @@ 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
>
>  The help text could be a bit more verbose.  E.g. explain what SPL stands
> for.  At least mention that the SPL binary is called MLO (the logic of
> which escapes me :-)
>

ok. I will update and resend. i will give a few more days to get more
reviews, just in case...

by the way, about the MLO stuff ... it comes from the OMAP romcode. this is
where the name 'MLO' is hardcoded. when booting from SD/eMMC formated with
FAT the ROM code will parse the FAT table and search for a file named MLO,
which stands for 'Memory LOader'. Such a boot mechanism is indeed what we
call memory booting as opposed to peripheral boot when we boot from USB or
UART. so MLO name has nothing to do with SPL, which is a uboot terminology
(Second Program Loader).


> > +
> >  endif # BR2_TARGET_UBOOT
> > diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> > index db9de8d..41745c9 100644
> > --- a/boot/uboot/uboot.mk
> > +++ b/boot/uboot/uboot.mk
> > @@ -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
>
>  I didn't know it was possible to split functions over several lines
> without \.  Nice to know!
>
>  Regards,
>  Arnout
>
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120216/bde9ed1a/attachment-0001.html>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/3 v2] uboot: add a new binary format for u-boot.img
  2012-02-16  0:01   ` Arnout Vandecappelle
@ 2012-02-16 14:17     ` Dechesne, Nicolas
  0 siblings, 0 replies; 8+ messages in thread
From: Dechesne, Nicolas @ 2012-02-16 14:17 UTC (permalink / raw)
  To: buildroot

On Thu, Feb 16, 2012 at 1:01 AM, Arnout Vandecappelle <arnout@mind.be>wrote:

> On Wednesday 15 February 2012 23:04:14 Nicolas Dechesne wrote:
> > For 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.
>
>  Isn't this mainly SPL that requires the .img?  If so, I would make
> IMG the default format if SPL is selected.  I'm not sure if that's
> possible in Kconfig, though.
>

.img is not required by SPL. in OMAP SPL code in uboot, the name u-boot.img
is hardcoded. When actually loading the file (see
http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/cpu/armv7/omap-common/spl.c;h=9c1f7e3eda6ce2c405b6c4aa123436036b0f2209;hb=master#l68)
we first check if the u-boot.img is using a mkimage file format, otherwise
we assume it's a raw .bin format. but the filename is still hardcoded, so
we can have platform with SPL but with u-boot.bin



> >
> > Signed-off-by: Nicolas Dechesne <n-dechesne@ti.com>
> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120216/eed2a075/attachment.html>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-02-16 14:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-15 22:04 [Buildroot] [PATCH 0/3 v2] Initial support for Panda and PandaES Nicolas Dechesne
2012-02-15 22:04 ` [Buildroot] [PATCH 1/3 v2] uboot: Add support for U-Boot SPL Nicolas Dechesne
2012-02-15 23:57   ` Arnout Vandecappelle
2012-02-16 14:10     ` Dechesne, Nicolas
2012-02-15 22:04 ` [Buildroot] [PATCH 2/3 v2] uboot: add a new binary format for u-boot.img Nicolas Dechesne
2012-02-16  0:01   ` Arnout Vandecappelle
2012-02-16 14:17     ` Dechesne, Nicolas
2012-02-15 22:04 ` [Buildroot] [PATCH 3/3 v2] configs: add support for PandaBoard and PandaBoard ES Nicolas Dechesne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.