Skip to contentSkip to conversation

at91bootstrap3: new package

PATCH Superseded spdawson at gmail.com 3 participants 8 messages Aug 17, 2012 – Aug 20, 2012 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 at91bootstrap3: new package

From: Simon Dawson <[email protected]>

Note that this new package, at91bootstrap3, is being added alongside the existing at91bootstrap. This was suggested by Thomas Petazzoni, whose comments on the mailing list are quoted below.

For this package, I am not sure we can do a simple version bump. Since there is (was?) no upstream for AT91Bootstrap 1.x, many vendors/companies had to maintain their patches on top of AT91Bootstrap 1.x. See for example board/calao/usb-a9263/at91bootstrap-1.16-usb-a9263.patch. Therefore, removing AT91Bootstrap 1.x from the tree will prevent those platforms to work. I know people should upgrade, but AT91Bootstrap 3.x is quite significantly different, so the porting effort is not that simple.

Therefore, I'm wondering whether we should kee at91bootstrap as it is, and create a separate package at91bootstrap3 for the 3.x generation.

---
v3: Resend.
v2: Improved patch in response to feedback from Arnout Vandecappelle.

 boot/Config.in                                     |    1 +
 boot/at91bootstrap3/Config.in                      |   53 ++
 .../at91bootstrap3-u-boot-relocation-fix.patch     |  747 ++++++++++++++++++++
 boot/at91bootstrap3/at91bootstrap3.mk              |   67 ++
 4 files changed, 868 insertions(+)
 create mode 100644 boot/at91bootstrap3/Config.in
 create mode 100644 boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch
 create mode 100644 boot/at91bootstrap3/at91bootstrap3.mk
boot/Config.in +1 -0
index 5252a49..a55139b 100644
@@ -1,6 +1,7 @@
 menu "Bootloaders"
 
 source "boot/at91bootstrap/Config.in"
+source "boot/at91bootstrap3/Config.in"
 source "boot/at91dataflashboot/Config.in"
 source "boot/barebox/Config.in"
 source "boot/grub/Config.in"
boot/at91bootstrap3/Config.in new file +53 -0

53 lines not on this page · raw message

boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch new file +747 -0

747 lines not on this page · raw message

boot/at91bootstrap3/at91bootstrap3.mk new file +67 -0

67 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v3 1/1 at91bootstrap3: new package

Le Fri, 17 Aug 2012 09:36:23 +0100,
spdawson at gmail.com a ?crit :

Quoted 15 lines

From: Simon Dawson <[email protected]>

Note that this new package, at91bootstrap3, is being added alongside the existing at91bootstrap. This was suggested by Thomas Petazzoni, whose comments on the mailing list are quoted below.

For this package, I am not sure we can do a simple version bump. Since there is (was?) no upstream for AT91Bootstrap 1.x, many vendors/companies had to maintain their patches on top of AT91Bootstrap 1.x. See for example board/calao/usb-a9263/at91bootstrap-1.16-usb-a9263.patch. Therefore, removing AT91Bootstrap 1.x from the tree will prevent those platforms to work. I know people should upgrade, but AT91Bootstrap 3.x is quite significantly different, so the porting effort is not that simple.

Quoted 5 lines

Therefore, I'm wondering whether we should kee at91bootstrap as it is, and create a separate package at91bootstrap3 for the 3.x generation.

Applied to next, thanks.

Later on, we may want to add an at91bootstrap3-menuconfig target, like we have for Barebox/Linux so that users can tune the configuration easily. But that can be done later.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH v3 1/1 at91bootstrap3: new package

Hi Thomas.

Quoted 3 lines · Thomas Petazzoni

Later on, we may want to add an at91bootstrap3-menuconfig target, like we have for Barebox/Linux so that users can tune the configuration easily. But that can be done later.

Yes, that is a good idea; I'll do it when I get a chance.

Simon.

#3 lore raw

PATCH v3 1/1 at91bootstrap3: new package

Le Fri, 17 Aug 2012 17:49:17 +0100,
Simon Dawson <[email protected]> a ?crit :

Quoted 7 lines
Quoted 3 lines · Thomas Petazzoni

Later on, we may want to add an at91bootstrap3-menuconfig target, like we have for Barebox/Linux so that users can tune the configuration easily. But that can be done later.

