LS-Pro - chroot Arm Build Environment

From Buffalo NAS-Central

Jump to: navigation, search

Contents

[edit] Get Started

by armstation


Why: To not fill up LinkStation's system partition & To test toolchains and building programs without risk of breaking anything

[edit] Create a chroot somewhere outside of the LinkStation system partition

mkdir /mnt/disk1/share/arm-tools

[edit] Transfer entire Linkstation system to build directory

cd /
for d in `ls |grep -v dev |grep -v proc|grep -v mnt`
do
tar -cvf /mnt/disk1/share/arm-tools/$d.tar $d
done

[edit] Unpack the system directories

cd /mnt/disk1/share/arm-tools
for f in *.tar
do
tar -xvf $f
done

[edit] Download jonli447's excellent arm-tools and copy them into /mnt/disk1/share/arm-tools/

then Gunzip & Untar the arm tool

tar -xvzf arm-tools-0_16-3.tgz

[edit] Mount special files in chroot environment (thanks Zoolook)

mount -t proc none /mnt/disk1/share/arm-tools/proc 
mount -o bind /dev /mnt/disk1/share/arm-tools/dev

[edit] Create /opt directory in chroot

mkdir /mnt/disk1/share/arm-tools/opt

[edit] Create symbolic link from chrooted /opt to system /opt

ln -s /mnt/disk1/share/arm-tools/opt /opt

[edit] chroot into development environment.

chroot /mnt/disk1/share/arm-tools /bin/sh

[edit] That's it

That's it, now everyting compiled and installed to /opt from chroot will be available from the main Linkstation system without adding any files to the system partition besides 1 symbolic link.

Personal tools
Downloads
Optware
hosted by
hosted by osuosl.org