at91bootstrap3: new package
PATCH 1/1 at91bootstrap3: new package
From: Simon Dawson <[email protected]>
--- boot/Config.in | 1 + boot/at91bootstrap3/Config.in | 52 ++ .../at91bootstrap3-u-boot-relocation-fix.patch | 746 ++++++++++++++++++++ boot/at91bootstrap3/at91bootstrap3.mk | 67 ++ 4 files changed, 866 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
@@ -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 +52 -0
52 lines not on this page · raw message
boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch new file +746 -0
746 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
PATCH 1/1 at91bootstrap3: new package
Le Fri, 27 Jul 2012 12:45:06 +0100,
spdawson at gmail.com a ?crit :
boot/at91bootstrap3/at91bootstrap3.mk line 42
Quoted 11 lines
boot/at91bootstrap3/at91bootstrap3.mk new file +11
-0+ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y) +AT91BOOTSTRAP3_SOURCE_CONFIG = \ + $(@D)/board/*/$(AT91BOOTSTRAP3_DEFCONFIG)_defconfig +else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y) +AT91BOOTSTRAP3_SOURCE_CONFIG = $(AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE) +endif + +define AT91BOOTSTRAP3_CONFIGURE_CMDS + cp $(AT91BOOTSTRAP3_SOURCE_CONFIG) $(@D)/.config + $(SED) 's/image.bin/uImage/' $(@D)/.config +endef
Are you this actually works? If the defconfig are minimal defconfigs generated by "make savedefconfig", then just copying them to .config and running make will ask the user the value of all options that are not defined in the .config file.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 at91bootstrap3: new package
Quoted 19 lines · Thomas Petazzoni
Le Fri, 27 Jul 2012 12:45:06 +0100,
spdawson at gmail.com a ?crit :boot/at91bootstrap3/at91bootstrap3.mk line 42
Quoted 11 lines
boot/at91bootstrap3/at91bootstrap3.mk new file +11
-0+ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y) +AT91BOOTSTRAP3_SOURCE_CONFIG = \ + $(@D)/board/*/$(AT91BOOTSTRAP3_DEFCONFIG)_defconfig +else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y) +AT91BOOTSTRAP3_SOURCE_CONFIG = $(AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE) +endif + +define AT91BOOTSTRAP3_CONFIGURE_CMDS + cp $(AT91BOOTSTRAP3_SOURCE_CONFIG) $(@D)/.config + $(SED) 's/image.bin/uImage/' $(@D)/.config +endefAre you this actually works? If the defconfig are minimal defconfigs generated by "make savedefconfig", then just copying them to .config and running make will ask the user the value of all options that are not defined in the .config file.
It does work, yes. (At least in the handful of cases that I've tested.) Looking at the files, however, I don't think they really are defconfigs proper: they appear to be full-blown configuration files.
Simon.
PATCH 1/1 at91bootstrap3: new package
Le Fri, 27 Jul 2012 13:09:27 +0100,
Simon Dawson <[email protected]> a ?crit :
Quoted 8 lines
Quoted 4 lines
Are you this actually works? If the defconfig are minimal defconfigs generated by "make savedefconfig", then just copying them to .config and running make will ask the user the value of all options that are not defined in the .config file.
It does work, yes. (At least in the handful of cases that I've tested.) Looking at the files, however, I don't think they really are defconfigs proper: they appear to be full-blown configuration files.
Does the kconfig in at91bootstrap3 supports savedefconfig? If it does, then I would prefer it we supported minimal defconfigs.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 at91bootstrap3: new package
Hi Thomas.
Quoted 2 lines · Thomas Petazzoni
Does the kconfig in at91bootstrap3 supports savedefconfig? If it does, then I would prefer it we supported minimal defconfigs.
No, it doesn't support savedefconfig --- at least there is no savedefconfig make target.
Given that the "defconfigs" are, seemingly, really "configs", do you think I need to rename things to avoid confusion?
Simon.
PATCH 1/1 at91bootstrap3: new package
In reply to spdawson at gmail.comQuoted 3 lines · spdawson at gmail.com
From: Simon Dawson<[email protected]>
Signed-off-by Simon Dawson<[email protected]>
[This time I did a build test, with an all-features-enabled
busybox toolchain. First defconfig I tried failed, but at91sam9g45sd succeeded; the failure is an issue with the at91bootstrap build system.]
I have some small, optional comments below, but nothing to stop
inclusion as it is.
First comment: in the commit message you could mention why
this is a new package rather than a bump of at91bootstrap (perhaps quoting Thomas).
[snip]
boot/at91bootstrap3/Config.in line 44
Quoted 7 lines
boot/at91bootstrap3/Config.in new file +7
-0+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 in + board/<board> in the at91bootstrap3 tree.
It's actually in board/<processor>/<board>_defconfig, no?
Quoted 14 lines
boot/at91bootstrap3/Config.in new file +8
-0+ +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_AT91BOOTSTRAP3boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch new file +0
-0
boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch line 4
Quoted 4 lines
boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch new file +4
-0@@ -0,0 +1,746 @@ +Every AT91SAM plaforms were broken between 2010.12 and 2011.03 because +of the relocation changes. + +We have to get JUMP_ADDR consistant with what is used by u-boot
While your at it: spelling correction consistant -> consistent.
Quoted 7 lines
boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch new file +7
-0+(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.
boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch line 21
Quoted 10 lines
boot/at91bootstrap3/at91bootstrap3-u-boot-relocation-fix.patch new file +10
-0+ +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
Just for clarity, I'd put a --- and/or some whitespace between the S-o-b
and the diff.
[snip]
Quoted 13 lines
boot/at91bootstrap3/at91bootstrap3.mk new file +7
-0@@ -0,0 +1,67 @@ +############################################################# +# +# at91bootstrap3 +# +############################################################# +AT91BOOTSTRAP3_VERSION = 3.2 +AT91BOOTSTRAP3_SITE = \
boot/at91bootstrap3/at91bootstrap3.mk line 17
Quoted 10 lines
boot/at91bootstrap3/at91bootstrap3.mk new file +10
-0+ ftp://www.at91.com/pub/at91bootstrap/AT91Bootstrap$(AT91BOOTSTRAP3_VERSION) +AT91BOOTSTRAP3_SOURCE = at91bootstrap_9n12.tar.gz + +AT91BOOTSTRAP3_INSTALL_IMAGES = YES +AT91BOOTSTRAP3_INSTALL_TARGET = NO + +AT91BOOTSTRAP3_DEFCONFIG = \ + $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG)) +AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE = \ + $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE))
AFAICS these are used only once so defining a variable is unnecessary.
boot/at91bootstrap3/at91bootstrap3.mk line 27
Quoted 10 lines
boot/at91bootstrap3/at91bootstrap3.mk new file +10
-0+AT91BOOTSTRAP3_CUSTOM_PATCH_DIR = \ + $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR)) + +AT91BOOTSTRAP3_MAKE_OPT = CROSS_COMPILE=$(TARGET_CROSS) DESTDIR=$(BINARIES_DIR) + +ifneq ($(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR),) +define AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES + support/scripts/apply-patches.sh $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \ + at91bootstrap3-\*.patch +endef
I smell a refactoring opportunity here, because this pattern is used in
a few bootloaders and in the kernel...
Quoted 4 lines
boot/at91bootstrap3/at91bootstrap3.mk new file +4
-0+ +AT91BOOTSTRAP3_POST_PATCH_HOOKS += AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES +endif +
boot/at91bootstrap3/at91bootstrap3.mk line 41
Quoted 10 lines
boot/at91bootstrap3/at91bootstrap3.mk new file +10
-0+ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y) +AT91BOOTSTRAP3_SOURCE_CONFIG = \ + $(@D)/board/*/$(AT91BOOTSTRAP3_DEFCONFIG)_defconfig +else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y) +AT91BOOTSTRAP3_SOURCE_CONFIG = $(AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE) +endif + +define AT91BOOTSTRAP3_CONFIGURE_CMDS + cp $(AT91BOOTSTRAP3_SOURCE_CONFIG) $(@D)/.config + $(SED) 's/image.bin/uImage/' $(@D)/.config
I'd say it's safer to run a 'make silentoldconfig' afterwards to clean up
the config file, but they don't even have that target defined...
Regards,
Arnout
Quoted 1 line
boot/at91bootstrap3/at91bootstrap3.mk new file +1
-0+endef
[snip]
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
PATCH 1/1 at91bootstrap3: new package
Hi Arnout. Thanks for the detailed comments.
Quoted 3 lines · Arnout Vandecappelle
First comment: in the commit message you could mention why
this is a new package rather than a bump of at91bootstrap (perhaps quoting Thomas).
Okay. Will do so.
Quoted 1 line
It's actually in board/<processor>/<board>_defconfig, no?
Yes, quite right.
Quoted 4 lines
Quoted 1 line
+We have to get
JUMP_ADDRconsistant with what is used by u-bootWhile your at it: spelling correction consistant -> consistent.
Okay.
Quoted 2 lines
Just for clarity, I'd put a --- and/or some whitespace between the S-o-b
and the diff.
Okay.
Quoted 7 lines
boot/at91bootstrap3/at91bootstrap3.mk line 17
Quoted 4 lines
boot/at91bootstrap3/at91bootstrap3.mk new file +4
-0+AT91BOOTSTRAP3_DEFCONFIG = \ + $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG)) +AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE = \ + $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE))AFAICS these are used only once so defining a variable is unnecessary.
In fact, these variables are all used more than once in the makefile. I've no objection to not using the variables though, if you think it makes things cleaner.
Quoted 2 lines
I smell a refactoring opportunity here, because this pattern is used in
a few bootloaders and in the kernel...
Yes, agreed. A job for another day.
Simon.