williamspatrick / mchroot Goto Github PK
View Code? Open in Web Editor NEWMounting chroot utility
Mounting chroot utility
Creating a cross-compile chroot environment using Gentoo. 1. Create destination directory. Referenced as <chroot> below. Ex. /esw/powerpc64-gcc-20130412 2. Configure portage options. <chroot>/etc/make.conf: MAKEOPTS="-j5" CFLAGS="-O2 -pipe" CXXFLAGS="${CFLAGS}" <chroot>/etc/portage/make.profile/parent: gentoo:default/linux/amd64 # OR gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit gentoo:funtoo/1.0/linux-gnu/build/current gentoo:funtoo/1.0/linux-gnu/flavor/minimal <chroot>/etc/portage/package.use/net-misc: net-misc/curl ssl <chroot>/etc/portage/package.use/sys-devel: sys-devel/binutils multitarget 3. Install 'system'. cd <chroot> ROOT=`pwd` PORTAGE_CONFIGROOT=`pwd` emerge @system --jobs 4. Install cross-compiler and extra packages. cp /etc/resolv.conf <chroot>/etc/resolv.conf unshare -m /bin/bash mount -n --bind /dev <chroot>/dev mount -n --bind /proc <chroot>/proc mkdir <chroot>/usr/portage mount -n --bind /usr/portage <chroot>/usr/portage chroot <chroot> /bin/bash emerge crossdev dwarves --jobs emerge strace # optional mkdir /usr/local/portage crossdev powerpc64-unknown-linux-gnu --ov-output /usr/local/portage exit exit 5. Install mchroot and wrappers. cd /tmp git clone http://github.com/williamspatrick/mchroot cd mchroot gcc mchroot.c -Os -static -o mchroot mkdir <chroot>/wrappers cp mchroot mchroot_wrapper.sh jail_wrapper.sh <chroot>/wrappers cd <chroot>/wrappers chmod u+s mchroot /tmp/mchroot/create_wrapper_links.sh 6. Configure mchroot Add file systems you wish to bind-mount into the chroot to <chroot>/.mchroot.cfg with one mount path per line. <chroot>/.mchroot.cfg: /dev /proc /tmp /home (...etc...)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.