Android kernel with Kerrighed support, based on linux 2.6.29 and kerrighed 3.0.0, rootfs built using buildroot.
Check git tag
for versions. Tag linux2.6.29Ker
has source code necessary to build Linux kernel version 2.6.29 with Kerrighed support. Tag linux2.6.29KerAndroid
has the same with Android support additional.
NOTES:
- use gcc-4.4
- kerrighed will download linux-2.6.29.tar.bz -- this is OK
- however, make sure that during the configuration process, it does NOT unzip the linux source it just downloaded and instead uses the one already in the patches directory
- the linux-2.6.29 in the kerrighed/patches directory is a symlink to the linux-2.6.29 in the root directory of the repo
- create tap interfaces:
openvpn –mktun –dev tap0
andopenvpn –mktun –dev tap1
brctl addbr [name]
brctl addif tap0
brctl addif tap1
- setup tap0, tap1 to have some IP addr (192.168.1.1/2.1)
- start two qemu emulators running patched linux and rootfs, same session_id, different node_id, different tap interfaces, different macaddr
qemu-system-x86_64 -kernel Downloads/good/bzImage -initrd Downloads/rootfs.ext2 -append "root=/dev/ram session_id=1 node_id=1 ramdisk_size=128000" -net nic,model=e1000,macaddr=00:11:22:33:44:55 -net tap,ifname=tap0,script=no,downscript=no
/etc/init.d/kerrighed-host start
krgboot -imp -- /sbin/krginit-helper
(don't run krgboot_helper, the -u flag causes to crash)- inside one node, ssh into kerrighed-container:
ssh user@localhost -p 2222
- inside the kerrighed-container:
krgadm nodes add -a
- check proc/cpuinfo:
cat /proc/cpuinfo
repo init -u git://android-x86.git.sf.net/gitroot/android-x86/manifest.git -b donut-x86
(other links don't work)repo sync
ifconfig eth0 up
udhcpc
- check ifconfig or try ping-ing
Hints:
- run menuconfig to add utilities and libraries (openssh, openssl, etc)
- if needed, use glibc toolchain (toolchain options)
- populate dev (tty, tty1, null, urandom)
- edit etc/network/interfaces to have internet access
- mount rootfs image and install kerrighed there (prefix=/path/to/rootfs/mount)
- copy /lib/lsb/init-functions from ubuntu vm or somewhere... kerrighed-host uses it
- qemu-system-x86_64 -kernel [path]/[to]/bzImage -initrd [path]/[to]/rootfs.img -nographic -append "root=/dev/ram console=ttyS0,115200" -vga vmware
-
create QEMU disk image:
qemu-img create -f qcow2 test.qcow2 1G
-
add the disk image to run.sh:
-hda test.qcow2
-
./run.sh
-
enter 'ctrl'+'alt'+'shift'+'2' to enter QEMU monitor mode
-
savevm newvm
-- your VM is now saved in test.qcow2 -
enter 'ctrl'+'alt'+'shift'+'1' to exit QEMU monitor mode
-
add the existing disk image to the run.sh script:
-hda test.qcow2
-
./run.sh
-
enter QEMU monitor mode
-
loadvm newvm
- inside kerrighed dir:
./configure -disable-kernel
make distclean
./autogen.sh
./configure --disable-kernel --prefix=/path/to/
make install
INSTRUCTIONS FOR BUILDING KERNEL:
cp -R linux-2.6.29 kerrighed/patches/.
- inside kerrighed dir:
./configure
cd _kernel
make android-x86_defconfig
make
- bzImage file will be in kerrighed/kernel/arch/x86/boot/