I had this exact problem and I'd also be very thankful for information on this! For the life of me I couldn't get any C programs to link against the .so files that are installable on the Omega2+. I always had to recompile or cross-compile every library myself (SPI, I2C, ALSA,..) to get the linker to work.
Another interesting thing is that when you do file libonionspi.so it will say ELF 32-bit LSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked, corrupted section header size.
As a work-around, I've uploaded the recompiled binaries at https://github.com/gamer-cndg/omega2-libs. But it feels like I'm missing something here that would allow for a successful linking with the preinstalled .so files.. Maybe a missing linker flag?
Im trying do to kind of the same but for a ILI9341. It's essentially the same, but changing the commands codes.
What I've been trying to overcome (without success) is the malfunctioning of the SPIs MSB. I have had a peek at your code and it's mostly similar to mine. How did you overcome this issue?
The funny thing is that for this particular display the bug doesn't matter so much -- when writing to registers, conveniently, the address of the important registers of the ILI9225 are in the range where the SPI transmitter doesn't exhibit the MSB bug. At the end of the initialization sequence though (setting the gamme curve), the bug occurs, doesn't however cause any harm. I've thought about a workaround for this, but didn't implement it yet (because it works without it it, too) -- You might be able to group register writes and such in groups of at maximum 16 bytes, and only the MSB of the first byte might be corrupted of it's from 0x40 to 0xbf. So, if the first byte isn't in that range (known good value), then the entire transmission will be bug-free. Thus you may be able to correctly write to a register between 0x40 and 0xbf be first placing a write to a lower reg (0x00-0x3f e.g.). Oh, and another hint: You can pretty much drop-in the initialization routine from here if that's where you're stuck :)
Just out of curiosity - have you tried the hardware SPI? There are issues with that, too (MT7688 hardware has a bug in full duplex transfers, and the driver needs a patch to at least support half duplex). The speed should be much better here (after all, that SPI bus is used to get data from and to the flash).
Please, by all means, if you have any resources on how to easily use the hardware SPI interface on an Omega2+ from C, preferably without having to recompile / patch the kernel or firmware from scratch, I'd like to hear it. All I found was the spio-gpio-driver kernel module and library. I'd be great if you made your own project page about that if you succeed. This and another part of this project will benefit greatly from a faster half-duplex (TX only) SPI.