I can't help but comment that after 30 years writing C and ASM code, I consider gdb to always be a last resort. Logging is your friend, search for my response on how to set up a remote logging server for your Omega. I have 80+ devices, all running my own custom applications, and there is nothing I need to know about these devices that I cannot understand using logging, or by listening on wireshark.
You are hero. Logging, asserts, tracing are good instruments, but I drop much time to find errors without Debugger. The debugger is more perfect instrument for me. And I'm codding in C++ - it's need powerfull IDE such as Visual Studio or Eclipse, because C++ syntax is too difficult for a simple text editor.
By the way. The problem was links with different versions of Kernel and Packages. Default repository downloading packages from the OpenWRT v. 19xx, but the Onion OS is based on version 18.06.
Now I'm installed gdb and gdbserver. Both of them are already tested and works! Subject can be closed.
I figured this out myself, so hopefully it's all correct. But it works :)
Make sure your shell is in the source directory
Run: "./scripts/feeds install <<your lib>>"
Often this works. If it doesn't we will install manually.
mkdir -p package/libs/<<your lib>>
cd package/libs/<<your lib>>
wget https://raw.githubusercontent.com/openwrt/packages/master/libs/<<your lib>>/Makefile
once more I answere my own question.
put this in a shell script and go for a walk, it will take some time:
if ! grep -q "src/gz reboot_base https://downloads.lede-project.org/releases/packages-17.01/mipsel_24kc/base" /etc/opkg/customfeeds.conf; then
echo "src/gz reboot_base https://downloads.lede-project.org/releases/packages-17.01/mipsel_24kc/base" >> /etc/opkg/customfeeds.conf
if ! grep -q "src/gz reboot_packages https://downloads.lede-project.org/releases/packages-17.01/mipsel_24kc/packages" /etc/opkg/customfeeds.conf; then
echo "src/gz reboot_packages https://downloads.lede-project.org/releases/packages-17.01/mipsel_24kc/packages" >> /etc/opkg/customfeeds.conf
opkg install grep gcc make autoconf automake tar
tar -xf autoconf-archive-2018.03.13.tar.xz
sh configure --prefix=/usr
@Unbioctian take a look at /usr/lib where the library shared objects are kept and /usr/include where the header files are kept. You'd notice some library objects do not have corresponded header files. The i2c C library is available for you and is called libonioni2c. The source code can be found in our GitHub repo. For more info on compiling C/C++ on the Omega please refer to our official documentation and i2c C Library
Edit: I found in Docker the bluez-lib and they run well but work in that conteiner is laborious (I have to use transfer.sh website to transfer files). Where can I found the Makefile to compile bluez-lib in the LEDE Configurator in order to use it in Ubuntu too?
max@max-VirtualBox:~/cgminer-4.10.0$ file cgminer
cgminer: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked, interpreter /lib/ld-musl-mipsel-sf.so.1, not stripped
Transfer to Omega2 via scp and execute..
root@Omega-17FD:~# ./cgminer -h
Built with bitforce mining support.
Usage: ./cgminer [-DlmpPqUouOchnV]
Options for both config file and command line:
--api-allow <arg> Allow API access only to the given list of [G:]IP[/Prefix] addresses[/subnets]
--api-description <arg> Description placed in the API status header, default: cgminer version
Obviously is not fully enabled with every possible feature (and libcurl without SSL!) but I think you can start working from there.
@patrick-gunderson I am trying to build a simple IoT project - and got stuck because the SerialPort module does NOT have a MIPS version. I am trying to get setup to attempt building it BUT it won't compile/build - get to the same stage as you are. Any instructions on how to get gcc / node-gyp installed on the Omega2?
Voila, you got working SDK buildroot for ramips MT7688 (Omega2) Rest is the same as all others cross-compile buildroots (export env STAGING_DIR as $BUILDROOT/staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/bin/, export PATH with STAGING_DIR as first in chain, etc).
If using e.g. make, remember to use variables for corss-compile:
@Fred-Blais thanx for this article , realy help me :)
i found some mistake in the cross compiling tutorial
i will post it later in details later in this post
but finally i succeed with eclipse cross compiling