ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] new LTIB platform diffs for submission


From: Stuart Hughes
Subject: Re: [Ltib] new LTIB platform diffs for submission
Date: Tue, 26 May 2009 17:39:08 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Hi Kevin,

I think there are 2 issues. Tomasz' compilation error maybe due to the version he's using, it's a bit older than the CVS. I checked-out the latest lpc32xx from CVS and it built the kernel without problems, so I'm guessing for him updating to the latest and fixing this much would move him forward.

So far as the header copying goes, what I put in and took out was speculative. The reason I removed it was that I could not confirm whether the approach was correct. If it's right it could be put back, but I think it was only a partial solution. What intrigues me is that this must be something that is commonly needed, so I wonder what other ARM folk are doing. I know there's a 'make headers_install', but these are sanitised (for userspace headers), what we need to copy is the raw headers.

The constraints we need to keep are that older and newer kernels must be handled by the same kernel-common.tmpl file. The good news is that detecting what to do can be handled merely by the present or not of the directory structure.

So for all ARM experts out there, as Kevin says, please let us know if you have an idea of the right way of copying the raw kernel header files. Here's my speculative change (reverted):

http://cvs.savannah.gnu.org/viewvc/ltib/dist/lfs-5.1/kernel/kernel-common.tmpl?root=ltib&r1=1.5&r2=1.6

Regards, Stuart

Kevin Wells wrote:
Hi Stuart,

This issue showed up with the 2.6.26 kernel release (maybe .27).
The machine specific headers were moved to 
./arch/arm/mach-<platform>/include/mach
and they way the link to the ./include/asm-<arch>/arch/ was generated was
changed (or just removed).

I see revision 1.6 of the kernel-common.tmpl had a workaround for this issue, 
but
the latest version (1.8) seems to have regressed back to the pre-workaround
./include/asm-<arch>/arch/mach-<board> method.

I think all platforms that use a kernel revision of .26 or later and have the
[*] Include kernel headers options enabled (or have a package that includes it)
will have this same issue.

I looked at this a while back and did have a temporary fix for this issue, but
it required another var in the platform specific main.lkc file and a small 
change
in the kernel common template. Basically, if the var didn't exist, the link
in ./include was used to copy those files. If the var did exist, the var was
used as the mach-<board> name to find the include path. This solution wasn't too
elegant as it would require post 2.6.26 platform submitters to add the variable
to their main.lkc file.

I'm still not sure how to approach this issue. An equivalent direct link in the
kernel include tree doesn't seem to be there anymore so parsing the kernel
version may not be enough without the mach name also. If anyone has an ideas on
how to tackle this, I'll take a shot at it.

Here is a link to the previous thread:
http://lists.gnu.org/archive/html/ltib/2009-01/msg00043.html

thanks,
kevin


-----Original Message-----
Sent: Tuesday, May 26, 2009 1:36 AM
Cc: address@hidden
Subject: Re: [Ltib] new LTIB platform diffs for submission

Hi Tomasz,

I think that's a bug in the version you have.  You should get the latest
from Savannah CVS (cvs co ...).  The section that is probably wrong is
in dist/lfs-5.1/kernel/kernel-common.tmpl around line 318 it should now
read:

     if [ "${LINTARCH}" = "arm" ]
     then
         mkdir -p $RPM_BUILD_ROOT/%{pfx}/usr/src/linux/include/asm/arch
         cp -a $KBOUT/include/asm/arch/*
$RPM_BUILD_ROOT/%{pfx}/usr/src/linux/include/asm/arch
     fi


Note the 'cp -a' is split on 2 lines by my mail client but should all be
one line.  Here's the actual file:
http://cvs.savannah.gnu.org/viewvc/*checkout*/ltib/dist/lfs-
5.1/kernel/kernel-common.tmpl?root=ltib

Regards, Stuart


