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.

how to rebuild busybox

Other Parts Discussed in Thread: AM3517

Hi,

I,m using AM3517 EVM with SDK 05.05.00.00. I've find out that most of shell utils in TI's SDKs are provided with BusyBox. unfortunately it comes with minimal build and quite old - 1.13.2 for my sdk.

in my application I'd like to have ftpput, so I download  1.20.2 sourses from busybox.net. the question is how to compile it for sdk?

with "make distclean" and "make menuconfig" I'm OK. sdk uses arago toolchain, but defining COMPILER_PREFIX = arago-linux-gnueabi- invokes error.

shtirlich@ubuntu:~$ cd /home/shtirlich/ti-sdk-am3517-evm-05.05.00.00/busybox-1.20.2
shtirlich@ubuntu:~/ti-sdk-am3517-evm-05.05.00.00/busybox-1.20.2$ make busybox
/home/shtirlich/ti-sdk-am3517-evm-05.05.00.00/busybox-1.20.2/scripts/gcc-version.sh: line 11: arm-arago-linux-gnueabi-gcc: command not found
  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:144: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result
  GEN     include/applet_tables.h
  CC      applets/applets.o
/bin/sh: arm-arago-linux-gnueabi-gcc: command not found
make[1]: *** [applets/applets.o] Error 127
make: *** [applets_dir] Error 2
shtirlich@ubuntu:~/ti-sdk-am3517-evm-05.05.00.00/busybox-1.20.2$

what compiler should I use for busybox? or maybe there is some magic .config for that stuff for building inside/for sdk?

Regards,

