Hello everyone.
I'm new to openwrt and am having some trouble. I've managed to get the sd card to mount to /mnt at boot. I did the following packagesonexternalmediahowto but every time I rebooted it didn't load. I read in the forums to add "echo 0x9c > /proc/diag/gpiomask" to /etc/init.d/boot, make a file in /etc/modules.d with mmc in it and added the following to my fstab.
config mount
option target /mnt/
option device /dev/mmc/disc0/part1
option fstype ext3
option options defaults
option enabled 1
Now when I reboot i have the sd card on /mnt.
Here's my df -h
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 1.6M 1.6M 0 100% /
/dev/root 1.6M 1.6M 0 100% /rom
tmpfs 7.0M 56.0k 6.9M 1% /tmp
/dev/mtdblock/4 1.7M 888.0k 840.0k 51% /jffs
mini_fo:/jffs 1.6M 1.6M 0 100% /
/dev/mmc/disc0/part1 1.8G 40.8M 1.7G 2% /mnt
my /sbin/init
#!/bin/sh
. /etc/functions.sh
config_load "bootfromexternalmedia"
local section="cfg1"
config_get "target" "$section" "target"
config_get "device" "$section" "device"
config_get "gpiomask" "$section" "gpiomask"
config_get "modules" "$section" "modules"
config_get_bool "enabled" "$section" "enabled" '1'
[ "$enabled" -gt 0 ] && {
[ -n "$gpiomask" ] && {
echo "$gpiomask" > /proc/diag/gpiomask
}
for module in $modules; do {
insmod $module
}; done
sleep 5s
mount -o rw "$device" $target
[ -x $target/sbin/init ] && {
. /bin/firstboot
pivot $target $target
}
}
exec /bin/busybox init
my /etc/config/bootfromexternalmedia
config bootfromexternalmedia
option target '/mnt/'
option device '/dev/mmc/disc0/part1'
option gpiomask '0x9c'
option modules 'mmc jbd ext3'
option enabled '1'
Any help would be very much appreciated!
(Last edited by vio on 25 Oct 2009, 06:35)