WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: compiling  (Read 4428 times)

Offline hiro

  • Hero Member
  • *****
  • Posts: 1152
compiling
« on: October 24, 2012, 01:56:41 PM »
so if I see this right there are three ways to compile for the picore.

1. natively
2. cross-compiling from x86
3. compiling directly in arm-qemu

It's best to use 1. for small things obviously, but for big things 2. should be fastest most of the time.
Only when I have something big which comes with a different build system like scons, cmake,... I might want to use 3. because it saves me from having to find out how to specify the cross-compiler.

Does this sound right? How would you choose?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7035
    • My Community Forum
Re: compiling
« Reply #1 on: October 24, 2012, 02:21:53 PM »
2) Cross-compiling is good for the initial programs with no or few dependencies, like kernel, eglibc (glibc) library and probably the GCC toolchain to get a minimal system running. Later it is less and less realible and at the same time more complicated.

1) and 2) practically the same, you can say both are native environment for 99% of programs. For hardware related drivers, modules, etc. for testing you need the real hardware, but compiling in QEMU is more convenient and also can be faster depending on your machine.

Currently I'm building packages in QEMU running piCore. My first packages were built in QEMU running Raspbian.

Raspbian packages are also built native on DEBIAN running on a fast ARM board with many memory, not on Raspberry Pi.
« Last Edit: October 24, 2012, 02:24:17 PM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline hiro

  • Hero Member
  • *****
  • Posts: 1152
Re: compiling
« Reply #2 on: October 24, 2012, 03:49:16 PM »
ok, will setup a picore in qemu tomorrow.
copying the image on the sd card was a very easy and fast installation, also added some swap and a big ext partition with parted after that.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1152
Re: compiling
« Reply #3 on: October 25, 2012, 05:16:41 AM »
shit, compiling native is faster than in qemu here.

just running configure takes ages everywhere.
currently building build systems so I can build build systems.

also thinking about what happens if any package needs an update. I'd really prefer a good cross-compile environment instead. will try to find some docs.
« Last Edit: October 25, 2012, 05:25:37 AM by hiro »