#!/bin/sh
sh /scratchbox/users/rlinfati/home/rlinfati/maemo-sdk-nokia-binaries_4.1.2.sh
newgrp sbox < /bin/cat <<'END'
sb-conf st maemo5 -c cs2007q3-glibc2.5-i486 -d debian-etch:doctools:git:perl:svn -t none -f
sb-conf re maemo5 -f
sb-conf rs maemo5 /scratchbox/users/rlinfati/home/rlinfati/maemo-sdk-rootstrap_5.0_i386.tgz
sb-conf install maemo5 -L --etc --devkits --fakeroot
echo "# maemo5
deb http://repository.maemo.org/ fremantle/sdk free non-free
deb-src http://repository.maemo.org/ fremantle/sdk free non-free
deb http://repository.maemo.org/ fremantle/tools free non-free
deb-src http://repository.maemo.org/ fremantle/tools free non-free
deb http://repository.maemo.org/ fremantle/12345678901234567890 nokia-binaries
# deb http://repository.maemo.org/extras fremantle free non-free
# deb-src http://repository.maemo.org/extras fremantle free non-free
# deb http://repository.maemo.org/extras-testing fremantle free non-free
# deb-src http://repository.maemo.org/extras-testing fremantle free non-free
# deb http://repository.maemo.org/extras-devel fremantle free non-free
# deb-src http://repository.maemo.org/extras-devel fremantle free non-free" > /scratchbox/users/rlinfati/targets/maemo5/etc/apt/sources.list
rm /scratchbox/users/rlinfati/targets/maemo5/opt
mkdir /scratchbox/users/rlinfati/targets/maemo5/opt
sb-conf st n900 -c cs2007q3-glibc2.5-arm7 -d debian-etch:doctools:git:perl:svn:qemu -t qemu-arm-sb -f
sb-conf re n900 -f
sb-conf rs n900 /scratchbox/users/rlinfati/home/rlinfati/maemo-sdk-rootstrap_5.0_armel.tgz
sb-conf install n900 -L --etc --devkits --fakeroot
echo "export DEB_BUILD_OPTIONS=maemo-launcher,thumb,vfp" > /scratchbox/users/rlinfati/targets/n900.environment
echo "# maemo5
deb http://repository.maemo.org/ fremantle/sdk free non-free
deb-src http://repository.maemo.org/ fremantle/sdk free non-free
deb http://repository.maemo.org/ fremantle/tools free non-free
deb-src http://repository.maemo.org/ fremantle/tools free non-free
deb http://repository.maemo.org/ fremantle/4bc37c7c77ebe90177c050b805a8dc79 nokia-binaries
# deb http://repository.maemo.org/extras fremantle free non-free
# deb-src http://repository.maemo.org/extras fremantle free non-free
# deb http://repository.maemo.org/extras-testing fremantle free non-free
# deb-src http://repository.maemo.org/extras-testing fremantle free non-free
# deb http://repository.maemo.org/extras-devel fremantle free non-free
# deb-src http://repository.maemo.org/extras-devel fremantle free non-free" > /scratchbox/users/rlinfati/targets/n900/etc/apt/sources.list
rm /scratchbox/users/rlinfati/targets/n900/opt
mkdir /scratchbox/users/rlinfati/targets/n900/opt
sb-conf st maemo4 -c cs2007q3-glibc2.5-i486 -d debian-etch:doctools:git:perl:svn -t none -f
sb-conf re maemo4 -f
sb-conf rs maemo4 /scratchbox/users/rlinfati/home/rlinfati/maemo-sdk-rootstrap_4.1.2_i386.tgz
sb-conf install maemo4 -L --etc --devkits --fakeroot
echo "# maemo4
deb http://repository.maemo.org/ diablo/sdk free non-free
deb-src http://repository.maemo.org/ diablo/sdk free
deb http://repository.maemo.org/ diablo/tools free non-free
deb-src http://repository.maemo.org/ diablo/tools free
deb file:/home/rlinfati/maemo-sdk-nokia-binaries_4.1.2 diablo explicit
# deb http://repository.maemo.org/extras diablo free non-free
# deb-src http://repository.maemo.org/extras diablo free non-free
# deb http://repository.maemo.org/extras-devel diablo free non-free
# deb-src http://repository.maemo.org/extras-devel diablo free non-free" > /scratchbox/users/rlinfati/targets/maemo4/etc/apt/sources.list
sb-conf st n8x0 -c cs2007q3-glibc2.5-arm6 -d debian-etch:doctools:git:perl:svn:qemu -t qemu-arm-sb -f
sb-conf re n8x0 -f
sb-conf rs n8x0 /scratchbox/users/rlinfati/home/rlinfati/maemo-sdk-rootstrap_4.1.2_armel.tgz
sb-conf install n8x0 -L --etc --devkits --fakeroot
echo "export DEB_BUILD_OPTIONS=maemo-launcher,thumb,vfp" > /scratchbox/users/rlinfati/targets/n8x0.environment
echo "# maemo4
deb http://repository.maemo.org/ diablo/sdk free non-free
deb-src http://repository.maemo.org/ diablo/sdk free
deb http://repository.maemo.org/ diablo/tools free non-free
deb-src http://repository.maemo.org/ diablo/tools free
deb file:/home/rlinfati/maemo-sdk-nokia-binaries_4.1.2 diablo explicit
# deb http://repository.maemo.org/extras diablo free non-free
# deb-src http://repository.maemo.org/extras diablo free non-free
# deb http://repository.maemo.org/extras-devel diablo free non-free
# deb-src http://repository.maemo.org/extras-devel diablo free non-free" > /scratchbox/users/rlinfati/targets/n8x0/etc/apt/sources.list
echo export DISPLAY=:2 > /scratchbox/users/rlinfati/home/rlinfati/.bashrc
END
Create a directory for the boot image and copy memdisk to /boot
mkdir /boot/images/
aptitude install syslinux
cp /usr/lib/syslinux/memdisk /boot
Create a script /etc/grub.d/40_custom to auto-detect the floppy image at the directory
#!/bin/sh
set -e
IMAGES=/boot/images
. /usr/lib/grub/grub-mkconfig_lib
if test -e /boot/memdisk ; then
MEMDISKPATH=$( make_system_path_relative_to_its_root "/boot/memdisk" )
echo "Found memdisk: $MEMDISKPATH" >&2
find $IMAGES -name "*.img" | sort |
while read image ; do
IMAGEPATH=$( make_system_path_relative_to_its_root "$image" )
echo "Found floppy image: $IMAGEPATH" >&2
cat << EOF
menuentry "Bootable floppy: $(basename $IMAGEPATH | sed s/.img//)" {
EOF
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
cat << EOF
linux16 $MEMDISKPATH bigraw
initrd16 $IMAGEPATH
}
EOF
done
fi
# exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
and call update-grub2
Build a Chroot with debootstrap, example a Ubuntu lucid
sudo debootstrap lucid /opt/chroots/lucid.linfati.cl/
now, create a /usr/local/bin/go-chroot file with
#/bin/sh
case "$1" in
sethost)
echo virtu-$2 | sudo tee /opt/chroots/$2.linfati.cl/etc/debian_chroot
;;
run)
sudo pbuilder --execute \
--aptcache "" \
--no-targz \
--buildplace /opt/chroots/$2.linfati.cl \
-- /bin/su -
;;
*)
$0 sethost $1
$0 run $1
;;
esac
exit 0
and run
go-chroot lucid
Modificamos los siguientes archivos
/etc/sysconfig/network ( solo añadir lineas que falten )
HOSTNAME=el_nombre_de_la_maquina
NETWORKING=yes
NETWORKING_IPV6=yes
IPV6_AUTOTUNNEL=yes
/etc/sysconfig/network-scripts/ifcfg-sit1″)
DEVICE=sit1
BOOTPROTO=none
ONBOOT=yes
IPV6INIT=yes
IPV6TUNNELIPV4=ipv4_servidor_del_tunel
IPV6TUNNELIPV4LOCAL=ipv4_cliente_del_tunel
IPV6ADDR=ipv6_cliente_del_tunel
/etc/sysconfig/static-routes-ipv6″)
sit1 2000::/3 ipv6_servidor_del_tunel
Y activamos la configuracion!
/etc/init.d/network reboot
Recent Comments