Skip to content

Instantly share code, notes, and snippets.

@prologic
Created March 1, 2015 15:39
Show Gist options
  • Save prologic/e87b93ed6333e2acb769 to your computer and use it in GitHub Desktop.
Save prologic/e87b93ed6333e2acb769 to your computer and use it in GitHub Desktop.
created by github.com/tr3buchet/gister
#!/bin/sh
cd work/busybox
# Change to the first directory ls finds, e.g. 'busybox-1.23.1'
cd $(ls -d *)
# Setup Cross Comiler
export PATH=$HOME/x-tools/x86_64-unknown-linux-uclibc/bin:$PATH
# Remove previously generated artefacts
make ARCH=x86_64 CROSS_COMPILE=x86_64-unknown-linux-uclibc- clean
# Create a default configuration file
make ARCH=x86_64 CROSS_COMPILE=x86_64-unknown-linux-uclibc- defconfig
# Change the configuration, so that busybox is statically compiled
# You could do this manually with 'make menuconfig'
sed -i "s/.*CONFIG_STATIC.*/CONFIG_STATIC=y/" .config
# Compile busybox
make
# Create the symlinks for busybox
# It uses the file 'busybox.links' for this
make install
cd ../../..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment