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.

minimum file system with gdbserver and Kermit etc.

Other Parts Discussed in Thread: AM3703

Hi,

How can I get the minimum size file system that can boot up for my AM3703 EVM board to flash into nand? The file system in my SDK package is big size like 24M and does not have gdbserver which I need for debugging. Also I hope to add other tools such as Kermit into the file system. Any one can help or point to me to the correct forum to post the question? Thanks.

Frank

  • Frank,

    The base file system still has a package manager called opkg.  So you can take that file system and remove the packages you don't want.  use the opkg list and opkg remove commands to see what is installed and remove the packages.

    You should be able to copy the gdbserver from the full file system into your modified file system.

    Lastly, you will need to cross-compile Kermit and install that into your file system if you need that.

    You can also look at the Arago project at http://arago-project.org which is based on openembedded and can help you build minimal file systems.

    Chase

  • Hi Chase,

    Thanks for the quick reply. I found opkg in /usr/bin of my target file directory but it cannot run. Only opkg-cl and opkg-key are executable files. But I cannot run them in the target directory somehow. Sorry I am new to Linux. So where to run opkg to configure the packages for my target directory.

    Further queston, I see long list of packages in my remote board linux if I run opkg-cl list-installed. I don't know which of them can be removed. My SDK package gives 0 guide on how to configure the file sytem needed. Thanks.

    Frank

  • Frank,

    You should run the opkg command on the target board.  You will need to boot the base file system on the target so that you can run opkg.  The base file system will have a shorter list of packages than the full file system on the SD card.


    I would recommend booting the base file system over NFS (the setup.sh script should be able to help you configure NFS) and then removing packages you do not need.

    Chase

  • Hi Chase,

    Could you suggest what packages are basic that I must have and what packages are optional? Or tell me where to learn about these packages? There are so many lib* packages and I have no ideas what they are for. Thanks.

    Frank

  • Frank,

    This is completely dependent on your system and what you are trying to do.  For example if you don't care about networking performance measurement then you can remove the iperf package, but if that is something you are trying to do you should leave it there.  I'm afraid there is not always a clean cut answer to this question.  One thing I can say is that when building a "base" image in Openembedded usually only the following packages are required:

    1. base-files

    2. base-passwd

    3. busybox

    4. modutils-initscripts

    5. netbase

    You can try removing the rest of the packages.  You can also use the additional command that opkg provides to help you out such as the "whatdepends" command to tell what packages depend on the one you are thinking about removing.

    As a quick list you might try removing the following packages (NOTE: I have not tried this myself and I don't know if something you want will be removed):

    alsa-lib, alsa-utils-aplay, mtd-utils, curl, arago-feed-configs, initscript-telnetd, devmem2, ethtool, tcpdump, update-alternatives, module-init-tools, dbus, dbus-x11, expat, glib-2.0, libxml2, libpcre, iptables, iperf, psplash-ti, arago-gpl-notice, u-boot, u-boot-spl, alsa-conf, alsa-conf-base, alsa-server, alsa-utils, alsa-utils-aconnect, alsa-utils-alsaconf, alsa-utils-alsactl, alsa-utils-alsamixer, alsa-utils-amixer, alsa-utils-iecset, alsa-utils-midi, alsa-utils-speakertest, alsa-state, ncurses, ncurses-terminfo, ncurses-tools, e2fsprogs, e2fsprogs-e2fsck, e2fsprogs-mke2fs, dosfstools, util-linux-ng-fdisk, fbset, usbutils, i2c-tools, iproute2, zlib, tslib-conf, tslib-calibrate, tslib-tests, libpng12, jpeg, jpeg-tools, freetype, thttpd, cppstub

    This will get you pretty close to a base image but to be honest I don't know how usable that image will be since most of the tools have been removed.

    Chase

  • Thanks Chase. This is very helpful. What about the packages start with lib* and pam*? There are many of them. I need u-boot for boot up. Does that mean I should not remove u-boot and u-boot-spl packages? Any links have desciptions of these packages? Thanks.

    Frank

  • Frank,

    The u-boot and u-boot-spl packages just place a copy of the bootloaders on the root file system for reference. The copies used during boot are the ones on the first partition of the SD card.

    As for the lib* packages I would probably leave most of these alone unless you know that you aren't using a library.  If you do try to remove one that is being used by another package you should be given a warning of which packages are using the library.

    Chase

  • Ok. I will follow your instructions. Thanks a lot.