Dmitriy.

  • Hello, Dmitriy!

    You should set path to your cross-compile, e.g. make --directory=$(BUSYBOX) CROSS_COMPILE=$(CROSS) CONFIG_PREFIX=$(INITRD_DIR) install or via $PATH

  • Kirill, thanks for your help. I've successfully compiled busybox with command

    make ARCH=arm CROSS_COMPILE=/home/shtirlich/ti-sdk-am3517-evm-05.05.00.00/linux-devkit/bin/arm-arago-linux-gnueabi- all

    install path (NFS root) was selected with menuconfig by CONFIG_PREFRIX param in .config file

    and after installation with  "make install" I have new file system...

    which booting with error:

    I2C:   ready
    DRAM:  256 MiB
    WARNING: Caches not enabled
    NAND:  HW ECC [Kernel/FS layout] selected
    512 MiB
    MMC:   OMAP SD/MMC: 0
    In:    serial
    Out:   serial
    Err:   serial
    Die ID #3694000100000000015da3960f01401e
    Net:   Ethernet PHY: GENERIC @ 0x00
    DaVinci-EMAC
    Hit any key to stop autoboot:  0
    BOOTP broadcast 1
    DHCP client bound to address 192.168.0.102
    Using DaVinci-EMAC device
    TFTP from server 192.168.0.101; our IP address is 192.168.0.102
    Filename 'am3517-wifi'.
    Load address: 0x82000000
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             ##############################################
    done
    Bytes transferred = 3227048 (313da8 hex)
    ## Booting kernel from Legacy Image at 82000000 ...
       Image Name:   Linux-2.6.37
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3226984 Bytes = 3.1 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK

    Starting kernel ...

    **************some strings************************

    [    6.096649] Sending DHCP requests .
    [    8.073822] PHY: ffffffff:00 - Link is Up - 100/Full
    [    9.338745] ., OK
    [    9.862670] IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.0.102
    [    9.872894] IP-Config: Complete:
    [    9.876098]      device=eth0, addr=192.168.0.102, mask=255.255.255.0, gw=192.168.0.1,
    [    9.884368]      host=192.168.0.102, domain=, nis-domain=(none),
    [    9.890716]      bootserver=0.0.0.0, rootserver=192.168.0.101, rootpath=
    [    9.969024] VFS: Mounted root (nfs filesystem) on device 0:14.
    [    9.975585] Freeing init memory: 200K
    Bad inittab entry at line 5                            <------------------------------------- this is that error
    can't open /dev/si: No such file or directory
    can't open /dev/~~: No such file or directory
    can't open /dev/l0: No such file or directory
    can't open /dev/l1: No such file or directory
    can't open /dev/l2: No such file or directory
    can't open /dev/l3: No such file or directory
    can't open /dev/l4: No such file or directory
    can't open /dev/l5: No such file or directory
    can't open /dev/l6: No such file or directory
    can't open /dev/z6: No such file or directory
    can't open /dev/S: No such file or directory
    can't open /dev/z6: No such file or directory
    can't open /dev/S: No such file or directory
    can't open /dev/z6: No such file or directory
    can't open /dev/S: No such file or directory
    can't open /dev/z6: No such file or directory
    can't open /dev/S: No such file or directory
    can't open /dev/z6: No such file or directory
    can't open /dev/S: No such file or directory
    can't open /dev/z6: No such file or directory
    can't open /dev/S: No such file or directory
    can't open /dev/z6: No such file or directory
    can't open /dev/S: No such file or directory
    can't open /dev/z6: No such file or directory
    can't open /dev/S: No such file or directory
    can't open /dev/z6: No such file or directory
    can't open /dev/S: No such file or directory

    and so on.

    without file system modification everything ok. here the same stage of boot from sd card with standard file system.

    [   13.521362] kjournald starting.  Commit interval 5 seconds
    [   13.749420] EXT3-fs (mmcblk0p2): using internal journal
    [   13.755004] EXT3-fs (mmcblk0p2): recovery complete
    [   14.321411] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
    [   14.329376] VFS: Mounted root (ext3 filesystem) on device 179:2.
    [   14.335968] Freeing init memory: 200K
    INIT: version 2.86 booting
    Please wait: booting...
    Starting udev
    Remounting root file system...
    Caching udev devnodes

    init here is invoked correctly. in NFS before modification it was working well too.

    full log and my .config are uploaded below.

    any suggestions? wrong configs?

    Regards, Dmitry.


    2860.boot_log.txt

    6114._.config.txt

  • Hello, Dmitriy!

    As you can see you have error in inittab.

    As example my inittab:
    ::sysinit:/etc/init.d/rcS
    ::respawn:/sbin/getty -L ttyS0 115200
    ::restart:/sbin/init
    ::ctrlaltdel:/bin/umount -a -r

    And /etc/init.d/rcS:
    #!/bin/sh
    /bin/mount -a
    /sbin/mdev -s
    echo /sbin/mdev > /proc/sys/kernel/hotplug
    mkdir -p /dev/pts
    mount /dev/pts

    /etc/init.d/rcS should have executable bit.

  •  Kirill, I'm appreciate your help.

    all that things quite new for me, so I would start with basis: there is some init executable

    http://en.wikipedia.org/wiki/Inittab

    which was in my case rebuild as part of busybox. and it uses file /etc/inittab as guide what to do on system start up.

     what is the next step? should I manually  edit that set of instructions, or change something in busybox configs to make this file be rebuild with that new settings?

    regards, Dmitriy

  • Hello, Dmitriy!

    You can manually change your inittab. Note one point, format inittab BusyBox not identical inittab Linux, please use as example inittab from BusyBox sources.

  • Hi, kirill!

    So after all I am able to login!

    I was wrong about new BusyBox install changes some init scripts, they stay unchanged. editing default initab  resulting system begin start up and then shutting down before login.very helpful was placing a lot of debug menages with echo in different scripts being invoked.

    heare my initab and rcS, and fragment of S35mountall.sh

    1220.rcS.zip

    #
    # mountall.sh    Mount all filesystems.
    #
    # Version:    @(#)mountall.sh  2.83-2  01-Nov-2001  miquels@cistron.nl
    #
    echo "S35"
    . /etc/default/rcS
    if test -f /etc/default/mountall; then
        . /etc/default/mountall
    fi

    echo "S35 1"
    #
    # Mount local filesystems in /etc/fstab. For some reason, people
    # might want to mount "proc" several times, and mount -v complains
    # about this. So we mount "proc" filesystems without -v.
    #
    test "$VERBOSE" != no && echo "Mounting local filesystems..."
    mount -a $MOUNTALL 2>&1 | logger -s -p user.err

    echo "S35 2"

    #
    # We might have mounted something over /dev, see if /dev/initctl is there.
    #
    if test ! -p /dev/initctl
    then
        rm -f /dev/initctl
        mknod -m 600 /dev/initctl p
    fi
    #kill -USR1 1     <------  system boots well after commenting this

    echo "S35 3"

    now I get full-featured BusyBox. I'm going to test it's ftp clients with usb wifi. results will be posted here.

    Kirill, thank you again.

    Best regards,

    Dmitriy.