diff options
Diffstat (limited to 'meta-seattle/README')
-rw-r--r-- | meta-seattle/README | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/meta-seattle/README b/meta-seattle/README index 0454cd58..07925703 100644 --- a/meta-seattle/README +++ b/meta-seattle/README @@ -112,3 +112,59 @@ Shell> FS0:\Image root=/dev/sda<X> rw console=ttyAMA0,115200n8 References: 1) https://www.kernel.org/doc/Documentation/efi-stub.txt 2) http://www.uefi.org/specifications + +III. How to Run 32-bit Applications on aarch64 +============================================== + +Since multilib is not yet available for aarch64, this BSP offers some alternatives +in order to run 32-bit legacy applications on an aarch64. + +Each method that helps to setup the environment to run 32-bit applications requires +a few extra tools. Two of those metods are described in this section, one requiring +chroot and another one qemu installation. + +meta-seattle BSP includes two scripts that help you to setup environment for 32bit +applications that can be found under following path meta-seattle/recipes-support/32b-env/ + +III.1 Using chroot tool to run 32-bit applications on aarch64 +============================================================= + +This solution requires the chroot tool on the target, a 32b-built rootfs, and +a build for the seattle machine. + +root@seattle:~# scp <user>@<host_ip>:/homes/rootfs32b.tar.gz ./ + +root@seattle:~# tar -zxf rootfs32.tar.gz + +root@seattle:~# set_32b_env_chroot.sh -r ./rootfs32 + +# 32b environment started +@seattle:~# ./hello32d + +Starting from this point, any 32-bit application can be executed, but not 64-bit +applications which will fail due to wrong path to 32-bit libraries. To run a 64-bit +application, chroot mode must be quit by using the "exit" command. + +III.2 Using qemu to run 32-bit applications on aarch64 +====================================================== + +This example requires an existing 32b-built rootfs and a build for the seattle machine. +It is also expected that qemu-arm is already installed!!! + +root@seattle:~# scp <user>@<host_ip>:/homes/rootfs32b.tar.gz ./ + +root@seattle:~# source /usr/bin/set_32b_env_qemu.sh -r ./rootfs32 + +Starting from this point, any 32-bit or 64-bit application can be executed. + +IV. Limitations +=============== +In order to enable 32-bit support in the aarch64 kernel, COMPAT mode is enabled +(CONFIG_COMPAT=y), page size set to 4K, and VirtualAddress set to 48-bit. + +It might be possible to use 64K page sizes and 42-bit VirtualAddress if it is possible +to rebuild the 32-bit application using binutils version 2.25. + +If 32-bit support is not required, COMPAT mode can be disabled (CONFIG_COMPAT=n) and +page sizes set to 64K and VirtualAddress to 42-bit. Any change of the kernel +confguration requires of course a kernel rebuild. |