Errors while Compiling busy box for android on i.mx53 QSB board

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

Errors while Compiling busy box for android on i.mx53 QSB board

6,683 Views
admin
Specialist II

I started compiling busy box by downloading the source from the below link by executing the following commands

http://omapedia.org/wiki/Android_Installing_Busybox_Command_Line_Tools

ubuntu@ubuntu-laptop:~$ git clone git://busybox.net/busybox.git
ubuntu@ubuntu-laptop:~$ cd busybox/
ubuntu@ubuntu-laptop:~$ git checkout -b my_working_branch 1_19_3

configured the busybox using the following command

make ARCH=arm CROSS_COMPILE=arm-eabi- menuconfig

In menuconfig set the following options

Busybox Settings --> Build Options --> Build Busybox as a static binary (no shared libs)  -  Enable this option by pressing "Y"
Busybox Settings --> Build Options --> Cross compiler prefix  -  Set this option equal to "arm-none-linux-gnueabi-"
Busybox Settings --> General Configuration --> Don't use /usr  -  Enable this option by pressing "Y"
Linux Module Utilities --> [ ] Simplified modutils
                           [*]   insmod
                           [*]   rmmod 
                           [*]   lsmod
                           [*]     Pretty output
                           [ ]   modprobe
                           [ ]   depmod
Linux Module Utilities --> [ ] Support version 2.2/2.4 Linux kernels
Linux Module Utilities --> [ ] Try to load module from a mmap'ed area
Linux Module Utilities --> [*] Support tainted module checking with new kernels
Linux Module Utilities --> () Default directory containing modules - Set this option to nothing
Linux Module Utilities --> () Default name of modules.dep - Set this option to nothing

And builded using the below command