Tomasz Samotyjak wrote:
Hi,
I´ve got compiling problem with kernel for phy3250. The log for kernel
is (sorry for length):
Processing: kernel-2.6.27.8-lpc32xx
=====================================
/usr/bin/rpmbuild --dbpath /home/tomek/Temp/ltib-8-1-2-
sv/rootfs//var/lib/rpm --target arm --define
'_unpackaged_files_terminate_build 0' --define '_target_cpu arm' --
define '__strip strip' --define '_topdir /home/tomek/Temp/ltib-8-1-2-
sv/rpm' --define '_prefix /usr' --define '_tmppath
/home/tomek/Temp/ltib-8-1-2-sv/tmp' --define '_mandir /usr/share/man' --
define '_sysconfdir /etc' --define '_localstatedir /var' -bi --short-
circuit  /home/tomek/Temp/ltib-8-1-2-sv/tmp/kernel-2.6.27.8-lpc32xx.spec
Building target platforms: arm
Building for target arm
Executing(%install): /bin/sh -e /home/tomek/Temp/ltib-8-1-2-
sv/tmp/rpm-tmp.a81dwP
+ umask 022
+ cd /home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILD
+ cd linux-2.6.27.8
++ eval echo
+++ echo
+ PKG_KERNEL_PATH_PRECONFIG=
++ eval echo
+++ echo
+ PKG_KERNEL_KBUILD_PRECONFIG=
++ eval echo
+++ echo
+ DTC_NAMES=
+ KSRC_DIR=/home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILD/linux-2.6.27.8
+ cd /home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILD/linux-2.6.27.8
+ KBOUT=
+ '[' -n '' ']'
+ KBOUT=.
+ grep -q CONFIG_PPC_MERGE=y ./.config
+ case $LINTARCH in
+ BOOT_KERNEL=arch/arm/boot/zImage
+ rm -rf /home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386
+ mkdir -p /home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILDROOT/kernel-
2.6.27.8-1.i386//opt/nxp/rootfs/arm/boot
+ grep -q '^CONFIG_MODULES=' ./.config
+ make ARCH=arm CROSS_COMPILE= 'HOSTCC=/usr/bin/gcc -B/usr/bin//'
DEPMOD=/bin/true INSTALL_MOD_PATH=/home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-1.i386//opt/nxp/rootfs/arm
modules_install
Warning: you may need to install module-init-tools
See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt
  INSTALL drivers/base/firmware_class.ko
  INSTALL drivers/scsi/scsi_wait_scan.ko
  INSTALL fs/nls/nls_ascii.ko
  INSTALL fs/nls/nls_utf8.ko
  DEPMOD  2.6.27.8
++ ls /home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/lib/modules
+ KERNEL_VER=2.6.27.8
+ for i in build source
+ rm -f /home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/lib/modules/2.6.27.8/build
+ ln -s /usr/src/linux /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/lib/modules/2.6.27.8/build
+ for i in build source
+ rm -f /home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/lib/modules/2.6.27.8/source
+ ln -s /usr/src/linux /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/lib/modules/2.6.27.8/source
+ SYSCFG_BOOT_KERNEL=arch/arm/boot/uImage
+ '[' -n '' ']'
+ for i in vmlinux System.map '$SYSCFG_BOOT_KERNEL'
+ cp ./vmlinux /home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILDROOT/kernel-
2.6.27.8-1.i386//opt/nxp/rootfs/arm/boot
+ for i in vmlinux System.map '$SYSCFG_BOOT_KERNEL'
+ cp ./System.map /home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILDROOT/kernel-
2.6.27.8-1.i386//opt/nxp/rootfs/arm/boot
+ for i in vmlinux System.map '$SYSCFG_BOOT_KERNEL'
+ cp ./arch/arm/boot/uImage /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-1.i386//opt/nxp/rootfs/arm/boot
++ basename arch/arm/boot/uImage
+ ln -s uImage /home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILDROOT/kernel-
2.6.27.8-1.i386//opt/nxp/rootfs/arm/boot/bootable_kernel
+ cp ./.config /home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILDROOT/kernel-
2.6.27.8-1.i386//opt/nxp/rootfs/arm/boot/linux.config
+ '[' phy3250 = mcf547x_8x ']'
+ '[' phy3250 = mcf5445x ']'
+ DTC_PATH=arch/arm/boot/dts
+ '[' arm = powerpc -a -d arch/arm/boot/dts ']'
+ '[' -n y ']'
+ mkdir -p /home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILDROOT/kernel-
2.6.27.8-1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in 'asm-${LINTARCH}' asm-generic config linux math-emu media
mtd net pcmcia rxrpc scsi sound video
+ '[' -d include/asm-arm ']'
+ cp -a include/asm-arm /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in 'asm-${LINTARCH}' asm-generic config linux math-emu media
mtd net pcmcia rxrpc scsi sound video
+ '[' -d include/asm-generic ']'
+ cp -a include/asm-generic /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in 'asm-${LINTARCH}' asm-generic config linux math-emu media
mtd net pcmcia rxrpc scsi sound video
+ '[' -d include/config ']'
+ cp -a include/config /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in 'asm-${LINTARCH}' asm-generic config linux math-emu media
mtd net pcmcia rxrpc scsi sound video
+ '[' -d include/linux ']'
+ cp -a include/linux /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in 'asm-${LINTARCH}' asm-generic config linux math-emu media
mtd net pcmcia rxrpc scsi sound video
+ '[' -d include/math-emu ']'
+ cp -a include/math-emu /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in 'asm-${LINTARCH}' asm-generic config linux math-emu media
mtd net pcmcia rxrpc scsi sound video
+ '[' -d include/media ']'
+ cp -a include/media /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in 'asm-${LINTARCH}' asm-generic config linux math-emu media
mtd net pcmcia rxrpc scsi sound video
+ '[' -d include/mtd ']'
+ cp -a include/mtd /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in 'asm-${LINTARCH}' asm-generic config linux math-emu media
mtd net pcmcia rxrpc scsi sound video
+ '[' -d include/net ']'
+ cp -a include/net /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in 'asm-${LINTARCH}' asm-generic config linux math-emu media
mtd net pcmcia rxrpc scsi sound video
+ '[' -d include/pcmcia ']'
+ cp -a include/pcmcia /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in 'asm-${LINTARCH}' asm-generic config linux math-emu media
mtd net pcmcia rxrpc scsi sound video
+ '[' -d include/rxrpc ']'
+ cp -a include/rxrpc /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in 'asm-${LINTARCH}' asm-generic config linux math-emu media
mtd net pcmcia rxrpc scsi sound video
+ '[' -d include/scsi ']'
+ cp -a include/scsi /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in 'asm-${LINTARCH}' asm-generic config linux math-emu media
mtd net pcmcia rxrpc scsi sound video
+ '[' -d include/sound ']'
+ cp -a include/sound /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in 'asm-${LINTARCH}' asm-generic config linux math-emu media
mtd net pcmcia rxrpc scsi sound video
+ '[' -d include/video ']'
+ cp -a include/video /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in asm config linux
+ '[' -d ./include/asm ']'
+ cp -a ./include/asm /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in asm config linux
+ '[' -d ./include/config ']'
+ cp -a ./include/config /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ for i in asm config linux
+ '[' -d ./include/linux ']'
+ cp -a ./include/linux /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include
+ '[' arm = arm ']'
+ mkdir -p /home/tomek/Temp/ltib-8-1-2-sv/rpm/BUILDROOT/kernel-
2.6.27.8-1.i386//opt/nxp/rootfs/arm/usr/src/linux/include/asm/arch
+ cp -a './include/asm/arch/*' /home/tomek/Temp/ltib-8-1-2-
sv/rpm/BUILDROOT/kernel-2.6.27.8-
1.i386//opt/nxp/rootfs/arm/usr/src/linux/include/asm/arch
cp: cannot stat `./include/asm/arch/*': No such file or directory
error: Bad exit status from /home/tomek/Temp/ltib-8-1-2-sv/tmp/rpm-
tmp.a81dwP (%install)

RPM build errors:
    Bad exit status from /home/tomek/Temp/ltib-8-1-2-sv/tmp/rpm-
tmp.a81dwP (%install)
Build time for kernel-2.6.27.8-lpc32xx: 8 seconds

Failed building kernel-2.6.27.8-lpc32xx

I´ve tried with gcc 4.3, 3.4. Linux Fedora 10. Other packages
compiling successfully.
What to do?

Best regards
Tomasz Samotyjak



_______________________________________________
LTIB home page: http://bitshrine.org

Ltib mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/ltib


_______________________________________________
LTIB home page: http://bitshrine.org

Ltib mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/ltib





reply via email to

[Prev in Thread] Current Thread [Next in Thread]