Using LTIB and custom toolchain

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using LTIB and custom toolchain

Jump to solution
2,601 Views
rgirme
Contributor I
Hello,

I tried using the LTIB from Freescale. I am using a custom toolchain along LTIB to build the Linux kernel image for MCF5485evb. I made the necessary changes in the LTIB settings to build it using my toolchain. Everything runs fine until I get this error:

/home/rohit/Programs/LTIB/
ltib-m5475evb-20080808/rpm/BUILD/busybox-1.1.3/modutils/insmod.c: In function 'arch_apply_relocation':
/home/rohit/Programs/LTIB/ltib-m5475evb-20080808/rpm/BUILD/busybox-1.1.3/modutils/insmod.c:864: warning: unused variable 'got'
  CC modutils/modprobe.o
  CC modutils/rmmod.o
  CC networking/ftpgetput.o
  CC networking/hostname.o
  CC networking/ifconfig.o
  CC networking/ifupdown.o
  CC networking/inetd.o
  CC networking/interface.o
  CC networking/ip.o
  CC networking/ipaddr.o
  CC networking/iplink.o
  CC networking/iproute.o
  CC networking/nc.o
  CC networking/netstat.o
  CC networking/ping.o
  CC networking/route.o
  CC networking/telnet.o
  CC networking/telnetd.o
  CC networking/tftp.o
  CC networking/traceroute.o
  CC networking/vconfig.o
  CC networking/wget.o
  CC networking/libiproute/ip_parse_common_args.o
  CC networking/libiproute/ipaddress.o
  CC networking/libiproute/iplink.o
  CC networking/libiproute/iproute.o
  CC networking/libiproute/iptunnel.o
In file included from /home/rohit/CodeSourcery_free/Sourcery_G++_Lite/bin/../m68k-linux-gnu/libc/usr/include/linux/if_tunnel.h:5,
                 from /home/rohit/Programs/LTIB/ltib-m5475evb-20080808/rpm/BUILD/busybox-1.1.3/networking/libiproute/iptunnel.c:34:
/home/rohit/CodeSourcery_free/Sourcery_G++_Lite/bin/../m68k-linux-gnu/libc/usr/include/linux/ip.h:85: error: redefinition of 'struct iphdr'
  CC networking/libiproute/libnetlink.o
