This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x evm ICS new driver build process

Hi,

I'm adding a new driver to the ICS Android image. theproblem is when I generated the linux image 

with the new driver as a module but I couldn't find it anywhere (using the busybox to search so I'm pretty sure

I searched everywhere). so I tried to build the driver as a built-in driver, but same result.

In the both cases, I was using the rootfs.tar.bz2 that I generated for the "original" Android Image

described in this link : http://processors.wiki.ti.com/index.php/TI-Android-ICS-4.0.3-DevKit-3.0.1_DevelopersGuide

So, I was wondering if I have to re-build the rootfs in order to add the new driver ? Although I'm almost sure

that there's no connection between rootfs and the Linux Image.

Or, maybe I'm missing something ?

I really appreciate your help. 

Thanks in advance.

B.R

  • Hi Hafedh,

    After you compile your modules with "make modules", .ko files are generated in the folders of the corresponding .c files. This is where you will find the kernel module (.ko file) for your driver. Then you have to move it to your device root filesystem. The command you have to use on your device, in order to try and load the module, is "insmod <module_name>.ko" or "modprobe <module_name>.ko".

    If you wish to have your kernel load the module automatically, then after you compile your modules, you have to run "make modules_install INSTALL_MOD_PATH=/path_to_your_target_device_rootfs/".

    Best regards,
    Miroslav

  • Hi Miroslav,

    Thank You for Your quick answer.

    I used this command in order to build the dvb-usb.ko  

        make ARCH=arm CROSS_COMPILE=arm-eabi- modules

    but when I tried to insert the module on the AM335x evm using 

      insmod dvb-usb.ko

    I got this error :  insmod: can't insert 'dvb-usb.ko': invalid module format

    I appreciate Your help.

    Thanks in advance.

    B.R

  • Hi Hafedh,

    Please post the output of the following command:

    file <path_to_file>/dvb-usb.ko

    Also is the arm-eabi- cross compiler the one that comes with your downloaded Android ICS SDK?

    Best regards,
    Miroslav

  • Hi Miroslav,

    the output of the file dvb-usb.ko command is 

    dvb-usb.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), BuildID[sha1]=0x9dddf998962f8aa4fd1523c1d9a80a07bf1ba0b7, not stripped

    and yes, I'm using the arm-eabi cross compiler => echo $PATH gives :

    /usr/lib/jvm/jdk1.6.0_43/bin:/home/hafedh/rowboat/TI-Android-ICS-4.0.3-DevKit-EVM-SK-3.0.1/

    prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:

    /usr/bin:/sbin:/bin. 

    Thanks in advance.

    B.R

  • Hi Miroslav,

    Sorry for my last reply.

    the output of the file dvb-usb.ko command is 

    dvb-usb.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), BuildID[sha1]=0x9dddf998962f8aa4fd1523c1d9a80a07bf1ba0b7, not stripped

    Thanks again

  • Hi Hafedh,

    The module file format seems to be ok. Are you sure your module was compiled against the same kernel version that is running on your target system? Have you made any changes? Please check if the kernel config used to build your module is the same as the config for the currently running kernel. The kernel keeps its current config in /proc/config.gz. Untar this file and compare it to the .config file in your kernel folder used to build the module. Use this config to compile your kernel and then your module. It would be best if you clean your build tree before that, just to be sure.

    If this doesn't help, then please run "modinfo <path_to_file>/dvb-usb.ko" and check the "vermagic" string. It shows what options were used to build the module. These options must match between the module and the running kernel.

    If any of the above suggestions doesn't work, please post what the "dmesg" command (run inside your target system) shows after you try to load your module.

    Best regards,
    Miroslav

  • Hi again,

    I re-compiled the kernel and then made the command :

    make ARCH=arm CROSS_COMPILE=arm-eabi- modules

    so, I'm sure now that they have the same config.

    now, when trying to insert the module, I get this error 

    insmod: can't insert 'dvb-usb.ko': unknown symbol in module or invalid parameter

    I can't figure out the reason.

    Thank Your for your help.

    B.R

  • Hi Hafedh,

    Would you please post what the "dmesg" command outputs after you try to insmod the module. I'm interested in what symbols are unknown. Perhaps you module depends on another module? Please try "modprobe dvb-usb.ko" as it is a wrapper for "insmod", which also handles the module dependencies.

    Best regards,
    Miroslav

  • Hi Miroslav,

    The busybox binary that I'm using have some problem with the modprobe command.

    however, after running insmod dvb-usb.ko command, the dmesg's output is the following : 

    [ 2059.941802] dvb_usb: Unknown symbol dvb_dmxdev_init (err 0)
    [ 2059.947845] dvb_usb: Unknown symbol dvb_register_adapter (err 0)
    [ 2059.954193] dvb_usb: Unknown symbol dvb_dmx_swfilter_204 (err 0)
    [ 2059.960449] dvb_usb: Unknown symbol dvb_dmx_release (err 0)
    [ 2059.966278] dvb_usb: Unknown symbol rc_register_device (err 0)
    [ 2059.972381] dvb_usb: Unknown symbol dvb_net_init (err 0)
    [ 2059.977935] dvb_usb: Unknown symbol dvb_dmx_swfilter (err 0)
    [ 2059.983886] dvb_usb: Unknown symbol dvb_dmxdev_release (err 0)
    [ 2059.989959] dvb_usb: Unknown symbol rc_free_device (err 0)
    [ 2059.995697] dvb_usb: Unknown symbol dvb_frontend_detach (err 0)
    [ 2060.001892] dvb_usb: Unknown symbol dvb_net_release (err 0)
    [ 2060.007720] dvb_usb: Unknown symbol rc_allocate_device (err 0)
    [ 2060.013824] dvb_usb: Unknown symbol dvb_unregister_frontend (err 0)
    [ 2060.020355] dvb_usb: Unknown symbol dvb_register_frontend (err 0)
    [ 2060.026763] dvb_usb: Unknown symbol dvb_unregister_adapter (err 0)
    [ 2060.033203] dvb_usb: Unknown symbol dvb_dmx_init (err 0)
    [ 2060.038757] dvb_usb: Unknown symbol rc_unregister_device (err 0)

    This seems to be related to DVB for Linux option in the kernel config. but 

    I made sure to make it as built-in in the kernel config. I can't figure out the issue.

    Thanks in advance.

    B.R

  • Hi again,

    so, I choosed to build "DVB for linux" (dvb-core) as a module in the kernel config,

    but I noticed after the end of the kernel compilation that there is no (dvb-core.ko) buit

    and when I explored the kernel image using an adb shell, I couldn't find anything neither.

    Is this a common behavior to not getting the .ko automatically netither on my Ubuntu nor

    on the linux uImage for the Am335x evm ? because it seems weird to 

    build the module myself as it's the "original" linux module not mine.

    So, I tried to generate the dvb-core.ko ( even it's weird) and when I tried to insert it, it gave me

    those error in dmesg:

    [ 325.782989] dvb_core: disagrees about version of symbol eth_header
    [ 325.789581] dvb_core: Unknown symbol eth_header (err -22)
    [ 325.795257] dvb_core: disagrees about version of symbol eth_rebuild_header
    [ 325.802429] dvb_core: Unknown symbol eth_rebuild_header (err -22)
    [ 325.808807] dvb_core: disagrees about version of symbol skb_put
    [ 325.814971] dvb_core: Unknown symbol skb_put (err -22)
    [ 325.820343] dvb_core: disagrees about version of symbol consume_skb
    [ 325.826873] dvb_core: Unknown symbol consume_skb (err -22)
    [ 325.832611] dvb_core: disagrees about version of symbol unregister_netdev
    [ 325.839721] dvb_core: Unknown symbol unregister_netdev (err -22)
    [ 325.846038] dvb_core: disagrees about version of symbol eth_validate_addr
    [ 325.853118] dvb_core: Unknown symbol eth_validate_addr (err -22)
    [ 325.859405] dvb_core: disagrees about version of symbol ether_setup
    [ 325.865966] dvb_core: Unknown symbol ether_setup (err -22)
    [ 325.871673] dvb_core: disagrees about version of symbol wake_up_process
    [ 325.878570] dvb_core: Unknown symbol wake_up_process (err -22)
    [ 325.884674] dvb_core: disagrees about version of symbol alloc_netdev_mqs
    [ 325.891662] dvb_core: Unknown symbol alloc_netdev_mqs (err -22)
    [ 325.897857] dvb_core: disagrees about version of symbol eth_header_parse
    [ 325.904846] dvb_core: Unknown symbol eth_header_parse (err -22)
    [ 325.911102] dvb_core: disagrees about version of symbol skb_pull
    [ 325.917358] dvb_core: Unknown symbol skb_pull (err -22)
    [ 325.922821] dvb_core: disagrees about version of symbol skb_push
    [ 325.929107] dvb_core: Unknown symbol skb_push (err -22)
    [ 325.934570] dvb_core: disagrees about version of symbol register_netdev
    [ 325.941467] dvb_core: Unknown symbol register_netdev (err -22)
    [ 325.947540] dvb_core: disagrees about version of symbol free_netdev
    [ 325.954101] dvb_core: Unknown symbol free_netdev (err -22)
    [ 325.959838] dvb_core: disagrees about version of symbol dev_alloc_skb
    [ 325.966552] dvb_core: Unknown symbol dev_alloc_skb (err -22)
    [ 325.972473] dvb_core: disagrees about version of symbol netif_rx
    [ 325.978759] dvb_core: Unknown symbol netif_rx (err -22)
    [ 325.984252] dvb_core: disagrees about version of symbol eth_change_mtu
    [ 325.991058] dvb_core: Unknown symbol eth_change_mtu (err -22)

    although that I didn't get any error when compiling the kernel having the

    same dvb-core as built-in. I can't figure out the problem.

    Thanks in advance

    B.R

  • Hi Hafedh,

    What exactly do you mean, having problem with modprobe? What is the output when you run the command?

    Actually I have to correct myself from my previous post - the command you have to run is "modprobe dvb-usb", not "modprobe dvb-usb.ko" as I stated before, otherwise the modprobe command will output that it can't find the .ko file. I'm sorry for the mistake.

    The "Unknown symbol" errors are most probably caused by the fact that "insmod" doesn't care for the module dependencies listed in the /lib/modules/<version>/modules.dep file.

    So, please try the following:

    I assume the kernel and module versions and options are the same.
    You run sudo make ARCH=arm modules_install INSTALL_MOD_PATH=/<path_to_target_rootfs> - this will install all the modules including the dependencies file into the specified rootfs folder (located on mounted SD card). If you can't mount the real rootfs folder of your target device, then please copy these files to it via adb.
    On your device run "depmod -a" and then "modprobe dvb-usb".

    If the insmod/modprobe command continues to give "Unknown symbol" errors, I'll investigate further.

    P.S. If this doesn't work then please also post the output of the following command: "depmod -v -a"

    Best regards,
    Miroslav

  • Hi Miroslav,

    the only working binary of busybox I found (on this forum) is 1.17 ( http://e2e.ti.com/support/embedded/android/f/509/t/161092.aspx )

    as I couldn't compile the busybox ( as it needs the Android Source code probably &

    I don't have that). So, it doesn't seem to run the modprobe correctly.

    Anyway, is it ook that the "DVB for linux" option is set to module in the kernel menuconfig

    to not to be generated automatically by the make process ( Can't find the dvb-core.ko neither on my PC

    nor on the generated uImage) ?? Or do I have to generate its .ko manually ( weird thing to do as it's a

    Linux feature not a new module to add) ??

    However, when I tried to do that ( generate the DVB for Linux option's .ko manually)

    and when I run insmod dvb-core.ko , I got those errors :

    [ 325.782989] dvb_core: disagrees about version of symbol eth_header
    [ 325.789581] dvb_core: Unknown symbol eth_header (err -22)
    [ 325.795257] dvb_core: disagrees about version of symbol eth_rebuild_header
    [ 325.802429] dvb_core: Unknown symbol eth_rebuild_header (err -22)
    [ 325.808807] dvb_core: disagrees about version of symbol skb_put

    etc..

    And a similar problem was mentionned on this forum http://e2e.ti.com/support/embedded/linux/f/354/t/101933.aspx?pi239031349=2

    but I can't see how exactly it was solved at the end.

    I really appreciate your help.

    Thanks in advance.

    B.R

  • Hi,

    Read this in order to understand how to cross compile your busybox. You don't need any sources except for the busybox sources themselves.

    Also please tell me how do you configure your kernel config? Do you alter the config files directly or do you use "make menuconfig" or similar command?

    Best regards,
    Miroslav

  • Hi Miroslav,

    Thanks again for your answer.

    So, I've already tried the steps described in the script in order to croos-compile busybox, but I got the errors in the attached file.

    But the main problem remains : I can't find the .ko of the menuconfig options set as module on my pc.

    I'm using these commands exactly : 

    make ARCH=arm CROSS_COMPILE=arm-eabi-  distclean

    make ARCH=arm CROSS_COMPILE=arm-eabi-  am335x_evm_android_defconfig

    make ARCH=arm CROSS_COMPILE=arm-eabi-  menuconfig ( & choose to add the DVB for linux as module & some drivers)

    make ARCH=arm CROSS_COMPILE=arm-eabi-  uImage

    It compiles just fine, however, I can't locate the .ko of the modules on my computer.

    But when I tried this command make ARCH=arm CROSS_COMPILE=arm-eabi-  ( without the uImage part) I was able to find all the .ko 

    files on my computer. so, is the use of uImage in the command prevent the generation of the .ko ? 

    In the other hand, I'm confused about the dip switch config, as I'm booting from the SD card but when

    I made a change in the /system folder ( using adb & some busybox binairy ), the same change persists even after erasing the SD card and putting a fresh Android uImage (same rootfs).

    That made me wonder if I'm really in the SD card boot mode, especialy that I found more than one config of the dip switches over the net.

    however, when I change /system by mounting it into my PC, I'm able to find the change under the adb shell, meaning that I'm booting from

    the SD card. So, another question, why does the run-time change persist ? 

    Thank you for your help.

     

    *
    * System Logging Utilities
    *
    syslogd (SYSLOGD) [Y/n/?] (NEW) y
      Rotate message files (FEATURE_ROTATE_LOGFILE) [Y/n/?] (NEW) y
      Remote Log support (FEATURE_REMOTE_LOG) [Y/n/?] (NEW) y
      Support -D (drop dups) option (FEATURE_SYSLOGD_DUP) [Y/n/?] (NEW) y
      Read buffer size in bytes (FEATURE_SYSLOGD_READ_BUFFER_SIZE) [256] (NEW) 256
      Circular Buffer support (FEATURE_IPC_SYSLOG) [Y/n/?] (NEW) y
        Circular buffer size in Kbytes (minimum 4KB) (FEATURE_IPC_SYSLOG_BUFFER_SIZE) [16] (NEW) 16
        logread (LOGREAD) [Y/n/?] (NEW) y
          Double buffering (FEATURE_LOGREAD_REDUCED_LOCKING) [Y/n/?] (NEW) y
    klogd (KLOGD) [Y/n/?] (NEW) y
    logger (LOGGER) [Y/n/?] (NEW) y
      SPLIT   include/autoconf.h -> include/config/*
      GEN     include/bbconfigopts.h
      HOSTCC  applets/usage
    applets/usage.c: In function ‘main’:
    applets/usage.c:52:8: attention : ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
      GEN     include/usage_compressed.h
      HOSTCC  applets/applet_tables
    applets/applet_tables.c: In function ‘main’:
    applets/applet_tables.c:138:9: attention : ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
      GEN     include/applet_tables.h
      CC      applets/applets.o
    In file included from include/libbb.h:13,
                     from include/busybox.h:10,
                     from applets/applets.c:9:
    include/platform.h:165:23: error: byteswap.h: No such file or directory
    include/platform.h:166:21: error: endian.h: No such file or directory
    include/platform.h:179:3: error: #error "Can't determine endianness"
    include/platform.h:183:5: warning: "BB_BIG_ENDIAN" is not defined
    In file included from include/busybox.h:10,
                     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:23:20: error: stdint.h: No such file or directory
    include/libbb.h:24:19: error: stdio.h: No such file or directory
    include/libbb.h:25:20: error: stdlib.h: No such file or directory
    include/libbb.h:28:20: error: string.h: No such file or directory
    include/libbb.h:29:22: error: sys/poll.h: No such file or directory
    include/libbb.h:30:23: error: sys/ioctl.h: No such file or directory
    include/libbb.h:31:22: error: sys/mman.h: No such file or directory
    include/libbb.h:32:24: error: sys/socket.h: No such file or directory
    include/libbb.h:33:22: error: sys/stat.h: No such file or directory
    include/libbb.h:34:22: error: sys/time.h: No such file or directory
    include/libbb.h:35:23: error: sys/types.h: No such file or directory
    include/libbb.h:36:22: error: sys/wait.h: No such file or directory
    include/libbb.h:37:21: error: termios.h: No such file or directory
    include/libbb.h:38:18: error: time.h: No such file or directory
    include/libbb.h:39:20: error: unistd.h: No such file or directory
    include/libbb.h:41:20: error: limits.h: No such file or directory
    include/libbb.h:42:23: error: sys/param.h: No such file or directory
    include/libbb.h:44:20: error: mntent.h: No such file or directory
    include/libbb.h:47:24: error: sys/statfs.h: No such file or directory
    include/libbb.h:63:17: error: pwd.h: No such file or directory
    include/libbb.h:64:17: error: grp.h: No such file or directory
    include/libbb.h:79:24: error: arpa/inet.h: No such file or directory
    In file included from include/libbb.h:138,
                     from include/busybox.h:10,
                     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:139,
                     from include/busybox.h:10,
                     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:170:6: warning: "ULONG_MAX" is not defined
    In file included from include/busybox.h:10,
                     from applets/applets.c:9:
    include/libbb.h:271: error: expected ')' before 'mode'
    include/libbb.h:272: warning: 'struct stat' declared inside parameter list
    include/libbb.h:272: warning: its scope is only this definition or declaration, which is probably not what you want
    include/libbb.h:305: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'recurse_flags_t'
    include/libbb.h:307: warning: 'struct stat' declared inside parameter list
    include/libbb.h:308: warning: 'struct stat' declared inside parameter list
    include/libbb.h:317: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bb_copyfd_eof'
    include/libbb.h:318: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bb_copyfd_size'
    include/libbb.h:319: error: expected declaration specifiers or '...' before 'off_t'
    include/libbb.h:322: error: expected ')' before 'sz'
    include/libbb.h:341: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:342: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:369: error: 'SIGHUP' undeclared here (not in a function)
    include/libbb.h:370: error: 'SIGINT' undeclared here (not in a function)
    include/libbb.h:371: error: 'SIGTERM' undeclared here (not in a function)
    include/libbb.h:372: error: 'SIGPIPE' undeclared here (not in a function)
    include/libbb.h:373: error: 'SIGQUIT' undeclared here (not in a function)
    include/libbb.h:374: error: 'SIGABRT' undeclared here (not in a function)
    include/libbb.h:375: error: 'SIGALRM' undeclared here (not in a function)
    include/libbb.h:376: error: 'SIGVTALRM' undeclared here (not in a function)
    include/libbb.h:377: error: 'SIGXCPU' undeclared here (not in a function)
    include/libbb.h:378: error: 'SIGXFSZ' undeclared here (not in a function)
    include/libbb.h:379: error: 'SIGUSR1' undeclared here (not in a function)
    include/libbb.h:380: error: 'SIGUSR2' undeclared here (not in a function)
    include/libbb.h:397: warning: 'struct sigaction' declared inside parameter list
    include/libbb.h:405: error: expected ')' before 'gid'
    include/libbb.h:406: error: expected ')' before 'uid'
    include/libbb.h:413: warning: 'struct stat' declared inside parameter list
    include/libbb.h:423: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xlseek'
    include/libbb.h:424: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fdlength'
    include/libbb.h:438: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'socktype_t'
    include/libbb.h:439: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'family_t'
    include/libbb.h:442: error: 'SOCK_STREAM' undeclared here (not in a function)
    include/libbb.h:443: error: 'SOCK_DGRAM' undeclared here (not in a function)
    include/libbb.h:444: error: 'SOCK_RDM' undeclared here (not in a function)
    include/libbb.h:445: error: 'SOCK_SEQPACKET' undeclared here (not in a function)
    include/libbb.h:446: error: 'SOCK_RAW' undeclared here (not in a function)
    include/libbb.h:449: error: 'AF_UNSPEC' undeclared here (not in a function)
    include/libbb.h:450: error: 'AF_INET' undeclared here (not in a function)
    include/libbb.h:451: error: 'AF_INET6' undeclared here (not in a function)
    include/libbb.h:452: error: 'AF_UNIX' undeclared here (not in a function)
    include/libbb.h:465: warning: 'struct tm' declared inside parameter list
    include/libbb.h:466: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'validate_tm_time'
    include/libbb.h:470: warning: 'struct sockaddr' declared inside parameter list
    include/libbb.h:472: warning: 'struct sockaddr' declared inside parameter list
    include/libbb.h:473: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xsendto'
    include/libbb.h:489: error: field 'sa' has incomplete type
    include/libbb.h:490: error: field 'sin' has incomplete type
    include/libbb.h:492: error: field 'sin6' has incomplete type
    include/libbb.h:500: error: field 'sa' has incomplete type
    include/libbb.h:501: error: field 'sin' has incomplete type
    include/libbb.h:503: error: field 'sin6' has incomplete type
    include/libbb.h:553: error: expected declaration specifiers or '...' before 'sa_family_t'
    include/libbb.h:554: error: expected declaration specifiers or '...' before 'sa_family_t'
    include/libbb.h:579: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'send_to_from'
    include/libbb.h:583: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'recv_from_to'
    include/libbb.h:624: error: expected declaration specifiers or '...' before 'FILE'
    include/libbb.h:641: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'safe_read'
    include/libbb.h:642: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nonblock_safe_read'
    include/libbb.h:645: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'full_read'
    include/libbb.h:648: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'read_close'
    include/libbb.h:649: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'open_read_close'
    include/libbb.h:673: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'safe_write'
    include/libbb.h:676: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'full_write'
    include/libbb.h:679: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'full_write1_str'
    include/libbb.h:680: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'full_write2_str'
    include/libbb.h:687: error: expected ')' before '*' token
    include/libbb.h:689: error: expected ')' before '*' token
    include/libbb.h:690: error: expected ')' before '*' token
    include/libbb.h:692: error: expected ')' before '*' token
    include/libbb.h:694: error: expected ')' before '*' token
    include/libbb.h:696: error: expected ')' before '*' token
    include/libbb.h:698: error: expected ')' before '*' token
    include/libbb.h:700: error: expected ')' before '*' token
    include/libbb.h:704: error: expected ')' before '*' token
    include/libbb.h:708: error: expected ')' before '*' token
    include/libbb.h:709: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:711: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:713: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:714: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:715: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:716: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:717: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:718: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:719: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:720: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:729: error: expected declaration specifiers or '...' before 'nfds_t'
    include/libbb.h:729: warning: 'struct pollfd' declared inside parameter list
    include/libbb.h:760: error: expected ')' before '*' token
    In file included from include/libbb.h:767,
                     from include/busybox.h:10,
                     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:767,
                     from include/busybox.h:10,
                     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'
    In file included from include/busybox.h:10,
                     from applets/applets.c:9:
    include/libbb.h:775: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xatou16'
    include/libbb.h:787: error: expected specifier-qualifier-list before 'uid_t'
    include/libbb.h:798: error: expected ')' before 'uid'
    include/libbb.h:799: error: expected ')' before 'gid'
    include/libbb.h:800: error: expected ')' before 'uid'
    include/libbb.h:801: error: expected ')' before 'gid'
    include/libbb.h:802: error: expected ')' before 'uid'
    include/libbb.h:803: error: expected ')' before 'gid'
    include/libbb.h:807: error: expected ')' before 'uid'
    include/libbb.h:808: error: expected ')' before 'gid'
    include/libbb.h:819: error: expected ')' before 'pid'
    include/libbb.h:820: error: expected ')' before 'pid'
    include/libbb.h:855: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xfork'
    include/libbb.h:859: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'spawn'
    include/libbb.h:860: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xspawn'
    include/libbb.h:862: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'safe_waitpid'
    include/libbb.h:863: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wait_any_nohang'
    include/libbb.h:872: error: expected ')' before 'pid'
    include/libbb.h:876: error: expected specifier-qualifier-list before 'jmp_buf'
    include/libbb.h:950: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'option_mask32'
    include/libbb.h:951: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'getopt32'
    include/libbb.h:992: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'die_jmp'
    include/libbb.h:1088: warning: 'struct mntent' declared inside parameter list
    include/libbb.h:1092: error: expected ')' before 'speed'
    include/libbb.h:1093: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'tty_value_to_baud'
    include/libbb.h:1115: error: expected declaration specifiers or '...' before 'mode_t'
    include/libbb.h:1137: error: expected specifier-qualifier-list before 'FILE'
    include/libbb.h:1143: error: expected declaration specifiers or '...' before 'FILE'
    In file included from include/busybox.h:10,
                     from applets/applets.c:9:
    include/libbb.h:1245: warning: 'struct termios' declared inside parameter list
    include/libbb.h:1262: warning: 'struct stat' declared inside parameter list
    include/libbb.h:1263: warning: 'struct stat' declared inside parameter list
    include/libbb.h:1327: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'read_key'
    include/libbb.h:1386: error: expected specifier-qualifier-list before 'DIR'
    include/libbb.h:1476: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:1477: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:1485: error: expected specifier-qualifier-list before 'uint32_t'
    include/libbb.h:1498: error: expected specifier-qualifier-list before 'uint64_t'
    include/libbb.h:1507: error: expected specifier-qualifier-list before 'uint32_t'
    include/libbb.h:1528: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:1539: error: expected specifier-qualifier-list before 'off_t'
    include/libbb.h:1547: error: expected declaration specifiers or '...' before 'off_t'
    include/libbb.h:1547: error: expected declaration specifiers or '...' before 'off_t'
    include/libbb.h:1548: error: expected declaration specifiers or '...' before 'off_t'
    In file included from applets/applets.c:9:
    include/busybox.h:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'applet_nameofs'
    include/busybox.h:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'applet_install_loc'
    make[1]: *** [applets/applets.o] Erreur 1
    make: *** [applets_dir] Erreur 2
    
    

  • Hi again, 

    I think the SD card problem is a DIP switches config pproblem. I just checked the u-boot log using minicom and it seems to

    boot from Nand. Can You point me to the correct DIP Switch config to boot from SD card ? (as there are too many configs over the net) 

    Thanks in advance.

  • Hi,

    Hafedh Haouala said:

    Hi Miroslav,

    Thanks again for your answer.

    So, I've already tried the steps described in the script in order to croos-compile busybox, but I got the errors in the attached file.

    But the main problem remains : I can't find the .ko of the menuconfig options set as module on my pc.

    I'm using these commands exactly : 

    make ARCH=arm CROSS_COMPILE=arm-eabi-  distclean

    make ARCH=arm CROSS_COMPILE=arm-eabi-  am335x_evm_android_defconfig

    make ARCH=arm CROSS_COMPILE=arm-eabi-  menuconfig ( & choose to add the DVB for linux as module & some drivers)

    make ARCH=arm CROSS_COMPILE=arm-eabi-  uImage

    It compiles just fine, however, I can't locate the .ko of the modules on my computer.

    But when I tried this command make ARCH=arm CROSS_COMPILE=arm-eabi-  ( without the uImage part) I was able to find all the .ko 

    files on my computer. so, is the use of uImage in the command prevent the generation of the .ko ? 

    This is how the make system works here:

    "make" defaults to "make all" which means it will build both kernel Image AND the kernel modules (.ko files). It then compresses the Image to zImage by default.
    "make modules" makes only the modules.
    "make uImage" generates kernel Image, then zImage and then adds the needed U-Boot headers to it, so the output is uImage, which is U-Boot bootable kernel image file.

    I hope this makes things clear.

    Regarding the Boot Switch problem:

    Please read this section of the U-Boot's User Guide. Keep in mind the following:

    IMPORTANT

    ON is labeled on the wrong side of SW3 boot mode switch.

    Please always check the official Sitara AM335x portal for the information you seek, as information found across the internet may not always be correct.

    Best regards,
    Miroslav

  • Hi,

    Thank You for your answer. 

    I'll be using those commands ( would you correct me if I'm wrong )

    make ARCH=arm CROSS_COMPILE=arm-eabi-  distclean

    make ARCH=arm CROSS_COMPILE=arm-eabi-  am335x_evm_android_defconfig

    make ARCH=arm CROSS_COMPILE=arm-eabi-  menuconfig ( & choose to add the DVB for linux as module & some drivers)

    make ARCH=arm CROSS_COMPILE=arm-eabi-  uImage

    make ARCH=arm CROSS_COMPILE=arm-eabi- modules

    make modules_install INSTALL_MOD_PATH="rootfs_path"

    meaning that the uImage won't contain the modules by default ?

    what about the busybox errors ?

    I can't express my gratitude. Thank you for the quality of your support and thank you for sharing your knowledge.

    Best regards

  • Hi,

    The make command sequence seems OK. The uImage file contains only the drivers that are configured to be built within the kernel image. uImage does not contain the drivers, that are selected to be built as modules. These drivers (.ko files) are generated after the execution of the "make modules" command and can later be dynamically linked with the running kernel (using insmod or modprobe).

    Regarding the busybox build errors, it seems like either something wrong with your environment, or permissions issue. Can you please try and execute the Busybox build commands as root (using "sudo"):
    sudo make CROSS_COMPILE=arm-eabi- defconfig

    Best regards,
    Miroslav

  • Hi,

    I tried to build the busybox by using those commands :

    sudo make CROSS_COMPILE=arm-eabi- defconfig

    sudo make CROSS_COMPILE=arm-eabi- 

    but I got the same errors stated in the new attached file.

    Thanks in advance.

     sudo make 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:8: attention : ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
      GEN     include/usage_compressed.h
      HOSTCC  applets/applet_tables
    applets/applet_tables.c: In function ‘main’:
    applets/applet_tables.c:138:9: attention : ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
      GEN     include/applet_tables.h
      CC      applets/applets.o
    In file included from include/libbb.h:13,
                     from include/busybox.h:10,
                     from applets/applets.c:9:
    include/platform.h:165:23: error: byteswap.h: No such file or directory
    include/platform.h:166:21: error: endian.h: No such file or directory
    include/platform.h:179:3: error: #error "Can't determine endianness"
    include/platform.h:183:5: warning: "BB_BIG_ENDIAN" is not defined
    In file included from include/busybox.h:10,
                     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:23:20: error: stdint.h: No such file or directory
    include/libbb.h:24:19: error: stdio.h: No such file or directory
    include/libbb.h:25:20: error: stdlib.h: No such file or directory
    include/libbb.h:28:20: error: string.h: No such file or directory
    include/libbb.h:29:22: error: sys/poll.h: No such file or directory
    include/libbb.h:30:23: error: sys/ioctl.h: No such file or directory
    include/libbb.h:31:22: error: sys/mman.h: No such file or directory
    include/libbb.h:32:24: error: sys/socket.h: No such file or directory
    include/libbb.h:33:22: error: sys/stat.h: No such file or directory
    include/libbb.h:34:22: error: sys/time.h: No such file or directory
    include/libbb.h:35:23: error: sys/types.h: No such file or directory
    include/libbb.h:36:22: error: sys/wait.h: No such file or directory
    include/libbb.h:37:21: error: termios.h: No such file or directory
    include/libbb.h:38:18: error: time.h: No such file or directory
    include/libbb.h:39:20: error: unistd.h: No such file or directory
    include/libbb.h:41:20: error: limits.h: No such file or directory
    include/libbb.h:42:23: error: sys/param.h: No such file or directory
    include/libbb.h:44:20: error: mntent.h: No such file or directory
    include/libbb.h:47:24: error: sys/statfs.h: No such file or directory
    include/libbb.h:63:17: error: pwd.h: No such file or directory
    include/libbb.h:64:17: error: grp.h: No such file or directory
    include/libbb.h:79:24: error: arpa/inet.h: No such file or directory
    In file included from include/libbb.h:138,
                     from include/busybox.h:10,
                     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:139,
                     from include/busybox.h:10,
                     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:170:6: warning: "ULONG_MAX" is not defined
    In file included from include/busybox.h:10,
                     from applets/applets.c:9:
    include/libbb.h:271: error: expected ')' before 'mode'
    include/libbb.h:272: warning: 'struct stat' declared inside parameter list
    include/libbb.h:272: warning: its scope is only this definition or declaration, which is probably not what you want
    include/libbb.h:305: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'recurse_flags_t'
    include/libbb.h:307: warning: 'struct stat' declared inside parameter list
    include/libbb.h:308: warning: 'struct stat' declared inside parameter list
    include/libbb.h:317: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bb_copyfd_eof'
    include/libbb.h:318: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bb_copyfd_size'
    include/libbb.h:319: error: expected declaration specifiers or '...' before 'off_t'
    include/libbb.h:322: error: expected ')' before 'sz'
    include/libbb.h:341: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:342: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:369: error: 'SIGHUP' undeclared here (not in a function)
    include/libbb.h:370: error: 'SIGINT' undeclared here (not in a function)
    include/libbb.h:371: error: 'SIGTERM' undeclared here (not in a function)
    include/libbb.h:372: error: 'SIGPIPE' undeclared here (not in a function)
    include/libbb.h:373: error: 'SIGQUIT' undeclared here (not in a function)
    include/libbb.h:374: error: 'SIGABRT' undeclared here (not in a function)
    include/libbb.h:375: error: 'SIGALRM' undeclared here (not in a function)
    include/libbb.h:376: error: 'SIGVTALRM' undeclared here (not in a function)
    include/libbb.h:377: error: 'SIGXCPU' undeclared here (not in a function)
    include/libbb.h:378: error: 'SIGXFSZ' undeclared here (not in a function)
    include/libbb.h:379: error: 'SIGUSR1' undeclared here (not in a function)
    include/libbb.h:380: error: 'SIGUSR2' undeclared here (not in a function)
    include/libbb.h:397: warning: 'struct sigaction' declared inside parameter list
    include/libbb.h:405: error: expected ')' before 'gid'
    include/libbb.h:406: error: expected ')' before 'uid'
    include/libbb.h:413: warning: 'struct stat' declared inside parameter list
    include/libbb.h:423: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xlseek'
    include/libbb.h:424: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fdlength'
    include/libbb.h:438: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'socktype_t'
    include/libbb.h:439: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'family_t'
    include/libbb.h:442: error: 'SOCK_STREAM' undeclared here (not in a function)
    include/libbb.h:443: error: 'SOCK_DGRAM' undeclared here (not in a function)
    include/libbb.h:444: error: 'SOCK_RDM' undeclared here (not in a function)
    include/libbb.h:445: error: 'SOCK_SEQPACKET' undeclared here (not in a function)
    include/libbb.h:446: error: 'SOCK_RAW' undeclared here (not in a function)
    include/libbb.h:449: error: 'AF_UNSPEC' undeclared here (not in a function)
    include/libbb.h:450: error: 'AF_INET' undeclared here (not in a function)
    include/libbb.h:451: error: 'AF_INET6' undeclared here (not in a function)
    include/libbb.h:452: error: 'AF_UNIX' undeclared here (not in a function)
    include/libbb.h:465: warning: 'struct tm' declared inside parameter list
    include/libbb.h:466: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'validate_tm_time'
    include/libbb.h:470: warning: 'struct sockaddr' declared inside parameter list
    include/libbb.h:472: warning: 'struct sockaddr' declared inside parameter list
    include/libbb.h:473: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xsendto'
    include/libbb.h:489: error: field 'sa' has incomplete type
    include/libbb.h:490: error: field 'sin' has incomplete type
    include/libbb.h:492: error: field 'sin6' has incomplete type
    include/libbb.h:500: error: field 'sa' has incomplete type
    include/libbb.h:501: error: field 'sin' has incomplete type
    include/libbb.h:503: error: field 'sin6' has incomplete type
    include/libbb.h:553: error: expected declaration specifiers or '...' before 'sa_family_t'
    include/libbb.h:554: error: expected declaration specifiers or '...' before 'sa_family_t'
    include/libbb.h:579: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'send_to_from'
    include/libbb.h:583: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'recv_from_to'
    include/libbb.h:624: error: expected declaration specifiers or '...' before 'FILE'
    include/libbb.h:641: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'safe_read'
    include/libbb.h:642: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nonblock_safe_read'
    include/libbb.h:645: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'full_read'
    include/libbb.h:648: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'read_close'
    include/libbb.h:649: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'open_read_close'
    include/libbb.h:673: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'safe_write'
    include/libbb.h:676: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'full_write'
    include/libbb.h:679: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'full_write1_str'
    include/libbb.h:680: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'full_write2_str'
    include/libbb.h:687: error: expected ')' before '*' token
    include/libbb.h:689: error: expected ')' before '*' token
    include/libbb.h:690: error: expected ')' before '*' token
    include/libbb.h:692: error: expected ')' before '*' token
    include/libbb.h:694: error: expected ')' before '*' token
    include/libbb.h:696: error: expected ')' before '*' token
    include/libbb.h:698: error: expected ')' before '*' token
    include/libbb.h:700: error: expected ')' before '*' token
    include/libbb.h:704: error: expected ')' before '*' token
    include/libbb.h:708: error: expected ')' before '*' token
    include/libbb.h:709: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:711: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:713: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:714: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:715: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:716: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:717: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:718: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:719: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:720: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:729: error: expected declaration specifiers or '...' before 'nfds_t'
    include/libbb.h:729: warning: 'struct pollfd' declared inside parameter list
    include/libbb.h:760: error: expected ')' before '*' token
    In file included from include/libbb.h:767,
                     from include/busybox.h:10,
                     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:767,
                     from include/busybox.h:10,
                     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'
    In file included from include/busybox.h:10,
                     from applets/applets.c:9:
    include/libbb.h:775: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xatou16'
    include/libbb.h:787: error: expected specifier-qualifier-list before 'uid_t'
    include/libbb.h:798: error: expected ')' before 'uid'
    include/libbb.h:799: error: expected ')' before 'gid'
    include/libbb.h:800: error: expected ')' before 'uid'
    include/libbb.h:801: error: expected ')' before 'gid'
    include/libbb.h:802: error: expected ')' before 'uid'
    include/libbb.h:803: error: expected ')' before 'gid'
    include/libbb.h:807: error: expected ')' before 'uid'
    include/libbb.h:808: error: expected ')' before 'gid'
    include/libbb.h:819: error: expected ')' before 'pid'
    include/libbb.h:820: error: expected ')' before 'pid'
    include/libbb.h:855: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xfork'
    include/libbb.h:859: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'spawn'
    include/libbb.h:860: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xspawn'
    include/libbb.h:862: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'safe_waitpid'
    include/libbb.h:863: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wait_any_nohang'
    include/libbb.h:872: error: expected ')' before 'pid'
    include/libbb.h:876: error: expected specifier-qualifier-list before 'jmp_buf'
    include/libbb.h:950: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'option_mask32'
    include/libbb.h:951: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'getopt32'
    include/libbb.h:992: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'die_jmp'
    include/libbb.h:1088: warning: 'struct mntent' declared inside parameter list
    include/libbb.h:1092: error: expected ')' before 'speed'
    include/libbb.h:1093: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'tty_value_to_baud'
    include/libbb.h:1115: error: expected declaration specifiers or '...' before 'mode_t'
    include/libbb.h:1137: error: expected specifier-qualifier-list before 'FILE'
    include/libbb.h:1143: error: expected declaration specifiers or '...' before 'FILE'
    In file included from include/busybox.h:10,
                     from applets/applets.c:9:
    include/libbb.h:1245: warning: 'struct termios' declared inside parameter list
    include/libbb.h:1262: warning: 'struct stat' declared inside parameter list
    include/libbb.h:1263: warning: 'struct stat' declared inside parameter list
    include/libbb.h:1327: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'read_key'
    include/libbb.h:1386: error: expected specifier-qualifier-list before 'DIR'
    include/libbb.h:1476: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:1477: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:1485: error: expected specifier-qualifier-list before 'uint32_t'
    include/libbb.h:1498: error: expected specifier-qualifier-list before 'uint64_t'
    include/libbb.h:1507: error: expected specifier-qualifier-list before 'uint32_t'
    include/libbb.h:1528: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    include/libbb.h:1539: error: expected specifier-qualifier-list before 'off_t'
    include/libbb.h:1547: error: expected declaration specifiers or '...' before 'off_t'
    include/libbb.h:1547: error: expected declaration specifiers or '...' before 'off_t'
    include/libbb.h:1548: error: expected declaration specifiers or '...' before 'off_t'
    In file included from applets/applets.c:9:
    include/busybox.h:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'applet_nameofs'
    include/busybox.h:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'applet_install_loc'
    make[1]: *** [applets/applets.o] Erreur 1
    make: *** [applets_dir] Erreur 2
    
    

  • Hi,

    Please check if you have installed the build-essential package. If not - install it:
    sudo apt-get install build-essential

    If you already have this package, you may want to try to reinstall it:
    sudo apt-get remove build-essential
    sudo apt-get install build-essential

    If this doesn't do the trick, then please post the output of the following two commands:
    uname -a
    find /usr/include/ -name "stdio.h"

    You can also try the following before compiling:
    export GCC_INCLUDE_DIR=/usr/include/

    Please post your progress.

    Best regards,
    Miroslav

  • Hi,

    I've already had the  build-essential . So, I re-installed it . 

    uname -a   =>  Linux Vaio 3.2.0-39-generic-pae #62-Ubuntu SMP Wed Feb 27 22:25:11 UTC 2013 i686 i686 i386 GNU/Linux

    find /usr/include/ -name "stdio.h"   :

                                           /usr/include/c++/4.6/tr1/stdio.h
                                          /usr/include/stdio.h
                                         /usr/include/i386-linux-gnu/bits/stdio.h

    Miroslav Kiradzhiyski XID said:
    You can also try the following before compiling:
    export GCC_INCLUDE_DIR=/usr/include/

    I will post my progress when I will flash the NAND and try to boot from the SD card.

    Thank you for your quality of support.

    Best Regards