Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

The following is contained in the vendor user manual for its embedded Linux distro on the hardward board they supply

Developers can put their program onto X-Linux device via FTP or NFS. Before running it, use ldd command on development workstation to check dependency files. Also put relative files onto X-Linux to ensure program can run properly. Here is an example when we put “syslinux” onto X-Linux:

  [root@X-Linux]:/sbin # ldd syslinux 
          linux-gate.so.1 => (0xb80a0000)
          libc.so.6 => /lib/libc.so.6 (0xb7f60000) 
          /lib/ld-linux.so.2 (0xb80a1000) 
  [root@X-Linux]:/sbin # 

From above messages, /lib/libc.so.6 and /lib/ld-linux.so.2 are needed by syslinux. Put those two files onto X-Linux to ensure syslinux can work properly.

I will have to write software to run on this device and a lot of advice I have received on stack exchange points me in directions that contradict this advice (suggesting setting up specific embedded development environment, linking to older versions of libc, static linking etc). Is the above information given by the vendor a safe and reliable way to do things???

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

You can copy libraries to your embedded device provided that it's running the same operating system on the same processor architecture family. Your device has an x86 processor, which is the same family as 32-bit PCs. So if you have a 32-bit Linux system on your desktop machine, you can copy libraries and executables from your desktop machine to your device.

On the other hand, I do not recommend doing things that way. You'll end up with a jumble of files of unknown origin, with no way to manage dependencies, upgrade, or uninstall software. From what I gather from a quick glance at the manual, X-Linux is a small Linux system that is not designed to be extensible. My recommendation is to instead install another Linux distribution alongside or instead of X-Linux. If the other distribution is alongside X-Linux, run programs from that distribution in a chroot (you'll still be constrained by the X-Linux kernel).

share|improve this answer
    
If I use x-linux I will need to install device drivers for a plug in CANBUS device. Does your feeling that X-linux is not extensible mean I am unable to do that. Kind of related to my other question here unix.stackexchange.com/questions/42717/… this is all totally new to me. Im a desktop application developer with no knowledge of hardware or kernel compiling at all and this has been thrust on me. There are no linux developers here so I have no support other than online. –  mathematician1975 Jul 11 '12 at 10:19
    
@mathematician1975 I would recommend trying to install some other distribution on the device. How much RAM does it have? –  Gilles Jul 11 '12 at 11:12
    
256MB as a minimum possibly 512MB –  mathematician1975 Jul 11 '12 at 11:16
add comment

I hope they meant "embedded development environment" by "development workstation", since otherwise it is likely the application will not run at all due to architectural differences (invalid instruction errors).

The device appears to have a 32-bit x86 processor, so it shouldn't be hard to set up, yet copying libraries from your (probable) 64-bit system would end in disaster.

share|improve this answer
    
So by "Put those two files onto X-Linux to ensure syslinux can work properly." should I read that I should build them natively on the embedded device rather than copy from my (32-bit) development desktop machine? –  mathematician1975 Jul 10 '12 at 13:51
    
no, I'm pretty sure glibc will work fine either way. It has no dependencies itself and if you haven't built it with aggressive optimisations, it should be fine. –  lynxlynxlynx Jul 10 '12 at 13:55
    
So basically it is safe to SCP the binary and needed *.so files from my desktop onto the embedded device and run it from there? –  mathematician1975 Jul 10 '12 at 14:00
    
Definitely worth a try! –  lynxlynxlynx Jul 10 '12 at 14:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.