Yes, that is a good idea; I'll do it when I get a chance.

And will you get a chance to work on the remaining gpsd build problem (see autobuilder results) ? :-)

Thanks! :-)

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

PATCH v3 1/1 at91bootstrap3: new package

Quoted 2 lines · Thomas Petazzoni

And will you get a chance to work on the remaining gpsd build problem (see autobuilder results) ? :-)

Hi Thomas. I have been thinking about this, but I don't really know enough Python to properly understand what the problem is.

From what I've read, it may be that the gps/__init__.py module initialisation file is to blame: if my understanding is correct, then this file ought perhaps *not* to include the following lines.

from gps import *
from misc import *

Indeed, commenting out these lines, gpsd still builds correctly on my machine (with local Python version 2.7).

Beyond this observation, I have made no further progress with fixing the build problem.

Any thoughts or suggestions?

Simon.

#5 lore raw

PATCH v3 1/1 at91bootstrap3: new package

In reply to spdawson at gmail.com
Quoted 148 lines · spdawson at gmail.com

From: Simon Dawson <[email protected]>

Note that this new package, at91bootstrap3, is being added alongside the existing at91bootstrap. This was suggested by Thomas Petazzoni, whose comments on the mailing list are quoted below.

For this package, I am not sure we can do a simple version bump. Since there is (was?) no upstream for AT91Bootstrap 1.x, many vendors/companies had to maintain their patches on top of AT91Bootstrap 1.x. See for example board/calao/usb-a9263/at91bootstrap-1.16-usb-a9263.patch. Therefore, removing AT91Bootstrap 1.x from the tree will prevent those platforms to work. I know people should upgrade, but AT91Bootstrap 3.x is quite significantly different, so the porting effort is not that simple.

Therefore, I'm wondering whether we should kee at91bootstrap as it is, and create a separate package at91bootstrap3 for the 3.x generation.

---
v3: Resend.
v2: Improved patch in response to feedback from Arnout Vandecappelle.

 boot/Config.in                                     |    1 +
 boot/at91bootstrap3/Config.in                      |   53 ++
 .../at91bootstrap3-u-boot-relocation-fix.patch     |  747 ++++++++++++++++++++
 boot/at91bootstrap3/at91bootstrap3.mk              |   67 ++
 4 files changed, 868 insertions(+)
 create mode 100644 boot/at91bootstrap3/Config.in
 create mode 100644 boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch
 create mode 100644 boot/at91bootstrap3/at91bootstrap3.mk
boot/Config.in +1 -0
index 5252a49..a55139b 100644
@@ -1,6 +1,7 @@
 menu "Bootloaders"
 
 source "boot/at91bootstrap/Config.in"
+source "boot/at91bootstrap3/Config.in"
 source "boot/at91dataflashboot/Config.in"
 source "boot/barebox/Config.in"
 source "boot/grub/Config.in"
