Skip to contentSkip to conversation

svn commit: trunk/buildroot/target: device/Atmel linux

Buildroot ulf at uclibc.org 3 participants 5 messages Apr 16, 2008 – May 8, 2008

lore
Share & tools
lore
#0 lore raw

Author: ulf
Date: 2008-04-16 15:45:47 -0700 (Wed, 16 Apr 2008) New Revision: 21747

Log:
Fix bad linux kernel name

Modified:
trunk/buildroot/target/device/Atmel/Makefile.in trunk/buildroot/target/linux/Makefile.in.advanced

Changeset:
Modified: trunk/buildroot/target/device/Atmel/Makefile.in
===================================================================

buildroot/target/device/Atmel/Makefile.in +1 -1
@@ -37,7 +37,7 @@
 # This should be part of target/linux/Makefile.in
 LINUX26_BUILD_DIR:=$(PROJECT_BUILD_DIR)
 
-LINUX26_BINLOC=$(LINUX26_FORMAT)
+#LINUX26_BINLOC=$(LINUX26_FORMAT)
 #LINUX26_BINLOC:=$(BINARIES_DIR)/$(LINUX26_KERNEL)
 ifeq ($(strip $(BR2_avr32)),y)
 LINUX26_BINLOC:=arch/$(KERNEL_ARCH)/boot/images/$(BR2_PACKAGE_LINUX_FORMAT)

Modified: trunk/buildroot/target/linux/Makefile.in.advanced
===================================================================

buildroot/target/linux/Makefile.in.advanced +5 -20
@@ -134,11 +134,7 @@
 # --------------
 # UIMAGE
 ifeq ($(LINUX26_FORMAT),uImage)
-ifeq ($(BR2_avr32),y)
-LINUX26_BINLOC:=arch/$(KERNEL_ARCH)/boot/images/$(LINUX26_FORMAT)
-else
 LINUX26_BINLOC:=arch/$(KERNEL_ARCH)/boot/$(LINUX26_FORMAT)
-endif
 KERNEL_EXT:=.gz
 endif
 
@@ -153,29 +149,16 @@
 # BZIMAGE
 ifeq ($(LINUX26_FORMAT),bzImage)
 LINUX26_BINLOC:=arch/$(KERNEL_ARCH)/boot/bzImage
-KERNEL_EXT:=
+KERNEL_EXT:=.bz
 endif
 
 endif
 
 # -----------------------------------------------------------------------------
 # File name for the Linux kernel binary
-ifeq ($(LINUX26_FORMAT),uImage)
-LINUX26_KERNEL_NAME:="uImage"
-endif
-ifeq ($(LINUX26_FORMAT),bzImage)
-LINUX26_KERNEL_NAME:="bzImage"
-endif
-ifeq ($(LINUX26_FORMAT),vmlinux)
-LINUX26_KERNEL_NAME:="vmlinux"
-endif
-ifeq ($(LINUX26_FORMAT),zImage)
-LINUX26_KERNEL_NAME:="zImage"
-endif
-ifeq ($(LINUX26_FORMAT),custom)
 LINUX26_KERNEL_NAME:=$(BOARD_NAME)-linux-$(LINUX26_VERSION)-$(DATE)$(KERNEL_EXT)
-endif
 
+
 ifeq ($(BOARD_NAME),)
 BOARD_NAME=$(ARCH)
 endif
@@ -387,10 +370,12 @@
 	$(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) prepare
 	touch $@
 
-$(LINUX26_KERNEL): $(INITRAMFS_TARGET) $(BB_INITRAMFS_TARGET) \
+$(LINUX26_DIR)/$(LINUX26_BINLOC): $(INITRAMFS_TARGET) $(BB_INITRAMFS_TARGET) \
 		$(LINUX26_DIR)/.depend_done
 	$(MAKE) $(LINUX26_MAKE_FLAGS) \
 		-C $(LINUX26_DIR) $(LINUX26_FORMAT)
+
+$(LINUX26_KERNEL): $(LINUX26_DIR)/$(LINUX26_BINLOC)
 	cp -pf $(LINUX26_DIR)/$(LINUX26_BINLOC) $(LINUX26_KERNEL)
 	touch -c $@
 
#1 lore raw

buildroot/target/linux/Makefile.in.advanced line 153

Quoted 7 lines
buildroot/target/linux/Makefile.in.advanced +1 -1
@@ -153,29 +149,16 @@
 # BZIMAGE
 ifeq ($(LINUX26_FORMAT),bzImage)
 LINUX26_BINLOC:=arch/$(KERNEL_ARCH)/boot/bzImage
-KERNEL_EXT:=
+KERNEL_EXT:=.bz
 endif

I have never seen any distro doing this. Why?

Quoted 7 lines
buildroot/target/linux/Makefile.in.advanced +0 -5
 # -----------------------------------------------------------------------------
 # File name for the Linux kernel binary
-ifeq ($(LINUX26_FORMAT),uImage)
-LINUX26_KERNEL_NAME:="uImage"
-endif
-ifeq ($(LINUX26_FORMAT),bzImage)
-LINUX26_KERNEL_NAME:="bzImage"

buildroot/target/linux/Makefile.in.advanced line 177

Quoted 10 lines
buildroot/target/linux/Makefile.in.advanced +0 -9
-endif
-ifeq ($(LINUX26_FORMAT),vmlinux)
-LINUX26_KERNEL_NAME:="vmlinux"
-endif
-ifeq ($(LINUX26_FORMAT),zImage)
-LINUX26_KERNEL_NAME:="zImage"
-endif
-ifeq ($(LINUX26_FORMAT),custom)
 LINUX26_KERNEL_NAME:=$(BOARD_NAME)-linux-$(LINUX26_VERSION)-$(DATE)$(KERNEL_EXT)
-endif

Why on Earth did you remove John's changes from May 6?

#2 lore raw

[Buildroot] svn commit: trunk/buildroot/target: device/Atmellinux

Quoted 28 lines

buildroot/target/linux/Makefile.in.advanced line 153

Quoted 9 lines
buildroot/target/linux/Makefile.in.advanced +1 -1
@@ -153,29 +149,16 @@
 # BZIMAGE
 ifeq ($(LINUX26_FORMAT),bzImage)
 LINUX26_BINLOC:=arch/$(KERNEL_ARCH)/boot/bzImage
-KERNEL_EXT:=
+KERNEL_EXT:=.bz
 endif

I have never seen any distro doing this. Why?

Quoted 16 lines
buildroot/target/linux/Makefile.in.advanced +0 -13
 # -----------------------------------------------------------------------------
 # File name for the Linux kernel binary
-ifeq ($(LINUX26_FORMAT),uImage)
-LINUX26_KERNEL_NAME:="uImage"
-endif
-ifeq ($(LINUX26_FORMAT),bzImage)
-LINUX26_KERNEL_NAME:="bzImage"
-endif
-ifeq ($(LINUX26_FORMAT),vmlinux)
-LINUX26_KERNEL_NAME:="vmlinux"
-endif
-ifeq ($(LINUX26_FORMAT),zImage)
-LINUX26_KERNEL_NAME:="zImage"
-endif
-ifeq ($(LINUX26_FORMAT),custom)
 
Quoted 4 lines

buildroot/target/linux/Makefile.in.advanced line 177

Quoted 2 lines
buildroot/target/linux/Makefile.in.advanced +0 -1
 LINUX26_KERNEL_NAME:=$(BOARD_NAME)-linux-$(LINUX26_VERSION)-$(DATE)$(KERNEL_EXT)
-endif

Why on Earth did you remove John's changes from May 6?

One of the reasons I had to create the advanced linux configuration in buildroot
was that I wanted to be able to store multiple kernel images in the same directory.
John's patch makes this impossible and also makes the image name incompatible
with the automatically generated scripts which downloads the kernel to the target.

$(BOARD_NAME) needs to be changed to $(PROJECT) though.

Best Regards
Ulf Samuelsson

#3 lore raw

[Buildroot] svn commit: trunk/buildroot/target: device/Atmellinux

It would still be possible to do that by choosing the custom config.

You might have your reasons to want names with timestaps, but for most of us, it's nor required or desired. Forcing your way on everyone isn't quite the best approach.

