Sorry for the delay, took more testing than I anticipated. Cacko roms also have a usr.bin in /boot which is a cramfs of the normal /usr dir. Took me a whole day wondering why I kept getting errors on \"mount /dev/mmcda1 /usr/mnt.rom/card\" till I found this out.
This init script works form me on Sharp Qtopia, Cacko 1.21 roms, haven\'t had time to test on anything else yet.
Still can\'t dual boot into a Qtopia rom - the normal /sbin/init and all other apps give sig faults - any ideas anyone??
Here is the improved init script for C760 dual booting
#!/bin/sh
if [ "$1" != "" ]
then
exec /sbin/sys/init $@
fi
mount none /proc -t proc
mount none /dev -t tmpfs
if [ -f /root/.dev_default.tar.gz ]
then
echo "Cacko style"
gzip -dc /root/.dev_default.tar.gz | tar xf -
mount -n -r -t cramfs /boot/usr.bin /usr -o loop
else
echo "Sharp style"
tar xf /root/.dev_default.tar
fi
insmod /lib/modules.rom/2.4.18-rmk7-pxa3-embedix/kernel/drivers/block/sharp_mmcsd_m.o
mount -oasync,noatime /dev/mmcda1 /usr/mnt.rom/card
if [ -f /usr/mnt.rom/card/init.card ]
then
echo ""
echo "Executing init on SD card"
cp /usr/mnt.rom/card/init.card /dev/.
exec /dev/init.card
else
echo ""
echo "Chainloading rom init"
umount /usr/mnt.rom/card >/dev/null 2>&1
umount /dev >/dev/null 2>&1
umount /proc >/dev/null 2>&1
rmmod sharp_mmcsd_m.o >/dev/null 2>&1
exec /sbin/sys/init
fi
hope this helps
Stu