문제

I'm using an embedded PC which has a Vortex86-SG CPU, Ubuntu 10.04 w/ kernel 2.6.34.10-vortex86-sg. Unfortunately we can't compile a new kernel, cause we don't have any source code, not even drivers or patches.

I have to run a small project written in C++ with OpenFrameworks. The framework compiles right each script in of_v0071_linux_release/scripts/linux/ubuntu/install_*.sh.

I noticed that in order to compile against Vortex86/Ubuntu 10.04, the following options must be added in every config.make file:

USER_CFLAGS = -march=i486  
USER_LDFLAGS = -lGLEW  

In effects, it compiles without errors, but the generated binary doesn't start at all:

root@jb:~/openframeworks/of_v0071_linux_release/apps/myApps/emptyExample/bin# ./emptyExample  
Illegal instruction  
root@jb:~/openframeworks/of_v0071_linux_release/apps/myApps/emptyExample/bin# echo $?  
132  

Strace last lines:

munmap(0xb77c3000, 4096)                = 0  
rt_sigprocmask(SIG_BLOCK, [PIPE], NULL, 8) = 0  
--- SIGILL (Illegal instruction) @ 0 (0) ---  
+++ killed by SIGILL +++  
Illegal instruction  
root@jb:~/openframeworks/of_v0071_linux_release/apps/myApps/emptyExample/bin#  

Any idea to solve this problem?

도움이 되었습니까?

해결책

I know I am a bit late on this but I recently had my own issues trying to compile the kernel for the vortex86dx. I finally was able to build the kernel as well. Use these steps at your own risk as I am not a Linux guru and some settings you may have to change to your own preference/hardware:

  1. Download and use a Linux distribution that runs on a similar kernel version that you plan on compiling. Since I will be compiling Linux 2.6.34.14, I downloaded and installed Debian 6 on virtual box with adequate ram and processor allocations. You could potentially compile on the Vortex86DX itself, but that would likely take forever.
  2. Made sure I hade decencies: #apt-get install ncurses-dev kernel-package
  3. Download kernel from kernel.org (I grabbed Linux-2.6.34.14.tar.xz). Extract files from package.
  4. Grab Config file from dmp ftp site: ftp://vxmx:gc301@ftp.dmp.com.tw/Linux/Source/config-2.6.34-vortex86-sg-r1.zip. Please note vxmx user name. Copy the config file to freshly extracted Linux source folder.
  5. Grab Patch and at ftp://vxdx:gc301@ftp.dmp.com.tw/Driver/Linux/config%26patch/patch-2.6.34-hda.zip. Please note vxdx user name. Copy to kernel source folder.
  6. Patch Kernel: #patch -p1 < patchfilename
  7. configure kernel with #make menuconfig
  8. Load Alternate Configuration File
  9. Enable generic x86 support
  10. Enable Math Emulation
  11. I disabled generic IDE support because I will using legacy mode(selectable in bios)
  12. Under Device Drivers -> Ethernet (10 or 100Mbit) -> Make sure RDC R6040 Fast Ethernet Adapter Support is selected
  13. USB support -> Select Support for Host-side USB, EHCI HCD (USB 2.0) support, OHCI HCD support
  14. safe config as .config
  15. check serial ports: edit .config manually make sure CONFIG_SERIAL_8250_NR_UARTS = 4 (or more if you have additional), CONFIG_SERIAL_8250_RUNTIME_UARTS = 4(or more if you have additional). If you are to use more that 4 serial ports make use config_serail_8250_MANY_PORTs is set.
  16. compile kernel headers and source: #make-kpkg --initrd kernel_image kernel_source kernel_headers modules_image
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top