Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Cross-compilation environment for H3? (Orange Pi Lite / Jessie)

Featured Replies

Hello every one,

  I have used crosstool-ng on my Jessie server (x86), and downloaded the linaro toolchain for my Ubuntu (x64 / 16.04) laptop, but ran into a wall both times: the cross-compilers won't (and now that I think about it, can't) link to the host libraries.

 

Do I simply get all the sources for the libraries I want/need, and adjust their configure parameters to point to dedicated directory, and then build my target? Is there an easy way to manage the versions / dependencies to match Jessie (the version on my target OPi)?

 

I am trying to compile Duktape with libreadline, if that matters.

 

Thanks,

  Steve

  • Author

I sort of solved it. I switched from using readline to linenoise, and that killed my having to set up some sort of repository or chroot for Debian packages (more below).

As linenoise, Duktape, and a single header are all my binary needs, it now builds with my crosstool-ng compiler and a simple Makefile.

I created a handy shell wrapper called armbian-gcc that adjusts paths before invoking gcc.

 

I was able to make some headway with the libreadline6-dev package:

crosstool-ng creates a directory for every toolchain, usually in ~/x-tool

This toolchain directory, and its sub-directories, are readonly; a quick chmod fixes this.

I created a sub-directory named 'pkgs', and from there I used apt-get source libreadline6-dev,

which handily works without being root, as it downloads to whatever directory you are in.

Then, I invoked configure like this:

CC=arm-unknown-linux-gnueabihf-gcc ./configure --prefix=/home/foo/x-tool/arm-unknown-linux-gnueabihf --build=i686-linux-gnu --host=arm-unknown-linux-gnueabihf

Then, make, and make install as usual.

By setting the prefix, the library gets installed to ~/x-tool/<toolchain>/lib, and headers in ~/x-tool/<toolchain>/include,

which are accessed by default when compiling with the toolchain.

At this point, I hit a snag with not having built termcap, which is when I decided to go with linenoise.

 

Theoretically, as long as you calculate the dependencies yourself (with the help of the Debian Jessie package lists),

you can build any Jessie package for Arm on any host with a working crosstool-ng. I imagine targeting Ubuntu is much the same-

calculate the dependencies, fetch the sources matching your target version, configure with CC,--build,--host, and --prefix, make, install.

 

Hope this helps someone else.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.