[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] Microblaze with mmu support - "system reset" after u-boot attempts to load kernel



Hi Marco,

On Tue, Sep 1, 2009 at 6:11 PM, hoefle marco<marco.hoefle@xxxxxxxxxxxxx> wrote:
>
> Hello John,
>> > I want to test petalinux with mmu support. The reason is to have
>> > programs running which use mmu specific system calls (fork() etc.).
>> > One thing I came across was to figure out which mmu type is needed
>> > (protection, virtual...). I am on a Spartan 3A 700 so I am tight on
>> > logic resources.
>> > For now I took the same as on a reference design, C_USE_MMU = 2.
>>
>> You need MMU=3.
> That did the trick, the Kernel boots now.
> Unfortunately the root files system cannot be mounted:
>
> Creating 5 MTD partitions on "physmap-flash.0":
> 0x00000000-0x00060000 : "fpga_config"
> 0x00060000-0x00080000 : "boot"
> 0x00080000-0x00090000 : "bootenv"
> 0x00090000-0x000a0000 : "config"
> 0x000a0000-0x00400000 : "image"
> TCP cubic registered
> NET: Registered protocol family 1
> NET: Registered protocol family 17
> VFS: Cannot open root device "<NULL>" or unknown-block(0,0)
> Please append a correct "root=" boot option
> Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(0,0)
>  <0>Rebooting in 120 seconds..
>
> I took over the configs from a working non-mmu design.

It is safer to re-run petalinux-new-platform, with the -m flag (for
MMU).  It uses a kernel config template that is preconfigured for the
MMU.

I suspect your issue is because you have not enabled the INITRAMFS
root filesystem type.

Go to menuconfig, in kernel config, general options, enable "Initial
RAM filesystem and RAM disk (initramfs/initrd) support". For
"Initramfs source file(s)" enter "$(ROOTDIR)/images/rootfs.cpio"

Then in the user/vendor menu, under system settings, choose INITRAMFS
as the root filesystem type.

> I had a problem
> with CONFIG_USER_FLATFSD_FLATFSD=y as I got this compile error:
>
> mb-linux-gcc  -Os -g -fomit-frame-pointer -pipe -fno-common -fno-builtin
> -Wall  -mno-xl-soft-mul -mxl-barrel-shift -mcpu=v7.10.d   -DEMBED
> -I/opt/petalinux-v0.40-rc4/software/petalinux-dist
> -I/opt/petalinux-v0.40-rc4/software/petalinux-dist/include
> -I/opt/petalinux-v0.40-rc4/software/petalinux-dist/include -Dlinux
> -D__linux__ -Dunix -DLINUX -Wall -DUSING_MTD_DEVICE=1
> -DFLATFSD_VERSION='"1.0.0mtd"'   -c -o flatfs_mtd.o flatfs_mtd.c
> In file included
> from /opt/petalinux-v0.40-rc4/software/petalinux-dist/include/mtd/mtd-user.h:13,
>                 from flatfs_mtd.c:19:
> /opt/petalinux-v0.40-rc4/software/petalinux-dist/include/mtd/mtd-abi.h:18: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘*’ token
> make[2]: *** [flatfs_mtd.o] Error 1
> make[2]: Leaving directory
> `/opt/petalinux-v0.40-rc4/software/petalinux-dist/user/flatfsd'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory
> `/opt/petalinux-v0.40-rc4/software/petalinux-dist/user'
> make: *** [subdirs] Error 1

Can you please try adding

#include <linux/types.h>

after the #define __MTD_ABI_H__ line, in

software/linux-2.6.x/include/mtd/mtd-abi.h, and rebuild?

> For the first test I disabled CONFIG_USER_FLATFSD_FLATFSD allowing me to
> create the images and to boot the kernel.
> I suppose I need this option enabled to be able to boot the rootfs?

No - see my recent reply to someone else on the subject of flatfsd,
what it does and how to disable it.

>> > I read in another thread that mmu or no mmu will not increase the system
>> > performance, but as I had to deselect "optimze area" in the microblaze
>> > settings I hope I get some improvement.
>>
>> Yes - Area optimisation must be disabled if the MMU is enabled.
> >From your experience what will be the performance improvement when area
> optimization is switched off?

I haven't benchmarked it - that's on the TODO list.  The pipeline is
deeper so in principle you should be able to clock it faster.

Regards,

John
-- 
John Williams, PhD, B.Eng, B.IT
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com  p: +61-7-30090663  f: +61-7-30090663

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/