On Mon, 29 Apr 2002 12:46:01 +0200, "Arnd Bergmann" <[EMAIL PROTECTED]> wrote: >I'm doing the port of kbuild 2.5 for the arch/s390 and ach/s390x. I already >have a >working (mostly, it's currently against our internal tree only) patch, but >still have >a few questions/problems: > >1. My vmlinux.lds.i depends on a config symbol (CONFIG_SHARED_KERNEL), so I >#included >config.h and used #ifdef in a few places. However, the dependency on the >configuration >does not work unless I give the explicit rule >$(objfile vmlinux.lds.i): $(objfile /include/linux/autoconf.h) >in my Makefile.in. That does not look clean, is there a better way to do >it?
Not necessary. Use vmlinux.lds.S and no vmlinux.lds.i file. kbuild 2.5 automatically builds .i files from .S and tracks the config dependencies. If it does not track them, it is a bug. >2. There seems to be a bug when changing the target architechture without >changing the >object tree as well. For example: > >export KBUILD_OBJTREE=/tmp/kbuildtest >mkdir $KBUILD_OBJTREE >cd $KBUILD_SRCTREE_000 >make ARCH=s390 CROSS_COMPILE=$ARCH-linux- oldconfig >make ARCH=s390 CROSS_COMPILE=$ARCH-linux- > (building correct tree...) >make ARCH=s390x CROSS_COMPILE=$ARCH-linux- oldconfig >make ARCH=s390x CROSS_COMPILE=$ARCH-linux- > (...) > phase 3 (evaluate selections) > phase 4 (write global makefile) >pp_makefile4: Cannot find object for target /arch/s390/asm-offsets.s >pp_makefile4: Cannot find object for target /arch/s390/vmlinux.lds.i You cannot use the same object tree for two different architectures, you need separate objtrees. In particular the kbuild database which lives in objtree is persistent and still contains data for the other architecture. >3. In /drivers/s390, all object files are selected only when $(ARCH)=s390 >is set. However, >they should also be selected for $(ARCH)=s390x. In my patch, I have >replaced the ifeq(ARCH) >with conditionals on CONFIG_ARCH_S390, which is defined for both s390 and >s390x and this >works fine. Is this the preferred way to do it in this case or should I >rather use some >more complex conditional to test for either arch? ifsel(CONFIG_ARCH_S390) is fine. _______________________________________________ kbuild-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/kbuild-devel