Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small Project Idea: ARM package manager #34

Open
bamos opened this issue Nov 4, 2014 · 3 comments
Open

Small Project Idea: ARM package manager #34

bamos opened this issue Nov 4, 2014 · 3 comments

Comments

@bamos
Copy link
Contributor

bamos commented Nov 4, 2014

Hi @bgilbert @theonewolf and @wenluhu - just brainstorming here.
I've been compiling a lot of utility libraries for ARM in addition
to the ones in here, such as tune2fs, mknod, and gammaray.
Mostly, I can build them fine with the snippet below,
but other times a small diff of the original source is required,
or I need to link other static ARM libraries.
I've been thinking that a simple ARM package manager to
build executables and static libraries from the original source
would be helpful to run non-standard C programs on Android.
The benefit of centralizing this is that people wouldn't have to
manually build or chain together dependencies as I've done in https://github.com/cmusatyalab/diamond-android/blob/master/diamond-android-library/jni/build.sh.

Is this a sane idea?
Do you all have any thoughts on this?

if [[ ! -d toolchain ]]; then
  # Using NDK r10b.
  $ANDROID_NDK/build/tools/make-standalone-toolchain.sh \
    --platform=android-18 \
    --toolchain=arm-linux-androideabi-4.8 \
    --install-dir=$PWD/toolchain
fi

# Add the standalone toolchain to the path.
pathadd() { PATH="${PATH:+"$PATH:"}$1"; }
pathadd "$PWD/toolchain/bin"
command -v arm-linux-androideabi-gcc &> /dev/null || exit -1
export SYSROOT=$PWD/toolchain/sysroot
export CC="arm-linux-androideabi-gcc --sysroot=$SYSROOT"
export CXX=arm-linux-androideabi-g++
export LD=arm-linux-androideabi-ld
export RANLIB=arm-linux-androideabi-ranlib
export AR=arm-linux-androideabi-ar
export CROSS_PREFIX=arm-linux-androideabi-
export CFLAGS='-march=armv7-a -mfloat-abi=softfp -mfpu=neon'
export LDFLAGS='-Wl,--fix-cortex-a8'

./configure --enable-static --host=arm-linux || die "Configure failed."
make -j8 bin/gray-crawler || die "Make failed."
@bgilbert
Copy link

bgilbert commented Nov 4, 2014

When you say "package manager", I think of something like dpkg or rpm, and of course Android already has one: the Play Store. If you're talking about a cross-package build system with dependency resolution, then yes, that might be useful. Is jhbuild a good fit?

@bamos
Copy link
Contributor Author

bamos commented Nov 4, 2014

jhbuild docs: https://developer.gnome.org/jhbuild/3.12/jhbuild.html

From reading the intro, jhbuild looks useful.
I'll further look into later, thanks.

@bamos
Copy link
Contributor Author

bamos commented Jan 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants