Re: [kbuild-devel] vmlinux.lds not marked for update when building on OS X and changing config options

2007-05-22 Thread Sam Ravnborg
On Mon, May 21, 2007 at 05:08:23PM -0400, Mike Frysinger wrote:
 i'm not terribly familiar with the kconfig/kbuild system so i'm
 looking for some pointers so i can track down the root cause here ...
 
 some people like to cross-compile the Blackfin kernel on OS X hosts
 and we noticed that in some cases the vmlinux.lds linker script is not
 properly regenerated when changing some options in the kernel config
 menu ... it works just fine on all our Linux hosts :)
 
 linux/arch/blackfin/kernel/vmlinux.lds.S has this:
 MEMORY
 {
 ram : ORIGIN = CONFIG_BOOT_LOAD,
 ...
 
 and in linux/arch/blackfin/Kconfig, we have:
 config BOOT_LOAD
 hex Kernel load address
 default 0x1000
 
 if vmlinux.lds does not exist yet, running `make` generates the proper
 file.  but if we do `make menuconfig` and update just BOOT_LOAD to say
 0x4000 and then run `make`, vmlinux.lds is not regenerated.
 
 doing `rm -f` on vmlinux.lds and re-running `make` once again produces
 the correct file
 
 any pointers on where to dig ? :)

The file arch/blackfin/kernel/.vmlinux.lds.cmd should look like this:
cmd_arch/i386/kernel/vmlinux.lds := i686-unknown-linux-gnu-gcc -m32 -E 
-Wp,-MD,arch/i386/kernel/.vmlinux.lds.d  -nostdinc -isystem 
/opt/crosstool/gcc-4.1.0-glibc-2.3.6/i686-unknown-linux-gnu/lib/gcc/i686-unknown-linux-gnu/4.1.0/include
 -D__KERNEL__ -I/home/sam/kernel/kbuild-fix.git/include -Iinclude 
-I/home/sam/kernel/kbuild-fix.git/include2 -Iinclude2  
-I/home/sam/kernel/kbuild-fix.git/include -include include/linux/autoconf.h -P 
-C -Ui386 -D__ASSEMBLY__ -o arch/i386/kernel/vmlinux.lds 
/home/sam/kernel/kbuild-fix.git/arch/i386/kernel/vmlinux.lds.S

deps_arch/i386/kernel/vmlinux.lds := \
  /home/sam/kernel/kbuild-fix.git/arch/i386/kernel/vmlinux.lds.S \
$(wildcard include/config/blk/dev/initrd.h) \
  /home/sam/kernel/kbuild-fix.git/include/asm-generic/vmlinux.lds.h \
  include2/asm/thread_info.h \
$(wildcard include/config/4kstacks.h) \
$(wildcard include/config/debug/stack/usage.h) \
  /home/sam/kernel/kbuild-fix.git/include/linux/compiler.h \
  

Could you please check this.

The line that says:
deps_arch/blackfin/kernel/vmlinux.lds := \ 
list all the files that the .lds file is dependent on (the prerequisites).
For the config option BOOT_LOAD look for include/config/boot/load

Check that this file gets properly update on OS X.

Sam

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] Pretty strong RFE: .makeflags

2007-05-22 Thread H. Peter Anvin
I would like to *strongly* suggest adding the following feature to
Kbuild -- a file which can hold one's own make variables in any one
object (not source!) directory.

It's ridiculous to have to type:

[incidentally, the BIARCH test in arch/i386/Makefile doesn't seem to
work with CC='ccache gcc' for some reason...]

make O=o.i386 ARCH=i386 CC='ccache gcc -m32' FDARGS='ro root=/dev/hda1
...' isoimage

... over and over, and if you get something wrong, your object tree is
toast.

Logically speaking, it would work as if the main Makefile had near the top:

-include $(O)/.makeflags

... except of course with the proper logic to derive the object
directory.  This is *highly* complicated by the fact that Kbuild uses
$(origin), and treats command-line sourced options differently, this is
why this is an RFE and not a patch.

Thanks,

-hpa

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel