Pull request for branch for-2011.08/bootloaders
Hello,
We have a package infrastructure that allows to share a lot of common behaviour between packages, and allows to add new features easily to all existing packages (Git/Mercurial download support, or usage of an external source tree, etc.).
Unfortunately, some of the packages that would most benefit from those new infrastructure features are the bootloader and kernel, since it's typically the software components that have to be modified/tuned during the course of an embedded Linux project.
Therefore, this series converts all bootloaders makefiles and the kernel makefile to the package infrastructure, and adds the possibility of fetching the kernel and u-boot through Git (it can be added to other bootloaders with just a few lines of changes, mostly at the Config.in level).
It also does various other things :
* Integrate Allan Nielsen patch that allows package to override the default extract command. Allan wrote it for the ATI fglrx drivers, but this is also required by this patchset for the AT91Bootstrap bootloader, which is provided as a .zip file.
* Allow the kernel to be installed in /boot in the root filesystem. This is mostly useful for x86 and x86_64 systems, where it is traditional to have the kernel inside the root filesystem.
* Modify the way the kernel is configured, to always use a defconfig mechanism. This allows to make a silent oldconfig after linux.mk has tuned the kernel configuration according to various Buildroot configuration options (see the commit log for details).
* Modify the package infrastructure to provide a <pkg>_INSTALL_IMAGE knob in addition to <pkg>_INSTALL_STAGING and <pkg>_INSTALL_TARGET.
* Fix the patching procedure for host packages. It was incorrect, because it required the target package to exist even if only the host package was actually useful.
* Adds support for post-download hooks at the package infrastructure level. This is needed for the kernel, as the kernel requires to download a custom list of patches.
* Integrate Philippe Reynes patch that adds support for the x-loader first stage bootloader (for OMAP-based platforms).
The changes have already been tested sucessfully by Luca Ceresoli. Thanks to him for testing this patch set and for the feedback provided, as well as the bug fixes. Many, many thanks!
Changes since the last posting (May, 30th) :
- Made the option that allows to have the kernel installed in /boot available to all architectures, not only x86 and x86_64
- Fixed the package infrastructure modifications so that packages in subdirectories (such as package/multimedia/) continue to work properly.
- Add the x-loader bootloader, contributed by Philippe Reynes
- Bump Barebox version
Regards,
Thomas
The following changes since commit c80224a3a05e41af5a32e1c663fd3853f313382b:
toolchain/gcc: bump 4.6.x version to 4.6.1 (2011-06-28 15:19:13 +0200)
are available in the git repository at:
http://free-electrons.com/~thomas/buildroot.git for-2011.08/bootloaders
Allan W. Nielsen (1):
Makefile.package.in: Makes it possible to override the default extract commands
Philippe Reynes (1):
Add x-loader bootloader
Thomas Petazzoni (26):
Fix quoting in default extract command
linux: make it possible to install the kernel in /boot
linux: use the defconfig mechanism after tuning the config
package: add infrastructure to install things in images/
package: fix patching procedure for host packages
barebox: use = instead of := and re-indent
barebox: convert to GENTARGETS
at91bootstrap: use = instead of := and indent properly
at91bootstrap: convert to GENTARGETS
at91dataflashboot: use = instead of := and indent
at91dataflashboot: convert to GENTARGETS
syslinux: convert to GENTARGETS
grub: convert to AUTOTARGETS
grub2: remove package
u-boot: convert to GENTARGETS
uboot-mkimage: new package
linux: rename LINUX26 to LINUX
linux: indent and align some definitions
package: add support for post-download hooks
linux: convert to the GENTARGETS infrastructure
boot: rename BR2_TARGET_* to BR2_BOOT_*
u-boot: rename options BR2_BOOT_UBOOT* to BR2_BOOT_U_BOOT* Improve TARGETS handling for bootloaders and kernel
linux: allow specification of a custom Git repository as a source
u-boot: allow specification of custom Git repo as source
barebox: bump version
boot/Config.in | 2 +- boot/at91bootstrap/Config.in | 18 +- boot/at91bootstrap/at91bootstrap.mk | 69 ++---- boot/at91dataflashboot/Config.in | 24 +-- boot/at91dataflashboot/at91dataflashboot.mk | 49 +--- boot/barebox/Config.in | 8 +- boot/barebox/barebox.mk | 74 +++---- boot/grub/Config.in | 94 ++++---- boot/grub/grub.500-build-fix.patch | 14 ++ boot/grub/grub.mk | 157 +++++-------- boot/grub2/Config.in | 9 - boot/grub2/grub2.mk | 93 -------- boot/syslinux/Config.in | 16 +- boot/syslinux/syslinux.mk | 59 ++---- boot/u-boot/Config.in | 89 ++++---- boot/u-boot/u-boot.mk | 234 +++++++------------- boot/x-loader/Config.in | 15 ++ boot/x-loader/x-loader.mk | 35 +++ linux/Config.in | 22 ++ linux/linux.mk | 210 +++++++++--------- package/Makefile.package.in | 72 +++++-- .../uboot-mkimage-2011.03-drop-configh.patch | 0 package/uboot-mkimage/uboot-mkimage.mk | 16 ++ 23 files changed, 611 insertions(+), 768 deletions(-) create mode 100644 boot/grub/grub.500-build-fix.patch delete mode 100644 boot/grub2/Config.in delete mode 100644 boot/grub2/grub2.mk create mode 100644 boot/x-loader/Config.in create mode 100644 boot/x-loader/x-loader.mk rename boot/u-boot/u-boot-2011.03-drop-configh.patch => package/uboot-mkimage/uboot-mkimage-2011.03-drop-configh.patch (100%) create mode 100644 package/uboot-mkimage/uboot-mkimage.mk
Thanks,
Signature · 1 line
Thomas Petazzoni
PATCH 1/28 Makefile.package.in: Makes it possible to override the default extract commands
From: Allan W. Nielsen <[email protected]>
When using GENTARGETS (or macroes depending on it), there is no way of specifying a custom extraction procedure. When using the patch one can simply define $(PACKAGE_NAME)_EXTRACT_CMDS which will override the default. If non is defined it will fall back to the default extract procedure.
An example could look like this:
--- package/Makefile.package.in | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
package/Makefile.package.in +5 -2
@@ -243,8 +243,7 @@ endif $(BUILD_DIR)/%/.stamp_extracted: @$(call MESSAGE,"Extracting") $(Q)mkdir -p $(@D) - $(Q)$(if $($(PKG)_SOURCE),$(INFLATE$(suffix $($(PKG)_SOURCE))) $(DL_DIR)/$($(PKG)_SOURCE) | \ - $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -) + $($(PKG)_EXTRACT_CMDS) # some packages have messed up permissions inside $(Q)chmod -R ug+rw $(@D) $(foreach hook,$($(PKG)_POST_EXTRACT_HOOKS),$(call $(hook))$(sep))
@@ -425,6 +424,10 @@ $(2)_TARGET_UNINSTALL = $$($(2)_DIR)/.stamp_uninstalled $(2)_TARGET_CLEAN = $$($(2)_DIR)/.stamp_cleaned $(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned +# default extract command +$(2)_EXTRACT_CMDS ?= $(if $($(2)_SOURCE),$(INFLATE$(suffix $($(2)_SOURCE))) $(DL_DIR)/$($(2)_SOURCE) | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $(TAR_OPTIONS) -) + # post-steps hooks $(2)_POST_EXTRACT_HOOKS ?= $(2)_POST_PATCH_HOOKS ?=
Signature · 1 line
1.7.4.1
PATCH 1/28 Makefile.package.in: Makes it possible to override the default extract commands
Thomas, All,
Quoted 1 line · On Monday 04 July 2011 23:33:18 Thomas Petazzoni wrote:
From: Allan W. Nielsen <[email protected]>
Maybe add Allan to the CC: list?
Quoted 10 lines
When using GENTARGETS (or macroes depending on it), there is no way of specifying a custom extraction procedure. When using the patch one can simply define $(PACKAGE_NAME)_EXTRACT_CMDS which will override the default. If non is defined it will fall back to the default extract procedure.
An example could look like this:
--- package/Makefile.package.in | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
[--SNIP--]
It seems the xample got lost in the mail. I can't check the repo, it's 403.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/28 Makefile.package.in: Makes it possible to override the default extract commands
Le Mon, 4 Jul 2011 23:45:17 +0200,
"Yann E. MORIN" <[email protected]> a ?crit :
Quoted 4 lines · On Monday 04 July 2011 23:33:18 Thomas Petazzoni wrote:
Quoted 1 line
From: Allan W. Nielsen <[email protected]>
Maybe add Allan to the CC: list?
Fixed.
Quoted 6 lines
Quoted 6 lines
When using GENTARGETS (or macroes depending on it), there is no way of specifying a custom extraction procedure. When using the patch one can simply define $(PACKAGE_NAME)_EXTRACT_CMDS which will override the default. If non is defined it will fall back to the default extract procedure.
Quoted 7 lines
Quoted 4 lines
An example could look like this:
--- package/Makefile.package.in | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)[--SNIP--]
It seems the xample got lost in the mail. I can't check the repo, it's 403.
Fixed!
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
PATCH 2/28 Fix quoting in default extract command
In reply to Thomas Petazzoni--- package/Makefile.package.in | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
package/Makefile.package.in +2 -1
@@ -425,7 +425,8 @@ $(2)_TARGET_CLEAN = $$($(2)_DIR)/.stamp_cleaned $(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned # default extract command -$(2)_EXTRACT_CMDS ?= $(if $($(2)_SOURCE),$(INFLATE$(suffix $($(2)_SOURCE))) $(DL_DIR)/$($(2)_SOURCE) | \ +$(2)_EXTRACT_CMDS ?= \ + $$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $(DL_DIR)/$$($(2)_SOURCE) | \ $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $(TAR_OPTIONS) -) # post-steps hooks
Signature · 1 line
1.7.4.1
PATCH 2/28 Fix quoting in default extract command
Thomas, All,
Quoted 1 line · On Monday 04 July 2011 23:33:19 Thomas Petazzoni wrote:
Signed-off-by Thomas Petazzoni <[email protected]>
Quoted 19 lines
--- package/Makefile.package.in | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)package/Makefile.package.in +2
-1@@ -425,7 +425,8 @@ $(2)_TARGET_CLEAN = $$($(2)_DIR)/.stamp_cleaned $(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned # default extract command -$(2)_EXTRACT_CMDS ?= $(if $($(2)_SOURCE),$(INFLATE$(suffix $($(2)_SOURCE))) $(DL_DIR)/$($(2)_SOURCE) | \ +$(2)_EXTRACT_CMDS ?= \ + $$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $(DL_DIR)/$$($(2)_SOURCE) | \ $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $(TAR_OPTIONS) -) # post-steps hooks
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 3/28 linux: make it possible to install the kernel in /boot
In reply to Thomas Petazzoni--- linux/Config.in | 7 +++++++ linux/linux.mk | 3 +++ 2 files changed, 10 insertions(+), 0 deletions(-)
linux/Config.in +7 -0
@@ -153,6 +153,13 @@ config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME Specify the kernel make target to build the kernel that you need. +config BR2_LINUX_KERNEL_INSTALL_TARGET + bool "Install kernel image to /boot in target" + help + Select this option to have the kernel image installed to + /boot in the target root filesystem, as is typically done on + x86/x86_64 systems. + endif # BR2_LINUX_KERNEL endmenu
linux/linux.mk +3 -0
@@ -158,6 +158,9 @@ $(LINUX26_DIR)/.stamp_compiled: $(LINUX26_DIR)/.stamp_configured $(LINUX26_DIR)/ $(LINUX26_DIR)/.stamp_installed: $(LINUX26_DIR)/.stamp_compiled @$(call MESSAGE,"Installing kernel") cp $(LINUX26_IMAGE_PATH) $(BINARIES_DIR) +ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y) + install -m 0644 -D $(LINUX26_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX26_IMAGE_NAME) +endif # Install modules and remove symbolic links pointing to build # directories, not relevant on the target @if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX26_DIR)/.config) != 0 ] ; then \
Signature · 1 line
1.7.4.1
PATCH 3/28 linux: make it possible to install the kernel in /boot
Thomas, All,
Quoted 29 lines · On Monday 04 July 2011 23:33:20 Thomas Petazzoni wrote:
Signed-off-by Thomas Petazzoni <[email protected]>--- linux/Config.in | 7 +++++++ linux/linux.mk | 3 +++ 2 files changed, 10 insertions(+), 0 deletions(-)linux/Config.in +7
-0@@ -153,6 +153,13 @@ config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME Specify the kernel make target to build the kernel that you need. +config BR2_LINUX_KERNEL_INSTALL_TARGET + bool "Install kernel image to /boot in target" + help + Select this option to have the kernel image installed to + /boot in the target root filesystem, as is typically done on + x86/x86_64 systems. + endif # BR2_LINUX_KERNEL endmenulinux/linux.mk +0
-0
linux/linux.mk $(LINUX26_DIR)/.stamp_compiled: $(LINUX26_DIR)/.stamp_configured $(LINUX26_DIR)/ · line 163
Quoted 6 lines
linux/linux.mk +3
-0@@ -158,6 +158,9 @@ $(LINUX26_DIR)/.stamp_compiled: $(LINUX26_DIR)/.stamp_configured $(LINUX26_DIR)/ $(LINUX26_DIR)/.stamp_installed: $(LINUX26_DIR)/.stamp_compiled @$(call MESSAGE,"Installing kernel") cp $(LINUX26_IMAGE_PATH) $(BINARIES_DIR) +ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y) + install -m 0644 -D $(LINUX26_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX26_IMAGE_NAME) +endif
If we install the kernel in /boot, why do we stil install it in ${BINARIES_DIR} ?
It can only be confusing to have the kernel image in two places.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 3/28 linux: make it possible to install the kernel in /boot
Le Mon, 4 Jul 2011 23:48:43 +0200,
"Yann E. MORIN" <[email protected]> a ?crit :
Quoted 2 lines
If we install the kernel in /boot, why do we stil install it in ${BINARIES_DIR} ?
Good idea, done.
I have also added a depends on !BR2_TARGET_ROOTFS_INITRAMFS on this option, because it wouldn't make sense to install the kernel in the root filesystem and have the root filesystem embedded inside the kernel image as an initramfs.
Cheers,
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 3/28 linux: make it possible to install the kernel in /boot
In reply to Yann E. MORINQuoted 42 lines · Yann E. MORIN
Thomas, All,
Quoted 29 lines · On Monday 04 July 2011 23:33:20 Thomas Petazzoni wrote:
Signed-off-by Thomas Petazzoni<[email protected]>--- linux/Config.in | 7 +++++++ linux/linux.mk | 3 +++ 2 files changed, 10 insertions(+), 0 deletions(-)linux/Config.in +7
-0@@ -153,6 +153,13 @@ config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME Specify the kernel make target to build the kernel that you need. +config BR2_LINUX_KERNEL_INSTALL_TARGET + bool "Install kernel image to /boot in target" + help + Select this option to have the kernel image installed to + /boot in the target root filesystem, as is typically done on + x86/x86_64 systems. + endif # BR2_LINUX_KERNEL endmenulinux/linux.mk +0
-0linux/linux.mk $(LINUX26_DIR)/.stamp_compiled: $(LINUX26_DIR)/.stamp_configured $(LINUX26_DIR)/ · line 163
Quoted 6 lines
linux/linux.mk +3
-0@@ -158,6 +158,9 @@ $(LINUX26_DIR)/.stamp_compiled: $(LINUX26_DIR)/.stamp_configured $(LINUX26_DIR)/ $(LINUX26_DIR)/.stamp_installed: $(LINUX26_DIR)/.stamp_compiled @$(call MESSAGE,"Installing kernel") cp $(LINUX26_IMAGE_PATH) $(BINARIES_DIR) +ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y) + install -m 0644 -D $(LINUX26_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX26_IMAGE_NAME) +endifIf we install the kernel in /boot, why do we stil install it in ${BINARIES_DIR} ?
Quoted 1 line
It can only be confusing to have the kernel image in two places.
Does this really hurt? I found that a handy _feature_ indeed.
Well, sorry for writing after v3 was submitted, but Thomas was so much faster than my review! :)
I need the kernel in the target for some products, but with v2 of Thomas' work I also was sure that I always have an uImage in output/images, ready for network boot via TFTP and other stuff.
Now I'd have to try both places, or script around the config to know where I'll find my uImage.
I'd rather come back to v2, but if you mind a few MB wasted on the development host, an additional option (say, "Copy kernel image to /images dir") would save both needs.
Luca
PATCH 3/28 linux: make it possible to install the kernel in /boot
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Luca" == Luca Ceresoli <[email protected]> writes:
If we install the kernel in /boot, why do we stil install it in ${BINARIES_DIR} ?
It can only be confusing to have the kernel image in two places.
Luca> Does this really hurt? I found that a handy _feature_ indeed.
Luca> Well, sorry for writing after v3 was submitted, but Thomas was so much Luca> faster than my review! :)
Luca> I need the kernel in the target for some products, but with v2 of Luca> Thomas' work I also was sure that I always have an uImage in Luca> output/images, ready for network boot via TFTP and other stuff.
Luca> Now I'd have to try both places, or script around the config to know Luca> where I'll find my uImage.
Ok, I'll make the copy-to-images unconditional when applying v3.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 4/28 linux: use the defconfig mechanism after tuning the config
In reply to Thomas PetazzoniCurrently, the kernel configuration mechanism works as follows for custom configuration files:
* Copy the custom config file to buildroot_defconfig in the kernel tree
* Run "make buildroot_defconfig"
* Remove the buildroot_defconfig
* Tune the .config depending on some Buildroot options (EABI, MDEV, etc.)
* Run oldconfig
And for a defconfig-based configuration:
* Run "make XXX_defconfig"
* Tune the .config depending on some Buildroot options (EABI, MDEV, etc.)
* Run oldconfig
The problem is that the tuning done on the .config file can lead to have new options available for which no value has been set. Therefore, the "oldconfig" at the end of the process will hang the build process, waiting for the user to confirm what should be done.
Instead, we would like the kernel to automatically select the default value for those options.
Therefore, the configuration process when a configuration file is given is now the following one :
* Copy the custom config file to buildroot_defconfig in the kernel tree
* Tune the buildroot_defconfig depending on some Buildroot options (EABI, MDEV, etc.)
* Run "make buildroot_defconfig"
* Remove the buildroot_defconfig
And similarly, for defconfig-based configuration, the process is now the following one:
* Copy the defconfig file to buildroot_defconfig in the kernel tree
* Tune the buildroot_defconfig depending on some Buildroot options (EABI, MDEV, etc.)
* Run "make buildroot_defconfig"
* Remove the buildroot_defconfig
--- linux/linux.mk | 40 ++++++++++++++++++++++++---------------- 1 files changed, 24 insertions(+), 16 deletions(-)
linux/linux.mk +24 -16
@@ -105,21 +105,28 @@ $(LINUX26_DIR)/.stamp_patched: $(LINUX26_DIR)/.stamp_extracted done $(Q)touch $@ +# As we are tweaking the kernel configuration file, we want to run a +# silent oldconfig pass on the configuration file after having done +# our tweaks. The normal 'oldconfig' target prompts the user for new +# values that appeared, which hangs the build. Therefore, what we do +# is that we create a new defconfig file called buildroot_defconfig, +# which we tweak, and then use as the basis for the kernel +# configuration. This temporary defconfig file is removed right after. +KERNEL_DEFCONFIG_NAME = buildroot_defconfig +KERNEL_DEFCONFIG_PATH = $(KERNEL_ARCH_PATH)/configs/$(KERNEL_DEFCONFIG_NAME) # Configuration $(LINUX26_DIR)/.stamp_configured: $(LINUX26_DIR)/.stamp_patched @$(call MESSAGE,"Configuring kernel") ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y) - $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) $(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig + cp $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig $(KERNEL_DEFCONFIG_PATH) else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y) - cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig - $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) buildroot_defconfig - rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig + cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(KERNEL_DEFCONFIG_PATH) endif ifeq ($(BR2_ARM_EABI),y) - $(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH)) else - $(call KCONFIG_DISABLE_OPT,CONFIG_AEABI,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH)) endif ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) # As the kernel gets compiled before root filesystems are
@@ -127,21 +134,22 @@ ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) # replaced later by the real list, and the kernel will be # rebuilt using the linux26-rebuild-with-initramfs target. touch $(BINARIES_DIR)/rootfs.initramfs - $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config) - $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(@D)/.config) - $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config) - $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config) - $(call KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(@D)/.config) - $(call KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(KERNEL_DEFCONFIG_PATH)) endif ifneq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y) - $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config) - $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(KERNEL_DEFCONFIG_PATH)) endif ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y) - $(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(@D)/.config) + $(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(KERNEL_DEFCONFIG_PATH)) endif - $(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) oldconfig + $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) $(KERNEL_DEFCONFIG_NAME) + rm $(KERNEL_DEFCONFIG_PATH) $(Q)touch $@ # Compilation. We make sure the kernel gets rebuilt when the
Signature · 1 line
1.7.4.1
PATCH 4/28 linux: use the defconfig mechanism after tuning the config
Thomas, All,
Quoted 2 lines · On Monday 04 July 2011 23:33:21 Thomas Petazzoni wrote:
Currently, the kernel configuration mechanism works as follows for custom configuration files:
[--SNIP--]
Quoted 2 lines
Therefore, the configuration process when a configuration file is given is now the following one :
[--SNIP--]
Quoted 1 line
Signed-off-by Thomas Petazzoni <[email protected]>
Quoted 77 lines
--- linux/linux.mk | 40 ++++++++++++++++++++++++---------------- 1 files changed, 24 insertions(+), 16 deletions(-)linux/linux.mk +24
-16@@ -105,21 +105,28 @@ $(LINUX26_DIR)/.stamp_patched: $(LINUX26_DIR)/.stamp_extracted done $(Q)touch $@ +# As we are tweaking the kernel configuration file, we want to run a +# silent oldconfig pass on the configuration file after having done +# our tweaks. The normal 'oldconfig' target prompts the user for new +# values that appeared, which hangs the build. Therefore, what we do +# is that we create a new defconfig file called buildroot_defconfig, +# which we tweak, and then use as the basis for the kernel +# configuration. This temporary defconfig file is removed right after. +KERNEL_DEFCONFIG_NAME = buildroot_defconfig +KERNEL_DEFCONFIG_PATH = $(KERNEL_ARCH_PATH)/configs/$(KERNEL_DEFCONFIG_NAME) # Configuration $(LINUX26_DIR)/.stamp_configured: $(LINUX26_DIR)/.stamp_patched @$(call MESSAGE,"Configuring kernel") ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y) - $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) $(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig + cp $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig $(KERNEL_DEFCONFIG_PATH) else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y) - cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig - $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) buildroot_defconfig - rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig + cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(KERNEL_DEFCONFIG_PATH) endif ifeq ($(BR2_ARM_EABI),y) - $(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH)) else - $(call KCONFIG_DISABLE_OPT,CONFIG_AEABI,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH)) endif ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) # As the kernel gets compiled before root filesystems are@@ -127,21 +134,22 @@ ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) # replaced later by the real list, and the kernel will be # rebuilt using the linux26-rebuild-with-initramfs target. touch $(BINARIES_DIR)/rootfs.initramfs - $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config) - $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(@D)/.config) - $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config) - $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config) - $(call KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(@D)/.config) - $(call KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(KERNEL_DEFCONFIG_PATH)) endif ifneq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y) - $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config) - $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(KERNEL_DEFCONFIG_PATH)) endif ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y) - $(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(@D)/.config) + $(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(KERNEL_DEFCONFIG_PATH)) endif - $(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) oldconfig + $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) $(KERNEL_DEFCONFIG_NAME) + rm $(KERNEL_DEFCONFIG_PATH) $(Q)touch $@ # Compilation. We make sure the kernel gets rebuilt when the
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 5/28 package: add infrastructure to install things in images/
In reply to Thomas PetazzoniThis will allow the bootloader makefiles and the kernel makefile to rely on the GENTARGETS infrastructure.
--- package/Makefile.package.in | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletions(-)
package/Makefile.package.in +19 -1
@@ -304,6 +304,13 @@ $(BUILD_DIR)/%/.stamp_staging_installed: $(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep)) $(Q)touch $@ +# Install to images dir +$(BUILD_DIR)/%/.stamp_images_installed: + @$(call MESSAGE,'Installing to images directory') + $($(PKG)_INSTALL_IMAGES_CMDS) + $(foreach hook,$($(PKG)_POST_INSTALL_IMAGES_HOOKS),$(call $(hook))$(sep)) + $(Q)touch $@ + # Install to target dir $(BUILD_DIR)/%/.stamp_target_installed: @$(call MESSAGE,"Installing to target")
@@ -408,12 +415,14 @@ endif $(2)_DEPENDENCIES ?= $(2)_INSTALL_STAGING ?= NO +$(2)_INSTALL_IMAGES ?= NO $(2)_INSTALL_TARGET ?= YES $(2)_DIR_PREFIX = $(if $(4),$(4),$(TOP_SRCDIR)/package) # define sub-target stamps $(2)_TARGET_INSTALL_TARGET = $$($(2)_DIR)/.stamp_target_installed $(2)_TARGET_INSTALL_STAGING = $$($(2)_DIR)/.stamp_staging_installed +$(2)_TARGET_INSTALL_IMAGES = $$($(2)_DIR)/.stamp_images_installed $(2)_TARGET_INSTALL_HOST = $$($(2)_DIR)/.stamp_host_installed $(2)_TARGET_BUILD = $$($(2)_DIR)/.stamp_built $(2)_TARGET_CONFIGURE = $$($(2)_DIR)/.stamp_configured
@@ -438,6 +447,7 @@ $(2)_POST_BUILD_HOOKS ?= $(2)_POST_INSTALL_HOOKS ?= $(2)_POST_INSTALL_STAGING_HOOKS ?= $(2)_POST_INSTALL_TARGET_HOOKS ?= +$(2)_POST_INSTALL_IMAGES_HOOKS ?= # human-friendly targets and target sequencing $(1): $(1)-install
@@ -445,7 +455,7 @@ $(1): $(1)-install ifeq ($$($(2)_TYPE),host) $(1)-install: $(1)-install-host else -$(1)-install: $(1)-install-staging $(1)-install-target +$(1)-install: $(1)-install-staging $(1)-install-target $(1)-install-images endif ifeq ($$($(2)_INSTALL_TARGET),YES)
@@ -462,6 +472,13 @@ else $(1)-install-staging: endif +ifeq ($$($(2)_INSTALL_IMAGES),YES) +$(1)-install-images: $(1)-build \ + $$($(2)_TARGET_INSTALL_IMAGES) +else +$(1)-install-images: +endif + $(1)-install-host: $(1)-build $$($(2)_TARGET_INSTALL_HOST) $(1)-build: $(1)-configure \
@@ -493,6 +510,7 @@ $(1)-dirclean: $$($(2)_TARGET_DIRCLEAN) # uppercase package variable prefix $$($(2)_TARGET_INSTALL_TARGET): PKG=$(2) $$($(2)_TARGET_INSTALL_STAGING): PKG=$(2) +$$($(2)_TARGET_INSTALL_IMAGES): PKG=$(2) $$($(2)_TARGET_INSTALL_HOST): PKG=$(2) $$($(2)_TARGET_BUILD): PKG=$(2) $$($(2)_TARGET_CONFIGURE): PKG=$(2)
Signature · 1 line
1.7.4.1
PATCH 6/28 package: fix patching procedure for host packages
In reply to Thomas PetazzoniThe patching procedure was using $($(NOHOSTPKG)_NAME) to find the name of the package without the host- prefix for host packages, which is needed to find the package directory and the prefix of the patches.
However, this $($(NOHOSTPKG)_NAME) variable is empty when there is only an host variant for the package and no target variant for it.
Therefore, instead of using this $($(NOHOSTPKG)_NAME) variable, we now use a new $(RAWNAME) variable, which is always the name of the package without the host- prefix, even for host packages.
--- package/Makefile.package.in | 26 ++++++++++++-------------- 1 files changed, 12 insertions(+), 14 deletions(-)
package/Makefile.package.in +12 -14
@@ -251,23 +251,21 @@ $(BUILD_DIR)/%/.stamp_extracted: # Patch # -# The NOHOSTPKG variable is the uppercased package name, without the -# HOST_ prefix, even for host packages. This allows to find the -# patches in the package directory, because $($(NOHOSTPKG)_NAME) -# expands to the package directory name. -# -$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $($(NOHOSTPKG)_NAME)-$($(PKG)_VERSION) +# The RAWNAME variable is the lowercased package name, which allows to +# find the package directory (typically package/<pkgname>) and the +# prefix of the patches +$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION) $(BUILD_DIR)/%/.stamp_patched: - @$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$($(PKG)_NAME)") + @$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)") $(if $($(PKG)_PATCH),toolchain/patch-kernel.sh $(@D) $(DL_DIR) $($(PKG)_PATCH)) $(Q)( \ - if test -d $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME); then \ - if test "$(wildcard $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER)*.patch*)"; then \ - toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \ + if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME); then \ + if test "$(wildcard $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER)*.patch*)"; then \ + toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \ else \ - toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME) $($(NOHOSTPKG)_NAME)\*.patch $($(NOHOSTPKG)_NAME)\*.patch.$(ARCH) || exit 1; \ - if test -d $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER); then \ - toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$($(NOHOSTPKG)_NAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \ + toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(RAWNAME)\*.patch $(RAWNAME)\*.patch.$(ARCH) || exit 1; \ + if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER); then \ + toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \ fi; \ fi; \ fi; \
@@ -515,7 +513,7 @@ $$($(2)_TARGET_INSTALL_HOST): PKG=$(2) $$($(2)_TARGET_BUILD): PKG=$(2) $$($(2)_TARGET_CONFIGURE): PKG=$(2) $$($(2)_TARGET_PATCH): PKG=$(2) -$$($(2)_TARGET_PATCH): NOHOSTPKG=$(3) +$$($(2)_TARGET_PATCH): RAWNAME=$(subst host-,,$(1)) $$($(2)_TARGET_EXTRACT): PKG=$(2) $$($(2)_TARGET_SOURCE): PKG=$(2) $$($(2)_TARGET_UNINSTALL): PKG=$(2)
Signature · 1 line
1.7.4.1
PATCH 6/28 package: fix patching procedure for host packages
Thomas, All,
Quoted 10 lines · On Monday 04 July 2011 23:33:23 Thomas Petazzoni wrote:
The patching procedure was using $($(NOHOSTPKG)_NAME) to find the name of the package without the host- prefix for host packages, which is needed to find the package directory and the prefix of the patches.
However, this $($(NOHOSTPKG)_NAME) variable is empty when there is only an host variant for the package and no target variant for it.
Therefore, instead of using this $($(NOHOSTPKG)_NAME) variable, we now use a new $(RAWNAME) variable, which is always the name of the package without the host- prefix, even for host packages.
[--SNIP--]
package/Makefile.package.in $$($(2)_TARGET_INSTALL_HOST): PKG=$(2) · line 516
Quoted 6 lines
package/Makefile.package.in +1
-1@@ -515,7 +513,7 @@ $$($(2)_TARGET_INSTALL_HOST): PKG=$(2) $$($(2)_TARGET_BUILD): PKG=$(2) $$($(2)_TARGET_CONFIGURE): PKG=$(2) $$($(2)_TARGET_PATCH): PKG=$(2) -$$($(2)_TARGET_PATCH): NOHOSTPKG=$(3) +$$($(2)_TARGET_PATCH): RAWNAME=$(subst host-,,$(1))
I might say something stupid, but what abouta package that is named 'foohost-bar'? The 'host-' part will be stripped, and we'd get 'foobar'. And that'd be wrong, I think.
I'd use: $(patsubst host-%,%,$(1))
And even in that case, that does not prevent a target package that is named 'host-utils' from matching, and be renamed to just 'utils'.
But it's been a while I looked at the generic infra, so I might be just saying cracks here...
package/Makefile.package.in $$($(2)_TARGET_INSTALL_HOST): PKG=$(2) · line 519
Quoted 4 lines
package/Makefile.package.in +0
-0$$($(2)_TARGET_EXTRACT): PKG=$(2) $$($(2)_TARGET_SOURCE): PKG=$(2) $$($(2)_TARGET_UNINSTALL): PKG=$(2)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 6/28 package: fix patching procedure for host packages
Hello,
Le Tue, 5 Jul 2011 00:01:50 +0200,
"Yann E. MORIN" <[email protected]> a ?crit :
Quoted 5 lines
I might say something stupid, but what abouta package that is named 'foohost-bar'? The 'host-' part will be stripped, and we'd get 'foobar'. And that'd be wrong, I think.
I'd use: $(patsubst host-%,%,$(1))
Ah, good idea, thanks! I've updated my patch with this.
Quoted 5 lines
And even in that case, that does not prevent a target package that is named 'host-utils' from matching, and be renamed to just 'utils'.
But it's been a while I looked at the generic infra, so I might be just saying cracks here...
I would say that we don't allow a package to have a name that starts with "host-". I think even without this patch, having such a package could cause troubles.
Regards,
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 7/28 barebox: use = instead of := and re-indent
In reply to Thomas Petazzoni--- boot/barebox/barebox.mk | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-)
boot/barebox/barebox.mk +7 -6
@@ -4,12 +4,13 @@ # ############################################################# -BAREBOX_VERSION:=2011.05.0 -BAREBOX_SOURCE:=barebox-$(BAREBOX_VERSION).tar.bz2 -BAREBOX_SITE:=http://www.barebox.org/download/ -BAREBOX_DIR:=$(BUILD_DIR)/barebox-$(BAREBOX_VERSION) -BAREBOX_CAT:=$(BZCAT) -BAREBOX_BOARD_DEFCONFIG:=$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG)) +BAREBOX_VERSION = 2011.05.0 +BAREBOX_SOURCE = barebox-$(BAREBOX_VERSION).tar.bz2 +BAREBOX_SITE = http://www.barebox.org/download/ +BAREBOX_DIR = $(BUILD_DIR)/barebox-$(BAREBOX_VERSION) +BAREBOX_CAT = $(BZCAT) + +BAREBOX_BOARD_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG)) ifeq ($(KERNEL_ARCH),i386) BAREBOX_ARCH=x86
Signature · 1 line
1.7.4.1
PATCH 7/28 barebox: use = instead of := and re-indent
Thomas, All,
Quoted 1 line · On Monday 04 July 2011 23:33:24 Thomas Petazzoni wrote:
-BAREBOX_VERSION:=2011.05.0
[--SNIP--]
Quoted 1 line
+BAREBOX_VERSION = 2011.05.0
What is the rationale for using '=' instead of ':='?
Using '=' evaluates the assignemnt every time it is referenced, which can be a little bit costly when there are tons of them (like in buildroot); while using ':=' does the evaluation only once, at the time of the assignment, not evaluation.
I agree that the code should be homogeneous, but I'd think it should be fast as well. He, if I can get butter, buter's money, and a litle smile from the dairywoman! ;-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 7/28 barebox: use = instead of := and re-indent
Le Tue, 5 Jul 2011 00:08:38 +0200,
"Yann E. MORIN" <[email protected]> a ?crit :
Quoted 1 line
What is the rationale for using '=' instead of ':='?
Consistency. And also because personally, I find = nicer to read than :=, but as you state below, it's true that the behaviour is not the same.
Quoted 8 lines
Using '=' evaluates the assignemnt every time it is referenced, which can be a little bit costly when there are tons of them (like in buildroot); while using ':=' does the evaluation only once, at the time of the assignment, not evaluation.
I agree that the code should be homogeneous, but I'd think it should be fast as well. He, if I can get butter, buter's money, and a litle smile from the dairywoman! ;-)
Then, we should state that those variables must all be defined with := all over the place and enforce this decision. In the mean time, I will drop those modifications from my patch set.
Regards,
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 7/28 barebox: use = instead of := and re-indent
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 8 lines
Quoted 8 lines
Using '=' evaluates the assignemnt every time it is referenced, which can be a little bit costly when there are tons of them (like in buildroot); while using ':=' does the evaluation only once, at the time of the assignment, not evaluation.
I agree that the code should be homogeneous, but I'd think it should be fast as well. He, if I can get butter, buter's money, and a litle smile from the dairywoman! ;-)
Thomas> Then, we should state that those variables must all be defined with := Thomas> all over the place and enforce this decision. In the mean time, I will Thomas> drop those modifications from my patch set.
:= is only a performance advantage if variables are expensive to expand (use) and are used more than once - E.G. stuff involving $(shell) and similar, like the UPPERCASE macro we had calling tr.
= has a number of advantages though. As it only gets expanded at the last possible moment you don't have to take care about variable ordering, E.G. when you use a variable like LIBGLIB2_HOST_BINARY on another package, whereas with := you do. This can also be interesting when the variable contains $(shell) or other functions, as you might only want to execute them if/when they are needed, and not right away when the Makefiles are parsed.
I would prefer to use = by default, and only use := where it matters for correctness or performance.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 8/28 barebox: convert to GENTARGETS
In reply to Thomas Petazzoni--- boot/barebox/barebox.mk | 59 +++++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 32 deletions(-)
boot/barebox/barebox.mk +27 -32
@@ -7,8 +7,11 @@ BAREBOX_VERSION = 2011.05.0 BAREBOX_SOURCE = barebox-$(BAREBOX_VERSION).tar.bz2 BAREBOX_SITE = http://www.barebox.org/download/ -BAREBOX_DIR = $(BUILD_DIR)/barebox-$(BAREBOX_VERSION) -BAREBOX_CAT = $(BZCAT) + +BAREBOX_INSTALL_IMAGES = YES +ifneq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y) +BAREBOX_INSTALL_TARGET = NO +endif BAREBOX_BOARD_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))
@@ -22,41 +25,33 @@ endif BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" -$(DL_DIR)/$(BAREBOX_SOURCE): - $(call DOWNLOAD,$(BAREBOX_SITE),$(BAREBOX_SOURCE)) - -$(BAREBOX_DIR)/.unpacked: $(DL_DIR)/$(BAREBOX_SOURCE) - mkdir -p $(@D) - $(INFLATE$(suffix $(BAREBOX_SOURCE))) $(DL_DIR)/$(BAREBOX_SOURCE) \ - | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) - - touch $@ +define BAREBOX_CONFIGURE_CMDS + $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) $(BAREBOX_BOARD_DEFCONFIG)_defconfig +endef -$(BAREBOX_DIR)/.patched: $(BAREBOX_DIR)/.unpacked - toolchain/patch-kernel.sh $(BAREBOX_DIR) boot/barebox \ - barebox-$(BAREBOX_VERSION)-\*.patch \ - barebox-$(BAREBOX_VERSION)-\*.patch.$(ARCH) - touch $@ - -$(BAREBOX_DIR)/.configured: $(BAREBOX_DIR)/.patched - $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) $(BAREBOX_BOARD_DEFCONFIG)_defconfig - touch $@ +ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y) +define BAREBOX_BUILD_BAREBOXENV_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(@D)/bareboxenv \ + $(@D)/scripts/bareboxenv.c +endef +endif -$(BAREBOX_DIR)/.built: $(BAREBOX_DIR)/.configured - $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) - touch $@ +define BAREBOX_BUILD_CMDS + $(BAREBOX_BUILD_BAREBOXENV_CMDS) + $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) +endef -$(BAREBOX_DIR)/.installed: $(BAREBOX_DIR)/.built - cp $(BAREBOX_DIR)/barebox.bin $(BINARIES_DIR) - touch $@ +define BAREBOX_INSTALL_IMAGES_CMDS + cp $(@D)/barebox.bin $(BINARIES_DIR) +endef -# bareboxenv for the target -$(TARGET_DIR)/usr/bin/bareboxenv: $(BAREBOX_DIR)/.configured - mkdir -p $(@D) - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $@ \ - $(BAREBOX_DIR)/scripts/bareboxenv.c +ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y) +define BAREBOX_INSTALL_TARGET_CMDS + cp $(@D)/bareboxenv $(TARGET_DIR)/usr/bin +endef +endif -barebox: $(BAREBOX_DIR)/.installed \ - $(if $(BR2_TARGET_BAREBOX_BAREBOXENV),$(TARGET_DIR)/usr/bin/bareboxenv) +$(eval $(call GENTARGETS,boot,barebox)) ifeq ($(BR2_TARGET_BAREBOX),y) TARGETS+=barebox
Signature · 1 line
1.7.4.1
PATCH 9/28 at91bootstrap: use = instead of := and indent properly
In reply to Thomas Petazzoni--- boot/at91bootstrap/at91bootstrap.mk | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
boot/at91bootstrap/at91bootstrap.mk +10 -10
@@ -3,17 +3,17 @@ # at91bootstrap # ############################################################# -AT91BOOTSTRAP_VERSION:=1.16 -AT91BOOTSTRAP_NAME:=AT91Bootstrap$(AT91BOOTSTRAP_VERSION) -AT91BOOTSTRAP_SITE:=http://www.atmel.com/dyn/resources/prod_documents/ -AT91BOOTSTRAP_SOURCE:=$(AT91BOOTSTRAP_NAME).zip -AT91BOOTSTRAP_DIR:=$(BUILD_DIR)/at91bootstrap-$(AT91BOOTSTRAP_VERSION) +AT91BOOTSTRAP_VERSION = 1.16 +AT91BOOTSTRAP_NAME = AT91Bootstrap$(AT91BOOTSTRAP_VERSION) +AT91BOOTSTRAP_SITE = http://www.atmel.com/dyn/resources/prod_documents/ +AT91BOOTSTRAP_SOURCE = $(AT91BOOTSTRAP_NAME).zip +AT91BOOTSTRAP_DIR = $(BUILD_DIR)/at91bootstrap-$(AT91BOOTSTRAP_VERSION) -AT91BOOTSTRAP_BOARD:=$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD)) -AT91BOOTSTRAP_MEMORY:=$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY)) -AT91BOOTSTRAP_BINARY:=$(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin -AT91BOOTSTRAP_BUILD_DIR:=$(AT91BOOTSTRAP_DIR)/board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY) -AT91BOOTSTRAP_TARGET:=$(AT91BOOTSTRAP_BUILD_DIR)/$(AT91BOOTSTRAP_BINARY) +AT91BOOTSTRAP_BOARD = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD)) +AT91BOOTSTRAP_MEMORY = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY)) +AT91BOOTSTRAP_BINARY = $(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin +AT91BOOTSTRAP_BUILD_DIR = $(AT91BOOTSTRAP_DIR)/board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY) +AT91BOOTSTRAP_TARGET = $(AT91BOOTSTRAP_BUILD_DIR)/$(AT91BOOTSTRAP_BINARY) $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE): $(call DOWNLOAD,$(AT91BOOTSTRAP_SITE),$(AT91BOOTSTRAP_SOURCE))
Signature · 1 line
1.7.4.1
PATCH 10/28 at91bootstrap: convert to GENTARGETS
In reply to Thomas Petazzoni--- boot/at91bootstrap/at91bootstrap.mk | 53 ++++++++++++----------------------- 1 files changed, 18 insertions(+), 35 deletions(-)
boot/at91bootstrap/at91bootstrap.mk +18 -35
@@ -4,49 +4,32 @@ # ############################################################# AT91BOOTSTRAP_VERSION = 1.16 -AT91BOOTSTRAP_NAME = AT91Bootstrap$(AT91BOOTSTRAP_VERSION) AT91BOOTSTRAP_SITE = http://www.atmel.com/dyn/resources/prod_documents/ -AT91BOOTSTRAP_SOURCE = $(AT91BOOTSTRAP_NAME).zip -AT91BOOTSTRAP_DIR = $(BUILD_DIR)/at91bootstrap-$(AT91BOOTSTRAP_VERSION) +AT91BOOTSTRAP_SOURCE = AT91Bootstrap$(AT91BOOTSTRAP_VERSION).zip -AT91BOOTSTRAP_BOARD = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD)) -AT91BOOTSTRAP_MEMORY = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY)) -AT91BOOTSTRAP_BINARY = $(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin -AT91BOOTSTRAP_BUILD_DIR = $(AT91BOOTSTRAP_DIR)/board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY) -AT91BOOTSTRAP_TARGET = $(AT91BOOTSTRAP_BUILD_DIR)/$(AT91BOOTSTRAP_BINARY) +AT91BOOTSTRAP_BOARD = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD)) +AT91BOOTSTRAP_MEMORY = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY)) +AT91BOOTSTRAP_MAKE_SUBDIR = board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY) +AT91BOOTSTRAP_BINARY = $(AT91BOOTSTRAP_MAKE_SUBDIR)/$(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin -$(DL_DIR)/$(AT91BOOTSTRAP_SOURCE): - $(call DOWNLOAD,$(AT91BOOTSTRAP_SITE),$(AT91BOOTSTRAP_SOURCE)) +AT91BOOTSTRAP_INSTALL_IMAGES = YES +AT91BOOTSTRAP_INSTALL_TARGET = NO -$(AT91BOOTSTRAP_DIR)/.unpacked: $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) - mkdir -p $(BUILD_DIR) +define AT91BOOTSTRAP_EXTRACT_CMDS unzip -d $(BUILD_DIR) $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) - mv $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION) $(AT91BOOTSTRAP_DIR) - touch $@ + mv $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION)/* $(@D) + rmdir $(BUILD_DIR)/Bootstrap-v$(AT91BOOTSTRAP_VERSION) +endef -$(AT91BOOTSTRAP_DIR)/.patched: $(AT91BOOTSTRAP_DIR)/.unpacked - toolchain/patch-kernel.sh $(AT91BOOTSTRAP_DIR) boot/at91bootstrap/ at91bootstrap-$(AT91BOOTSTRAP_VERSION)\*.patch - touch $@ +define AT91BOOTSTRAP_BUILD_CMDS + $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) -C $(@D)/$(AT91BOOTSTRAP_MAKE_SUBDIR) +endef -$(AT91BOOTSTRAP_TARGET): $(AT91BOOTSTRAP_DIR)/.patched - $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \ - -C $(AT91BOOTSTRAP_BUILD_DIR) +define AT91BOOTSTRAP_INSTALL_IMAGES_CMDS + cp $(@D)/$(AT91BOOTSTRAP_BINARY) $(BINARIES_DIR) +endef -$(BINARIES_DIR)/$(AT91BOOTSTRAP_BINARY): $(AT91BOOTSTRAP_TARGET) - mkdir -p $(dir $@) - cp $^ $@ - -at91bootstrap: $(BINARIES_DIR)/$(AT91BOOTSTRAP_BINARY) - -at91bootstrap-source: $(DL_DIR)/$(AT91BOOTSTRAP_SOURCE) - -at91bootstrap-unpacked: $(AT91BOOTSTRAP_DIR)/.unpacked - -at91bootstrap-clean: - make -C $(AT91BOOTSTRAP_BUILD_DIR) clean - -at91bootstrap-dirclean: - rm -rf $(AT91BOOTSTRAP_DIR) +$(eval $(call GENTARGETS,boot,at91bootstrap)) ############################################################# #
Signature · 1 line
1.7.4.1
PATCH 11/28 at91dataflashboot: use = instead of := and indent
In reply to Thomas Petazzoni--- boot/at91dataflashboot/at91dataflashboot.mk | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
boot/at91dataflashboot/at91dataflashboot.mk +6 -6
@@ -3,12 +3,12 @@ # DataFlashBoot # ############################################################# -DATAFLASHBOOT_VERSION:=1.05 -DATAFLASHBOOT_NAME:=DataflashBoot-$(DATAFLASHBOOT_VERSION) -DATAFLASHBOOT_SITE:=ftp://www.at91.com/pub/buildroot/ -DATAFLASHBOOT_SOURCE:=$(DATAFLASHBOOT_NAME).tar.bz2 -DATAFLASHBOOT_DIR:=$(BUILD_DIR)/at91dataflashboot-$(DATAFLASHBOOT_VERSION) -DATAFLASHBOOT_BINARY:=$(DATAFLASHBOOT_NAME).bin +DATAFLASHBOOT_VERSION = 1.05 +DATAFLASHBOOT_NAME = DataflashBoot-$(DATAFLASHBOOT_VERSION) +DATAFLASHBOOT_SITE = ftp://www.at91.com/pub/buildroot/ +DATAFLASHBOOT_SOURCE = $(DATAFLASHBOOT_NAME).tar.bz2 +DATAFLASHBOOT_DIR = $(BUILD_DIR)/at91dataflashboot-$(DATAFLASHBOOT_VERSION) +DATAFLASHBOOT_BINARY = $(DATAFLASHBOOT_NAME).bin $(DL_DIR)/$(DATAFLASHBOOT_SOURCE): $(call DOWNLOAD,$(DATAFLASHBOOT_SITE),$(DATAFLASHBOOT_SOURCE))
Signature · 1 line
1.7.4.1
PATCH 12/28 at91dataflashboot: convert to GENTARGETS
In reply to Thomas PetazzoniThis commit converts the at91dataflashboot bootloader build process to GENTARGETS. It also does the following changes :
* As the package directory name is at91dataflashboot, the configuration options and make variables are renamed to AT91DATAFLASHBOOT instead of DATAFLASHBOOT.
* Since the board selection in Kconfig wasn't used anywhere, get rid of it. at91dataflashboot is only for AT91RM9200 apparently anyway.
--- boot/at91dataflashboot/Config.in | 24 +-------------- boot/at91dataflashboot/at91dataflashboot.mk | 44 ++++++++------------------ 2 files changed, 15 insertions(+), 53 deletions(-)
boot/at91dataflashboot/Config.in +1 -23
@@ -1,25 +1,3 @@ -menuconfig BR2_TARGET_DATAFLASHBOOT +menuconfig BR2_TARGET_AT91DATAFLASHBOOT depends on BR2_arm bool "AT91 DataFlashBoot" - -if BR2_TARGET_DATAFLASHBOOT - -choice - prompt "Target Architecture" - default BR2_TARGET_DATAFLASHBOOT_AT91RM9200 - help - Select Chip for which Dataflash boot should be built - Currently only AT91RM9200 Supported - -config BR2_TARGET_DATAFLASHBOOT_AT91RM9200 - bool "AT91RM9200" - -config BR2_TARGET_DATAFLASHBOOT_AT91SAM9261 - bool "AT91SAM9261" - -config BR2_TARGET_DATAFLASHBOOT_AT91SAM9261S - bool "AT91SAM9261S" - -endchoice - -endif # BR2_TARGET_DATAFLASHBOOT
boot/at91dataflashboot/at91dataflashboot.mk +14 -30
58 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 13/28 syslinux: convert to GENTARGETS
In reply to Thomas PetazzoniMoreover, the installation of pxelinux and/or isolinux is now selected to suboptions, as we traditionally do for other packages. This allows to have a single option (BR2_TARGET_SYSLINUX) that enables the syslinux package.
--- boot/syslinux/Config.in | 14 ++++++++---- boot/syslinux/syslinux.mk | 50 +++++++++++++++----------------------------- 2 files changed, 26 insertions(+), 38 deletions(-)
boot/syslinux/Config.in +9 -5
@@ -5,8 +5,12 @@ config BR2_TARGET_SYSLINUX The syslinux bootloader for x86 systems. This includes: syslinux, pxelinux, extlinux. -config BR2_TARGET_PXELINUX - bool "pxelinux" - depends on BR2_i386 || BR2_x86_64 - help - The pxelinux loader for x86 systems. +config BR2_TARGET_SYSLINUX_ISOLINUX + bool "Install isolinux" + depends on BR2_TARGET_SYSLINUX + default y + +config BR2_TARGET_SYSLINUX_PXELINUX + bool "Install pxelinux" + depends on BR2_TARGET_SYSLINUX + default y
boot/syslinux/syslinux.mk +17 -33
65 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 13/28 syslinux: convert to GENTARGETS
Thomas, All,
Quoted 4 lines · On Monday 04 July 2011 23:33:30 Thomas Petazzoni wrote:
Moreover, the installation of pxelinux and/or isolinux is now selected to suboptions, as we traditionally do for other packages. This allows to have a single option (
BR2_TARGET_SYSLINUX) that enables the syslinux package.
You're doing two unrelated chances here:
- adding new options
- converting to GENTARGETS
In case something goes wrong, we would not know what of the two breaks.
Regards,
Yann E. MORIN.
PS. Yes, I'm in a review spree!
It can happen when my toolchians are building in the background! ;-)
YEM.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 13/28 syslinux: convert to GENTARGETS
Le Tue, 5 Jul 2011 00:12:31 +0200,
"Yann E. MORIN" <[email protected]> a ?crit :
Quoted 3 lines
You're doing two unrelated chances here:
- adding new options
- converting to GENTARGETS
I'm not adding options, but organizing them differently, because it is needed to be able to do the GENTARGETS conversion.
Before, we add:
* an option to enable isolinux
* an option to enable pxelinux
But this isn't compatible with GENTARGETS because with GENTARGETS, we need a single option that enables/disables the package, and other options should be suboptions. Which is why we now have :
* an option to enable syslinux
* a suboption to enable isolinux
* a suboption to enable pxelinux
I could have done this option change *before* doing the GENTARGETS conversion, but honestly, I didn't want to mess up with the existing makefile code before converting it to GENTARGETS.
I also don't think it's a very major issue of having those two things squashed together into a single patch, so I'd like to keep it as it is if possible.
Regards,
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 13/28 syslinux: convert to GENTARGETS
Thomas, All,
Quoted 4 lines · On Tuesday 05 July 2011 21:46:02 Thomas Petazzoni wrote:
Le Tue, 5 Jul 2011 00:12:31 +0200,
"Yann E. MORIN" <[email protected]> a ?crit :Quoted 1 line
You're doing two unrelated chances here:
^
Hmmm... Maybe I should re-read myself before posting... :-]
Quoted 9 lines
Before, we add:
* an option to enable isolinux
* an option to enable pxelinuxBut this isn't compatible with GENTARGETS because with GENTARGETS, we need a single option that enables/disables the package, and other options should be suboptions. Which is why we now have :
Quoted 7 lines
* an option to enable syslinux
* a suboption to enable isolinux
* a suboption to enable pxelinuxI could have done this option change *before* doing the GENTARGETS conversion, but honestly, I didn't want to mess up with the existing makefile code before converting it to GENTARGETS.
Granted. Doing both in one go is thus understandable.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 14/28 grub: convert to AUTOTARGETS
In reply to Thomas Petazzoni--- boot/grub/grub.500-build-fix.patch | 14 +++++ boot/grub/grub.mk | 102 ++++++++++++++---------------------- 2 files changed, 53 insertions(+), 63 deletions(-) create mode 100644 boot/grub/grub.500-build-fix.patch
boot/grub/grub.500-build-fix.patch new file +14 -0
@@ -0,0 +1,14 @@ +--- grub-0.97.orig/netboot/main.c 2004-05-21 00:19:33.000000000 +0200 ++++ grub-0.97/netboot/main.c 2007-07-20 02:31:28.000000000 +0200 +@@ -54,9 +54,9 @@ + + static int vendorext_isvalid; + static unsigned long netmask; +-static struct bootpd_t bootp_data; ++struct bootpd_t bootp_data; + static unsigned long xid; +-static unsigned char *end_of_rfc1533 = NULL; ++unsigned char *end_of_rfc1533 = NULL; + + #ifndef NO_DHCP_SUPPORT + #endif /* NO_DHCP_SUPPORT */
boot/grub/grub.mk +39 -63
131 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 15/28 grub2: remove package
In reply to Thomas PetazzoniGrub 2 has been marked BROKEN in June 2010, and nobody cared to fix it since then.
At that time, it was marked broken because the build process needed a Ruby interpreter available on the host, and it's really a pain that building a bootloader needs such a thing.
I've tried to upgrade the package to Grub2 1.99-rcX, and now it does not need a Ruby interpreter anymore, but instead requires a tool called "autogen", which itself needs the Guile Scheme interpreter.
Since we haven't heard any complaints about Grub2 being marked broken, and since it's such a pain to package, let's get rid of it. Of course, anybody interested in Grub2 is invited to contribute a working package.
--- boot/Config.in | 1 - boot/grub2/Config.in | 9 ----- boot/grub2/grub2.mk | 93 -------------------------------------------------- 3 files changed, 0 insertions(+), 103 deletions(-) delete mode 100644 boot/grub2/Config.in delete mode 100644 boot/grub2/grub2.mk
boot/Config.in +0 -1
@@ -2,7 +2,6 @@ menu "Bootloaders" source "boot/barebox/Config.in" source "boot/grub/Config.in" -source "boot/grub2/Config.in" source "boot/syslinux/Config.in" source "boot/u-boot/Config.in" source "boot/at91bootstrap/Config.in"
boot/grub2/Config.in deleted +0 -9
@@ -1,9 +0,0 @@ -config BR2_TARGET_GRUB2 - bool "grub2" - # Only supports PC, Mac (Power, x86 and x86-64), Pegasos - depends on BR2_i386 || BR2_powerpc - # Build process is broken (./configure doesn't work, Ruby - # required, etc.) - depends on BROKEN - help - The GRand Unified Bootloader for x86 systems, take #2.
boot/grub2/grub2.mk deleted +0 -93
93 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 16/28 u-boot: convert to GENTARGETS
In reply to Thomas PetazzoniThe feature of building mkimage for the target is removed, it wasn't building with current U-Boot, and doesn't make a lot of sense (mkimage is needed only to prepare a kernel image, or an U-Boot script).
The feature of building mkimage for the host is moved to a proper package. It duplicates a few things (U-Boot URL, etc.) but it makes things a lot cleaner than having it handled by boot/u-boot/u-boot.mk.
--- boot/u-boot/Config.in | 5 - boot/u-boot/u-boot.mk | 218 +++++++++++++++++-------------------------------- 2 files changed, 74 insertions(+), 149 deletions(-)
boot/u-boot/Config.in +0 -5
@@ -77,11 +77,6 @@ config BR2_TARGET_UBOOT_FORMAT_LDR endchoice -config BR2_TARGET_UBOOT_TOOL_MKIMAGE - bool "mkimage tool in target" - help - Install mkimage tool in target. - config BR2_TARGET_UBOOT_TOOL_ENV bool "fw_printenv tool in target" help
boot/u-boot/u-boot.mk +74 -144
256 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 17/28 uboot-mkimage: new package
In reply to Thomas PetazzoniThe mkimage for the host is now built by a package, so that boot/u-boot/u-boot.mk is no longer responsible for doing this. It makes things a lot easier to handle, as linux/linux.mk now simply depends on host-uboot-mkimage.
--- linux/linux.mk | 2 +- .../uboot-mkimage-2011.03-drop-configh.patch | 0 package/uboot-mkimage/uboot-mkimage.mk | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 1 deletions(-) rename boot/u-boot/u-boot-2011.03-drop-configh.patch => package/uboot-mkimage/uboot-mkimage-2011.03-drop-configh.patch (100%) create mode 100644 package/uboot-mkimage/uboot-mkimage.mk
linux/linux.mk +1 -1
@@ -40,7 +40,7 @@ LINUX26_IMAGE_NAME=vmImage else LINUX26_IMAGE_NAME=uImage endif -LINUX26_DEPENDENCIES+=$(MKIMAGE) +LINUX26_DEPENDENCIES+=host-uboot-mkimage else ifeq ($(BR2_LINUX_KERNEL_BZIMAGE),y) LINUX26_IMAGE_NAME=bzImage else ifeq ($(BR2_LINUX_KERNEL_ZIMAGE),y)
package/uboot-mkimage/uboot-mkimage-2011.03-drop-configh.patch renamed from boot/u-boot/u-boot-2011.03-drop-configh.patch +0 -0
package/uboot-mkimage/uboot-mkimage.mk new file +16 -0
@@ -0,0 +1,16 @@ +UBOOT_MKIMAGE_VERSION = 2011.03 +UBOOT_MKIMAGE_SOURCE = u-boot-$(UBOOT_MKIMAGE_VERSION).tar.bz2 +UBOOT_MKIMAGE_SITE = ftp://ftp.denx.de/pub/u-boot + +define HOST_UBOOT_MKIMAGE_BUILD_CMDS + $(MAKE) -C $(@D) \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH=$(U_BOOT_ARCH) \ + tools +endef + +define HOST_UBOOT_MKIMAGE_INSTALL_CMDS + install -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/usr/bin +endef + +$(eval $(call GENTARGETS,package,uboot-mkimage,host))
Signature · 1 line
1.7.4.1
PATCH 18/28 linux: rename LINUX26 to LINUX
In reply to Thomas Petazzoni--- linux/linux.mk | 108 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 54 insertions(+), 54 deletions(-)
linux/linux.mk +54 -54
@@ -3,22 +3,22 @@ # Linux kernel 2.6 target # ############################################################################### -LINUX26_VERSION=$(call qstrip,$(BR2_LINUX_KERNEL_VERSION)) +LINUX_VERSION=$(call qstrip,$(BR2_LINUX_KERNEL_VERSION)) -# Compute LINUX26_SOURCE and LINUX26_SITE from the configuration -ifeq ($(LINUX26_VERSION),custom) -LINUX26_TARBALL:=$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) -LINUX26_SITE:=$(dir $(LINUX26_TARBALL)) -LINUX26_SOURCE:=$(notdir $(LINUX26_TARBALL)) +# Compute LINUX_SOURCE and LINUX_SITE from the configuration +ifeq ($(LINUX_VERSION),custom) +LINUX_TARBALL:=$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) +LINUX_SITE:=$(dir $(LINUX_TARBALL)) +LINUX_SOURCE:=$(notdir $(LINUX_TARBALL)) else -LINUX26_SOURCE:=linux-$(LINUX26_VERSION).tar.bz2 -LINUX26_SITE:=$(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/ +LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 +LINUX_SITE:=$(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/ endif -LINUX26_DIR:=$(BUILD_DIR)/linux-$(LINUX26_VERSION) -LINUX26_PATCH=$(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) +LINUX_DIR:=$(BUILD_DIR)/linux-$(LINUX_VERSION) +LINUX_PATCH=$(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) -LINUX26_MAKE_FLAGS = \ +LINUX_MAKE_FLAGS = \ HOSTCC="$(HOSTCC)" \ HOSTCFLAGS="$(HOSTCFLAGS)" \ ARCH=$(KERNEL_ARCH) \
@@ -28,27 +28,27 @@ LINUX26_MAKE_FLAGS = \ # Get the real Linux version, which tells us where kernel modules are # going to be installed in the target filesystem. -LINUX26_VERSION_PROBED = $(shell $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) --no-print-directory -s kernelrelease) +LINUX_VERSION_PROBED = $(shell $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelrelease) ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y) -LINUX26_IMAGE_NAME=$(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_TARGET_NAME)) +LINUX_IMAGE_NAME=$(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_TARGET_NAME)) else ifeq ($(BR2_LINUX_KERNEL_UIMAGE),y) ifeq ($(KERNEL_ARCH),blackfin) # a uImage, but with a different file name -LINUX26_IMAGE_NAME=vmImage +LINUX_IMAGE_NAME=vmImage else -LINUX26_IMAGE_NAME=uImage +LINUX_IMAGE_NAME=uImage endif -LINUX26_DEPENDENCIES+=host-uboot-mkimage +LINUX_DEPENDENCIES+=host-uboot-mkimage else ifeq ($(BR2_LINUX_KERNEL_BZIMAGE),y) -LINUX26_IMAGE_NAME=bzImage +LINUX_IMAGE_NAME=bzImage else ifeq ($(BR2_LINUX_KERNEL_ZIMAGE),y) -LINUX26_IMAGE_NAME=zImage +LINUX_IMAGE_NAME=zImage else ifeq ($(BR2_LINUX_KERNEL_VMLINUX_BIN),y) -LINUX26_IMAGE_NAME=vmlinux.bin +LINUX_IMAGE_NAME=vmlinux.bin else ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y) -LINUX26_IMAGE_NAME=vmlinux +LINUX_IMAGE_NAME=vmlinux endif endif
@@ -57,44 +57,44 @@ endif # for bzImage, arch/i386 and arch/x86_64 do not exist when copying the # defconfig file. ifeq ($(KERNEL_ARCH),i386) -KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/x86 +KERNEL_ARCH_PATH=$(LINUX_DIR)/arch/x86 else ifeq ($(KERNEL_ARCH),x86_64) -KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/x86 +KERNEL_ARCH_PATH=$(LINUX_DIR)/arch/x86 else -KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/$(KERNEL_ARCH) +KERNEL_ARCH_PATH=$(LINUX_DIR)/arch/$(KERNEL_ARCH) endif ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y) -LINUX26_IMAGE_PATH=$(LINUX26_DIR)/$(LINUX26_IMAGE_NAME) +LINUX_IMAGE_PATH=$(LINUX_DIR)/$(LINUX_IMAGE_NAME) else ifeq ($(KERNEL_ARCH),avr32) -LINUX26_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/images/$(LINUX26_IMAGE_NAME) +LINUX_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/images/$(LINUX_IMAGE_NAME) else -LINUX26_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/$(LINUX26_IMAGE_NAME) +LINUX_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/$(LINUX_IMAGE_NAME) endif endif # BR2_LINUX_KERNEL_VMLINUX # Download -$(LINUX26_DIR)/.stamp_downloaded: +$(LINUX_DIR)/.stamp_downloaded: @$(call MESSAGE,"Downloading kernel") - $(call DOWNLOAD,$(LINUX26_SITE),$(LINUX26_SOURCE)) - $(foreach patch,$(filter ftp://% http://%,$(LINUX26_PATCH)),\ + $(call DOWNLOAD,$(LINUX_SITE),$(LINUX_SOURCE)) + $(foreach patch,$(filter ftp://% http://%,$(LINUX_PATCH)),\ $(call DOWNLOAD,$(dir $(patch)),$(notdir $(patch)))$(sep)) mkdir -p $(@D) touch $@ # Extraction -$(LINUX26_DIR)/.stamp_extracted: $(LINUX26_DIR)/.stamp_downloaded +$(LINUX_DIR)/.stamp_extracted: $(LINUX_DIR)/.stamp_downloaded @$(call MESSAGE,"Extracting kernel") mkdir -p $(@D) - $(Q)$(INFLATE$(suffix $(LINUX26_SOURCE))) $(DL_DIR)/$(LINUX26_SOURCE) | \ + $(Q)$(INFLATE$(suffix $(LINUX_SOURCE))) $(DL_DIR)/$(LINUX_SOURCE) | \ tar -C $(@D) $(TAR_STRIP_COMPONENTS)=1 $(TAR_OPTIONS) - $(Q)touch $@ # Patch -$(LINUX26_DIR)/.stamp_patched: $(LINUX26_DIR)/.stamp_extracted +$(LINUX_DIR)/.stamp_patched: $(LINUX_DIR)/.stamp_extracted @$(call MESSAGE,"Patching kernel") - for p in $(LINUX26_PATCH) ; do \ + for p in $(LINUX_PATCH) ; do \ if echo $$p | grep -q -E "^ftp://|^http://" ; then \ toolchain/patch-kernel.sh $(@D) $(DL_DIR) `basename $$p` ; \ elif test -d $$p ; then \
@@ -116,7 +116,7 @@ KERNEL_DEFCONFIG_NAME = buildroot_defconfig KERNEL_DEFCONFIG_PATH = $(KERNEL_ARCH_PATH)/configs/$(KERNEL_DEFCONFIG_NAME) # Configuration -$(LINUX26_DIR)/.stamp_configured: $(LINUX26_DIR)/.stamp_patched +$(LINUX_DIR)/.stamp_configured: $(LINUX_DIR)/.stamp_patched @$(call MESSAGE,"Configuring kernel") ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y) cp $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig $(KERNEL_DEFCONFIG_PATH)
@@ -148,62 +148,62 @@ endif ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y) $(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(KERNEL_DEFCONFIG_PATH)) endif - $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) $(KERNEL_DEFCONFIG_NAME) + $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) $(KERNEL_DEFCONFIG_NAME) rm $(KERNEL_DEFCONFIG_PATH) $(Q)touch $@ # Compilation. We make sure the kernel gets rebuilt when the # configuration has changed. -$(LINUX26_DIR)/.stamp_compiled: $(LINUX26_DIR)/.stamp_configured $(LINUX26_DIR)/.config +$(LINUX_DIR)/.stamp_compiled: $(LINUX_DIR)/.stamp_configured $(LINUX_DIR)/.config @$(call MESSAGE,"Compiling kernel") - $(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) $(LINUX26_IMAGE_NAME) - @if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX26_DIR)/.config) != 0 ] ; then \ - $(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) modules ; \ + $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_IMAGE_NAME) + @if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX_DIR)/.config) != 0 ] ; then \ + $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \ fi $(Q)touch $@ # Installation -$(LINUX26_DIR)/.stamp_installed: $(LINUX26_DIR)/.stamp_compiled +$(LINUX_DIR)/.stamp_installed: $(LINUX_DIR)/.stamp_compiled @$(call MESSAGE,"Installing kernel") - cp $(LINUX26_IMAGE_PATH) $(BINARIES_DIR) + cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR) ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y) - install -m 0644 -D $(LINUX26_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX26_IMAGE_NAME) + install -m 0644 -D $(LINUX_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX_IMAGE_NAME) endif # Install modules and remove symbolic links pointing to build # directories, not relevant on the target - @if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX26_DIR)/.config) != 0 ] ; then \ - $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) \ + @if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX_DIR)/.config) != 0 ] ; then \ + $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) \ DEPMOD="$(HOST_DIR)/usr/sbin/depmod" modules_install ; \ - rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/build ; \ - rm -f $(TARGET_DIR)/lib/modules/$(LINUX26_VERSION_PROBED)/source ; \ + rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/build ; \ + rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/source ; \ fi $(Q)touch $@ -linux linux26: host-module-init-tools $(LINUX26_DEPENDENCIES) $(LINUX26_DIR)/.stamp_installed +linux linux26: host-module-init-tools $(LINUX_DEPENDENCIES) $(LINUX_DIR)/.stamp_installed -linux-menuconfig linux-xconfig linux-gconfig linux-nconfig linux26-menuconfig linux26-xconfig linux26-gconfig linux26-nconfig: dirs $(LINUX26_DIR)/.stamp_configured - $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) \ +linux-menuconfig linux-xconfig linux-gconfig linux-nconfig linux26-menuconfig linux26-xconfig linux26-gconfig linux26-nconfig: dirs $(LINUX_DIR)/.stamp_configured + $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) \ $(subst linux-,,$(subst linux26-,,$@)) # Support for rebuilding the kernel after the initramfs file list has # been generated in $(BINARIES_DIR)/rootfs.initramfs. -$(LINUX26_DIR)/.stamp_initramfs_rebuilt: $(LINUX26_DIR)/.stamp_installed $(BINARIES_DIR)/rootfs.initramfs +$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_installed $(BINARIES_DIR)/rootfs.initramfs @$(call MESSAGE,"Rebuilding kernel with initramfs") # Remove the previously generated initramfs which was empty, # to make sure the kernel will actually regenerate it. $(RM) -f $(@D)/usr/initramfs_data.cpio* # Build the kernel. - $(TARGET_MAKE_ENV) $(MAKE) $(LINUX26_MAKE_FLAGS) -C $(@D) $(LINUX26_IMAGE_NAME) + $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_IMAGE_NAME) # Copy the kernel image to its final destination - cp $(LINUX26_IMAGE_PATH) $(BINARIES_DIR) + cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR) $(Q)touch $@ # The initramfs building code must make sure this target gets called # after it generated the initramfs list of files. -linux-rebuild-with-initramfs linux26-rebuild-with-initramfs: $(LINUX26_DIR)/.stamp_initramfs_rebuilt +linux-rebuild-with-initramfs linux26-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_initramfs_rebuilt ifeq ($(BR2_LINUX_KERNEL),y) -TARGETS+=linux26 +TARGETS+=linux endif # Checks to give errors that the user can understand
Signature · 1 line
1.7.4.1
Dechesne
PATCH 18/28 linux: rename LINUX26 to LINUX
linux/linux.mk line 5
Quoted 8 lines · Thomas Petazzoni
linux/linux.mk +0
-0@@ -3,22 +3,22 @@ # Linux kernel 2.6 target #
you probably missed this instance of '2.6', granted it's a comment ;-) -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110705/e79607c0/attachment.html>
PATCH 18/28 linux: rename LINUX26 to LINUX
Le Tue, 5 Jul 2011 16:24:00 +0200,
"Dechesne, Nicolas" <[email protected]> a ?crit :
Quoted 5 lines
Quoted 3 lines
# Linux kernel 2.6 target
#you probably missed this instance of '2.6', granted it's a comment ;-)
Right, fixed! Thanks Nicolas.
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 19/28 linux: indent and align some definitions
In reply to Thomas Petazzoni--- linux/linux.mk | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
linux/linux.mk +7 -7
@@ -7,16 +7,16 @@ LINUX_VERSION=$(call qstrip,$(BR2_LINUX_KERNEL_VERSION)) # Compute LINUX_SOURCE and LINUX_SITE from the configuration ifeq ($(LINUX_VERSION),custom) -LINUX_TARBALL:=$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) -LINUX_SITE:=$(dir $(LINUX_TARBALL)) -LINUX_SOURCE:=$(notdir $(LINUX_TARBALL)) +LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) +LINUX_SITE = $(dir $(LINUX_TARBALL)) +LINUX_SOURCE = $(notdir $(LINUX_TARBALL)) else -LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 -LINUX_SITE:=$(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/ +LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2 +LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/ endif -LINUX_DIR:=$(BUILD_DIR)/linux-$(LINUX_VERSION) -LINUX_PATCH=$(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) +LINUX_DIR = $(BUILD_DIR)/linux-$(LINUX_VERSION) +LINUX_PATCH = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) LINUX_MAKE_FLAGS = \ HOSTCC="$(HOSTCC)" \
Signature · 1 line
1.7.4.1
PATCH 20/28 package: add support for post-download hooks
In reply to Thomas PetazzoniThis will be needed for the Linux kernel package, which needs to download patches in a custom way.
--- package/Makefile.package.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
package/Makefile.package.in +2 -0
@@ -234,6 +234,7 @@ ifeq ($(DL_MODE),DOWNLOAD) endif $(if $($(PKG)_SOURCE),$(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_SOURCE))) $(if $($(PKG)_PATCH),$(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_PATCH))) + $(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep)) ifeq ($(DL_MODE),DOWNLOAD) $(Q)mkdir -p $(@D) $(Q)touch $@
@@ -437,6 +438,7 @@ $(2)_EXTRACT_CMDS ?= \ $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $(TAR_OPTIONS) -) # post-steps hooks +$(2)_POST_DOWNLOAD_HOOKS ?= $(2)_POST_EXTRACT_HOOKS ?= $(2)_POST_PATCH_HOOKS ?= $(2)_PRE_CONFIGURE_HOOKS ?=
Signature · 1 line
1.7.4.1
PATCH 21/28 linux: convert to the GENTARGETS infrastructure
In reply to Thomas Petazzoni--- linux/linux.mk | 111 +++++++++++++++++++++++++++----------------------------- 1 files changed, 53 insertions(+), 58 deletions(-)
linux/linux.mk +53 -58
@@ -15,8 +15,10 @@ LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2 LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/ endif -LINUX_DIR = $(BUILD_DIR)/linux-$(LINUX_VERSION) -LINUX_PATCH = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) +LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) + +LINUX_INSTALL_IMAGES = YES +LINUX_DEPENDENCIES += host-module-init-tools LINUX_MAKE_FLAGS = \ HOSTCC="$(HOSTCC)" \
@@ -74,27 +76,17 @@ LINUX_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/$(LINUX_IMAGE_NAME) endif endif # BR2_LINUX_KERNEL_VMLINUX -# Download -$(LINUX_DIR)/.stamp_downloaded: - @$(call MESSAGE,"Downloading kernel") - $(call DOWNLOAD,$(LINUX_SITE),$(LINUX_SOURCE)) - $(foreach patch,$(filter ftp://% http://%,$(LINUX_PATCH)),\ +define LINUX_DOWNLOAD_PATCHES + $(if $(LINUX_PATCHES), + @$(call MESSAGE,"Download additional patches")) + $(foreach patch,$(filter ftp://% http://%,$(LINUX_PATCHES)),\ $(call DOWNLOAD,$(dir $(patch)),$(notdir $(patch)))$(sep)) - mkdir -p $(@D) - touch $@ - -# Extraction -$(LINUX_DIR)/.stamp_extracted: $(LINUX_DIR)/.stamp_downloaded - @$(call MESSAGE,"Extracting kernel") - mkdir -p $(@D) - $(Q)$(INFLATE$(suffix $(LINUX_SOURCE))) $(DL_DIR)/$(LINUX_SOURCE) | \ - tar -C $(@D) $(TAR_STRIP_COMPONENTS)=1 $(TAR_OPTIONS) - - $(Q)touch $@ +endef + +LINUX_POST_DOWNLOAD_HOOKS += LINUX_DOWNLOAD_PATCHES -# Patch -$(LINUX_DIR)/.stamp_patched: $(LINUX_DIR)/.stamp_extracted - @$(call MESSAGE,"Patching kernel") - for p in $(LINUX_PATCH) ; do \ +define LINUX_APPLY_PATCHES + for p in $(LINUX_PATCHES) ; do \ if echo $$p | grep -q -E "^ftp://|^http://" ; then \ toolchain/patch-kernel.sh $(@D) $(DL_DIR) `basename $$p` ; \ elif test -d $$p ; then \
@@ -103,7 +95,9 @@ $(LINUX_DIR)/.stamp_patched: $(LINUX_DIR)/.stamp_extracted toolchain/patch-kernel.sh $(@D) `dirname $$p` `basename $$p` ; \ fi \ done - $(Q)touch $@ +endef + +LINUX_POST_PATCH_HOOKS += LINUX_APPLY_PATCHES # As we are tweaking the kernel configuration file, we want to run a # silent oldconfig pass on the configuration file after having done
@@ -115,60 +109,59 @@ $(LINUX_DIR)/.stamp_patched: $(LINUX_DIR)/.stamp_extracted KERNEL_DEFCONFIG_NAME = buildroot_defconfig KERNEL_DEFCONFIG_PATH = $(KERNEL_ARCH_PATH)/configs/$(KERNEL_DEFCONFIG_NAME) -# Configuration -$(LINUX_DIR)/.stamp_configured: $(LINUX_DIR)/.stamp_patched - @$(call MESSAGE,"Configuring kernel") ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y) - cp $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig $(KERNEL_DEFCONFIG_PATH) +KERNEL_SOURCE_CONFIG = $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y) - cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(KERNEL_DEFCONFIG_PATH) +KERNEL_SOURCE_CONFIG = $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) endif -ifeq ($(BR2_ARM_EABI),y) - $(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH)) -else - $(call KCONFIG_DISABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH)) -endif -ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) + +define LINUX_CONFIGURE_CMDS + cp $(KERNEL_SOURCE_CONFIG) $(KERNEL_DEFCONFIG_PATH) + $(if $(BR2_ARM_EABI), + $(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH)), + $(call KCONFIG_DISABLE_OPT,CONFIG_AEABI,$(KERNEL_DEFCONFIG_PATH))) # As the kernel gets compiled before root filesystems are # built, we create a fake initramfs file list. It'll be # replaced later by the real list, and the kernel will be # rebuilt using the linux26-rebuild-with-initramfs target. - touch $(BINARIES_DIR)/rootfs.initramfs - $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(KERNEL_DEFCONFIG_PATH)) - $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(KERNEL_DEFCONFIG_PATH)) - $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(KERNEL_DEFCONFIG_PATH)) - $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(KERNEL_DEFCONFIG_PATH)) - $(call KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(KERNEL_DEFCONFIG_PATH)) - $(call KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(KERNEL_DEFCONFIG_PATH)) -endif -ifneq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y) - $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(KERNEL_DEFCONFIG_PATH)) - $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(KERNEL_DEFCONFIG_PATH)) -endif -ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y) - $(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(KERNEL_DEFCONFIG_PATH)) -endif + $(if $(BR2_TARGET_ROOTFS_INITRAMFS), + touch $(BINARIES_DIR)/rootfs.initramfs + $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.initramfs\",$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(KERNEL_DEFCONFIG_PATH))) + $(if $(BR2_ROOTFS_DEVICE_CREATION_STATIC),, + $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(KERNEL_DEFCONFIG_PATH)) + $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(KERNEL_DEFCONFIG_PATH))) + $(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV), + $(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(KERNEL_DEFCONFIG_PATH))) $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) $(KERNEL_DEFCONFIG_NAME) rm $(KERNEL_DEFCONFIG_PATH) - $(Q)touch $@ +endef # Compilation. We make sure the kernel gets rebuilt when the # configuration has changed. -$(LINUX_DIR)/.stamp_compiled: $(LINUX_DIR)/.stamp_configured $(LINUX_DIR)/.config - @$(call MESSAGE,"Compiling kernel") +define LINUX_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_IMAGE_NAME) @if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX_DIR)/.config) != 0 ] ; then \ $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \ fi - $(Q)touch $@ +endef -# Installation -$(LINUX_DIR)/.stamp_installed: $(LINUX_DIR)/.stamp_compiled - @$(call MESSAGE,"Installing kernel") +define LINUX_INSTALL_IMAGES_CMDS cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR) +endef + ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y) +define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET install -m 0644 -D $(LINUX_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX_IMAGE_NAME) +endef endif + +define LINUX_INSTALL_TARGET_CMDS + $(LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET) # Install modules and remove symbolic links pointing to build # directories, not relevant on the target @if [ $(shell grep -c "CONFIG_MODULES=y" $(LINUX_DIR)/.config) != 0 ] ; then \
@@ -177,17 +170,18 @@ endif rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/build ; \ rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/source ; \ fi - $(Q)touch $@ +endef -linux linux26: host-module-init-tools $(LINUX_DEPENDENCIES) $(LINUX_DIR)/.stamp_installed +$(eval $(call GENTARGETS,,linux)) linux-menuconfig linux-xconfig linux-gconfig linux-nconfig linux26-menuconfig linux26-xconfig linux26-gconfig linux26-nconfig: dirs $(LINUX_DIR)/.stamp_configured $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) \ $(subst linux-,,$(subst linux26-,,$@)) + rm -f $(LINUX_DIR)/.stamp_{built,target_installed,images_installed} # Support for rebuilding the kernel after the initramfs file list has # been generated in $(BINARIES_DIR)/rootfs.initramfs. -$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_installed $(BINARIES_DIR)/rootfs.initramfs +$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LINUX_DIR)/.stamp_images_installed $(BINARIES_DIR)/rootfs.initramfs @$(call MESSAGE,"Rebuilding kernel with initramfs") # Remove the previously generated initramfs which was empty, # to make sure the kernel will actually regenerate it.
@@ -202,6 +196,7 @@ $(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_installed $(BINARIES_ # after it generated the initramfs list of files. linux-rebuild-with-initramfs linux26-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_initramfs_rebuilt + ifeq ($(BR2_LINUX_KERNEL),y) TARGETS+=linux endif
Signature · 1 line
1.7.4.1
PATCH 22/28 boot: rename BR2_TARGET_* to BR2_BOOT_*
In reply to Thomas Petazzoni--- boot/at91bootstrap/Config.in | 18 +++--- boot/at91bootstrap/at91bootstrap.mk | 8 +- boot/at91dataflashboot/Config.in | 2 +- boot/at91dataflashboot/at91dataflashboot.mk | 2 +- boot/barebox/Config.in | 8 +- boot/barebox/barebox.mk | 12 ++-- boot/grub/Config.in | 94 +++++++++++++------------- boot/grub/grub.mk | 50 +++++++------- boot/syslinux/Config.in | 10 ++-- boot/syslinux/syslinux.mk | 6 +- boot/u-boot/Config.in | 70 ++++++++++---------- boot/u-boot/u-boot.mk | 34 +++++----- 12 files changed, 157 insertions(+), 157 deletions(-)
boot/at91bootstrap/Config.in +9 -9
@@ -1,4 +1,4 @@ -menuconfig BR2_TARGET_AT91BOOTSTRAP +menuconfig BR2_BOOT_AT91BOOTSTRAP depends on BR2_arm bool "AT91 Bootstrap" help
@@ -8,9 +8,9 @@ menuconfig BR2_TARGET_AT91BOOTSTRAP - Peripheral drivers such as PIO, PMC or SDRAMC... - Physical media algorithm such as DataFlash, NandFlash, NOR Flash... -if BR2_TARGET_AT91BOOTSTRAP +if BR2_BOOT_AT91BOOTSTRAP -config BR2_TARGET_AT91BOOTSTRAP_BOARD +config BR2_BOOT_AT91BOOTSTRAP_BOARD string "Bootstrap board" default "" help
@@ -18,22 +18,22 @@ config BR2_TARGET_AT91BOOTSTRAP_BOARD choice prompt "Boot Memory" - default BR2_TARGET_AT91BOOTSTRAP_DATAFLASH + default BR2_BOOT_AT91BOOTSTRAP_DATAFLASH help Select Chip for which AT91 bootstrap should be built -config BR2_TARGET_AT91BOOTSTRAP_DATAFLASH +config BR2_BOOT_AT91BOOTSTRAP_DATAFLASH bool "Data Flash" -config BR2_TARGET_AT91BOOTSTRAP_NANDFLASH +config BR2_BOOT_AT91BOOTSTRAP_NANDFLASH bool "NAND Flash" endchoice -config BR2_TARGET_AT91BOOTSTRAP_MEMORY +config BR2_BOOT_AT91BOOTSTRAP_MEMORY string - default "dataflash" if BR2_TARGET_AT91BOOTSTRAP_DATAFLASH - default "nandflash" if BR2_TARGET_AT91BOOTSTRAP_NANDFLASH + default "dataflash" if BR2_BOOT_AT91BOOTSTRAP_DATAFLASH + default "nandflash" if BR2_BOOT_AT91BOOTSTRAP_NANDFLASH endif
boot/at91bootstrap/at91bootstrap.mk +4 -4
@@ -7,8 +7,8 @@ AT91BOOTSTRAP_VERSION = 1.16 AT91BOOTSTRAP_SITE = http://www.atmel.com/dyn/resources/prod_documents/ AT91BOOTSTRAP_SOURCE = AT91Bootstrap$(AT91BOOTSTRAP_VERSION).zip -AT91BOOTSTRAP_BOARD = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_BOARD)) -AT91BOOTSTRAP_MEMORY = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_MEMORY)) +AT91BOOTSTRAP_BOARD = $(call qstrip,$(BR2_BOOT_AT91BOOTSTRAP_BOARD)) +AT91BOOTSTRAP_MEMORY = $(call qstrip,$(BR2_BOOT_AT91BOOTSTRAP_MEMORY)) AT91BOOTSTRAP_MAKE_SUBDIR = board/$(AT91BOOTSTRAP_BOARD)/$(AT91BOOTSTRAP_MEMORY) AT91BOOTSTRAP_BINARY = $(AT91BOOTSTRAP_MAKE_SUBDIR)/$(AT91BOOTSTRAP_MEMORY)_$(AT91BOOTSTRAP_BOARD).bin
@@ -36,13 +36,13 @@ $(eval $(call GENTARGETS,boot,at91bootstrap)) # Toplevel Makefile options # ############################################################# -ifeq ($(BR2_TARGET_AT91BOOTSTRAP),y) +ifeq ($(BR2_BOOT_AT91BOOTSTRAP),y) TARGETS+=at91bootstrap # we NEED a board name unless we're at make source ifeq ($(filter source,$(MAKECMDGOALS)),) ifeq ($(AT91BOOTSTRAP_BOARD),) -$(error No AT91Bootstrap board name set. Check your BR2_TARGET_AT91BOOTSTRAP_BOARD setting) +$(error No AT91Bootstrap board name set. Check your BR2_BOOT_AT91BOOTSTRAP_BOARD setting) endif endif
boot/at91dataflashboot/Config.in +1 -1
@@ -1,3 +1,3 @@ -menuconfig BR2_TARGET_AT91DATAFLASHBOOT +menuconfig BR2_BOOT_AT91DATAFLASHBOOT depends on BR2_arm bool "AT91 DataFlashBoot"
boot/at91dataflashboot/at91dataflashboot.mk +1 -1
@@ -25,6 +25,6 @@ $(eval $(call GENTARGETS,boot,at91dataflashboot)) # Toplevel Makefile options # ############################################################# -ifeq ($(BR2_TARGET_AT91DATAFLASHBOOT),y) +ifeq ($(BR2_BOOT_AT91DATAFLASHBOOT),y) TARGETS+=at91dataflashboot endif
boot/barebox/Config.in +4 -4
@@ -1,18 +1,18 @@ -menuconfig BR2_TARGET_BAREBOX +menuconfig BR2_BOOT_BAREBOX bool "Barebox" help The Barebox bootloader, formerly known as U-Boot v2. http://www.barebox.org -if BR2_TARGET_BAREBOX -config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG +if BR2_BOOT_BAREBOX +config BR2_BOOT_BAREBOX_BOARD_DEFCONFIG string "board defconfig" help Name of the board for which Barebox should be built, without the _defconfig suffix. -config BR2_TARGET_BAREBOX_BAREBOXENV +config BR2_BOOT_BAREBOX_BAREBOXENV bool "bareboxenv tool in target" help Install bareboxenv tool in target.
boot/barebox/barebox.mk +6 -6
@@ -9,11 +9,11 @@ BAREBOX_SOURCE = barebox-$(BAREBOX_VERSION).tar.bz2 BAREBOX_SITE = http://www.barebox.org/download/ BAREBOX_INSTALL_IMAGES = YES -ifneq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y) +ifneq ($(BR2_BOOT_BAREBOX_BAREBOXENV),y) BAREBOX_INSTALL_TARGET = NO endif -BAREBOX_BOARD_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG)) +BAREBOX_BOARD_DEFCONFIG = $(call qstrip,$(BR2_BOOT_BAREBOX_BOARD_DEFCONFIG)) ifeq ($(KERNEL_ARCH),i386) BAREBOX_ARCH=x86
@@ -29,7 +29,7 @@ define BAREBOX_CONFIGURE_CMDS $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) $(BAREBOX_BOARD_DEFCONFIG)_defconfig endef -ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y) +ifeq ($(BR2_BOOT_BAREBOX_BAREBOXENV),y) define BAREBOX_BUILD_BAREBOXENV_CMDS $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(@D)/bareboxenv \ $(@D)/scripts/bareboxenv.c
@@ -45,7 +45,7 @@ define BAREBOX_INSTALL_IMAGES_CMDS cp $(@D)/barebox.bin $(BINARIES_DIR) endef -ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y) +ifeq ($(BR2_BOOT_BAREBOX_BAREBOXENV),y) define BAREBOX_INSTALL_TARGET_CMDS cp $(@D)/bareboxenv $(TARGET_DIR)/usr/bin endef
@@ -53,13 +53,13 @@ endif $(eval $(call GENTARGETS,boot,barebox)) -ifeq ($(BR2_TARGET_BAREBOX),y) +ifeq ($(BR2_BOOT_BAREBOX),y) TARGETS+=barebox # we NEED a board defconfig file unless we're at make source ifeq ($(filter source,$(MAKECMDGOALS)),) ifeq ($(BAREBOX_BOARD_DEFCONFIG),) -$(error No Barebox defconfig file. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG setting) +$(error No Barebox defconfig file. Check your BR2_BOOT_BAREBOX_BOARD_DEFCONFIG setting) endif endif
boot/grub/Config.in +47 -47
193 lines not on this page · raw message
boot/grub/grub.mk +25 -25
67 lines not on this page · raw message
boot/syslinux/Config.in +5 -5
@@ -1,16 +1,16 @@ -config BR2_TARGET_SYSLINUX +config BR2_BOOT_SYSLINUX bool "syslinux" depends on BR2_i386 || BR2_x86_64 help The syslinux bootloader for x86 systems. This includes: syslinux, pxelinux, extlinux. -config BR2_TARGET_SYSLINUX_ISOLINUX +config BR2_BOOT_SYSLINUX_ISOLINUX bool "Install isolinux" - depends on BR2_TARGET_SYSLINUX + depends on BR2_BOOT_SYSLINUX default y -config BR2_TARGET_SYSLINUX_PXELINUX +config BR2_BOOT_SYSLINUX_PXELINUX bool "Install pxelinux" - depends on BR2_TARGET_SYSLINUX + depends on BR2_BOOT_SYSLINUX default y
boot/syslinux/syslinux.mk +3 -3
@@ -17,8 +17,8 @@ define SYSLINUX_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) CC="$(HOSTCC)" AR="$(HOSTAR)" -C $(@D) endef -SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += isolinux.bin -SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += pxelinux.bin +SYSLINUX_IMAGES-$(BR2_BOOT_SYSLINUX_ISOLINUX) += isolinux.bin +SYSLINUX_IMAGES-$(BR2_BOOT_SYSLINUX_PXELINUX) += pxelinux.bin define SYSLINUX_INSTALL_IMAGES_CMDS for i in $(SYSLINUX_IMAGES-y); do \
@@ -33,6 +33,6 @@ $(eval $(call GENTARGETS,boot,syslinux)) # Toplevel Makefile options # ############################################################# -ifeq ($(BR2_TARGET_SYSLINUX),y) +ifeq ($(BR2_BOOT_SYSLINUX),y) TARGETS+=syslinux endif
boot/u-boot/Config.in +35 -35
160 lines not on this page · raw message
boot/u-boot/u-boot.mk +17 -17
@@ -3,14 +3,14 @@ # U-Boot # ############################################################# -U_BOOT_VERSION = $(call qstrip,$(BR2_TARGET_UBOOT_VERSION)) -U_BOOT_BOARD_NAME = $(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME)) +U_BOOT_VERSION = $(call qstrip,$(BR2_BOOT_UBOOT_VERSION)) +U_BOOT_BOARD_NAME = $(call qstrip,$(BR2_BOOT_UBOOT_BOARDNAME)) U_BOOT_INSTALL_IMAGES = YES ifeq ($(U_BOOT_VERSION),custom) # Handle custom U-Boot tarballs as specified by the configuration -U_BOOT_TARBALL = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION)) +U_BOOT_TARBALL = $(call qstrip,$(BR2_BOOT_UBOOT_CUSTOM_TARBALL_LOCATION)) U_BOOT_SITE = $(dir $(U_BOOT_TARBALL)) U_BOOT_SOURCE = $(notdir $(U_BOOT_TARBALL)) else
@@ -19,10 +19,10 @@ U_BOOT_SITE = ftp://ftp.denx.de/pub/u-boot U_BOOT_SOURCE = u-boot-$(U_BOOT_VERSION).tar.bz2 endif -ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y) +ifeq ($(BR2_BOOT_UBOOT_FORMAT_KWB),y) U_BOOT_BIN = u-boot.kwb U_BOOT_MAKE_TARGET = $(U_BOOT_BIN) -else ifeq ($(BR2_TARGET_UBOOT_FORMAT_LDR),y) +else ifeq ($(BR2_BOOT_UBOOT_FORMAT_LDR),y) U_BOOT_BIN = u-boot.ldr else U_BOOT_BIN = u-boot.bin
@@ -52,9 +52,9 @@ $(if $(call qstrip,$(2)), @echo '#define $(strip $(1)) $(call qstrip,$(2))' >> $(@D)/include/config.h) endef -ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),) +ifneq ($(call qstrip,$(BR2_BOOT_UBOOT_CUSTOM_PATCH_DIR)),) define U_BOOT_APPLY_CUSTOM_PATCHES - toolchain/patch-kernel.sh $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \ + toolchain/patch-kernel.sh $(@D) $(BR2_BOOT_UBOOT_CUSTOM_PATCH_DIR) \ u-boot-$(U_BOOT_VERSION)-\*.patch endef
@@ -71,16 +71,16 @@ define U_BOOT_CONFIGURE_CMDS @echo "#define __BR2_ADDED_CONFIG_H" >> $(@D)/include/config.h $(call insert_define,DATE,$(DATE)) $(call insert_define,CONFIG_LOAD_SCRIPTS,1) - $(call insert_define,CONFIG_IPADDR,$(BR2_TARGET_UBOOT_IPADDR)) - $(call insert_define,CONFIG_GATEWAYIP,$(BR2_TARGET_UBOOT_GATEWAY)) - $(call insert_define,CONFIG_NETMASK,$(BR2_TARGET_UBOOT_NETMASK)) - $(call insert_define,CONFIG_SERVERIP,$(BR2_TARGET_UBOOT_SERVERIP)) - $(call insert_define,CONFIG_ETHADDR,$(BR2_TARGET_UBOOT_ETHADDR)) - $(call insert_define,CONFIG_ETH1ADDR,$(BR2_TARGET_UBOOT_ETH1ADDR)) + $(call insert_define,CONFIG_IPADDR,$(BR2_BOOT_UBOOT_IPADDR)) + $(call insert_define,CONFIG_GATEWAYIP,$(BR2_BOOT_UBOOT_GATEWAY)) + $(call insert_define,CONFIG_NETMASK,$(BR2_BOOT_UBOOT_NETMASK)) + $(call insert_define,CONFIG_SERVERIP,$(BR2_BOOT_UBOOT_SERVERIP)) + $(call insert_define,CONFIG_ETHADDR,$(BR2_BOOT_UBOOT_ETHADDR)) + $(call insert_define,CONFIG_ETH1ADDR,$(BR2_BOOT_UBOOT_ETH1ADDR)) @echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(@D)/include/config.h endef -ifeq ($(BR2_TARGET_UBOOT_TOOL_ENV),y) +ifeq ($(BR2_BOOT_UBOOT_TOOL_ENV),y) define U_BOOT_BUILD_TARGET_ENV_UTILS $(TARGET_CONFIGURE_OPTS) $(MAKE) HOSTCC="$(TARGET_CC)" -C $(@D) env endef
@@ -97,7 +97,7 @@ define U_BOOT_INSTALL_IMAGES_CMDS cp -dpf $(@D)/$(U_BOOT_BIN) $(BINARIES_DIR)/ endef -ifeq ($(BR2_TARGET_UBOOT_TOOL_ENV),y) +ifeq ($(BR2_BOOT_UBOOT_TOOL_ENV),y) define U_BOOT_INSTALL_TARGET_ENV_UTILS $(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv \ $(TARGET_DIR)/usr/sbin/fw_printenv
@@ -116,13 +116,13 @@ $(eval $(call GENTARGETS,boot,u-boot)) # Toplevel Makefile options # ############################################################# -ifeq ($(BR2_TARGET_UBOOT),y) +ifeq ($(BR2_BOOT_UBOOT),y) TARGETS+=u-boot # we NEED a board name unless we're at make source ifeq ($(filter source,$(MAKECMDGOALS)),) ifeq ($(U_BOOT_BOARD_NAME),) -$(error NO U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting) +$(error NO U-Boot board name set. Check your BR2_BOOT_UBOOT_BOARDNAME setting) endif endif
Signature · 1 line
1.7.4.1
PATCH 23/28 u-boot: rename options BR2_BOOT_UBOOT* to BR2_BOOT_U_BOOT*
In reply to Thomas PetazzoniAs we are moving U-Boot to the package infrastructure, the Kconfig options must match the package name. As the package name is 'u-boot', the Kconfig options must be BR2_BOOT_U_BOOT*.
--- boot/u-boot/Config.in | 70 ++++++++++++++++++++++++------------------------ boot/u-boot/u-boot.mk | 35 ++++++++++++------------ 2 files changed, 52 insertions(+), 53 deletions(-)
boot/u-boot/Config.in +35 -35
@@ -1,10 +1,10 @@ -menuconfig BR2_BOOT_UBOOT +menuconfig BR2_BOOT_U_BOOT bool "U-Boot" help Build "Das U-Boot" Boot Monitor -if BR2_BOOT_UBOOT -config BR2_BOOT_UBOOT_BOARDNAME +if BR2_BOOT_U_BOOT +config BR2_BOOT_U_BOOT_BOARDNAME string "U-Boot board name" help One of U-Boot supported boards to be built.
@@ -12,47 +12,47 @@ config BR2_BOOT_UBOOT_BOARDNAME choice prompt "U-Boot Version" - default BR2_BOOT_UBOOT_2011_03 + default BR2_BOOT_U_BOOT_2011_03 help Select the specific U-Boot version you want to use -config BR2_BOOT_UBOOT_2011_03 +config BR2_BOOT_U_BOOT_2011_03 bool "2011.03" -config BR2_BOOT_UBOOT_2010_12 +config BR2_BOOT_U_BOOT_2010_12 bool "2010.12" -config BR2_BOOT_UBOOT_2010_09 +config BR2_BOOT_U_BOOT_2010_09 bool "2010.09" -config BR2_BOOT_UBOOT_2010_06 +config BR2_BOOT_U_BOOT_2010_06 bool "2010.06" -config BR2_BOOT_UBOOT_2010_03 +config BR2_BOOT_U_BOOT_2010_03 bool "2010.03" -config BR2_BOOT_UBOOT_CUSTOM_TARBALL +config BR2_BOOT_U_BOOT_CUSTOM_TARBALL bool "Custom tarball" endchoice -if BR2_BOOT_UBOOT_CUSTOM_TARBALL +if BR2_BOOT_U_BOOT_CUSTOM_TARBALL -config BR2_BOOT_UBOOT_CUSTOM_TARBALL_LOCATION +config BR2_BOOT_U_BOOT_CUSTOM_TARBALL_LOCATION string "URL of custom U-Boot tarball" endif -config BR2_BOOT_UBOOT_VERSION +config BR2_BOOT_U_BOOT_VERSION string - default "2011.03" if BR2_BOOT_UBOOT_2011_03 - default "2010.12" if BR2_BOOT_UBOOT_2010_12 - default "2010.09" if BR2_BOOT_UBOOT_2010_09 - default "2010.06" if BR2_BOOT_UBOOT_2010_06 - default "2010.03" if BR2_BOOT_UBOOT_2010_03 - default "custom" if BR2_BOOT_UBOOT_CUSTOM_TARBALL - -config BR2_BOOT_UBOOT_CUSTOM_PATCH_DIR + default "2011.03" if BR2_BOOT_U_BOOT_2011_03 + default "2010.12" if BR2_BOOT_U_BOOT_2010_12 + default "2010.09" if BR2_BOOT_U_BOOT_2010_09 + default "2010.06" if BR2_BOOT_U_BOOT_2010_06 + default "2010.03" if BR2_BOOT_U_BOOT_2010_03 + default "custom" if BR2_BOOT_U_BOOT_CUSTOM_TARBALL + +config BR2_BOOT_U_BOOT_CUSTOM_PATCH_DIR string "custom patch dir" help If your board requires custom patches, add the path to the
@@ -64,68 +64,68 @@ config BR2_BOOT_UBOOT_CUSTOM_PATCH_DIR choice prompt "U-Boot binary format" -config BR2_BOOT_UBOOT_FORMAT_BIN +config BR2_BOOT_U_BOOT_FORMAT_BIN bool "u-boot.bin" -config BR2_BOOT_UBOOT_FORMAT_KWB +config BR2_BOOT_U_BOOT_FORMAT_KWB depends on BR2_arm bool "u-boot.kwb (Marvell)" -config BR2_BOOT_UBOOT_FORMAT_LDR +config BR2_BOOT_U_BOOT_FORMAT_LDR depends on BR2_bfin bool "u-boot.ldr" endchoice -config BR2_BOOT_UBOOT_TOOL_ENV +config BR2_BOOT_U_BOOT_TOOL_ENV bool "fw_printenv tool in target" help Install fw_printenv / fw_setenv tools in target. -menuconfig BR2_BOOT_UBOOT_NETWORK +menuconfig BR2_BOOT_U_BOOT_NETWORK bool "Network Settings" default y help Network settings for U-boot -if BR2_BOOT_UBOOT_NETWORK +if BR2_BOOT_U_BOOT_NETWORK -config BR2_BOOT_UBOOT_SERVERIP +config BR2_BOOT_U_BOOT_SERVERIP string "server ip" default "10.175.196.221" help TFTP server ip address -config BR2_BOOT_UBOOT_IPADDR +config BR2_BOOT_U_BOOT_IPADDR string "ip address" default "10.175.196.18" help Target ip address -config BR2_BOOT_UBOOT_GATEWAY +config BR2_BOOT_U_BOOT_GATEWAY string "gateway ip" default "10.175.196.1" help Gateway ip address -config BR2_BOOT_UBOOT_NETMASK +config BR2_BOOT_U_BOOT_NETMASK string "netmask" default "255.255.255.0" help Network Mask -config BR2_BOOT_UBOOT_ETHADDR +config BR2_BOOT_U_BOOT_ETHADDR string "ethernet address" default "04:25:fe:ed:00:18" help Target MAC address for the ethernet interface. This should be changed for production units -config BR2_BOOT_UBOOT_ETH1ADDR +config BR2_BOOT_U_BOOT_ETH1ADDR string "ethernet 2 address" help Target MAC address for the second ethernet interface. -endif # BR2_BOOT_UBOOT_NETWORK +endif # BR2_BOOT_U_BOOT_NETWORK -endif # BR2_BOOT_UBOOT +endif # BR2_BOOT_U_BOOT
boot/u-boot/u-boot.mk +17 -18
@@ -3,14 +3,14 @@ # U-Boot # ############################################################# -U_BOOT_VERSION = $(call qstrip,$(BR2_BOOT_UBOOT_VERSION)) -U_BOOT_BOARD_NAME = $(call qstrip,$(BR2_BOOT_UBOOT_BOARDNAME)) +U_BOOT_VERSION = $(call qstrip,$(BR2_BOOT_U_BOOT_VERSION)) +U_BOOT_BOARD_NAME = $(call qstrip,$(BR2_BOOT_U_BOOT_BOARDNAME)) U_BOOT_INSTALL_IMAGES = YES ifeq ($(U_BOOT_VERSION),custom) # Handle custom U-Boot tarballs as specified by the configuration -U_BOOT_TARBALL = $(call qstrip,$(BR2_BOOT_UBOOT_CUSTOM_TARBALL_LOCATION)) +U_BOOT_TARBALL = $(call qstrip,$(BR2_BOOT_U_BOOT_CUSTOM_TARBALL_LOCATION)) U_BOOT_SITE = $(dir $(U_BOOT_TARBALL)) U_BOOT_SOURCE = $(notdir $(U_BOOT_TARBALL)) else
@@ -19,10 +19,10 @@ U_BOOT_SITE = ftp://ftp.denx.de/pub/u-boot U_BOOT_SOURCE = u-boot-$(U_BOOT_VERSION).tar.bz2 endif -ifeq ($(BR2_BOOT_UBOOT_FORMAT_KWB),y) +ifeq ($(BR2_BOOT_U_BOOT_FORMAT_KWB),y) U_BOOT_BIN = u-boot.kwb U_BOOT_MAKE_TARGET = $(U_BOOT_BIN) -else ifeq ($(BR2_BOOT_UBOOT_FORMAT_LDR),y) +else ifeq ($(BR2_BOOT_U_BOOT_FORMAT_LDR),y) U_BOOT_BIN = u-boot.ldr else U_BOOT_BIN = u-boot.bin
@@ -52,9 +52,9 @@ $(if $(call qstrip,$(2)), @echo '#define $(strip $(1)) $(call qstrip,$(2))' >> $(@D)/include/config.h) endef -ifneq ($(call qstrip,$(BR2_BOOT_UBOOT_CUSTOM_PATCH_DIR)),) +ifneq ($(call qstrip,$(BR2_BOOT_U_BOOT_CUSTOM_PATCH_DIR)),) define U_BOOT_APPLY_CUSTOM_PATCHES - toolchain/patch-kernel.sh $(@D) $(BR2_BOOT_UBOOT_CUSTOM_PATCH_DIR) \ + toolchain/patch-kernel.sh $(@D) $(BR2_BOOT_U_BOOT_CUSTOM_PATCH_DIR) \ u-boot-$(U_BOOT_VERSION)-\*.patch endef
@@ -71,16 +71,16 @@ define U_BOOT_CONFIGURE_CMDS @echo "#define __BR2_ADDED_CONFIG_H" >> $(@D)/include/config.h $(call insert_define,DATE,$(DATE)) $(call insert_define,CONFIG_LOAD_SCRIPTS,1) - $(call insert_define,CONFIG_IPADDR,$(BR2_BOOT_UBOOT_IPADDR)) - $(call insert_define,CONFIG_GATEWAYIP,$(BR2_BOOT_UBOOT_GATEWAY)) - $(call insert_define,CONFIG_NETMASK,$(BR2_BOOT_UBOOT_NETMASK)) - $(call insert_define,CONFIG_SERVERIP,$(BR2_BOOT_UBOOT_SERVERIP)) - $(call insert_define,CONFIG_ETHADDR,$(BR2_BOOT_UBOOT_ETHADDR)) - $(call insert_define,CONFIG_ETH1ADDR,$(BR2_BOOT_UBOOT_ETH1ADDR)) + $(call insert_define,CONFIG_IPADDR,$(BR2_BOOT_U_BOOT_IPADDR)) + $(call insert_define,CONFIG_GATEWAYIP,$(BR2_BOOT_U_BOOT_GATEWAY)) + $(call insert_define,CONFIG_NETMASK,$(BR2_BOOT_U_BOOT_NETMASK)) + $(call insert_define,CONFIG_SERVERIP,$(BR2_BOOT_U_BOOT_SERVERIP)) + $(call insert_define,CONFIG_ETHADDR,$(BR2_BOOT_U_BOOT_ETHADDR)) + $(call insert_define,CONFIG_ETH1ADDR,$(BR2_BOOT_U_BOOT_ETH1ADDR)) @echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(@D)/include/config.h endef -ifeq ($(BR2_BOOT_UBOOT_TOOL_ENV),y) +ifeq ($(BR2_BOOT_U_BOOT_TOOL_ENV),y) define U_BOOT_BUILD_TARGET_ENV_UTILS $(TARGET_CONFIGURE_OPTS) $(MAKE) HOSTCC="$(TARGET_CC)" -C $(@D) env endef
@@ -97,7 +97,7 @@ define U_BOOT_INSTALL_IMAGES_CMDS cp -dpf $(@D)/$(U_BOOT_BIN) $(BINARIES_DIR)/ endef -ifeq ($(BR2_BOOT_UBOOT_TOOL_ENV),y) +ifeq ($(BR2_BOOT_U_BOOT_TOOL_ENV),y) define U_BOOT_INSTALL_TARGET_ENV_UTILS $(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv \ $(TARGET_DIR)/usr/sbin/fw_printenv
@@ -116,13 +116,12 @@ $(eval $(call GENTARGETS,boot,u-boot)) # Toplevel Makefile options # ############################################################# -ifeq ($(BR2_BOOT_UBOOT),y) +ifeq ($(BR2_BOOT_U_BOOT),y) TARGETS+=u-boot - # we NEED a board name unless we're at make source ifeq ($(filter source,$(MAKECMDGOALS)),) ifeq ($(U_BOOT_BOARD_NAME),) -$(error NO U-Boot board name set. Check your BR2_BOOT_UBOOT_BOARDNAME setting) +$(error NO U-Boot board name set. Check your BR2_BOOT_U_BOOT_BOARDNAME setting) endif endif
Signature · 1 line
1.7.4.1
PATCH 24/28 Improve TARGETS handling for bootloaders and kernel
In reply to Thomas PetazzoniAs the kernel and bootloaders do not use the normal BR2_PACKAGE_* Kconfig options, their target name was not automatically added to the global TARGETS variable. Each bootloader .mk and the linux.mk had to add their own target manually to TARGETS, and the package infrastructure was making tests on non-existing Kconfig variables.
This commit improves the package infrastructure so that it looks at BR2_PACKAGE_<pkg> for packages, BR2_BOOT_<pkg> for bootloaders and at the special BR2_LINUX_KERNEL for the linux package.
This allows to simplify a little bit the bootloaders and linux .mk files.
--- boot/at91bootstrap/at91bootstrap.mk | 8 -------- boot/at91dataflashboot/at91dataflashboot.mk | 9 --------- boot/barebox/barebox.mk | 2 -- boot/grub/grub.mk | 9 --------- boot/syslinux/syslinux.mk | 9 --------- boot/u-boot/u-boot.mk | 2 -- linux/linux.mk | 5 ----- package/Makefile.package.in | 16 +++++++++++++--- 8 files changed, 13 insertions(+), 47 deletions(-)
boot/at91bootstrap/at91bootstrap.mk +0 -8
@@ -31,19 +31,11 @@ endef $(eval $(call GENTARGETS,boot,at91bootstrap)) -############################################################# -# -# Toplevel Makefile options -# -############################################################# ifeq ($(BR2_BOOT_AT91BOOTSTRAP),y) -TARGETS+=at91bootstrap - # we NEED a board name unless we're at make source ifeq ($(filter source,$(MAKECMDGOALS)),) ifeq ($(AT91BOOTSTRAP_BOARD),) $(error No AT91Bootstrap board name set. Check your BR2_BOOT_AT91BOOTSTRAP_BOARD setting) endif endif - endif
boot/at91dataflashboot/at91dataflashboot.mk +0 -9
@@ -19,12 +19,3 @@ define AT91DATAFLASHBOOT_INSTALL_IMAGES_CMDS endef $(eval $(call GENTARGETS,boot,at91dataflashboot)) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_BOOT_AT91DATAFLASHBOOT),y) -TARGETS+=at91dataflashboot -endif
boot/barebox/barebox.mk +0 -2
@@ -54,8 +54,6 @@ endif $(eval $(call GENTARGETS,boot,barebox)) ifeq ($(BR2_BOOT_BAREBOX),y) -TARGETS+=barebox - # we NEED a board defconfig file unless we're at make source ifeq ($(filter source,$(MAKECMDGOALS)),) ifeq ($(BAREBOX_BOARD_DEFCONFIG),)
boot/grub/grub.mk +0 -9
@@ -83,12 +83,3 @@ define GRUB_UNINSTALL_TARGET_CMDS endef $(eval $(call AUTOTARGETS,boot,grub)) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_BOOT_GRUB),y) -TARGETS+=grub -endif
boot/syslinux/syslinux.mk +0 -9
@@ -27,12 +27,3 @@ define SYSLINUX_INSTALL_IMAGES_CMDS endef $(eval $(call GENTARGETS,boot,syslinux)) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_BOOT_SYSLINUX),y) -TARGETS+=syslinux -endif
boot/u-boot/u-boot.mk +0 -2
@@ -117,12 +117,10 @@ $(eval $(call GENTARGETS,boot,u-boot)) # ############################################################# ifeq ($(BR2_BOOT_U_BOOT),y) -TARGETS+=u-boot # we NEED a board name unless we're at make source ifeq ($(filter source,$(MAKECMDGOALS)),) ifeq ($(U_BOOT_BOARD_NAME),) $(error NO U-Boot board name set. Check your BR2_BOOT_U_BOOT_BOARDNAME setting) endif endif - endif
linux/linux.mk +0 -5
@@ -196,11 +196,6 @@ $(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LI # after it generated the initramfs list of files. linux-rebuild-with-initramfs linux26-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_initramfs_rebuilt - -ifeq ($(BR2_LINUX_KERNEL),y) -TARGETS+=linux -endif - # Checks to give errors that the user can understand ifeq ($(filter source,$(MAKECMDGOALS)),) ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
package/Makefile.package.in +13 -3
@@ -522,10 +522,20 @@ $$($(2)_TARGET_UNINSTALL): PKG=$(2) $$($(2)_TARGET_CLEAN): PKG=$(2) $$($(2)_TARGET_DIRCLEAN): PKG=$(2) +# Compute the name of the Kconfig option that correspond to the +# package being enabled. We handle three cases: the special Linux +# kernel case, the bootloaders case, and the normal packages case. +ifeq ($(1),linux) +$(2)_KCONFIG_VAR = BR2_LINUX_KERNEL +else ifeq ($(4),boot) +$(2)_KCONFIG_VAR = BR2_BOOT_$(2) +else +$(2)_KCONFIG_VAR = BR2_PACKAGE_$(2) +endif + # add package to the general list of targets if requested by the buildroot # configuration - -ifeq ($$(BR2_PACKAGE_$(2)),y) +ifeq ($$($$($(2)_KCONFIG_VAR)),y) TARGETS += $(1)
@@ -537,7 +547,7 @@ else ifeq ($$($(2)_SITE_METHOD),bzr) DL_TOOLS_DEPENDENCIES += bzr endif # SITE_METHOD -endif # BR2_PACKAGE_$(2) +endif # $(2)_KCONFIG_VAR endef # GENTARGETS_INNER ################################################################################
Signature · 1 line
1.7.4.1
PATCH 24/28 Improve TARGETS handling for bootloaders and kernel
Thomas, All,
On Monday 04 July 2011 23:33:41 Thomas Petazzoni wrote:
[--SNIP--]
Quoted 3 lines
This commit improves the package infrastructure so that it looks at BR2_PACKAGE_<pkg> for packages, BR2_BOOT_<pkg> for bootloaders and at the special
BR2_LINUX_KERNELfor the linux package.
For consistency, I'd suggest using 'BR2_KERNEL_LINUX'.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 24/28 Improve TARGETS handling for bootloaders and kernel
Le Tue, 5 Jul 2011 00:27:11 +0200,
"Yann E. MORIN" <[email protected]> a ?crit :
Quoted 5 lines
Quoted 3 lines
This commit improves the package infrastructure so that it looks at BR2_PACKAGE_<pkg> for packages, BR2_BOOT_<pkg> for bootloaders and at the special
BR2_LINUX_KERNELfor the linux package.For consistency, I'd suggest using '
BR2_KERNEL_LINUX'.
Well, it doesn't make a big difference, but I have no strong opinion about this. What's the opinion of others ?
Regards,
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 25/28 linux: allow specification of a custom Git repository as a source
In reply to Thomas Petazzoni--- linux/Config.in | 15 +++++++++++++++ linux/linux.mk | 3 +++ 2 files changed, 18 insertions(+), 0 deletions(-)
linux/Config.in +15 -0
@@ -47,6 +47,12 @@ config BR2_LINUX_KERNEL_CUSTOM_TARBALL This option allows to specify the http or ftp location of a specific kernel source tarball +config BR2_LINUX_KERNEL_CUSTOM_GIT + bool "Custom Git tree" + help + This option allows Buildroot to get the Linux kernel source + code from a Git repository. + endchoice config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE
@@ -58,12 +64,21 @@ config BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION string "URL of custom kernel tarball" depends on BR2_LINUX_KERNEL_CUSTOM_TARBALL +config BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL + string "URL of custom Git repository" + depends on BR2_LINUX_KERNEL_CUSTOM_GIT + +config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION + string "Custom Git version" + depends on BR2_LINUX_KERNEL_CUSTOM_GIT + config BR2_LINUX_KERNEL_VERSION string default "2.6.39.2" if BR2_LINUX_KERNEL_2_6_39 default BR2_DEFAULT_KERNEL_HEADERS if BR2_LINUX_KERNEL_SAME_AS_HEADERS default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE if BR2_LINUX_KERNEL_CUSTOM_VERSION default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL + default $BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION if BR2_LINUX_KERNEL_CUSTOM_GIT # # Patch selection
linux/linux.mk +3 -0
@@ -10,6 +10,9 @@ ifeq ($(LINUX_VERSION),custom) LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) LINUX_SITE = $(dir $(LINUX_TARBALL)) LINUX_SOURCE = $(notdir $(LINUX_TARBALL)) +else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y) +LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL)) +LINUX_SITE_METHOD = git else LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2 LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
Signature · 1 line
1.7.4.1
PATCH 26/28 u-boot: allow specification of custom Git repo as source
In reply to Thomas Petazzoni--- boot/u-boot/Config.in | 14 ++++++++++++++ boot/u-boot/u-boot.mk | 3 +++ 2 files changed, 17 insertions(+), 0 deletions(-)
boot/u-boot/Config.in +14 -0
@@ -34,6 +34,9 @@ config BR2_BOOT_U_BOOT_2010_03 config BR2_BOOT_U_BOOT_CUSTOM_TARBALL bool "Custom tarball" +config BR2_BOOT_U_BOOT_CUSTOM_GIT + bool "Custom Git repository" + endchoice if BR2_BOOT_U_BOOT_CUSTOM_TARBALL
@@ -43,6 +46,16 @@ config BR2_BOOT_U_BOOT_CUSTOM_TARBALL_LOCATION endif +if BR2_BOOT_U_BOOT_CUSTOM_GIT + +config BR2_BOOT_U_BOOT_CUSTOM_GIT_REPO_URL + string "URL of custom Git repository" + +config BR2_BOOT_U_BOOT_CUSTOM_GIT_VERSION + string "Custom Git version" + +endif + config BR2_BOOT_U_BOOT_VERSION string default "2011.03" if BR2_BOOT_U_BOOT_2011_03
@@ -51,6 +64,7 @@ config BR2_BOOT_U_BOOT_VERSION default "2010.06" if BR2_BOOT_U_BOOT_2010_06 default "2010.03" if BR2_BOOT_U_BOOT_2010_03 default "custom" if BR2_BOOT_U_BOOT_CUSTOM_TARBALL + default $BR2_BOOT_U_BOOT_CUSTOM_GIT_VERSION if BR2_BOOT_U_BOOT_CUSTOM_GIT config BR2_BOOT_U_BOOT_CUSTOM_PATCH_DIR string "custom patch dir"
boot/u-boot/u-boot.mk +3 -0
@@ -13,6 +13,9 @@ ifeq ($(U_BOOT_VERSION),custom) U_BOOT_TARBALL = $(call qstrip,$(BR2_BOOT_U_BOOT_CUSTOM_TARBALL_LOCATION)) U_BOOT_SITE = $(dir $(U_BOOT_TARBALL)) U_BOOT_SOURCE = $(notdir $(U_BOOT_TARBALL)) +else ifeq ($(BR2_BOOT_U_BOOT_CUSTOM_GIT),y) +U_BOOT_SITE = $(call qstrip,$(BR2_BOOT_U_BOOT_CUSTOM_GIT_REPO_URL)) +U_BOOT_SITE_METHOD = git else # Handle stable official U-Boot versions U_BOOT_SITE = ftp://ftp.denx.de/pub/u-boot
Signature · 1 line
1.7.4.1
PATCH 27/28 Add x-loader bootloader
In reply to Thomas PetazzoniFrom: Philippe Reynes <[email protected]>
[Thomas Petazzoni: use BR2_BOOT prefix instead of BR2_TARGET, misc fixes]
--- boot/Config.in | 1 + boot/x-loader/Config.in | 15 +++++++++++++++ boot/x-loader/x-loader.mk | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 0 deletions(-) create mode 100644 boot/x-loader/Config.in create mode 100644 boot/x-loader/x-loader.mk
boot/Config.in +1 -0
@@ -6,6 +6,7 @@ source "boot/syslinux/Config.in" source "boot/u-boot/Config.in" source "boot/at91bootstrap/Config.in" source "boot/at91dataflashboot/Config.in" +source "boot/x-loader/Config.in" endmenu
boot/x-loader/Config.in new file +15 -0
@@ -0,0 +1,15 @@ +menuconfig BR2_BOOT_XLOADER + bool "X-loader" + depends on BR2_arm + help + The x-loader bootloader. It is mainly used on OMAP-based + platforms. + +if BR2_BOOT_XLOADER +config BR2_BOOT_XLOADER_BOARDNAME + string "x-loader board name" + help + One of x-loader supported boards to be built. + This will be suffixed with _config to meet x-loader + standard naming. +endif
boot/x-loader/x-loader.mk new file +35 -0
@@ -0,0 +1,35 @@ +############################################################# +# +# x-loader +# +############################################################# +XLOADER_VERSION = 6f3a26101303051e0f91b6213735b68ce804e94e +XLOADER_SITE = git://gitorious.org/x-loader/x-loader.git +XLOADER_BOARD_NAME = $(call qstrip,$(BR2_BOOT_XLOADER_BOARDNAME)) + +define XLOADER_BUILD_CMDS + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) $(XLOADER_BOARD_NAME)_config + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) all + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) ift +endef + +define XLOADER_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/MLO $(BINARIES_DIR)/ +endef + +$(eval $(call GENTARGETS,boot,xloader)) + +############################################################# +# +# Toplevel Makefile options +# +############################################################# +ifeq ($(BR2_BOOT_XLOADER),y) +# we NEED a board name unless we're at make source +ifeq ($(filter source,$(MAKECMDGOALS)),) +ifeq ($(XLOADER_BOARD_NAME),) +$(error NO x-loader board name set. Check your BR2_BOOT_XLOADER_BOARDNAME setting) +endif +endif + +endif
Signature · 1 line
1.7.4.1
PATCH 28/28 barebox: bump version
In reply to Thomas Petazzoni--- boot/barebox/barebox.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
boot/barebox/barebox.mk +1 -1
@@ -4,7 +4,7 @@ # ############################################################# -BAREBOX_VERSION = 2011.05.0 +BAREBOX_VERSION = 2011.06.0 BAREBOX_SOURCE = barebox-$(BAREBOX_VERSION).tar.bz2 BAREBOX_SITE = http://www.barebox.org/download/
Signature · 1 line
1.7.4.1
Thomas, All,
On Monday 04 July 2011 23:33:17 Thomas Petazzoni wrote:
[--SNIP--]
Quoted 4 lines
The following changes since commit
c80224a3a05e41af5a32e1c663fd3853f313382b:
toolchain/gcc: bump 4.6.x version to 4.6.1 (2011-06-28 15:19:13 +0200)
are available in the git repository at:
http://free-electrons.com/~thomas/buildroot.git for-2011.08/bootloaders
403 - Forbidden. ;-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Le Mon, 4 Jul 2011 23:44:19 +0200,
"Yann E. MORIN" <[email protected]> a ?crit :
Quoted 10 lines
Thomas, All,
On Monday 04 July 2011 23:33:17 Thomas Petazzoni wrote:
[--SNIP--]Quoted 4 lines
The following changes since commit
c80224a3a05e41af5a32e1c663fd3853f313382b:
toolchain/gcc: bump 4.6.x version to 4.6.1 (2011-06-28 15:19:13 +0200)
are available in the git repository at:
http://free-electrons.com/~thomas/buildroot.git for-2011.08/bootloaders403 - Forbidden. ;-)
It's a git repo, not a git repo viewer. Cloning this URL works just fine, it's just that repository listing is not enabled on the web server.
Peter: I still cannot use my account at uclibc.org.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com