boot/at91bootstrap3/Config.in new file +53 -0
new file mode 100644
index 0000000..110f808
@@ -0,0 +1,53 @@
+config BR2_TARGET_AT91BOOTSTRAP3
+	depends on BR2_arm926t
+	bool "AT91 Bootstrap 3"
+	help
+	  AT91Bootstrap is a first level bootloader for the Atmel AT91
+	  devices. It integrates algorithms for:
+	  - Device initialization such as clock configuration, PIO settings...
+	  - Peripheral drivers such as PIO, PMC or SDRAMC...
+	  - Physical media algorithm such as DataFlash, NandFlash, NOR Flash...
+
+if BR2_TARGET_AT91BOOTSTRAP3
+
+config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR
+	string "custom patch dir"
+	help
+	  If your board requires custom patches, add the path to the
+	  directory containing the patches here. The patches must be
+	  named at91bootstrap3-<something>.patch.
+
+	  Most users may leave this empty
+
+#
+# Configuration selection
+#
+
+choice
+	prompt "AT91 Bootstrap 3 configuration"
+	default BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG
+
+config BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG
+	bool "Using a defconfig"
+
+config BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG
+	bool "Using a custom config file"
+
+endchoice
+
+config BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG
+	string "Defconfig name"
+	depends on BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG
+	help
+	  Name of the at91bootstrap3 defconfig file to use, without the
+	  trailing _defconfig.  The defconfig is located at
+	  board/<processor>/<board>_defconfig in the at91bootstrap3
+	  tree.
+
+config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE
+	string "Configuration file path"
+	depends on BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG
+	help
+	  Path to the at91bootstrap3 configuration file
+
+endif # BR2_TARGET_AT91BOOTSTRAP3
boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch new file +38 -0
new file mode 100644
index 0000000..62bbd2a
@@ -0,0 +1,747 @@
+Every AT91SAM plaforms were broken between 2010.12 and 2011.03 because
+of the relocation changes.
+
+We have to get JUMP_ADDR consistent with what is used by u-boot
+(CONFIG_SYS_TEXT_BASE).
+
+I also chose to "repartition" the dataflash. u-boot is now living at
+0x4000, letting 16kB for the bootstrap. We also have to increase the
+IMG_SIZE as u-boot as grown larger than the default value.
+As requested on the u-boot ML, we assume that it could be up to 512kB
+big.
+
+It means that now, you have to flash your kernel at 0x0008C000 instead
+of 0x00042000. And so you also have to load it from that address from
+u-boot.
+
+Then, remember that you could decrease IMG_SIZE to boot faster.
+
+Signed-off-by: Alexandre Belloni <[email protected]>
+Signed-off-by: Simon Dawson <[email protected]>
+
+diff -Nurp a/board/afeb9260/afeb9260_defconfig b/board/afeb9260/afeb9260_defconfig
+--- a/board/afeb9260/afeb9260_defconfig	2011-11-18 08:13:09.000000000 +0000
++++ b/board/afeb9260/afeb9260_defconfig	2012-07-25 20:52:17.967694276 +0100
+@@ -97,9 +97,9 @@ CONFIG_LOAD_UBOOT=y
+ # CONFIG_LOAD_64KB is not set
+ # CONFIG_LOAD_1MB is not set
+ # CONFIG_LOAD_4MB is not set
+-CONFIG_IMG_ADDRESS="0x00008400"
+-CONFIG_IMG_SIZE="0x00040000"
+-CONFIG_JUMP_ADDR="0x23F00000"
++CONFIG_IMG_ADDRESS="0x00004000"
++CONFIG_IMG_SIZE="0x00080000"
++CONFIG_JUMP_ADDR="0x21F00000"
+ CONFIG_APP_CHECK=y
+ # CONFIG_LONG_TEST is not set
+ # CONFIG_DEBUG is not set
+diff -Nurp a/board/at91cap9adk/at91cap9adk_defconfig b/board/at91cap9adk/at91cap9adk_defconfig

boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch line 48

Quoted 10 lines
boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch new file +10 -0
+--- a/board/at91cap9adk/at91cap9adk_defconfig	2011-11-18 08:13:09.000000000 +0000
++++ b/board/at91cap9adk/at91cap9adk_defconfig	2012-07-25 20:52:30.603693814 +0100
+@@ -96,8 +96,8 @@ CONFIG_LOAD_UBOOT=y
+ # CONFIG_LOAD_64KB is not set
+ # CONFIG_LOAD_1MB is not set
+ # CONFIG_LOAD_4MB is not set
+-CONFIG_IMG_ADDRESS="0x00008400"
+-CONFIG_IMG_SIZE="0x00040000"
++CONFIG_IMG_ADDRESS="0x00004000"
++CONFIG_IMG_SIZE="0x00080000"

Nack on this barebox does need this and boot slower You must put this as an option

Best Regards,
J.

#6 lore raw

PATCH v3 1/1 at91bootstrap3: new package

Hi Jean-Christophe; thanks for the feedback.

Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD

Nack on this barebox does need this and boot slower You must put this as an option

Best Regards,
J.

I'm sorry, but I don't understand your comment(s). Could you please clarify?

Thanks,

Simon.

#7 lore raw

PATCH v3 1/1 at91bootstrap3: new package

Quoted 11 lines · Simon Dawson

Hi Jean-Christophe; thanks for the feedback.

Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD

Nack on this barebox does need this and boot slower You must put this as an option

Best Regards,
J.

I'm sorry, but I don't understand your comment(s). Could you please clarify?

this path you apply slow down the boot => Nack

U-Boot is not the only bootlaoder on at91 other does not need it as barebox

so you can not apply it if we do not need it

Best Regards,
J.