I have an i386 binary that I would like to run on my STB with embedded linux.
How to run the i386 binary (compiled on Ubuntu / compiler : i486-linux-gnu-libusb) on MIPS arch platform (set-top box)?
You need an emulator. The most well-known emulators are qemu and bochs which are both open-source
However emulation is slow by nature, so it's only used for non-performance-critical applications that no source code is available. Real-time software like decoders in a set-top-box definitely isn't suitable to execute under emulation. You need to rebuild the software to MIPS target
See also
How to run a MIPS binary on x86 platform?
How can I execute MIPS assembly programs on an x86 linux?
Related
I used below command to build binary for nvidia GPU:
clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda simple-sycl-app.cpp -o simple-sycl-app-cuda
But got below error message:
clang++: error: cannot find 'libspirv-nvptx64--nvidiacl.bc'; provide path to libspirv library via '-fsycl-libspirv-path', or pass '-fno-sycl-libspirv' to build without linking with libspirv
I searched in both intel oneAPI installation path and cuda toolkit path, but cannot find the spirv-nvptx64-nvidiacl.bc.
Anyone knows where to find libspirv-nvptx64—nvidiacl.bc?
It looks like you are trying to compile using the DPC++ compiler for Nvidia GPUs.
This option is not included in the oneAPI release installations from the Intel website. At the moment you will need to compile the DPC++ LLVM project with this enabled to be able to use the appropriate flag to target Nvidia devices.
You can follow the instructions on this page to compile the project and then it explains how to use the ptx target. In the future Codeplay, the company I work for, intends to publish release binaries that include the ptx compiler option.
I have multiple MIPS platforms with different CPUs and different kernel and uclibc versions
I'm want to compile 'Hello World' program with single toolchain that will run on all of the devices.
I'm building the toolchain using crosstool-ng with the following configuration:
MIPS1 arch type (-march=mips1)
soft FPU (should work on devices w/wo hardware FPU)
static executable (to avoid libraries dependencies failures)
old kernel version (should be supported by devices with newer kernel)
Am I missing something?
I still have devices that the program is working only when using their dedicated toolchain (RTL819xD for example)
Thanks
When compile QEMU from source code, I find in file configure, option --target-list supports arm-linux-user and **armeb-linux-user". I know xx-linux-user is for User Emulation. What is the difference between "arm-linux-user" and "armeb-linux-user"?
armeb-linux-user is for big-endian Linux ARM binaries, and arm-linux-user is for little-endian ARM binaries. If you don't know you want big-endian then you don't want it. (The usual setup for user-mode QEMU uses the host-kernel's binfmt-misc support so it can automatically pick the right -linux-user QEMU binary to run for the guest executable anyway.)
I am trying to load few modules onto Tizen on my MIPS-based platform. Currently, I am using sourcery codebench gnu linux compiler. The libc.so files it uses have version 2.17 which libc.so file on my platform has version 2.13. I need a toolchain which has a version less than or equal to 2.13 and supports MIPS.
Thanks,
Atchyut Sreekar
few options:
talk to the Tizen people to see if they have pre-compiled toolchains that match your system
build the code directly on the device
use crosstool-ng to build a new cross-compiler but with an old glibc version
upgrade your system because glibc-2.13 (and glibc-2.17 for that matter) are ridiculously old and have a large number of known security vulnerabilities including remote exploits. developing & deploying anything based on those glibc versions is a terrible terrible mistake.
I'm trying to do some CUDA development on a PC without CUDA-capable GPU via emulation mode. The OS is Linux Mint Debian (can be considered Debian testing for all practical purposes) 32bit (2.6.32-5-686 kernel). Here's what I did so far:
Grabbed the CUDA Toolkit 32 bit and SDK for Ubuntu from http://developer.nvidia.com/cuda-toolkit-40
Installed the CUDA Toolkit in /usr/local/cuda/lib
Added the paths to bashrc
echo "# CUDA stuff
PATH=\$PATH:/usr/local/cuda/bin
LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/cuda/lib
export PATH
export LD_LIBRARY_PATH" >> ~/.bashrc
Added the path to /etc/ld.so.conf.d/cuda.conf:
/usr/local/cuda/lib
Executed "sudo ldconfig"
Restarted the session
Then installed the SDK in /home/user/NVIDIA_GPU_Computing_SDK folder
When I got to NVIDIA_GPU_Computing_SDK/C and type "make emu=1" to compile the examples I get:
nvcc warning : option 'device-emulation' has been deprecated and is ignored
/usr/bin/ld: cannot find -lcudartemu
/usr/bin/ld: cannot find -lcudartemu
collect2: ld returned 1 exit status
Seems like a library missing (rt = runtime ?). There is libcudart3 in the package manager, but wants a whole bunch of nvidia stuff as a dependency, including drivers and I don't even have an NVIDIA card on this machine. Also apparently the GPU emulation is now deprecated... Does anybody have some experience with CUDA emulation?
There is no emulation in CUDA any more. It was deprecated and removed during the 3.x release cycle. There is no emulation support beyond CUDA 3.1 IIRC. Certainly there is nothing you can do in CUDA 4.0.
On Linux, your best bet is to try gpuocelot, which provides a PTX level emulation on x86 processors and a reimplementation of the CUDA APIs.
Although I agree with the suggestion to try Ocelot, when I was in the same boat I found it easiest to go on eBay and get a cheap CUDA capable card to use for testing (I think I paid < $40). If you have the ability to open the hardware (I realize this isn't an option for some people) and to install drivers, that's what I'd suggest.