xda-developers.com
forum.xda-developers.com
device database
wiki.xda-developers.com Wiki HomePage
FAQ | Xanadux

RecentChanges | FindPage | | LikePages | BackLinks

Himalaya Standalone GPEWithout SD

Standalone GPE booting

Objective: Have a standalone GPE setup on Himalaya without SD/MMC access

Idea: Copy GPE files into a RAMfs, then pivotroot

Issues:

  • Device will not charge anymore once Linux booted, so you have approx. 4 hours to show this to your friends ;)
  • All your data will be in volatile memory, do not expect to find back your addressbook on next reboot

What you need: Himalaya, Haret, Xanadux kernel, InitRD, GPE Image, NFS Server.

You should have read HimalayaLinuxBootingViaRootNFS before.

Downloads :

  • kernel-2.6.12
  • initRD-2.6.12
  • Familiar/GPE snapshot

1. Setup your root filesystem

  • Extract InitRD files :
                gunzip initrd-2.6.12.gz
                mkdir tmpinitrd
                mount -o loop initrd-2.6.12 tmpinitrd
                cp -prvf tmpinitrd ./nfsroot
                umount tmpinitrd
  • Edit ./nfsroot/linuxrc :
                #!/bin/sh
                export PATH=/bin:/sbin:/usr/sbin:/usr/bin

                echo "Setting up RAMFS"
                mount -n /proc
                mount -t tmpfs tmpfs /mnt/ramfs -o size=65M

                echo "Mounting GPEroot"
                /sbin/portmap
                # Replace with your nfs dir
                mount -t nfs 192.168.0.205:/home/clement/dev/xda/gperoot /mnt/gperoot

                echo "Copying GPE into ramfs, please wait... "
                cp -pdRf /mnt/gperoot/* /mnt/ramfs
                umount /mnt/gperoot

                pivot_root /mnt/ramfs /mnt/ramfs/mnt/oldroot

                mount -t devfs none /dev
                mount -t devpts none /dev/pts
                mount -t proc none /proc

                # umount /mnt/oldroot/dev/pts
                umount /mnt/oldroot/dev
                umount /mnt/oldroot/proc
                umount /mnt/oldroot
                echo "Executing /sbin/init..."
                exec /sbin/init
                echo "Executing /bin/ash..."
                exec /bin/ash </dev/tts/2 >/dev/tts/2 2>/dev/tts/2

                mount -n /proc

                depmod -ae
                ln -s /dev/vc/0 /dev/tty0
                ln -s /dev/vc/1 /dev/tty1
                ln -s /dev/vc/2 /dev/tty2
                ln -s /dev/vc/3 /dev/tty3
                ln -s /dev/vc/4 /dev/tty4
                ln -s /dev/vc/5 /dev/tty5
                ln -s /dev/fb/0 /dev/fb0
                ln -s /dev/tts/0 /dev/ttyS0
                ln -s /dev/tts/1 /dev/ttyS1
                ln -s /dev/tts/2 /dev/ttyS2
                ln -s /dev/misc/rtc /dev/rtc

                ifconfig usb0 192.168.0.206
                route add default gw 192.168.0.205

                mknod /dev/ppp c 108 0

                echo "Executing /sbin/init..."
                exec /sbin/init $*

Note: Replace /home/clement/dev/xda/gperoot with your gpe nfs directory

2. Setup your GPE fs

                mkdir gperoot
                cd gperoot
                tar jxvf ../gpe-image-h3900-20051222183619.rootfs.tar.bz2
                mkdir mnt/oldroot

3. Export NFS directories

In /etc/exports (location may vary)

                # /etc/exports: NFS file systems being exported.  See exports(5).
                /home/clement/dev/xda/nfsroot himalaya(rw,sync,no_root_squash)
                /home/clement/dev/xda/gperoot himalaya(rw,sync,no_root_squash)

Note: himalaya is the hostname I affected to 192.168.0.206 in /etc/hosts

4. Boot Linux

Haret startup.txt :

                set KERNEL "zImage-2.6.12-hh2"
                set MTYPE 448
                set CMDLINE "root=/dev/nfs init=/linuxrc ip=192.168.0.206:192.168.0.205::::: nfsroot=192.168.0.205:/home/clement/dev/xda/nfsroot"
                bootlinux

Note: Replace /home/clement/dev/xda/nfsroot with your nfs directory

Don't forget to keep the device in craddle while booting linux. Once GPE is up you can remove it.

http://xda-fr.iclem.net/images/img2.png


Last edited on December 31, 2005 4:54 pm.


Edit | PageHistory | Diff | PageInfo
Login
User Name: Password:
Remember Me?