F200 Nand Access


Dan2552

Still Fresh
Joined
Nov 16, 2007
Messages
65
I just found a file called

usbconnect.sh

which seems to suggest that it DOES try to give you access to the NAND memory. Maybe somebody here could fix it? (although I understand the concept of what the script is doing, I'd have no idea what to check for problems)


CODE
#!/bin/sh

sync

if test $1 = "sd"; then
# is SD mount? (exists check)
if test "`mount | grep "/mnt/sd"`"; then
echo "USB Storage connect from SD"
umount /mnt/sd

# loading modules...
modprobe net2272
modprobe g_file_storage file=/dev/mmcsd/disc0/disc
fi
else
# load settings...
. /usr/gp2x/nandcfg.sh

# mount real nand
if test ! "`mount | grep "/mnt/yaffs"`"; then
echo "Mount image directory, if not mounted..."
mount ${IMGDIR}
fi

# unmount nand...
if test "`mount | grep "/mnt/nand"`"; then
echo "unmount nand directory, if mounted..."
umount ${MOUNT}
fi

# if not exists nand image, format nand...
if test ! -f ${IMAGE}; then
echo "format nand image, if not exists..."
rm -rf ${IMAGE}
${BINDIR}/nandformat.sh

# unmount nand...
if test "`mount | grep "/mnt/nand"`"; then
echo "unmount nand directory, if mounted..."
umount ${MOUNT}
fi
fi

# loading modules...
modprobe net2272
modprobe g_file_storage file=${IMAGE}
fi







here's the disconnect script too
CODE
#!/bin/sh

sync

if test $1 = "sd"; then
if test "`lsmod | grep "g_file_storage"`"; then
# remove modules...
rmmod g_file_storage
rmmod net2272

# mount sd...
mount -t vfat -o iocharset=utf8,sync,noatime /dev/mmcsd/disc0/part1 /mnt/sd
fi
else
# load NAND settings...
. /usr/gp2x/nandcfg.sh

# remove modules...
rmmod g_file_storage
rmmod net2272

# mount nand...
${BINDIR}/nandmount.sh
fi

modprobe net2272 susp=0
rmmod net2272

sync
 

paeryn

Reclusive maniac
Joined
Nov 28, 2005
Messages
432
Age
48
Location
Sheffield, England
Website
paeryn.myby.co.uk
Sorry to disappoint you but that's leftover code from the previous firmwares, the references to net2272 are a give away as that's the chip they took out and replaced with a card reader.
 

Dan2552

Still Fresh
Joined
Nov 16, 2007
Messages
65
too bad :(

Maybe it was a move to convince more people to try and get networking working by other methods.
 
Top