The Blackberry Playbook has formally reached EOL(april 2014), but I've installed BGShell, BGSSH-SCP-SFTP, and Term48 on it. So I have some ksh-like shell it seems with things like GNU awk
3.1.5, sed
4.1.5, grep
and python
, with some other coreutils elements (but no tr
) etc. I'm not root. Basically I can write in the Downloads
directory or in the $HOME dir created by the shell apps (/accounts/1000/appdata/com.BGShell..blabla/data
for instance) and I can't execute everything but I can generally run a script within the aforementioned constraints. The reason I'm interested is because this is QNX on cortex-A9.:
QNX localhost 6.6.0 2014/03/19-01:28:41EDT OMAP4430_ES2.2_HS_Winchester_Rev:07 armle
So I compiled some binaries by trying to leverage an old project1. Many things need be changed for this to work but it is set up and is able to compile most targets(including gcc
and coreutils-8.13
)2. To summarize, I compiled using many different variations of configure flags and older versions of some dev tools to avoid some errors. I've settled for something like:
CFLAGS="-march=armv7-a -marm -fno-strict-aliasing -mtune=cortex-a9 -O2 -pipe -fomit-frame-pointer -mlittle-endian"
AUTOMAKE=automake-1.11: AUTOCONF=: AUTOHEADER=: AUTORECONF=: ACLOCAL=aclocal-1.11: MAKEINFO=makeinfo-4.13a
with the arm-unknown-nto-qnx8.0.0eabi-gcc
cross-compiler linked from the 10.3 SDK which sits inside the momentics IDE. The resulting binaries look like this:
ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), BuildID[md5/uuid]=41442b23fecda2d1d7cc5d2c68432a33, not stripped
But every one of them errors on the tablet with this message:
ldd:FATAL: Unresolved symbol "getopt_long" called from Executable
As I recompiled many times using different flags and always get that message, I'm thinking I maybe mislinked some other things than the compiler in the build scripts as it was geared for a prior sdk... (this is beyond my expertise but maybe something about garbage collecting i.e. collect
?). Or is it the exotic configuration on the target platform?
A million things could have gone wrong here because of the setup(and inexperience) but I'm looking for some clues so is there any specific thing I should understand from such an error and how can I backtrack the problem generally?
1. In summary it is a bunch of scripts to fetch, patch, compile, install to some dir then bundle that dir to one zip file then spawn a cute ruby webrick server and you use the tablet to download the script and the archive from it(I don't use it for the archive at 250mb, I just use some web file host and the browser).
2. I've removed the ruby, file, and ruby targets from the top level build configuration.