As I've said before, changing the kernel name every time I build requires me to change u-boot, others will have to change their grub config, or what ever bootloader they use.

Quoted 50 lines · Ulf Samuelsson
Quoted 30 lines

buildroot/target/linux/Makefile.in.advanced line 153

Quoted 9 lines
buildroot/target/linux/Makefile.in.advanced +1 -1
@@ -153,29 +149,16 @@
 # BZIMAGE
 ifeq ($(LINUX26_FORMAT),bzImage)
 LINUX26_BINLOC:=arch/$(KERNEL_ARCH)/boot/bzImage
-KERNEL_EXT:=
+KERNEL_EXT:=.bz
 endif

I have never seen any distro doing this. Why?

Quoted 18 lines
buildroot/target/linux/Makefile.in.advanced +0 -14
 #
-----------------------------------------------------------------------------
 # File name for the Linux kernel binary
-ifeq ($(LINUX26_FORMAT),uImage)
-LINUX26_KERNEL_NAME:="uImage"
-endif
-ifeq ($(LINUX26_FORMAT),bzImage)
-LINUX26_KERNEL_NAME:="bzImage"
-endif
-ifeq ($(LINUX26_FORMAT),vmlinux)
-LINUX26_KERNEL_NAME:="vmlinux"
-endif
-ifeq ($(LINUX26_FORMAT),zImage)
-LINUX26_KERNEL_NAME:="zImage"
-endif
-ifeq ($(LINUX26_FORMAT),custom)
 
 
Quoted 4 lines

buildroot/target/linux/Makefile.in.advanced line 177

Quoted 2 lines
buildroot/target/linux/Makefile.in.advanced +0 -1
 LINUX26_KERNEL_NAME:=$(BOARD_NAME)-linux-$(LINUX26_VERSION)-$(DATE)$(KERNEL_EXT)
-endif

Why on Earth did you remove John's changes from May 6?

One of the reasons I had to create the advanced linux configuration in buildroot
was that I wanted to be able to store multiple kernel images in the same directory.
John's patch makes this impossible and also makes the image name incompatible
with the automatically generated scripts which downloads the kernel to the target.

$(BOARD_NAME) needs to be changed to $(PROJECT) though.

Best Regards
Ulf Samuelsson

#4 lore raw

[Buildroot] svn commit: trunk/buildroot/target:device/Atmellinux

Quoted 6 lines

It would still be possible to do that by choosing the custom config.

You might have your reasons to want names with timestaps, but for most of us, it's nor required or desired. Forcing your way on everyone isn't quite the best approach.

I do not force this on anyone.

The linux kernel can be built in two ways.
The traditional way, which will build uImage etc.
and the "advanced" way, which I generated to allow me to build it the way I see fit.

Select the traditional way, and you will get the traditional name.

I do not mind that there is an option to build it the traditional way, but I do mind that it is implemented in such a way
that my way of doing things is no longer possible.

Quoted 4 lines

As I've said before, changing the kernel name every time I build requires me to change u-boot, others will have to change their grub config, or what ever bootloader they use.

My U-Boot build generates an autoscript which is downloaded to the target This allows AT91 users to configure the U-Boot environment from buildroot, and allows them to initialize the environment with minimal typing.
- AND allows the user to figure out what is what.

You can easily change the name in the binaries dir before download or propose a patch which will allow you to choose a simple name, without changing the default behaviour.

config BR2_KERNEL_NAME_SIMPLE
bool "use simple kernel name"
default n

ifeq ($(BR2_KERNEL_NAME_SIMPLE),y) LINUX26_KERNEL_NAME:=$(LINUX26_FORMAT)
else LINUX26_KERNEL_NAME:=$(BOARD_NAME)-linux-$(LINUX26_VERSION)-$(DATE)$(KERNEL_EXT) endif

(a little cleaned-up) would work for me, but Johns patch doesn't because you will ALWAYS get a simple name if you choose
to build an uImage/vmlinux/zImage/bzImage.
It changes the default behaviour, and removes the possibility to configure to default behaviour using easy options.
It is making one feature depend on another, and this restricts choice.

Best Regards
Ulf Samuelsson