Hi,
I am Marc-Andre from the FreeRDP project, an open source RDP client. I want to work on optimizing FreeRDP for ARM using the NEON processor extensions.
The main computer is running Ubuntu 11.04 64-bit, while the target system is a pandaboard running Ubuntu 11.04 for ARM. I started looking into linaro because it aims at improving the current set of development tools for ARM, and I like where the project is going. Once I will have figured out how to get started, I will document the procedure specific to cross-compiling FreeRDP and redirect developers to it. It is my first time cross-compiling, so thank you for your understanding.
I have asked some questions on IRC, and read various pages from the wiki, but I haven't managed to successfully cross-compile FreeRDP yet. Compiling directly on the pandaboard works, but it is atrociously slow. I have made a chroot environment following and adapting the instructions from the following wiki page:
https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/UsingXdeb
I took notes while setting up my chroot environment, such that I could use those notes later on for a wiki article:
# bootstrap ubuntu natty
sudo debootstrap natty natty-armel
# chroot to new environment
sudo chroot natty-armel
# mount partitions
mount -t proc proc /proc
mount -t devpts none /dev/pts
# export environment variables
export LC_ALL=C
# append "universe" after "main" in sources.list
sed -i 's/main/main universe/' /etc/apt/sources.list
# add source repository
# update and install packages
apt-get update
apt-get install gcc-arm-linux-gnueabi xdeb
I have tried both xdeb and xapt, both causing problems. You can find the regular compilation procedure here:
Following the regular procedure, one can compile directly on the pandaboard, but it's very slow.
xapt:
I managed to fetch and convert packages with xapt, using the following command:
sudo xapt -a armel -k -b --suite natty --mirror
http://ports.ubuntu.com/ libssl-dev libx11-dev libxv-dev libxkbfile-dev libxcursor-dev libasound2-dev libxcb1 libxcb1-dev libdirectfb-dev libc6 libc6-dev zlib1g zlib1g-dev
The problem is then that xapt will fail to install the converted packages, saying the package architecture is different from the current architecture, as well as missing dependencies. I worked around the problem with this ugly hack:
cd /var/lib/xapt/output/
sudo dpkg -i --force-all *.deb
Following this, I could get the FreeRDP configure script to work, even though it would fail to detect X11 properly:
PKG_CONFIG_PATH=/usr/arm-linux-gnueabi/lib/pkgconfig ./configure --host=arm-linux-gnueabi --with-neon
When trying to build after that, it will still fail to link in the end, complaining about missing libraries such as zlib, X11, crypto, etc. I tried installing various packages more with xapt, but I couldn't get it to work.
xdeb:
I tried the following:
root@workstation:/# xdeb -a armel --prefer-apt libssl-dev libx11-dev libxv-dev libxkbfile-dev libxcursor-dev libasound2-dev
Building source package cache ...
Using file ports.ubuntu.com_dists_natty_main_source_Sources for apt cache
Using file ports.ubuntu.com_dists_natty_universe_source_Sources for apt cache
Using file archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources for apt cache
Using file archive.ubuntu.com_ubuntu_dists_natty_universe_source_Sources for apt cache
Building working tree cache ...
No source package found: libssl-dev
Or, alternatively, the following:
root@workstation:/# xdeb -a armel --convert libssl-dev libx11-dev libxv-dev libxkbfile-dev libxcursor-dev libasound2-dev
Traceback (most recent call last):
File "/usr/bin/xdeb", line 849, in <module>
main()
File "/usr/bin/xdeb", line 767, in main
crossed_debs = cross_convert(options, args)
File "/usr/bin/xdeb", line 409, in cross_convert
deb)).debcontrol()
File "/usr/lib/pymodules/python2.7/debian/debfile.py", line 208, in __init__
ArFile.__init__(self, filename, mode, fileobj)
File "/usr/lib/pymodules/python2.7/debian/arfile.py", line 47, in __init__
self.__index_archive()
File "/usr/lib/pymodules/python2.7/debian/arfile.py", line 52, in __index_archive
fp = open(self.__fname, "rb")
IOError: [Errno 2] No such file or directory: './libssl-dev'
Here is my sources.list file:
root@workstation:/# cat /etc/apt/sources.list
I'm stuck at this point. Can anybody point me towards possible solution paths on how to cross-compile FreeRDP for ARM, given the above information?
Best regards,
- Marc-Andre