mirror of https://github.com/CIRCL/Circlean
add some doc and script to chroot into the ARM system. And prepare the script to update the image.
parent
37a2856638
commit
8dda6d7d97
|
@ -0,0 +1,20 @@
|
|||
Prerequisites
|
||||
=============
|
||||
|
||||
Get the latest image: http://www.raspberrypi.org/downloads (the recommended one)
|
||||
And write it on the SD Card:
|
||||
dd bs=4M if=~/2013-02-09-wheezy-raspbian.img of=/dev/mmcblk0
|
||||
|
||||
Note: I had to unplug/replug the sd card in order to see the second partition.
|
||||
|
||||
On a debian/ubuntu host:
|
||||
- http://burstcoding.blogspot.com/2012/12/qemu-user-mode-arm-for-raspbian-chroot.html (not tested)
|
||||
On a gentoo host:
|
||||
- app-emulation/qemu-user
|
||||
|
||||
Choot
|
||||
=====
|
||||
|
||||
chroot
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
apt-get update
|
||||
apt-get dist-upgrade
|
||||
apt-get autoremove
|
||||
apt-get install libreoffice
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
PARTITION='/dev/mmcblk0p2'
|
||||
CHROOT_PATH='/mnt/arm_rPi'
|
||||
|
||||
clean(){
|
||||
mv ${CHROOT_PATH}/etc/ld.so.preload_bkp ${CHROOT_PATH}/etc/ld.so.preload
|
||||
rm ${CHROOT_PATH}/etc/resolv.conf
|
||||
rm ${CHROOT_PATH}/usr/bin/qemu-static-arm*
|
||||
|
||||
umount ${CHROOT_PATH}/dev/pts
|
||||
umount ${CHROOT_PATH}/dev/shm
|
||||
umount ${CHROOT_PATH}/dev
|
||||
umount ${CHROOT_PATH}/proc
|
||||
umount ${CHROOT_PATH}/sys
|
||||
umount ${CHROOT_PATH}/tmp
|
||||
umount ${CHROOT_PATH}
|
||||
|
||||
rm -rf ${CHROOT_PATH}
|
||||
}
|
||||
|
||||
trap clean EXIT TERM INT
|
||||
|
||||
mkdir -p ${CHROOT_PATH}
|
||||
mount ${PARTITION} ${CHROOT_PATH}
|
||||
|
||||
cp /usr/bin/qemu-static-arm* ${CHROOT_PATH}/usr/bin/
|
||||
|
||||
mount -o bind /dev ${CHROOT_PATH}/dev
|
||||
mount -o bind /dev/pts ${CHROOT_PATH}/dev/pts
|
||||
mount -o bind /dev/shm ${CHROOT_PATH}/dev/shm
|
||||
mount -o bind /proc ${CHROOT_PATH}/proc
|
||||
mount -o bind /sys ${CHROOT_PATH}/sys
|
||||
mount -o bind /tmp ${CHROOT_PATH}/tmp
|
||||
|
||||
cp -pf /etc/resolv.conf ${CHROOT_PATH}/etc
|
||||
mv ${CHROOT_PATH}/etc/ld.so.preload ${CHROOT_PATH}/etc/ld.so.preload_bkp
|
||||
|
||||
chroot ${CHROOT_PATH}
|
Loading…
Reference in New Issue