LS-Pro - chroot Arm Build Environment

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 15:39, 1 September 2007 by Ramuk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Get Started

by armstation

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

Create a chroot somewhere outside of the LinkStation system partition

mkdir /mnt/disk1/share/arm-tools

Transfer entire Linkstation system to build directory

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

Unpack the system directories

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

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

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

Create /opt directory in chroot

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

Create symbolic link from chrooted /opt to system /opt

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

chroot into development environment.

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

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.

Link.png This article is currently a stub. You can help this Wiki by expanding it

. This template will categorize articles that include it into Category:Stubs.