make[1]: *** [/home/rohit/Programs/LTIB/ltib-m5475evb-20080808/rpm/BUILD/busybox-1.1.3/networking/libiproute/iptunnel.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** wait: No child processes.  Stop.
make: *** [_all] Error 2
error: Bad exit status from /home/rohit/Programs/LTIB/ltib-m5475evb-20080808/tmp/rpm-tmp.19617 (%build)


RPM build errors:
    Bad exit status from /home/rohit/Programs/LTIB/ltib-m5475evb-20080808/tmp/rpm-tmp.19617 (%build)
Build time for busybox: 20 seconds

Failed building busybox



f_buildrpms() returned an error, exiting
traceback:
 main:501


Started: Tue Jul 28 14:15:22 2009
Ended:   Tue Jul 28 14:21:27 2009
Elapsed: 365 seconds

These packages failed to build:
busybox

Build Failed

Exiting on error or interrupt
 
I checked the make files but couldnt find anything. Can you help me out with this? What do I need to do to successfully complete build?

Thank you for your time. I am grateful.

Thanks,
Rohit
Labels (1)
0 Kudos
1 Solution
596 Views
jehoffma
Contributor II

Hi,

 

it seems there are some issues with older busybox and gcc4.3 toolchain. I've applied following patch to busybox 1.1.3.

 

diff --exclude CVS -uNr busybox-1.1.3/libbb/procps.c busybox-1.1.3.modified/libbb/procps.c
--- busybox-1.1.3/libbb/procps.c 2006-03-22 22:16:22.000000000 +0100
+++ busybox-1.1.3.modified/libbb/procps.c 2009-05-26 13:53:35.000000000 +0200
@@ -12,7 +12,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <asm/page.h>
+#include <sys/param.h>
 #include <fcntl.h>
 
 #include "libbb.h"
diff --exclude CVS -uNr busybox-1.1.3/util-linux/mkswap.c busybox-1.1.3.modified/util-linux/mkswap.c
--- busybox-1.1.3/util-linux/mkswap.c 2006-03-22 22:16:26.000000000 +0100
+++ busybox-1.1.3.modified/util-linux/mkswap.c 2009-05-26 13:54:06.000000000 +0200
@@ -42,7 +42,7 @@
 #include <stdlib.h>
 #include <sys/ioctl.h>   /* for _IO */
 #include <sys/utsname.h>
-#include <asm/page.h>   /* for PAGE_SIZE and PAGE_SHIFT */
+#include <sys/param.h>   /* for PAGE_SIZE and PAGE_SHIFT */
     /* we also get PAGE_SIZE via getpagesize() */
 #include "busybox.h"
 
diff --exclude CVS --exclude .git -uNr busybox-1.1.3/networking/libiproute/iptunnel.c busybox-1.1.3.modified/networking/libiproute/iptunnel.c
--- busybox-1.1.3/networking/libiproute/iptunnel.c 2006-03-22 22:16:18.000000000 +0100
+++ busybox-1.1.3.modified/networking/libiproute/iptunnel.c 2009-07-31 11:39:19.000000000 +0200
@@ -21,16 +21,15 @@
 #include <unistd.h>
 
 #include <arpa/inet.h>
-#include <netinet/ip.h>
 #include <netinet/in.h>
 
-#include <net/if.h>
 #include <net/if_arp.h>
 
 #include <asm/types.h>
 #ifndef __constant_htons
 #define __constant_htons htons
 #endif
+#include <linux/if.h>
 #include <linux/if_tunnel.h>
 
 #include "rt_names.h"

 

Message Edited by jehoffma on 2009-07-31 11:19 AM

View solution in original post

0 Kudos
2 Replies
597 Views
jehoffma
Contributor II

Hi,

 

it seems there are some issues with older busybox and gcc4.3 toolchain. I've applied following patch to busybox 1.1.3.

 

diff --exclude CVS -uNr busybox-1.1.3/libbb/procps.c busybox-1.1.3.modified/libbb/procps.c
--- busybox-1.1.3/libbb/procps.c 2006-03-22 22:16:22.000000000 +0100
+++ busybox-1.1.3.modified/libbb/procps.c 2009-05-26 13:53:35.000000000 +0200
@@ -12,7 +12,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <asm/page.h>
+#include <sys/param.h>
 #include <fcntl.h>
 
 #include "libbb.h"
diff --exclude CVS -uNr busybox-1.1.3/util-linux/mkswap.c busybox-1.1.3.modified/util-linux/mkswap.c
--- busybox-1.1.3/util-linux/mkswap.c 2006-03-22 22:16:26.000000000 +0100
+++ busybox-1.1.3.modified/util-linux/mkswap.c 2009-05-26 13:54:06.000000000 +0200
@@ -42,7 +42,7 @@
 #include <stdlib.h>
 #include <sys/ioctl.h>   /* for _IO */
 #include <sys/utsname.h>
-#include <asm/page.h>   /* for PAGE_SIZE and PAGE_SHIFT */
+#include <sys/param.h>   /* for PAGE_SIZE and PAGE_SHIFT */
     /* we also get PAGE_SIZE via getpagesize() */
 #include "busybox.h"
 
diff --exclude CVS --exclude .git -uNr busybox-1.1.3/networking/libiproute/iptunnel.c busybox-1.1.3.modified/networking/libiproute/iptunnel.c
--- busybox-1.1.3/networking/libiproute/iptunnel.c 2006-03-22 22:16:18.000000000 +0100
+++ busybox-1.1.3.modified/networking/libiproute/iptunnel.c 2009-07-31 11:39:19.000000000 +0200
@@ -21,16 +21,15 @@
 #include <unistd.h>
 
 #include <arpa/inet.h>
-#include <netinet/ip.h>
 #include <netinet/in.h>
 
-#include <net/if.h>
 #include <net/if_arp.h>
 
 #include <asm/types.h>
 #ifndef __constant_htons
 #define __constant_htons htons
 #endif
+#include <linux/if.h>
 #include <linux/if_tunnel.h>
 
 #include "rt_names.h"

 

Message Edited by jehoffma on 2009-07-31 11:19 AM
0 Kudos
596 Views
rgirme
Contributor I

Hello Jehoffma,

 

Thank you for your reply..

Can you explain to me how I am supposed to use this patch?

 

Thanks,

Rohit

0 Kudos