Standalone appllication run atop of QEMU for layerscape board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Standalone appllication run atop of QEMU for layerscape board

833 Views
pgajjar
Contributor I

Hello Team,

I am trying to run standalone application atop of QEMU for layerscape board.

I am able to execute Linux kernel using below command:

/qemu_v2/bin/qemu-system-aarch64 -m 2G -cpu cortex-a72 -M virt-4.2 \

-kernel /ls1046a/aarch64-layerscape-fvlinux-kernel \

-initrd /ls1046a/aarch64-layerscape-fvlinux-ramdisk.img \

-display none \

-serial mon:stdio \

-serial /dev/null \

-append 'root=/dev/sda rw console=ttyAMA0'

Which is working fine for Linux kernel. Request to similar provide command/guidance, which provides information/steps to run standalone application atop of QEMU for layerscape ls1028a or ls1046a board.

0 Kudos
7 Replies

726 Views
pgajjar
Contributor I

Command "qemu-aarch64 -L /usr/aarch64-linux-gnu" will work for dynamically linked executable. Here I need to run statically linked (not stripped), ELF 32-BIT LSB ARM executable image using qemu.  

0 Kudos

802 Views
pgajjar
Contributor I

Hello Chavira,

I have Linux PC with QEMU and trying to run an standalone kernel atop of QEMU. 

0 Kudos

788 Views
Chavira
NXP TechSupport
NXP TechSupport

Thank you for contacting NXP support!

We don't have documentation about QEMU.

I know the command is qemu-aarch64 -L /usr/aarch64-linux-gnu ./hello64dyn, but I am not sure!

you can learn more about QEMU by following the link:

Welcome to QEMU’s documentation! — QEMU documentation

0 Kudos

744 Views
pgajjar
Contributor I

Command: "qemu-aarch64 -L /usr/aarch64-linux-gnu ./hello64dyn" is not working for standalone application of layerscape ls1028a or ls1046a board.

Observed below error:

qemu-system-aarch64: No machine specified, and there is no default

0 Kudos

731 Views
Chavira
NXP TechSupport
NXP TechSupport

Linux User space emulatorCommand line optionsqemu-i386 [-h] [-d] [-L path] [-s size] [-cpu model] [-g port] [-B offset] [-R size] program [arguments...]-hPrint the help-L pathSet the x86 elf interpreter prefix (default=/usr/local/qemu-i386)-s sizeSet the x86 stack size in bytes (default=524288)-cpu modelSelect CPU model (-cpu help for list and additional feature selection)-E var=valueSet environment var to value.-U varRemove var from the environment.-B offsetOffset guest address by the specified number of bytes. This is useful when the address region required by guest applications is reserved on the host. This option is currently only supported on some hosts.-R sizePre-allocate a guest virtual address space of the given size (in bytes). "G", "M", and "k" suffixes may be used when specifying the size.Debug options:-d item1,...Activate logging of the specified items (use ‘-d help’ for a list of log items)-p pagesizeAct as if the host page size was ‘pagesize’ bytes-g portWait gdb connection to port-singlestepRun the emulation in single step mode.BSD User space emulatorBSD Statustarget Sparc64 on Sparc64: Some trivial programs work.Quick StartIn order to launch a BSD process, QEMU needs the process executable itself and all the target dynamic libraries used by it.On Sparc64, you can just try to launch any process by using the native libraries:qemu-sparc64 /bin/lsCommand line optionsqemu-sparc64 [-h] [-d] [-L path] [-s size] [-bsd type] program [arguments...]-hPrint the help-L pathSet the library root path (default=/)-s sizeSet the stack size in bytes (default=524288)-ignore-environmentStart with an empty environment. Without this option, the initial environment is a copy of the caller’s environment.-E var=valueSet environment var to value.-U varRemove var from the environment.-bsd typeSet the type of the emulated BSD Operating system. Valid values are FreeBSD, NetBSD and OpenBSD (default).Debug options:-d item1,...Activate logging of the specified items (use ‘-d help’ for a list of log items)-p pagesizeAct as if the host page size was ‘pagesize’ bytes-singlestepRun the emulation in single step mode.

I found the instructions in the next link:
https://www.qemu.org/docs/master/user/main.html

0 Kudos

721 Views
pgajjar
Contributor I

Command "qemu-aarch64 -L /usr/aarch64-linux-gnu" will work for dynamically linked executable. Here I need to run statically linked (not stripped), ELF 32-BIT LSB ARM executable image using qemu. 

0 Kudos

714 Views
Chavira
NXP TechSupport
NXP TechSupport

please try with qemu-aarch64.

or you can try according to the documentation of quemu.

Other binaries
user mode (Alpha)

"qemu-alpha" TODO.

user mode (Arm)

"qemu-armeb" TODO.

"qemu-arm" is also capable of running Arm "Angel" semihosted ELF binaries (as implemented by the arm-elf and arm-eabi Newlib/GDB configurations), and arm-uclinux bFLT format binaries.

0 Kudos