ubuntu@ubuntu-laptop:~/busybox$ make ARCH=arm CROSS_COMPILE=arm-eabi-
  SPLIT   include/autoconf.h -> include/config/*
  GEN     include/bbconfigopts.h
  HOSTCC  applets/usage
applets/usage.c: In function ‘main’:
applets/usage.c:52: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
  GEN     include/usage_compressed.h
  HOSTCC  applets/applet_tables
applets/applet_tables.c: In function ‘main’:
applets/applet_tables.c:151: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
  GEN     include/applet_tables.h
  CC      applets/applets.o
In file included from include/libbb.h:13,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
include/platform.h:138:20: error: limits.h: No such file or directory
include/platform.h:149:23: error: byteswap.h: No such file or directory
include/platform.h:150:21: error: endian.h: No such file or directory
include/platform.h:175:3: error: #error "Can't determine endianness"
include/platform.h:178:5: warning: "ULONG_MAX" is not defined
include/platform.h:183:5: warning: "BB_BIG_ENDIAN" is not defined
include/platform.h:206:20: error: stdint.h: No such file or directory
In file included from include/libbb.h:13,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
include/platform.h:208: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bb__aliased_uint16_t'
include/platform.h:209: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bb__aliased_uint32_t'
include/platform.h:283:20: error: unistd.h: No such file or directory
In file included from include/busybox.h:8,
                 from applets/applets.c:9:
include/libbb.h:15:19: error: ctype.h: No such file or directory
include/libbb.h:16:20: error: dirent.h: No such file or directory
include/libbb.h:17:19: error: errno.h: No such file or directory
include/libbb.h:18:19: error: fcntl.h: No such file or directory
include/libbb.h:19:22: error: inttypes.h: No such file or directory
include/libbb.h:20:19: error: netdb.h: No such file or directory
include/libbb.h:21:20: error: setjmp.h: No such file or directory
include/libbb.h:22:20: error: signal.h: No such file or directory
include/libbb.h:30:19: error: stdio.h: No such file or directory
include/libbb.h:31:20: error: stdlib.h: No such file or directory
include/libbb.h:34:20: error: string.h: No such file or directory
include/libbb.h:37:43: error: libgen.h: No such file or directory
include/libbb.h:40:22: error: sys/poll.h: No such file or directory
include/libbb.h:41:23: error: sys/ioctl.h: No such file or directory
include/libbb.h:42:22: error: sys/mman.h: No such file or directory
include/libbb.h:43:24: error: sys/socket.h: No such file or directory
include/libbb.h:44:22: error: sys/stat.h: No such file or directory
include/libbb.h:45:22: error: sys/time.h: No such file or directory
include/libbb.h:46:23: error: sys/types.h: No such file or directory
include/libbb.h:48:28: error: sys/sysmacros.h: No such file or directory
include/libbb.h:50:22: error: sys/wait.h: No such file or directory
include/libbb.h:51:21: error: termios.h: No such file or directory
include/libbb.h:52:18: error: time.h: No such file or directory
include/libbb.h:53:23: error: sys/param.h: No such file or directory
include/libbb.h:54:17: error: pwd.h: No such file or directory
include/libbb.h:55:17: error: grp.h: No such file or directory
include/libbb.h:69:21: error: mntent.h: No such file or directory
include/libbb.h:72:25: error: sys/statfs.h: No such file or directory
include/libbb.h:87:19: error: utmp.h: No such file or directory
include/libbb.h:116:24: error: arpa/inet.h: No such file or directory
In file included from include/libbb.h:183,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
include/pwd_.h:70: error: expected ')' before '__uid'
include/pwd_.h:87: error: expected ')' before '__uid'
include/pwd_.h:99: error: expected ')' before '*' token
In file included from include/libbb.h:184,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
include/grp_.h:71: error: expected ')' before '__gid'
include/grp_.h:89: error: expected ')' before '__gid'
include/grp_.h:101: error: expected ')' before '*' token
include/grp_.h:109: error: expected declaration specifiers or '...' before 'gid_t'
include/grp_.h:110: error: expected declaration specifiers or '...' before 'gid_t'
include/grp_.h:115: error: expected declaration specifiers or '...' before 'gid_t'
include/libbb.h:215:6: warning: "ULONG_MAX" is not defined
In file included from include/busybox.h:8,
                 from applets/applets.c:9:
include/libbb.h:256: error: 'off_t' undeclared here (not in a function)
include/libbb.h:301:7: warning: "ULONG_MAX" is not defined
include/libbb.h:303: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bb_bswap_64'
include/libbb.h:320: error: expected ')' before 'mode'
include/libbb.h:354: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'recurse_flags_t'
include/libbb.h:356: warning: 'struct stat' declared inside parameter list
include/libbb.h:356: warning: its scope is only this definition or declaration, which is probably not what you want
include/libbb.h:357: warning: 'struct stat' declared inside parameter list
include/libbb.h:366: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bb_copyfd_eof'
include/libbb.h:367: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bb_copyfd_size'
include/libbb.h:368: error: expected declaration specifiers or '...' before 'off_t'
include/libbb.h:371: error: expected ')' before 'sz'
include/libbb.h:396: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:397: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:424: error: 'SIGHUP' undeclared here (not in a function)
include/libbb.h:425: error: 'SIGINT' undeclared here (not in a function)
include/libbb.h:426: error: 'SIGTERM' undeclared here (not in a function)
include/libbb.h:427: error: 'SIGPIPE' undeclared here (not in a function)
include/libbb.h:428: error: 'SIGQUIT' undeclared here (not in a function)
include/libbb.h:429: error: 'SIGABRT' undeclared here (not in a function)
include/libbb.h:430: error: 'SIGALRM' undeclared here (not in a function)
include/libbb.h:431: error: 'SIGVTALRM' undeclared here (not in a function)
include/libbb.h:432: error: 'SIGXCPU' undeclared here (not in a function)
include/libbb.h:433: error: 'SIGXFSZ' undeclared here (not in a function)
include/libbb.h:434: error: 'SIGUSR1' undeclared here (not in a function)
include/libbb.h:435: error: 'SIGUSR2' undeclared here (not in a function)
include/libbb.h:452: warning: 'struct sigaction' declared inside parameter list
include/libbb.h:460: error: expected ')' before 'gid'
include/libbb.h:461: error: expected ')' before 'uid'
include/libbb.h:468: warning: 'struct stat' declared inside parameter list
include/libbb.h:469: warning: 'struct stat' declared inside parameter list
include/libbb.h:479: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xlseek'
include/libbb.h:481: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fdlength'
include/libbb.h:495: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'socktype_t'
include/libbb.h:496: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'family_t'
include/libbb.h:499: error: 'SOCK_STREAM' undeclared here (not in a function)
include/libbb.h:500: error: 'SOCK_DGRAM' undeclared here (not in a function)
include/libbb.h:501: error: 'SOCK_RDM' undeclared here (not in a function)
include/libbb.h:502: error: 'SOCK_SEQPACKET' undeclared here (not in a function)
include/libbb.h:503: error: 'SOCK_RAW' undeclared here (not in a function)
include/libbb.h:506: error: 'AF_UNSPEC' undeclared here (not in a function)
include/libbb.h:507: error: 'AF_INET' undeclared here (not in a function)
include/libbb.h:508: error: 'AF_INET6' undeclared here (not in a function)
include/libbb.h:509: error: 'AF_UNIX' undeclared here (not in a function)
include/libbb.h:522: warning: 'struct tm' declared inside parameter list
include/libbb.h:523: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'validate_tm_time'
include/libbb.h:527: warning: 'struct sockaddr' declared inside parameter list
include/libbb.h:529: warning: 'struct sockaddr' declared inside parameter list
include/libbb.h:530: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xsendto'
include/libbb.h:546: error: field 'sa' has incomplete type
include/libbb.h:547: error: field 'sin' has incomplete type
include/libbb.h:549: error: field 'sin6' has incomplete type
include/libbb.h:557: error: field 'sa' has incomplete type
include/libbb.h:558: error: field 'sin' has incomplete type
include/libbb.h:560: error: field 'sin6' has incomplete type
include/libbb.h:605: error: expected declaration specifiers or '...' before 'sa_family_t'
include/libbb.h:606: error: expected declaration specifiers or '...' before 'sa_family_t'
include/libbb.h:631: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'send_to_from'
include/libbb.h:635: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'recv_from_to'
include/libbb.h:640: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'inet_cksum'
include/libbb.h:677: error: expected declaration specifiers or '...' before 'FILE'
include/libbb.h:697: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'safe_read'
include/libbb.h:698: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nonblock_immune_read'
include/libbb.h:701: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'full_read'
include/libbb.h:704: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'read_close'
include/libbb.h:705: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'open_read_close'
include/libbb.h:729: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'safe_write'
include/libbb.h:732: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'full_write'
include/libbb.h:735: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'full_write1_str'
include/libbb.h:736: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'full_write2_str'
include/libbb.h:743: error: expected ')' before '*' token
include/libbb.h:750: error: expected ')' before '*' token
include/libbb.h:752: error: expected ')' before '*' token
include/libbb.h:754: error: expected ')' before '*' token
include/libbb.h:756: error: expected ')' before '*' token
include/libbb.h:758: error: expected ')' before '*' token
include/libbb.h:760: error: expected ')' before '*' token
include/libbb.h:764: error: expected ')' before '*' token
include/libbb.h:768: error: expected ')' before '*' token
include/libbb.h:769: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:771: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:773: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:774: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:775: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:776: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:777: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:778: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:779: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:780: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:789: error: expected declaration specifiers or '...' before 'nfds_t'
include/libbb.h:789: warning: 'struct pollfd' declared inside parameter list
include/libbb.h:820: error: expected ')' before '*' token
In file included from include/libbb.h:827,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
include/xatonum.h:86:5: warning: "ULONG_MAX" is not defined
include/xatonum.h:86:18: warning: "ULLONG_MAX" is not defined
include/xatonum.h:94:5: warning: "UINT_MAX" is not defined
include/xatonum.h:94:17: warning: "ULLONG_MAX" is not defined
include/xatonum.h:96:7: warning: "UINT_MAX" is not defined
include/xatonum.h:96:19: warning: "ULONG_MAX" is not defined
In file included from include/libbb.h:827,
                 from include/busybox.h:8,
                 from applets/applets.c:9:
include/xatonum.h:104: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'BUG_xatou32_unimplemented'
include/xatonum.h:105: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xatou32'
include/xatonum.h:130:5: warning: "ULONG_MAX" is not defined
include/xatonum.h:130:18: warning: "ULLONG_MAX" is not defined
include/xatonum.h:142:5: warning: "UINT_MAX" is not defined
include/xatonum.h:142:17: warning: "ULLONG_MAX" is not defined
include/xatonum.h:149:7: warning: "UINT_MAX" is not defined
include/xatonum.h:149:19: warning: "ULONG_MAX" is not defined
include/xatonum.h:161: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'BUG_bb_strtou32_unimplemented'
include/xatonum.h:163: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bb_strtou32'
include/xatonum.h:172: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bb_strtoi32'
In file included from include/busybox.h:8,
                 from applets/applets.c:9:
include/libbb.h:840: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xatou16'
include/libbb.h:852: error: expected specifier-qualifier-list before 'uid_t'
include/libbb.h:863: error: expected ')' before 'uid'
include/libbb.h:864: error: expected ')' before 'gid'
include/libbb.h:865: error: expected ')' before 'uid'
include/libbb.h:866: error: expected ')' before 'gid'
include/libbb.h:867: error: expected ')' before 'uid'
include/libbb.h:868: error: expected ')' before 'gid'
include/libbb.h:869: error: expected ')' before 'uid'
include/libbb.h:870: error: expected ')' before 'gid'
include/libbb.h:872: error: expected ')' before 'uid'
include/libbb.h:873: error: expected ')' before 'gid'
include/libbb.h:876: error: 'uid_t' undeclared here (not in a function)
include/libbb.h:884: error: expected ')' before 'pid'
include/libbb.h:885: error: expected ')' before 'pid'
include/libbb.h:923: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xfork'
include/libbb.h:927: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'spawn'
include/libbb.h:928: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xspawn'
include/libbb.h:930: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'safe_waitpid'
include/libbb.h:931: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wait_any_nohang'
include/libbb.h:940: error: expected ')' before 'pid'
include/libbb.h:1011: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'option_mask32'
include/libbb.h:1012: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'getopt32'
include/libbb.h:1056: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xfunc_error_retval'
include/libbb.h:1057: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'die_jmp'
include/libbb.h:1153: warning: 'struct mntent' declared inside parameter list
include/libbb.h:1157: error: expected ')' before 'speed'
include/libbb.h:1158: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'tty_value_to_baud'
include/libbb.h:1180: error: expected declaration specifiers or '...' before 'mode_t'
include/libbb.h:1203: error: expected specifier-qualifier-list before 'FILE'
include/libbb.h:1210: error: expected declaration specifiers or '...' before 'FILE'
In file included from include/busybox.h:8,
                 from applets/applets.c:9:
include/libbb.h:1328: warning: 'struct termios' declared inside parameter list
include/libbb.h:1345: warning: 'struct stat' declared inside parameter list
include/libbb.h:1346: warning: 'struct stat' declared inside parameter list
include/libbb.h:1422: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'read_key'
include/libbb.h:1511: error: expected ')' before 'pid'
include/libbb.h:1515: error: expected specifier-qualifier-list before 'DIR'
include/libbb.h:1593: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:1594: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:1617: error: expected ')' before '*' token
include/libbb.h:1620: error: expected specifier-qualifier-list before 'uint8_t'
include/libbb.h:1628: error: expected specifier-qualifier-list before 'uint64_t'
include/libbb.h:1645: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:1646: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
include/libbb.h:1647: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'crc32_block_endian1'
include/libbb.h:1648: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'crc32_block_endian0'
In file included from applets/applets.c:9:
include/busybox.h:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'applet_nameofs'
include/busybox.h:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'applet_install_loc'
make[1]: *** [applets/applets.o] Error 1
make: *** [applets_dir] Error 2

I am getting the above errors but am unable to resolve the above errors, could you please let me know how to overcome the above problem or is there any specific source codes for busybox which is meant only for android i.mx53 board or if the above source code of busy box works for android imx53 board, please help me in resolving the above errors or any other steps to be followed in compiling the above source code

Kindly do the needful as soon as possible, if u find any solution

Many Thanks in advance,

0 Kudos
Reply
6 Replies

1,783 Views
wsmith
Contributor I

You might need

LOCAL_MULTILIB := both

in your makefile, and you might get a bit further.

(I have other problems compiling now)

I am also trying to compile busybox properly for arm64,

and everything that is out there just does not work.

0 Kudos
Reply

1,783 Views
KrishnaPavan
Contributor II

Hi,

I hope you exported it a proper way like, export PATH = .....<path> and later export the environment variable like export CROSS_COMPILE.

OK, I got it, place your busybox directory at some other place and specify the target directory. I did the same.

By doing so you get a binary in the build directory itself.

Regards :: Krishna Pavan

0 Kudos
Reply

1,783 Views
admin
Specialist II

Dear sir,

Thanks f or your replies,

I used the cross compiler which i had used for building the android on mx53 board for compiling busy box

I have exported the same cross compiler for compiling busy box

I hope the cross compiler which i have used for building android on mx53 board is not flexible for compiling busy box, so is there any other cross compilers for compiling busy box for my android mx53 QSB

Pls correct me if my assumption is wrong,

Srinivasan


Krishna Pavan said:

Hi Srinivasan,

I have used busybox 1.19.2 for other software. I can't help you with the same for i.MX53.

But,

1. do you have a proper cross-compiler?

2. have you exported a proper cross-compiler to the shell?

The errors are related to cross_compiler also, that's what I have told.

Regards :: Krishna Pavan

0 Kudos
Reply

1,783 Views
KrishnaPavan
Contributor II

Hi Srinivasan,

I have used busybox 1.19.2 for other software. I can't help you with the same for i.MX53.

But,

1. do you have a proper cross-compiler?

2. have you exported a proper cross-compiler to the shell?

The errors are related to cross_compiler also, that's what I have told.

Regards :: Krishna Pavan

0 Kudos
Reply

1,783 Views
admin
Specialist II

Dear Sir,

Thanks a lot for your replies,

Have you compiled the busy box for android i.mx53 board, if so could you please share the links of the busy box which you have downloaded & if you have any documents pertaining to how to compile busy box coud you please share with me

Because I am stuck with the above errors & bot able to succeed further, could you please help me as am new to this android platform

Many Thanks in advance,

Srinivasan S


Krishna Pavan said:

Hi Srinivasan,

Are you sure you have exported the PATH variable to the respective shell properly.

Some errors are related to compiler, as they could not link up the proper library.

You have to use your cross_compiler[CC] and not the "just for reference" CC in the instruction list.

Regards :: Krishna Pavan

0 Kudos
Reply

1,783 Views
KrishnaPavan
Contributor II

Hi Srinivasan,

Are you sure you have exported the PATH variable to the respective shell properly.

Some errors are related to compiler, as they could not link up the proper library.

You have to use your cross_compiler[CC] and not the "just for reference" CC in the instruction list.

Regards :: Krishna Pavan

0 Kudos
Reply