Boot openwrt from MMC/SD on at91sam9x5 (9g25) help needed

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

Posts: 19
Joined: Thu Aug 27, 2009 4:15 pm

Boot openwrt from MMC/SD on at91sam9x5 (9g25) help needed

Fri Nov 02, 2012 5:31 pm


I am running openwrt r31370 with the
linux4sam/bin/view/Linux4SAM/SAM9x5Page ... exp_tar_gz

Booting from SD I get:
[ 1.280000] Registering the dns_resolver key type
[ 1.290000] at91_rtc at91_rtc: setting system clock to 2007-01-01 08:51:44 UTC (1167641504)
[ 1.300000] Waiting 10sec before mounting root device...
[ 11.320000] VFS: Cannot open root device "mmcblk0p2" or unknown-block(0,0)

The reason for this is because the mmc driver/module is not loaded yet, so mmcblk0p2 does not exist yet.

I need to get the kernel to load the mmc driver before trying to mount the file system.
But I can't get the it to be builtin in like the RTC, it only gets builds as a module.

If I deselect the mmc kernel modules in menuconfig, then the driver does not even get build.

My menuconfig looks like:

--- kmod-mmc............................................. MMC/SD Card
<*> kmod-mmc-atmelmci...................................... Amtel MMC Support

My kernel_menuconfig:

<*> Atmel SD/MMC Driver (Atmel Multimedia Card Interface support)
<*> Atmel MCI DMA support (EXPERIMENTAL)

Like I said if I use this and run it on Nand Flash it is noted that the mmc driver works but only gets loaded after the rootfs is mounted.
[ 7.800000] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[ 7.810000] Freeing init memory: 128K
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
- init -
[ 38.460000] atmel_mci atmel_mci.0: Using dma0chan1 for DMA transfers
[ 38.470000] atmel_mci atmel_mci.0: Atmel MCI controller at 0xf0008000 irq 12, 1 slots
[ 38.480000] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
[ 38.800000] mmc0: host does not support reading read-only switch. assuming write-enable.
[ 38.810000] mmc0: new high speed SDHC card at address b368
[ 38.820000] mmcblk0: mmc0:b368 00000 7.51 GiB
[ 38.820000] mmcblk0: detected capacity change from 0 to 8064598016
[ 38.840000] mmcblk0: p1 p2 p3 p4

I need the kernel to have this driver builtin and loaded before it tries to mount the rootfs.

any help ons this please?

Posts: 19
Joined: Thu Aug 27, 2009 4:15 pm

Re: Boot openwrt from MMC/SD on at91sam9x5 (9g25) help neede

Mon Nov 05, 2012 2:15 pm


changed the 3 config files that is used to build the kernel .config file.
Posts: 9
Joined: Fri May 27, 2016 2:43 pm

Re: Boot openwrt from MMC/SD on at91sam9x5 (9g25) help neede

Thu Feb 09, 2017 4:37 am


i am trying to compile openwrt for at91sam9x25 ( , but im getting kernel panic error,,Please help me..

i followed steps to compile:

git clone
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
make V=s

cd bin/at91/
dd if=openwrt-at91-legacy-AT91SAM9G25EK-rootfs.tar.gz of=./rootfs.img

i followed steps to flash kernel:

nand erase 0x200000 0x600000

tftp 0x22000000 openwrt-at91-legacy-9x25ek-uImage

nand write 0x22000000 0x200000 <size>

nand erase 0x800000 0xF800000

tftp 0x20000000 rootfs.img

nand write.trimffs 0x20000000 0x800000 <size>

nand erase 0x180000 0x80000

tftp 0x21000000 at91sam9g25ek.dtb

nand write 0x21000000 0x180000 <size>

Please help me...

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 2 guests