How to recompile busybox 1.11.3 with Digi Embedded Linux 4.2 (e.g. enable sendmail)

  1. extract the busybox source from the Digi Embedded Linux DVD
  2. # mount cdrom
    # tar xjf $PATHTODVD/toolchain/packages/busybox-1.11.3.tar.bz2
  3. check for any patches Digi has done on busybox
  4. # find $PATHTODVD/toolchain -iname \*busybox\*
    check the output for relevant patches for busybox source code..
  5. change into the source code and apply the patches Digi has done
  6. # cd busybox-1.11.3
    # patch -p1 < $PATHTODVD/toolchain/builder/packages/busybox/patch/target/busybox-1.11.3-config.patch
    # patch -p1 < $PATHTOVDV/toolchain/builder/packages/busybox/patch/target/busybox-1.11.3-version.patch
  7. Add the Digi cross compilation toolchain to your PATH
  8. # export PATH=/usr/local/DigiEL-4.2/bin:$PATH
  9. Modify the busybox to your needs:
  10. e.g. configure some additional features:
    # make xconfig
    -> Select Networking Utilities
    -> Check "sendmail"
    Save and Quit, graphical config

    you can also do this by patching .config of busybox by adding:
    CONFIG_SENDMAIL=yes
  11. Check how to cross compile busybox in the Makefile
  12. Typically you would need to change CROSS_COMPILE, CXX or CC in the Makefile or when callig make. This is very dependent on which application you try to re-compile. For busybox this can be done with:
    # make CROSS_COMPILE=arm-linux-
    This will generate a ARM9 busybox binary file in the local build directory:
    # file busybox
    busybox: ELF 32-bit LSB executable, ARM, ...
  13. Install every file needed into your rootfs
  14. Running "make install" will not do the job (without patching it), since this will install on your development PC and not into your Digi Embedded Linux project
    Just copy the busybox binary into your roofs under /bin and add a symbolic link for sendmail
    If you want this for only one project, add the commands to the add_files.sh of your project.
    If all your projects should contain the new busybox with sendmail, add this to the standard rootfs. Be sure to make a backup of your old rootfs_base before.
    # install busybox /usr/local/DigiEL-4.2/rootfs/rootfs_base/bin/busybox
    # cd /usr/local/DigiEL-4.2/rootfs/rootfs_base/bin
    # ln -s busybox sendmail
  15. Build and deploy your project to the embedded module
  16. ..and test "sendmail". See the busybox or more general sendmail documentation in the web on how to use it.
Last updated: Jun 21, 2019

Recently Viewed

No recently viewed articles

Did you find this article helpful?