1 (edited by forum2006 2007-05-21 10:24:07)

Topic: [howto] Changing mini_fo's storage directory (/jffs)

Changing mini_fo's storage directory (/jffs on external media)

1. Introduction
This guide describes how to use your USB stick or your MMC/SD card for storing pakages and files instead of
using the JFFS2 partion on your flash chip. / in this case is the SquashFS partition on the flash chip and the
writable EXT2 partion is on your external media. With little modifications you can use this guide also for MMC/SD
card. Tested with Kamikaze pre1 on a Asus WL-500GD and a 512MB Sundisk Cruzer Mini USB 2.0 stick. With little
modifications it will also work with WhiteRussian 0.9.
With this guide you do not have to mess around with PATH, LD_LIBRARY_PATH or create symlinks anymore.

NOTE: This notes are taken out of my personal notes. They may be incomplete or does not fit your needs.


Makes the following Wiki pages obsolete:
- http://wiki.openwrt.org/PackagesOnExternalMediaHowTo
- http://wiki.openwrt.org/UsbStorageHowto (section 4)


2. Requirements
- a router with external storage media like USB stick or MMC/SD card
- the OpenWrt ImageBuilder

3. USB media
Use the modified /sbin/mount_root script.
mkdir -p ~/files/sbin/
chmod +x ~/files/sbin/mount_root

Create a new image with the ImageBuilder
make clean image \
    PACKAGES="fdisk e2fsprogs kmod-fs-ext2 kmod-usb-core kmod-usb-ohci kmod-usb-storage kmod-usb-uhci kmod-usb2" \
    FILES="/home/ubuntu/files/"

Reflash your router with the new image.

Next partition and format your USB stick with EXT2 filesystem.

Check if you have /dev/sda1. If it's different change it in ~/files/sbin/mount_root. Rebuild the image and reflash again.

Finally reboot again and check with 'df -h' if /jffs is on your USB stick.

root@OpenWrt:/# df -h
Filesystem                Size      Used Available Use% Mounted on
none                     14.7M     20.0k     14.7M   0% /tmp
tmpfs                   512.0k         0    512.0k   0% /dev
/dev/sda1               480.9M      9.0M    447.4M   2% /jffs <--- this is my USB stick with EXT2 filesystem
/jffs                   960.0k    960.0k         0 100% /
root@OpenWrt:/#

From now on you can use ipkg the normal way and all packages or modified files will be stored on your USB stick.

modified /sbin/mount_root script:

--- mount_root.orig     2007-05-19 23:50:27.000000000 +0200
+++ files/sbin/mount_root       2007-05-20 01:17:55.000000000 +0200
@@ -42,8 +42,25 @@
                . /bin/firstboot
                mtd unlock rootfs_data
                jffs2_ready && {
+                       echo "loading USB and ext2 modules"
+                       insmod usbcore
+                       insmod ext2
+                       insmod ohci-hcd
+                       insmod uhci-hcd
+                       insmod ehci-hcd
+                       insmod scsi_mod
+                       insmod sd_mod
+                       insmod usb-storage
+                       # lsmod > /tmp/x.txt
+                       sleep 2
+                       mknod /dev/sda b 8 0
+                       mknod /dev/sda1 b 8 1
+                       # ls -al /dev/sda* >> /tmp/x.txt
+
                        echo "switching to jffs2"
-                       mount "$(find_mtd_part rootfs_data)" /jffs -t jffs2 && \
+                       # mount "$(find_mtd_part rootfs_data)" /jffs -t jffs2 && \
+
+                       mount /dev/sda1 /jffs -t ext2 && \
                                fopivot /jffs /rom
                } || {
                        echo "jffs2 not ready yet; using ramdisk"

For now you have to create the device files manually with mknod. Nbd said, this will change in the future.

1x ASUS WL-700g Encore (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x ASUS WL-500g Premium with Wistron CM9 WiFi card (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x Linksys WRT54GL v1.1 with 512MB MMC card mod, optimized MMC driver (Kamikaze trunk r9548, BCM947xx//953xx [2.4])
NO support via PM.

Re: [howto] Changing mini_fo's storage directory (/jffs)

Installing qos-scripts on the USB stick:

root@OpenWrt:/# df
Filesystem           1k-blocks      Used Available Use% Mounted on
none                     15032        24     15008   0% /tmp
tmpfs                      512         0       512   0% /dev
/dev/sda1               492406      8759    458626   2% /jffs
/jffs                      960       960         0 100% /
root@OpenWrt:/# ipkg install qos-scripts
Installing qos-scripts (1.1.1-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./qos-scripts_1.1.1-1_mipsel.ipk
Installing tc (2.6.15-060110-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./tc_2.6.15-060110-1_mipsel.ipk
Installing kmod-sched (2.6.19.2-brcm47xx-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./kmod-sched_2.6.19.2-brcm47xx-1_mipsel.ipk
Installing iptables-mod-filter (1.3.5-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./iptables-mod-filter_1.3.5-1_mipsel.ipk
Installing iptables (1.3.5-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./iptables_1.3.5-1_mipsel.ipk
Installing kmod-ipt-filter (2.6.19.2-brcm47xx-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./kmod-ipt-filter_2.6.19.2-brcm47xx-1_mipsel.ipk
Installing iptables-mod-ipopt (1.3.5-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./iptables-mod-ipopt_1.3.5-1_mipsel.ipk
Installing kmod-ipt-ipopt (2.6.19.2-brcm47xx-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./kmod-ipt-ipopt_2.6.19.2-brcm47xx-1_mipsel.ipk
Installing iptables-mod-extra (1.3.5-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./iptables-mod-extra_1.3.5-1_mipsel.ipk
Installing kmod-ipt-extra (2.6.19.2-brcm47xx-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./kmod-ipt-extra_2.6.19.2-brcm47xx-1_mipsel.ipk
Installing iptables-mod-conntrack (1.3.5-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./iptables-mod-conntrack_1.3.5-1_mipsel.ipk
Installing kmod-ipt-conntrack (2.6.19.2-brcm47xx-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./kmod-ipt-conntrack_2.6.19.2-brcm47xx-1_mipsel.ipk
Installing iptables-mod-imq (1.3.5-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./iptables-mod-imq_1.3.5-1_mipsel.ipk
Installing kmod-ipt-imq (2.6.19.2-brcm47xx-1) to root...
Downloading http://some.host/brcm47xx-2.6/packages/./kmod-ipt-imq_2.6.19.2-brcm47xx-1_mipsel.ipk
Configuring iptables
Configuring iptables-mod-conntrack
Configuring iptables-mod-extra
Configuring iptables-mod-filter
Configuring iptables-mod-imq
Configuring iptables-mod-ipopt
Configuring kmod-ipt-conntrack
Configuring kmod-ipt-extra
Configuring kmod-ipt-filter
Configuring kmod-ipt-imq
Configuring kmod-ipt-ipopt
Configuring kmod-sched
Configuring qos-scripts
Configuring tc
Done.
root@OpenWrt:/# df  
Filesystem           1k-blocks      Used Available Use% Mounted on
none                     15032        24     15008   0% /tmp
tmpfs                      512         0       512   0% /dev
/dev/sda1               492406      9697    457688   2% /jffs
/jffs                      960       960         0 100% /
root@OpenWrt:/#
1x ASUS WL-700g Encore (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x ASUS WL-500g Premium with Wistron CM9 WiFi card (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x Linksys WRT54GL v1.1 with 512MB MMC card mod, optimized MMC driver (Kamikaze trunk r9548, BCM947xx//953xx [2.4])
NO support via PM.

Re: [howto] Changing mini_fo's storage directory (/jffs)

Hi Forum2006,

Again - very useful HOWTO!

I have a couple of questions in this direction – external non-violate medias.

1) Is it possible the USB stick/storage to be got ready with root file system being plugged in the development PC, and to be used by router (being plugged in it, of course) at once, at the first boot?

2) Is it possible the OS kernel itself (having root file system on external media) to be build for execution in-place (XIP) in the board flash – not compressed, and not copied to RAM?
I guess it will require changes in boot-loader as well, but the idea is to save some RAM usage.

Thanks a lot in advance!

Re: [howto] Changing mini_fo's storage directory (/jffs)

Sorry, but my Linux knowledge is not so good that I can help you with your two questions. Maybe someone else knows more.

1x ASUS WL-700g Encore (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x ASUS WL-500g Premium with Wistron CM9 WiFi card (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x Linksys WRT54GL v1.1 with 512MB MMC card mod, optimized MMC driver (Kamikaze trunk r9548, BCM947xx//953xx [2.4])
NO support via PM.

Re: [howto] Changing mini_fo's storage directory (/jffs)

OK, I hope these questions will attract developers’ interest and attention

Nevertheless, Do not underestimate your Linux skills, I am applying your advises here – not a single wrong step

Cheers

6 (edited by Cisien 2007-05-20 22:00:12)

Re: [howto] Changing mini_fo's storage directory (/jffs)

Kamikaze with the broadcom 2.4 kernel is a little different. For one, you don't need the mknode lines since 2.4 adds them automatically. Also, if you use EXT3 you need to insmod the jbd module.

here is a copy of my mount_root file:
Note: I added extra debugging which helped me pinpoint some issues i was having. I chose to keep them, gives me something to look at if for some reason my filesystem is missing next reboot smile

#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
. /etc/functions.sh

size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)?mt-l:s}' /proc/meminfo)
mount none /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777

if grep devfs /proc/filesystems > /dev/null; then
        mount none /dev -t devfs
        M0=/dev/pty/m0
        M1=/dev/pty/m1
        HOTPLUG=/sbin/hotplug-call
else
        mount -t tmpfs tmpfs /dev -o size=512K
        mknod /dev/console c 5 1
        mkdir /dev/shm
        /sbin/hotplug2 --no-persistent --coldplug --set-rules-file /etc/hotplug2-init.rules
        M0=/dev/ptmx
        M1=/dev/ptmx
        HOTPLUG=
fi

mkdir -p /dev/pts /dev/shm
mount none /dev/pts -t devpts

# the shell really doesn't like having stdin/out closed
# that's why we use /dev/pty/m0 and m1 as replacement
# for /dev/console if there's no serial console available
dd if=/dev/console of=/dev/null bs=1 count=0 >/dev/null 2>/dev/null || \
        exec <$M0 >$M1 2>&0

echo "$HOTPLUG" > /proc/sys/kernel/hotplug

jffs2_ready () {
        mtdpart="$(find_mtd_part rootfs_data)"
        magic=$(hexdump $mtdpart -n 4 -e '4/1 "%02x"')
        [ "$magic" != "deadc0de" ]
}

[ failsafe != "$1" ] && {
        grep rootfs_data /proc/mtd >/dev/null 2>/dev/null && {
                . /bin/firstboot
                #mtd unlock rootfs_data
                jffs2_ready && {
                        echo "....loading modules...." > /tmp/usbstorage.log

                        insmod usbcore >> /tmp/usbstorage.log 2>> /tmp/usbstorage.log
                        insmod ext2 >> /tmp/usbstorage.log 2>> /tmp/usbstorage.log
                        insmod jbd >> /tmp/usbstorage.log 2>> /tmp/usbstorage.log
                        insmod ext3 >> /tmp/usbstorage.log 2>> /tmp/usbstorage.log
                        insmod usb-ohci >> /tmp/usbstorage.log 2>> /tmp/usbstorage.log
                        insmod ehci-hcd >> /tmp/usbstorage.log 2>> /tmp/usbstorage.log
                        insmod scsi_mod >> /tmp/usbstorage.log 2>> /tmp/usbstorage.log
                        insmod sd_mod >> /tmp/usbstorage.log 2>> /tmp/usbstorage.log
                        insmod usb-storage >> /tmp/usbstorage.log 2>> /tmp/usbstorage.log

                        echo "....loaded modules....." >> /tmp/usbstorage.log
                        lsmod >> /tmp/usbstorage.log

                        sleep 2

                        echo "....usb devices...." >> /tmp/usbstorage.log
                        ls -al /dev/scsi/host*/bus*/target*/lun*/* >> /tmp/usbstorage.log

                        echo "....switching  jffs device...." >> /tmp/usbstorage.log
                        mount /dev/scsi/host0/bus0/target0/lun0/part2 /jffs -t ext3 >> /tmp/usbstorage.log 2>> /tmp/usbstorage.log && \
                                fopivot /jffs /rom >> /tmp/usbstorage.log 2>> /tmp/usbstorage.log
                } || {
                        echo "jffs2 not ready yet; using ramdisk"
                        ramoverlay
                }
        } || {
                mtd unlock rootfs
                mount -o remount,rw /dev/root /
        }
}

Thanks for the great idea, forum2006! (and the help getting all this working!)

Re: [howto] Changing mini_fo's storage directory (/jffs)

Woooo! Great HowTo!!
That's what I am looking for!

But I am not using USB drive!
I use SDcard mod on a WRT54GL, does anybody have done this on a linksys with SDcard ?

Thanks

Re: [howto] Changing mini_fo's storage directory (/jffs)

The process should be the same. The important part is that you get all the required modules loaded (and built into the image using the ImageBuilder). If, for some reason, you made a mistake, the system uses the normal flash for /jffs.

Re: [howto] Changing mini_fo's storage directory (/jffs)

xtrem57 wrote:

But I am not using USB drive!
I use SDcard mod on a WRT54GL, does anybody have done this on a linksys with SDcard ?

please post the mount_root script if you have it working for SD/MMC mod.

In mount_root you have to load the mmc.o modules instead of the USB modules. I guess you also have to use different mknod command.

1x ASUS WL-700g Encore (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x ASUS WL-500g Premium with Wistron CM9 WiFi card (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x Linksys WRT54GL v1.1 with 512MB MMC card mod, optimized MMC driver (Kamikaze trunk r9548, BCM947xx//953xx [2.4])
NO support via PM.

10 (edited by Cisien 2007-05-21 10:51:28)

Re: [howto] Changing mini_fo's storage directory (/jffs)

isn't the /dev node for the MMC mod /dev/mmc/disk0/part1 (in 2.4 at least)?

Re: [howto] Changing mini_fo's storage directory (/jffs)

Thanks for answering wink

Cisien, the node for mmc is /dev/mmc/disk0/part1 yep wink

forum2006, I will try, and then I will post my mount script

I have never build my own image, so first of all I have to read some wiki page tongue
And then install a linux disto to be able to use ImageBuilder

Keep you informed wink

Re: [howto] Changing mini_fo's storage directory (/jffs)

forum2006's sig contains a link to a vmware image he put together that contains the openwrt build environment.

After you build your kernel and packages you want, just go into the bin folder, and grab the OpenWRT-ImageBuilder tarball, extract it to a new folder, and then you're set.

13 (edited by forum2006 2007-05-21 17:20:41)

Re: [howto] Changing mini_fo's storage directory (/jffs)

Ok. Here is the /sbin/mount_root script for WhiteRussian 0.9:

#!/bin/sh
is_dirty() {
        grep Broadcom /proc/cpuinfo >&- || return 1
        OFFSET="$(($(hexdump -v /dev/mtdblock/1 -s 20 -n 2 -e '"%d"')-1))"
        return $(hexdump -v /dev/mtdblock/1 -s $OFFSET -n 1 -e '"%d"')
}

if [ "$1" != "failsafe" -a "$(nvram get no_root_swap)" != 1 ]; then 
        mtd unlock linux
        mount | grep jffs2 >&-
        if [ $? = 0 ] ; then
                mount -o remount,rw /dev/root /
        else
                . /bin/firstboot
                is_dirty 
                [ $? != 0 ] && {
                        echo "loading USB and EXT2/EXT3 modules"
                        insmod usbcore
                        insmod ext2
                        insmod jbd
                        insmod ext3
                        insmod ohci-hcd
                        insmod uhci-hcd
                        insmod ehci-hcd
                        insmod scsi_mod
                        insmod sd_mod
                        insmod usb-storage
                        sleep 2

                        echo "switching to jffs2"
                        # mount /dev/mtdblock/4 /jffs -t jffs2
                        mount /dev/scsi/host0/bus0/target0/lun0/part1 /jffs -t ext3
                        fopivot /jffs /rom
                } || {
                        echo "jffs2 not ready yet; using ramdisk"
                        ramoverlay
                }
        fi
fi

mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777
mkdir -p /dev/pts
mount none /dev/pts -t devpts 2>&-
mount -t sysfs none /sys 2>&-

And here the extra packages for the WhiteRussian ImageBuilder (lists/default.brcm-2.4). You have to download e2fsprogs and fdisk packages from rc5 and rc6 backports.

e2fsprogs
fdisk
kmod-ext2
kmod-ext3
kmod-usb-core
kmod-usb-ohci
kmod-usb-uhci
kmod-usb2
kmod-usb-storage
root@OpenWrt:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 1.4M      1.4M         0 100% /rom
none                     14.9M     28.0k     14.9M   0% /tmp
/dev/scsi/host0/bus0/target0/lun0/part1   480.9M      8.9M    447.5M   2% /jffs
/jffs                     1.4M      1.4M         0 100% /
root@OpenWrt:/# mount
/dev/root on /rom type squashfs (ro)
none on /dev type devfs (rw)
none on /proc type proc (rw)
none on /tmp type tmpfs (rw,nosuid,nodev)
none on /proc/bus/usb type usbfs (rw)
/dev/scsi/host0/bus0/target0/lun0/part1 on /jffs type ext3 (rw)
/jffs on / type mini_fo (rw)
none on /dev/pts type devpts (rw)
root@OpenWrt:/# cat /proc/version 
Linux version 2.4.30 (nbd@cjdinfo1) (gcc version 3.4.4 (OpenWrt-1.0)) #1 Wed Jan 31 15:43:02 CET 2007
root@OpenWrt:/#
1x ASUS WL-700g Encore (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x ASUS WL-500g Premium with Wistron CM9 WiFi card (Kamikaze 7.09, BCM947xx//953xx [2.4])
1x Linksys WRT54GL v1.1 with 512MB MMC card mod, optimized MMC driver (Kamikaze trunk r9548, BCM947xx//953xx [2.4])
NO support via PM.

Re: [howto] Changing mini_fo's storage directory (/jffs)

I would like to comment on the convenience of this method.

The other day, shortly after setting up this config I made a change to my settings which caused my interfaces to not come up. Instead of dropping into failsafe mode and having to load all the usb modules, ext3 modules, and then mount the mem stick, I just pulled the usb stick out of the router, tossed it in my Linux box, mounted the drive, fixed the config, and put the stick back in the router. I had another case earlier where i tried some ipv6 settings in /etc/config/network. Apparently it doesn't support ipv6 yet. This left my lan interface unable to come up (probably due to syntax errors). Easy fix, mount the card in my Linux box and revert the changes.

So. The benefits of this are more than just more storage. it's peace of mind knowing that if you make a mistake you can easily revert it without fooling around with failsafe mode.

Also, i mounted the built in flash jffs2 partition and copied a working /etc to it. If i come up without the mem stick, the normal /jffs partition is mounted and I come up on a known good profile.

Re: [howto] Changing mini_fo's storage directory (/jffs)

I'm sorry to ask this stupid question. But what exactly are you supposed to do here:

3. USB media
Use the modified /sbin/mount_root script.
mkdir -p ~/files/sbin/
chmod +x ~/files/sbin/mount_root

Create a new image with the ImageBuilder
make clean image \
    PACKAGES="fdisk e2fsprogs kmod-fs-ext2 kmod-usb-core kmod-usb-ohci kmod-usb-storage kmod-usb-uhci kmod-usb2" \
    FILES="/home/ubuntu/files/"

What means "using the modified script"? Do you replace the mount_root script of your current installation on the router with the modified? Why do you creat the folders and then you flash the new image and the folders are lost?
I don't get the steps .. I'm sorry. Could you please explain it a bit more detailed? I would be very happy smile

Re: [howto] Changing mini_fo's storage directory (/jffs)

the mount_root script is part of the squashfs image, it can't be replaced without re-flashing.

when you run 'make clean image' in the image builder, you specify the path to the modified mount_root script which you stored in ~/files/sbin/, so FILES="/home/ubuntu/filles" would be whatever your "~/files" folder is.

17 (edited by Hanzolo 2007-05-26 13:32:29)

Re: [howto] Changing mini_fo's storage directory (/jffs)

Hey I just realised that the wiki said your tutorial is a bit outdated since it says:

Note: There is a better method for doing this found at the UsbStorageHowto page.

First of all, credit for this discovery goes to forum2006. I am reposting his guide here to keep it from getting buried.

I did it like here
http://wiki.openwrt.org/UsbStorageHowto
and it worked like a charm. Thanks anyway! It's just ab it complicated with the whole image building thingy when you're a linux novice. The wiki-tut worked flawlessly

For anyone who still wants to try this method described here I recommend the wiki page http://wiki.openwrt.org/ReplaceJFFS2WithExternalMedia because there it's a bit more detailed fith a few steps more in between

Have fun and good luck smile

Re: [howto] Changing mini_fo's storage directory (/jffs)

I cant build openwrt image,it write:
"make: Nothing to be done for `image'."
sad

Re: [howto] Changing mini_fo's storage directory (/jffs)

damn,now i cant mount usb disk as root fs edited mount_root script for kamikaze says:

root@router:/sbin# mount_root
mount: mounting none on /dev failed
mount: mounting none on /dev/pts failed

i have kamikaze 7.06
please help sad

Re: [howto] Changing mini_fo's storage directory (/jffs)

Hi,

I am brand new to this thread and just saw that topic.

Re: [howto] Changing mini_fo's storage directory (/jffs)

Hi Forum2006,
Do you still use this method in v 8.09 ?
I'll try to have a LiveUSB OpenWRT on x86...
Thk

Re: [howto] Changing mini_fo's storage directory (/jffs)

Hi,

I read about this alternative:

http://www.macsat.com/macsat/content/view/16/30/

It looks more simple but I am not sure whether it has some side effects compared to the method from this topic?

Re: [howto] Changing mini_fo's storage directory (/jffs)

forum2006 wrote:

Ok. Here is the /sbin/mount_root script for WhiteRussian 0.9:

#!/bin/sh
is_dirty() {
        grep Broadcom /proc/cpuinfo >&- || return 1
        OFFSET="$(($(hexdump -v /dev/mtdblock/1 -s 20 -n 2 -e '"%d"')-1))"
        return $(hexdump -v /dev/mtdblock/1 -s $OFFSET -n 1 -e '"%d"')
}

if [ "$1" != "failsafe" -a "$(nvram get no_root_swap)" != 1 ]; then 
        mtd unlock linux
        mount | grep jffs2 >&-
        if [ $? = 0 ] ; then
                mount -o remount,rw /dev/root /
        else
                . /bin/firstboot
                is_dirty 
                [ $? != 0 ] && {
                        echo "loading USB and EXT2/EXT3 modules"
                        insmod usbcore
                        insmod ext2
                        insmod jbd
                        insmod ext3
                        insmod ohci-hcd
                        insmod uhci-hcd
                        insmod ehci-hcd
                        insmod scsi_mod
                        insmod sd_mod
                        insmod usb-storage
                        sleep 2

                        echo "switching to jffs2"
                        # mount /dev/mtdblock/4 /jffs -t jffs2
                        mount /dev/scsi/host0/bus0/target0/lun0/part1 /jffs -t ext3
                        fopivot /jffs /rom
                } || {
                        echo "jffs2 not ready yet; using ramdisk"
                        ramoverlay
                }
        fi
fi

[...]

Congratulatiosn this is real great, I made it work once, and I was using my ipod 4g for /jffs and stuff, but it broke, once it felt and it won't turn on again, so I trashed it.

Now I bought myself a nice 8gb Kingston USB pen-drive, which I was messing around with, and noticed after using fdisk to remove the partitions that it cannot be used as I used the iPod, ext3 partitions are always reporting Magic block error, and after fsck.ect3 on them and correcting the problems it persists, they cannot be mounted, so i created a big 8Gb partition with winxp and now after trying to mount it, the following error shows.

I'm seeing this error after this part of the script

 
mount /dev/scsi/host0/bus0/target0/lun0/part1 /jffs -t ext3 fopivot /jffs /rom

..... switching jffs device .....
mount: mounting /dev/scsi/host0/bus0/target0/lun0/part1 on /jffs failed: no such device

and

..... usb devices ..... is always blank
..... switching jffs device .....
When trying to mount manually I get

/bin/ash: fopivot: not found

i'm new doing _this_ kind of tweaking to Kamikaze trunk (I'm using latest svn).

I suppose I'm missing something when I do make menuconfig, but don't know where.

Would you give me some advise on what to do?.

Re: [howto] Changing mini_fo's storage directory (/jffs)

Hi!
I compiled my image with the modified mount_root script but when the router comes up it displays a lot of error messages

CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: Tue Aug  7 17:14:08 CST 2007 (crazy@sw1.rd)
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.

Initializing Arena
Initializing Devices.

No DPN
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.37.0
CPU type 0x29008: 200MHz
Total memory: 16384 KBytes

Total memory used by CFE:  0x80300000 - 0x803A39B0 (670128)
Initialized Data:          0x803398C0 - 0x8033BFD0 (10000)
BSS Area:                  0x8033BFD0 - 0x8033D9B0 (6624)
Local Heap:                0x8033D9B0 - 0x803A19B0 (409600)
Stack Area:                0x803A19B0 - 0x803A39B0 (8192)
Text (code) segment:       0x80300000 - 0x803398C0 (235712)
Boot area (physical):      0x003A4000 - 0x003E4000
Relocation Factor:         I:00000000 - D:00000000

Boot version: v3.7
The boot is CFE

mac_init(): Find mac [XX:XX:XX:XX:XX:XX] in location 0
Nothing...

eou_key_init(): Find key pair in location 0
The eou device id is same
The eou public key is same
The eou private key is same
Device eth0:  hwaddr XX-XX-XX-XX-XX-XX, ipaddr 192.168.1.1, mask 255.255.255.0
        gateway not set, nameserver not set
Reading :: Failed.: Timeout occured
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
Loading: .. 3760 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
CPU revision is: 00029008
Primary instruction cache 16kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, linesize 16 bytes.
Linux version 2.4.35.4 (hunbalazs@BG1) (gcc version 3.4.6 (OpenWrt-2.0)) #11 Sat Jul 18 18:16:49 CEST 2009
Setting the PFC to its default value
Determined physical RAM map:
 memory: 01000000 @ 00000000 (usable)
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200
CPU: BCM5352 rev 0 at 200 MHz
Using 100.000 MHz high precision timer.
Calibrating delay loop... 199.47 BogoMIPS
Memory: 14260k/16384k available (1425k kernel code, 2124k reserved, 100k data, 84k init, 0k highmem)
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
PCI: no core
PCI: Fixing up bus 0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Registering mini_fo version $Id$
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
squashfs: version 3.0 (2006/03/15) Phillip Lougher
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 3) is a 16550A
b44.c:v0.93 (Mar, 2004)
eth0: Broadcom 47xx 10/100BaseT Ethernet 00:1d:7e:bc:c9:f2
 Amd/Fujitsu Extended Query Table v1.1 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Flash device: 0x400000 at 0x1c000000
bootloader size: 262144
Physically mapped flash: Filesystem type: squashfs, size=0x188f37
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "cfe"
0x00040000-0x003f0000 : "linux"
0x000bb000-0x00250000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x003f0000-0x00400000 : "nvram"
0x00250000-0x003f0000 : "rootfs_data"
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 84k freed
Algorithmics/MIPS FPU Emulator v1.5
mount: mounting sysfs on /sys failed: No such device
mount: mounting devfs on /dev failed: Device or resource busy
- preinit -
Press CTRL-C for failsafe
diag: Detected 'Linksys WRT54G/GS/GL'
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
roboswitch: Probing device eth0: found!
switch-robo             5180   0 (unused)
switching to jffs2
[INFO] mmc_hardware_init: initializing GPIOs
[INFO] mmc_card_init: the period of a 380KHz frequency lasts 524 CPU cycles
[INFO] mmc_card_init: powering card on. sending 80 CLK
[INFO] mmc_card_init: 80 CLK sent in 43646 CPU cycles
[INFO] mmc_card_init: resetting card (CMD0)
[INFO] mmc_card_init: doing initialization loop
[INFO] mmc_card_init: card inited successfully in 620 tries (19126861 CPU cycles).
[INFO] mmc_init: MMC/SD Card ID:
02 54 4d 53 44 35 31 32 28 82 6e cf 33 00 6b f3 [INFO] Manufacturer ID   : 02
[INFO] OEM/Application ID: TM
[INFO] Product name      : SD512
[INFO] Product revision  : 2.8
[INFO] Product SN        : 826ecf33
[INFO] Product Date      : 2006-11
[INFO] mmc_card_config: size = 500224, hardsectsize = 512, sectors = 1000448
[WARN] mmc_init: hd_sizes=500224, hd[0].nr_sects=1000448
[INFO] mmc_card_init: set_blocklen (CMD16) succeeded !
Partition check:
 mmca: p1
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
mini_fo: meta_build_lists:                                           ERROR, fs does not support reading.
- init -

Please press Enter to activate this console. jffs2.bbc: SIZE compression mode activated.
mini_fo: meta_build_lists:                                           ERROR, fs does not support reading.
VFS: Busy inodes after unmount. Self-destruct in 5 seconds.  Have a nice day...
Unhandled kernel unaligned access in unaligned.c::emulate_load_store_insn, line 481:
$0 : 00000000 1000ec00 62696c2f 00000001 80e66a80 80190000 80df1440 802130c8
$8 : 1000ec01 00020000 80c63dc0 7fff7efc ffffffff 00020000 0001ffff 00000008
$16: 2d646c2f 00000000 80c67220 80ca33e0 80c63dc0 80c63f30 00000000 004ca87c
$24: 00000000 00000000                   80c62000 80c63d18 00000000 8004e0d8
Hi : 00000000
Lo : 0000003d
epc   : 80062390    Not tainted
Status: 1000ec03
Cause : 00000010
PrId  : 00029008
Process uci (pid: 100, stackpage=80c62000)
Stack:    802bbc60 00442b3f 00442b80 00000003 80ca33e0 80ca33f8 8004e0d8
 80ca33e0 80063304 00006012 2aaa8000 00000001 80df16c0 8021b4a0 80038ac8
 80038a10 8018c8e0 800570cc 00000000 00000000 8018c8e0 800570cc 00000000
 00000000 800418e8 80041874 80c63dc0 00000000 00000000 802b7000 00000000
 802b7000 004d0a6c 004ca8f4 80c63f30 00000000 80041b04 80041af0 00000000
 00000000 ...
Call Trace:   [<8004e0d8>] [<80063304>] [<80038ac8>] [<80038a10>] [<800570cc>]
 [<800570cc>] [<800418e8>] [<80041874>] [<80041b04>] [<80041af0>] [<80008404>]
 [<80008a60>] [<8000f330>] [<8005bb0c>]

Code: 8c820000  1040000a  8c900004 <8c43004c> 10600007  00000000  8c63000c  10600004  00000000 
Unable to handle kernel paging request at virtual address 00000008, epc == 80026ea4, ra == 80027900
Oops in fault.c::do_page_fault, line 206:
$0 : 00000000 1000ec00 00000000 00000000 80df14c0 80cbdee0 80cbde90 80027744
$8 : 00000000 00000000 00000054 00000000 80df1440 00000000 801e6024 2ab98320
$16: 80df1460 00000fff 80df14c0 80df1440 ffffffea 80cbdee0 004cfa60 80df14c0
$24: 801a15d4 2ab9f540                   80cbc000 80cbde30 00000000 80027900
Hi : 00000000
Lo : 0000001b
epc   : 80026ea4    Not tainted
Status: 1000ec03
Cause : 00000008
PrId  : 00029008
Process S10boot (pid: 97, stackpage=80cbc000)
Stack:    00c7269b 004c6894 00c7279f 800233dc 80cbdee0 7f342138 80dfa2a0
 00000000 80df1460 00000fff 00000000 80df1440 ffffffea 80cbdee0 004cfa60
 80df14c0 00000000 80027900 80011758 004d2af0 80da7a40 8018c5bc 8004fd44
 00000000 00000000 00000fff 004cfa60 00000000 80df1460 80df14c0 ffffffea
 80df1440 ffffffea 80df1460 00000000 004cf78c 00000000 80062638 0000000b
 8017c820 ...
Call Trace:   [<800233dc>] [<80027900>] [<80011758>] [<8004fd44>] [<80062638>]
 [<80048648>] [<80037be4>] [<80037644>] [<8003763c>] [<80008a60>] [<8005bb0c>]

Code: 8c820008  afa50010  00809021 <8c420008> afa70014  8c5300b8  8e760020  96c40030  10800009 
Unhandled kernel unaligned access in unaligned.c::emulate_load_store_insn, line 481:
$0 : 00000000 1000ec00 80e66a80 80ca32e0 62696c2f 8014dd44 8014e6a4 00000063
$8 : 00000011 8029b000 00001000 00000002 8017cba0 00000000 00000001 00000001
$16: 2d646c2f 00000001 00000001 00000009 8029b011 00000009 00000001 00000003
$24: 00000000 00000000                   80ca6000 80ca7e20 ffffffff 80062104
Hi : 00000000
Lo : 00000000
epc   : 8006211c    Not tainted
Status: 1000ec03
Cause : 00000010
PrId  : 00029008
Process S10boot (pid: 102, stackpage=80ca6000)
Stack:    80f86c20 00000009 00000000 80ca7f00 80ca32e0 00000009 00000000
 80ca7f00 8004354c fffffffe 800434c8 6d006574 80f86c20 ffffffec 80f86c20
 00000000 800440e4 800440cc 80c97ea0 80ca6000 8000b484 8000b420 8029b009
 00000008 7498a549 6f63006e 00000000 726f665f 8029b000 80ca7f00 00000000
 004ca814 00000000 004d0000 8004478c 80044774 616f6c5f 79730064 6d657473
 70706100 ...
Call Trace:   [<8004354c>] [<800434c8>] [<800440e4>] [<800440cc>] [<8000b484>]
 [<8000b420>] [<8004478c>] [<80044774>] [<80044968>] [<800405e4>] [<800072d8>]
 [<80037644>] [<8003763c>] [<80008a60>] [<8000f1b8>] [<8005bb0c>]

Code: 8c440000  1080000a  8c500004 <8c82004c> 10400007  00000000  8c420000  10400004  00000000 
ASSERTION FAILED: src != NULL at mini_fo.h:413 (fist_copy_attr_all)
Unable to handle kernel paging request at virtual address 00000000, epc == 80065d44, ra == 80065d44
Oops in fault.c::do_page_fault, line 206:
$0 : 00000000 1000ec00 00000047 00000000 8018a8c0 00000001 00000001 8018a8d0
$8 : 00000000 000024c6 000024c6 0000247f 801a0000 801a0000 801a0000 ffffffff
$16: 00000000 80c67220 00000000 004ca7ac 00000000 004d0000 00000001 00000000
$24: 00000002 00000002                   80d34000 80d35ec8 ffffffff 80065d44
Hi : 00000000
Lo : 00000000
epc   : 80065d44    Not tainted
Status: 1000ec03
Cause : 0000000c
PrId  : 00029008
Process S10boot (pid: 94, stackpage=80d34000)
Stack:    80da6000 8014d5c8 8014d5bc 0000019d 80143f3c 80d35f30 00000000
 7fff4ab0 00000001 80040614 004c8d34 004cf6dc 00000000 800072d8 80ca33e0
 8021b4a0 00000000 00000000 000002a9 00000009 00000001 00000000 004ca7bc
 7fff4b40 80008a60 80005a88 004d2af0 004cf77c 00000000 004d2b0c ffffffff
 00000000 00000000 1000ec00 00001075 0000002f 004ca7bc 7fff4ab0 7fff4ab0
 7fff7fbd ...
Call Trace:   [<8014d5c8>] [<8014d5bc>] [<80143f3c>] [<80040614>] [<800072d8>]
 [<80008a60>] [<80005a88>] [<8005bb0c>]

I dont know what is wrong with it, I used the official source and I downloaded the mmc.o from there: https://forum.openwrt.org/viewtopic.php?id=9653
Please help I really dont know what to do now sad

Re: [howto] Changing mini_fo's storage directory (/jffs)

hunbalazs wrote:

Hi!
I compiled my image with the modified mount_root script but when the router comes up it displays a lot of error messages

CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: Tue Aug  7 17:14:08 CST 2007 (crazy@sw1.rd)
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.

Initializing Arena
Initializing Devices.

No DPN
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.37.0
CPU type 0x29008: 200MHz
Total memory: 16384 KBytes

Total memory used by CFE:  0x80300000 - 0x803A39B0 (670128)
Initialized Data:          0x803398C0 - 0x8033BFD0 (10000)
BSS Area:                  0x8033BFD0 - 0x8033D9B0 (6624)
Local Heap:                0x8033D9B0 - 0x803A19B0 (409600)
Stack Area:                0x803A19B0 - 0x803A39B0 (8192)
Text (code) segment:       0x80300000 - 0x803398C0 (235712)
Boot area (physical):      0x003A4000 - 0x003E4000
Relocation Factor:         I:00000000 - D:00000000

Boot version: v3.7
The boot is CFE

mac_init(): Find mac [XX:XX:XX:XX:XX:XX] in location 0
Nothing...

eou_key_init(): Find key pair in location 0
The eou device id is same
The eou public key is same
The eou private key is same
Device eth0:  hwaddr XX-XX-XX-XX-XX-XX, ipaddr 192.168.1.1, mask 255.255.255.0
        gateway not set, nameserver not set
Reading :: Failed.: Timeout occured
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
Loading: .. 3760 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
CPU revision is: 00029008
Primary instruction cache 16kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, linesize 16 bytes.
Linux version 2.4.35.4 (hunbalazs@BG1) (gcc version 3.4.6 (OpenWrt-2.0)) #11 Sat Jul 18 18:16:49 CEST 2009
Setting the PFC to its default value
Determined physical RAM map:
 memory: 01000000 @ 00000000 (usable)
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200
CPU: BCM5352 rev 0 at 200 MHz
Using 100.000 MHz high precision timer.
Calibrating delay loop... 199.47 BogoMIPS
Memory: 14260k/16384k available (1425k kernel code, 2124k reserved, 100k data, 84k init, 0k highmem)
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
PCI: no core
PCI: Fixing up bus 0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Registering mini_fo version $Id$
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
squashfs: version 3.0 (2006/03/15) Phillip Lougher
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 3) is a 16550A
b44.c:v0.93 (Mar, 2004)
eth0: Broadcom 47xx 10/100BaseT Ethernet 00:1d:7e:bc:c9:f2
 Amd/Fujitsu Extended Query Table v1.1 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Flash device: 0x400000 at 0x1c000000
bootloader size: 262144
Physically mapped flash: Filesystem type: squashfs, size=0x188f37
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "cfe"
0x00040000-0x003f0000 : "linux"
0x000bb000-0x00250000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x003f0000-0x00400000 : "nvram"
0x00250000-0x003f0000 : "rootfs_data"
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 84k freed
Algorithmics/MIPS FPU Emulator v1.5
mount: mounting sysfs on /sys failed: No such device
mount: mounting devfs on /dev failed: Device or resource busy
- preinit -
Press CTRL-C for failsafe
diag: Detected 'Linksys WRT54G/GS/GL'
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
roboswitch: Probing device eth0: found!
switch-robo             5180   0 (unused)
switching to jffs2
[INFO] mmc_hardware_init: initializing GPIOs
[INFO] mmc_card_init: the period of a 380KHz frequency lasts 524 CPU cycles
[INFO] mmc_card_init: powering card on. sending 80 CLK
[INFO] mmc_card_init: 80 CLK sent in 43646 CPU cycles
[INFO] mmc_card_init: resetting card (CMD0)
[INFO] mmc_card_init: doing initialization loop
[INFO] mmc_card_init: card inited successfully in 620 tries (19126861 CPU cycles).
[INFO] mmc_init: MMC/SD Card ID:
02 54 4d 53 44 35 31 32 28 82 6e cf 33 00 6b f3 [INFO] Manufacturer ID   : 02
[INFO] OEM/Application ID: TM
[INFO] Product name      : SD512
[INFO] Product revision  : 2.8
[INFO] Product SN        : 826ecf33
[INFO] Product Date      : 2006-11
[INFO] mmc_card_config: size = 500224, hardsectsize = 512, sectors = 1000448
[WARN] mmc_init: hd_sizes=500224, hd[0].nr_sects=1000448
[INFO] mmc_card_init: set_blocklen (CMD16) succeeded !
Partition check:
 mmca: p1
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
mini_fo: meta_build_lists:                                           ERROR, fs does not support reading.
- init -

Please press Enter to activate this console. jffs2.bbc: SIZE compression mode activated.
mini_fo: meta_build_lists:                                           ERROR, fs does not support reading.
VFS: Busy inodes after unmount. Self-destruct in 5 seconds.  Have a nice day...
Unhandled kernel unaligned access in unaligned.c::emulate_load_store_insn, line 481:
$0 : 00000000 1000ec00 62696c2f 00000001 80e66a80 80190000 80df1440 802130c8
$8 : 1000ec01 00020000 80c63dc0 7fff7efc ffffffff 00020000 0001ffff 00000008
$16: 2d646c2f 00000000 80c67220 80ca33e0 80c63dc0 80c63f30 00000000 004ca87c
$24: 00000000 00000000                   80c62000 80c63d18 00000000 8004e0d8
Hi : 00000000
Lo : 0000003d
epc   : 80062390    Not tainted
Status: 1000ec03
Cause : 00000010
PrId  : 00029008
Process uci (pid: 100, stackpage=80c62000)
Stack:    802bbc60 00442b3f 00442b80 00000003 80ca33e0 80ca33f8 8004e0d8
 80ca33e0 80063304 00006012 2aaa8000 00000001 80df16c0 8021b4a0 80038ac8
 80038a10 8018c8e0 800570cc 00000000 00000000 8018c8e0 800570cc 00000000
 00000000 800418e8 80041874 80c63dc0 00000000 00000000 802b7000 00000000
 802b7000 004d0a6c 004ca8f4 80c63f30 00000000 80041b04 80041af0 00000000
 00000000 ...
Call Trace:   [<8004e0d8>] [<80063304>] [<80038ac8>] [<80038a10>] [<800570cc>]
 [<800570cc>] [<800418e8>] [<80041874>] [<80041b04>] [<80041af0>] [<80008404>]
 [<80008a60>] [<8000f330>] [<8005bb0c>]

Code: 8c820000  1040000a  8c900004 <8c43004c> 10600007  00000000  8c63000c  10600004  00000000 
Unable to handle kernel paging request at virtual address 00000008, epc == 80026ea4, ra == 80027900
Oops in fault.c::do_page_fault, line 206:
$0 : 00000000 1000ec00 00000000 00000000 80df14c0 80cbdee0 80cbde90 80027744
$8 : 00000000 00000000 00000054 00000000 80df1440 00000000 801e6024 2ab98320
$16: 80df1460 00000fff 80df14c0 80df1440 ffffffea 80cbdee0 004cfa60 80df14c0
$24: 801a15d4 2ab9f540                   80cbc000 80cbde30 00000000 80027900
Hi : 00000000
Lo : 0000001b
epc   : 80026ea4    Not tainted
Status: 1000ec03
Cause : 00000008
PrId  : 00029008
Process S10boot (pid: 97, stackpage=80cbc000)
Stack:    00c7269b 004c6894 00c7279f 800233dc 80cbdee0 7f342138 80dfa2a0
 00000000 80df1460 00000fff 00000000 80df1440 ffffffea 80cbdee0 004cfa60
 80df14c0 00000000 80027900 80011758 004d2af0 80da7a40 8018c5bc 8004fd44
 00000000 00000000 00000fff 004cfa60 00000000 80df1460 80df14c0 ffffffea
 80df1440 ffffffea 80df1460 00000000 004cf78c 00000000 80062638 0000000b
 8017c820 ...
Call Trace:   [<800233dc>] [<80027900>] [<80011758>] [<8004fd44>] [<80062638>]
 [<80048648>] [<80037be4>] [<80037644>] [<8003763c>] [<80008a60>] [<8005bb0c>]

Code: 8c820008  afa50010  00809021 <8c420008> afa70014  8c5300b8  8e760020  96c40030  10800009 
Unhandled kernel unaligned access in unaligned.c::emulate_load_store_insn, line 481:
$0 : 00000000 1000ec00 80e66a80 80ca32e0 62696c2f 8014dd44 8014e6a4 00000063
$8 : 00000011 8029b000 00001000 00000002 8017cba0 00000000 00000001 00000001
$16: 2d646c2f 00000001 00000001 00000009 8029b011 00000009 00000001 00000003
$24: 00000000 00000000                   80ca6000 80ca7e20 ffffffff 80062104
Hi : 00000000
Lo : 00000000
epc   : 8006211c    Not tainted
Status: 1000ec03
Cause : 00000010
PrId  : 00029008
Process S10boot (pid: 102, stackpage=80ca6000)
Stack:    80f86c20 00000009 00000000 80ca7f00 80ca32e0 00000009 00000000
 80ca7f00 8004354c fffffffe 800434c8 6d006574 80f86c20 ffffffec 80f86c20
 00000000 800440e4 800440cc 80c97ea0 80ca6000 8000b484 8000b420 8029b009
 00000008 7498a549 6f63006e 00000000 726f665f 8029b000 80ca7f00 00000000
 004ca814 00000000 004d0000 8004478c 80044774 616f6c5f 79730064 6d657473
 70706100 ...
Call Trace:   [<8004354c>] [<800434c8>] [<800440e4>] [<800440cc>] [<8000b484>]
 [<8000b420>] [<8004478c>] [<80044774>] [<80044968>] [<800405e4>] [<800072d8>]
 [<80037644>] [<8003763c>] [<80008a60>] [<8000f1b8>] [<8005bb0c>]

Code: 8c440000  1080000a  8c500004 <8c82004c> 10400007  00000000  8c420000  10400004  00000000 
ASSERTION FAILED: src != NULL at mini_fo.h:413 (fist_copy_attr_all)
Unable to handle kernel paging request at virtual address 00000000, epc == 80065d44, ra == 80065d44
Oops in fault.c::do_page_fault, line 206:
$0 : 00000000 1000ec00 00000047 00000000 8018a8c0 00000001 00000001 8018a8d0
$8 : 00000000 000024c6 000024c6 0000247f 801a0000 801a0000 801a0000 ffffffff
$16: 00000000 80c67220 00000000 004ca7ac 00000000 004d0000 00000001 00000000
$24: 00000002 00000002                   80d34000 80d35ec8 ffffffff 80065d44
Hi : 00000000
Lo : 00000000
epc   : 80065d44    Not tainted
Status: 1000ec03
Cause : 0000000c
PrId  : 00029008
Process S10boot (pid: 94, stackpage=80d34000)
Stack:    80da6000 8014d5c8 8014d5bc 0000019d 80143f3c 80d35f30 00000000
 7fff4ab0 00000001 80040614 004c8d34 004cf6dc 00000000 800072d8 80ca33e0
 8021b4a0 00000000 00000000 000002a9 00000009 00000001 00000000 004ca7bc
 7fff4b40 80008a60 80005a88 004d2af0 004cf77c 00000000 004d2b0c ffffffff
 00000000 00000000 1000ec00 00001075 0000002f 004ca7bc 7fff4ab0 7fff4ab0
 7fff7fbd ...
Call Trace:   [<8014d5c8>] [<8014d5bc>] [<80143f3c>] [<80040614>] [<800072d8>]
 [<80008a60>] [<80005a88>] [<8005bb0c>]

I dont know what is wrong with it, I used the official source and I downloaded the mmc.o from there: https://forum.openwrt.org/viewtopic.php?id=9653
Please help I really dont know what to do now sad

Weird thing man, but AFAIK mmc module sghould be compiled by yourself and it's available under Kernel modules on make menuconfig.

Try that.

Sorry I'm no expert and people here isn't very in the mood of answering.

Hope this helps.