Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: ContextSwitch on August 31, 2018, 09:14:42 AM

Title: Development Environment
Post by: ContextSwitch on August 31, 2018, 09:14:42 AM
Hi,

I've been developing an app and one of the targets is the RPi. TinyCore looks like a very good OS to use but I need to compile the app with the appropriate environment. Does TinyCore have a development environment I can download for cross-compilation? I have looked at the forum and wiki but can't see mention of one.

--
Geoff
Title: Re: Development Environment
Post by: Rich on August 31, 2018, 11:31:51 AM
Hi ContextSwitch
Are you looking for a cross compiler or the toolchain for compiling on RPi? For compiling natively on RPi you want to install
the  compiletc  extension. I'm not aware of any RPi cross compilers in the Tinycore repositories.
Title: Re: Development Environment
Post by: ContextSwitch on August 31, 2018, 01:35:23 PM
Hello Rich,

Ideally I'd like to cross compile on my x86_64 desktop. This I do by creating docker images of the target environment and using that for the x-compile and linking. In this case, as the app is quite small, I could do the compile using a re-mastered images of piCore on the RPi itself (I guess, I haven't tried it yet).

I probably should explain: I develop in Rust, not C. Rust has good support for arm-unknown-linux-gnueabi and I have already cross compiled for this architecture. The real problem comes when linking to libraries; I've found that if I don't use the exact version that's in the target environment then weird stuff can, and will, happen.

So I need the libraries from the extension packages and their header files for the foreign function interfaces. I thought that if a development environment already existed for piCore similar to OpenWRT, then that would save me a lot of time, cheers.

--
Geoff
Title: Re: Development Environment
Post by: Rich on August 31, 2018, 01:50:18 PM
Hi ContextSwitch
Quote
So I need the libraries from the extension packages and their header files for the foreign function interfaces.
Currently available packages are listed here:
http://tinycorelinux.net/9.x/armv6/tcz/
To download a package, append  PackageName.tcz  to the URL above. These are squash file system compressed packages.
You can either loop mount them or unsquash them to access their contents.
Title: Re: Development Environment
Post by: bmarkus on September 01, 2018, 02:10:05 AM
What is about usin a native Rust on the RPi?
Title: Re: Development Environment
Post by: ContextSwitch on September 01, 2018, 11:49:37 AM
What is about usin a native Rust on the RPi?

Yes, I think I'll end up doing this. I've already built for Raspian this way, of course the compilation takes much longer than on my desktop and I'm an impatient type  :)

My only doubt is if I can get rustc and cargo running under piCore. The executables are available with the right architecture I'm just not sure how much piCore looks like a normal Linux distro. I'll try it and see in the next few days.

Cheers,
--
Geoff