Computer Accessories User Manual
Using the DiskOnChip with Linux OS
91-SR-005-10-7L REV. 2.0 21
For example:
# ldd /sbin/mke2fs
libext2fs.so.2 /lib/libext2fs.so.2
libcom_err.so.2 /lib/libcom_err.so.2
libuuid.so.1 lib/libuuid.so.1
libc.so.5 /lib/libc.so.5
This will show which libraries are needed for the program mke2fs. In this example, it is necessary to copy
the following four libraries:
# cp /lib/ext2fs.so.2 /diskonchip/lib
# cp /lib/libcom_err.so.2 /diskonchip/lib
# cp /lib/libuuid.so.1 /diskonchip/lib
# cp /lib/libc.so.5 /diskonchip/lib
If you have a long list of files to be copied, it is also possible to run the following command:
# ldd /bin/* > lib_list
# more lib_list
Copy the library loaders as follows:
# cp lib/ld.so /diskonchip/lib (a.out loader)
# cp /lib/ld_linux.so /diskonchip/lib (elf loader)
It is possible to use objcopy to reduce the size of the libraries. For example:
# objcopy -strip-debug /diskonchip/lib/lib.so.5