* [Buildroot] [PATCH 0/2] Initial support for Panda and PandaES @ 2012-02-05 0:35 Nicolas Dechesne 2012-02-05 0:35 ` [Buildroot] [PATCH 1/2] Add support for U-Boot SPL Nicolas Dechesne 2012-02-05 0:35 ` [Buildroot] [PATCH 2/2] Initial support for PandaBoard and PandaBoard ES Nicolas Dechesne 0 siblings, 2 replies; 8+ messages in thread From: Nicolas Dechesne @ 2012-02-05 0:35 UTC (permalink / raw) To: buildroot Here is an attempt to add support for TI PandaBoard and PandaBoard ES. 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 (2): Add support for U-Boot SPL Initial support for PandaBoard and PandaBoard ES boot/uboot/Config.in | 6 ++++++ boot/uboot/uboot.mk | 4 ++++ configs/pandaboard_defconfig | 24 ++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 0 deletions(-) create mode 100644 configs/pandaboard_defconfig -- 1.7.8.3 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] Add support for U-Boot SPL 2012-02-05 0:35 [Buildroot] [PATCH 0/2] Initial support for Panda and PandaES Nicolas Dechesne @ 2012-02-05 0:35 ` Nicolas Dechesne 2012-02-06 10:59 ` Thomas De Schampheleire 2012-02-09 23:58 ` Arnout Vandecappelle 2012-02-05 0:35 ` [Buildroot] [PATCH 2/2] Initial support for PandaBoard and PandaBoard ES Nicolas Dechesne 1 sibling, 2 replies; 8+ messages in thread From: Nicolas Dechesne @ 2012-02-05 0:35 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 - SPL will load 'u-boot.img' instead of 'u-boot.bin, so the name is updated accordingly Signed-off-by: Nicolas Dechesne <n-dechesne@ti.com> --- boot/uboot/Config.in | 6 ++++++ boot/uboot/uboot.mk | 4 ++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index c8db9fb..1b94803 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 suport" + 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..b327f4b 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_SPL),y) +UBOOT_BIN = u-boot.img else UBOOT_BIN = u-boot.bin endif @@ -88,6 +90,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.8.3 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] Add support for U-Boot SPL 2012-02-05 0:35 ` [Buildroot] [PATCH 1/2] Add support for U-Boot SPL Nicolas Dechesne @ 2012-02-06 10:59 ` Thomas De Schampheleire 2012-02-09 23:58 ` Arnout Vandecappelle 1 sibling, 0 replies; 8+ messages in thread From: Thomas De Schampheleire @ 2012-02-06 10:59 UTC (permalink / raw) To: buildroot On Sun, Feb 5, 2012 at 1:35 AM, Nicolas Dechesne <n-dechesne@ti.com> 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 > - SPL will load 'u-boot.img' instead of 'u-boot.bin, so the name > ?is updated accordingly > > Signed-off-by: Nicolas Dechesne <n-dechesne@ti.com> > --- > ?boot/uboot/Config.in | ? ?6 ++++++ > ?boot/uboot/uboot.mk ?| ? ?4 ++++ > ?2 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in > index c8db9fb..1b94803 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 suport" typo: 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..b327f4b 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_SPL),y) > +UBOOT_BIN ? ? ? ? ?= u-boot.img > ?else > ?UBOOT_BIN ? ? ? ? ?= u-boot.bin > ?endif > @@ -88,6 +90,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.8.3 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] Add support for U-Boot SPL 2012-02-05 0:35 ` [Buildroot] [PATCH 1/2] Add support for U-Boot SPL Nicolas Dechesne 2012-02-06 10:59 ` Thomas De Schampheleire @ 2012-02-09 23:58 ` Arnout Vandecappelle 2012-02-10 18:27 ` Dechesne, Nicolas 1 sibling, 1 reply; 8+ messages in thread From: Arnout Vandecappelle @ 2012-02-09 23:58 UTC (permalink / raw) To: buildroot On Sunday 05 February 2012 01:35:46 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 > - SPL will load 'u-boot.img' instead of 'u-boot.bin, so the name > is updated accordingly It doesn't work well, but unfortunately I don't know how to solve it. MLO and u-boot.img are only created for the omap configs, and only in u-boot 2011.12 or later. Depending on omap in the Config.in is almost impossible, and also depending on 2011.12 is difficult because it could be a custom git instead. I think the only solution is to add a check in the .mk file if MLO and u-boot.img indeed exist, and fall back to the default instead if not. What is also missing is that the choice between the different image types should depend on !BR2_TARGET_UBOOT_SPL. Regards, Arnout > > Signed-off-by: Nicolas Dechesne <n-dechesne@ti.com> > --- > boot/uboot/Config.in | 6 ++++++ > boot/uboot/uboot.mk | 4 ++++ > 2 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in > index c8db9fb..1b94803 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 suport" > + 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..b327f4b 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_SPL),y) > +UBOOT_BIN = u-boot.img > else > UBOOT_BIN = u-boot.bin > endif > @@ -88,6 +90,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)) > -- 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/2] Add support for U-Boot SPL 2012-02-09 23:58 ` Arnout Vandecappelle @ 2012-02-10 18:27 ` Dechesne, Nicolas 2012-02-10 21:37 ` Arnout Vandecappelle 0 siblings, 1 reply; 8+ messages in thread From: Dechesne, Nicolas @ 2012-02-10 18:27 UTC (permalink / raw) To: buildroot On Fri, Feb 10, 2012 at 12:58 AM, Arnout Vandecappelle <arnout@mind.be>wrote: > It doesn't work well, but unfortunately I don't know how to solve it. > MLO and u-boot.img are only created for the omap configs, and only in > u-boot 2011.12 or later. Depending on omap in the Config.in is almost > impossible, and also depending on 2011.12 is difficult because it could > be a custom git instead. > > ouch. thanks for finding this out, as I didn't notice. looking at the SPL code, it seems that SPL will parse the uboot file and try to determine the format. if it does not find the right signature it will assume it's raw, e.g. something a-la u-boot.bin. so we could patch SPL to load u-boot.bin (the name used by SPL is hardcoded). but that means that we have to carry over 1 patch and keep rebasing it... i don't have my board with me, atm. so i will make some tests sometimes later. > I think the only solution is to add a check in the .mk file if MLO and > u-boot.img indeed exist, and fall back to the default instead if not. > indeed, the u-boot.img does not seem to be created unless it's needed (e.g. in OMAP case). so that might work. would you accept such a solution? if so i can update my patches with that? > > What is also missing is that the choice between the different image types > should depend on !BR2_TARGET_UBOOT_SPL. > sorry, i don't get this one. what do you mean? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120210/d92e5cfa/attachment.html> ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] Add support for U-Boot SPL 2012-02-10 18:27 ` Dechesne, Nicolas @ 2012-02-10 21:37 ` Arnout Vandecappelle 2012-02-15 21:56 ` Dechesne, Nicolas 0 siblings, 1 reply; 8+ messages in thread From: Arnout Vandecappelle @ 2012-02-10 21:37 UTC (permalink / raw) To: buildroot On Friday 10 February 2012 19:27:52 Dechesne, Nicolas wrote: > On Fri, Feb 10, 2012 at 12:58 AM, Arnout Vandecappelle <arnout@mind.be> wrote: > > > It doesn't work well, but unfortunately I don't know how to solve it. > > MLO and u-boot.img are only created for the omap configs, and only in > > u-boot 2011.12 or later. Depending on omap in the Config.in is almost > > impossible, and also depending on 2011.12 is difficult because it could > > be a custom git instead. > > > ouch. thanks for finding this out, as I didn't notice. > > looking at the SPL code, it seems that SPL will parse the uboot file and > try to determine the format. if it does not find the right signature it > will assume it's raw, e.g. something a-la u-boot.bin. > so we could patch SPL to load u-boot.bin (the name used by SPL is > hardcoded). but that means that we have to carry over 1 patch and keep > rebasing it... That doesn't sound like a very good idea, indeed. > > I think the only solution is to add a check in the .mk file if MLO and > > u-boot.img indeed exist, and fall back to the default instead if not. > > > > indeed, the u-boot.img does not seem to be created unless it's needed (e.g. > in OMAP case). so that might work. > > would you accept such a solution? if so i can update my patches with that? I don't see why we would not accept that solution. However, I just saw that my remark applies to all other possible targets as well. It looks like the u-boot build produces just one of the possible images (kwb, ldr, bin, -nand.bin) so the user is responsible for choosing the right one in the config. So I guess you can disregard my original remark. Although actually, I'd prefer if the BR2_TARGET_UBOOT_FORMAT_* options would just go away. The install commands can copy all of them, as far as they exist. But you don't have to worry about that, Nicolas. > > What is also missing is that the choice between the different image types > > should depend on !BR2_TARGET_UBOOT_SPL. > > sorry, i don't get this one. what do you mean? There is a prompt 'U-Boot binary format' that selects which u-boot.* to install. If you select SPL, the binary format must be .img. So you should make sure that the Config.in enforces that. Come to think of it, you can simply make the SPL one of the binary formats. It's not exactly the same, of course, because MLO is a separate file. But it serves the same purpose: select the binary format appropriate for the target. So, move the BR2_TARGET_UBOOT_SPL config up 60 lines so it becomes part of the binary format choice. 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/20120210/40810971/attachment.html> ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] Add support for U-Boot SPL 2012-02-10 21:37 ` Arnout Vandecappelle @ 2012-02-15 21:56 ` Dechesne, Nicolas 0 siblings, 0 replies; 8+ messages in thread From: Dechesne, Nicolas @ 2012-02-15 21:56 UTC (permalink / raw) To: buildroot On Fri, Feb 10, 2012 at 10:37 PM, Arnout Vandecappelle <arnout@mind.be>wrote: > > > I think the only solution is to add a check in the .mk file if MLO and > > > > u-boot.img indeed exist, and fall back to the default instead if not. > > > > > > > > > > indeed, the u-boot.img does not seem to be created unless it's needed > (e.g. > > > in OMAP case). so that might work. > > > > > > would you accept such a solution? if so i can update my patches with > that? > > > I don't see why we would not accept that solution. > > > However, I just saw that my remark applies to all other possible targets > as > > well. It looks like the u-boot build produces just one of the possible > images > > (kwb, ldr, bin, -nand.bin) so the user is responsible for choosing the > right > > one in the config. So I guess you can disregard my original remark. > Although > > actually, I'd prefer if the BR2_TARGET_UBOOT_FORMAT_* options would just go > > away. The install commands can copy all of them, as far as they exist. But > > you don't have to worry about that, Nicolas. > in fact I didn't realize the usage of BR2_TARGET_UBOOT_FORMAT_* until your message. so i have prepared a new patch set like this: 03675f3 configs: add support for PandaBoard and PandaBoard ES 8872284 uboot: add a new binary format for u-boot.img f2157f3 uboot: Add support for U-Boot SPL basically first I add u-boot SPL support which ensure xloader is not used, and copy MLO from uboot. then I create a new UBOOT_FORMAT_IMG set to u-boot.img, which can be set for the relevant targets. then in the panda config I set the proper configs. i will resent the serie shortly > > > What is also missing is that the choice between the different image > types > > > > should depend on !BR2_TARGET_UBOOT_SPL. > > > > > > sorry, i don't get this one. what do you mean? > > > There is a prompt 'U-Boot binary format' that selects which u-boot.* to > > install. If you select SPL, the binary format must be .img. So you should > > make sure that the Config.in enforces that. > > > Come to think of it, you can simply make the SPL one of the binary > > formats. It's not exactly the same, of course, because MLO is a separate > > file. But it serves the same purpose: select the binary format appropriate > > for the target. So, move the BR2_TARGET_UBOOT_SPL config up 60 lines > > so it becomes part of the binary format choice. > well, SPL is not really the format. SPL is where we load the uboot file, it fact it would work with BIN format or IMG format. it's just that the name is 'hardcoded' there. if we rename uboot.img uboot.bin, then it works... when reading the file SPL will first try to detect if it's a IMG format (looking for MAGIC number), if not it would assume a BIN format... so really I think that adding another FORMAT is the right solution, and that would allow other platforms to use SPL with uboot.bin if that's what they need/want. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120215/a22b0ff0/attachment.html> ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] Initial support for PandaBoard and PandaBoard ES 2012-02-05 0:35 [Buildroot] [PATCH 0/2] Initial support for Panda and PandaES Nicolas Dechesne 2012-02-05 0:35 ` [Buildroot] [PATCH 1/2] Add support for U-Boot SPL Nicolas Dechesne @ 2012-02-05 0:35 ` Nicolas Dechesne 1 sibling, 0 replies; 8+ messages in thread From: Nicolas Dechesne @ 2012-02-05 0:35 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. Signed-off-by: Nicolas Dechesne <n-dechesne@ti.com> --- configs/pandaboard_defconfig | 24 ++++++++++++++++++++++++ 1 files changed, 24 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..64000f2 --- /dev/null +++ b/configs/pandaboard_defconfig @@ -0,0 +1,24 @@ +# 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_BOARDNAME="omap4_panda" +BR2_TARGET_UBOOT_SPL=y -- 1.7.8.3 ^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-02-15 21:56 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-02-05 0:35 [Buildroot] [PATCH 0/2] Initial support for Panda and PandaES Nicolas Dechesne 2012-02-05 0:35 ` [Buildroot] [PATCH 1/2] Add support for U-Boot SPL Nicolas Dechesne 2012-02-06 10:59 ` Thomas De Schampheleire 2012-02-09 23:58 ` Arnout Vandecappelle 2012-02-10 18:27 ` Dechesne, Nicolas 2012-02-10 21:37 ` Arnout Vandecappelle 2012-02-15 21:56 ` Dechesne, Nicolas 2012-02-05 0:35 ` [Buildroot] [PATCH 2/2] Initial support for PandaBoard and PandaBoard ES Nicolas Dechesne
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox