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

Re: Making use of the BigRamPlus?



On 2013-12-17 12:19, Geert Uytterhoeven wrote:

Please try mtdblock, not block2mtd.
The latter creates an mtd from a block device, not the other way around.

How about this one?

spice:/home/ij# modprobe phram phram=bigram,0x50000000,0xfffffe0
spice:/home/ij# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 0fffffe0 00001000 "bigram"
spice:/home/ij# mtdinfo
Count of MTD devices:           1
Present MTD devices:            mtd0
Sysfs interface supported:      yes
spice:/home/ij# modprobe mtdblock
spice:/home/ij# mtdinfo
Count of MTD devices:           1
Present MTD devices:            mtd0
Sysfs interface supported:      yes
spice:/home/ij# ls /dev/mtd*
/dev/mtd0  /dev/mtd0ro  /dev/mtdblock0
spice:/home/ij# ls /dev/mtd* -l
crw------- 1 root root 90, 0 Dec 17 18:16 /dev/mtd0
crw------- 1 root root 90, 1 Dec 17 18:16 /dev/mtd0ro
brw-rw---- 1 root disk 31, 0 Dec 17 18:16 /dev/mtdblock0
spice:/home/ij# mkswap /dev/mtdblock0
mkswap: /dev/mtdblock0: warning: don't erase bootbits sectors
        on whole disk. Use -f to force.
Setting up swapspace version 1, size = 262136 KiB
no label, UUID=75ef868e-facf-4ff8-93d2-e951dbe62610
spice:/home/ij# swapon -s
Filename Type Size Used Priority /dev/sda3 partition 205932 0 1 /dev/sdb3 partition 875536 0 1
spice:/home/ij# swapon -p 5 /dev/mtdblock0
spice:/home/ij# swapon -s
Filename Type Size Used Priority /dev/sda3 partition 205932 0 1 /dev/sdb3 partition 875536 0 1 /dev/mtdblock0 partition 262136 0 5
spice:/home/ij#

I recompiled the kernel once again and now it includes this modules:

CONFIG_MTD=m
CONFIG_MTD_CMDLINE_PARTS=m
CONFIG_MTD_BLKDEVS=m
CONFIG_MTD_BLOCK=m
CONFIG_MTD_SWAP=m
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
CONFIG_MTD_RAM=m
CONFIG_MTD_PLATRAM=m
CONFIG_MTD_SLRAM=m
CONFIG_MTD_PHRAM=m
CONFIG_MTD_BLOCK2MTD=m

For best performance (as a block device), I suggest creating a normal block
device driver. drivers/block/ps3vram.c may be a good start point. After
removing all PS3-specific code and just using memcpy(), not much will
be left.

Ok, after we are cruising now with impulse speed, it might be time for Warp 9... ;)

--
Ciao...          //    Fon: 0381-2744150
.     Ingo     \X/     http://blog.windfluechter.net

gpg pubkey: http://www.juergensmann.de/ij_public_key.


Reply to: