LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 10-15-2016, 02:25 AM   #1
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 889

Rep: Reputation: 123Reputation: 123
Bananapro; cat /proc/mtd


I've had a look at the 4.7.4-armv7 .config and it seems that everything necessary has been included for MTD but the /proc/mtd file is empty
Code:
root@bpro10:~# cat /proc/mtd
dev:    size   erasesize  name
root@bpro10:~#
nor have there beem any mtd device(s) created
Code:
root@bpro10:/home/rick# ls /dev/mtd*
ls: cannot access '/dev/mtd*': No such file or directory
root@bpro10:/home/rick#
Is there something missing that should be enabled or whatever?
 
Old 10-15-2016, 03:10 AM   #2
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,661

Rep: Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361
Quote:
Originally Posted by justwantin View Post
I've had a look at the 4.7.4-armv7 .config and it seems that everything necessary has been included for MTD but the /proc/mtd file is empty
Code:
root@bpro10:~# cat /proc/mtd
dev:    size   erasesize  name
root@bpro10:~#
nor have there beem any mtd device(s) created
Code:
root@bpro10:/home/rick# ls /dev/mtd*
ls: cannot access '/dev/mtd*': No such file or directory
root@bpro10:/home/rick#
Is there something missing that should be enabled or whatever?
The SD card on mine is addressed through /dev/mmcblk0

What did you plug in?
 
Old 10-15-2016, 03:49 AM   #3
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 889

Original Poster
Rep: Reputation: 123Reputation: 123
I have an a SanDisk 2Gb microsd with just u-boot (maybe 8 mo old) and a Kingston 8Gb microsd and just u-boot (2016-9).
Code:
Device         Boot Start    End Sectors Size Id Type
/dev/mmcblk0p1       2048 135167  133120  65M  b W95 FAT32

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       2048 15351807 15349760  7.3G 83 Linux
Same thing on both no MTD offsets in /proc/mtd.
Code:
root@bpro10:/home/rick# cat /proc/mtd
dev:    size   erasesize  name
root@bpro10:/home/rick#
I had found a blog where the fellow had calculated the sunxi offsets as
Code:
/dev/mmcblk0            0x88000         0x20000
but without the flash sector size. He said it worked for him. I put it in my /etc/fw_env.config.

The 8 gig card can't see a /dev/mtd
Code:
root@bpro9:/home/rick# fw_printenv 
Cannot access MTD device /dev/mmcblk0: No such file or directory
The 8 gig card does a bit better
Code:
root@bpro10:/home/rick# fw_printenv 
Warning: Bad CRC, using default environment
bootcmd=setenv bootargs ${console} ${mtdparts} ${bootargs_root}; ubi part root; ubifsmount ubi:rootfs; ubifsload 0x800000 ${kernel}; ubifsload 0x700000 ${fdt}; ubifsumount; fdt addr 0x700000; fdt resize; fdt chosen; bootz 0x800000 - 0x700000
bootdelay=3
baudrate=115200
preboot=
console=console=ttyS0,115200
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:896K(uboot),128K(uboot_env),-@1M(root)
kernel=/boot/zImage
fdt=/boot/guruplug-server-plus.dtb
bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw
but I don't know where the 'fdt=/boot/guruplug-server-plus.dtb" comes from. I've either used your 'latest' u-boot, one from Debian, or this might be one I cross compiled awhile back.
 
Old 10-15-2016, 05:48 AM   #4
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,661

Rep: Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361Reputation: 1361
Quote:
Originally Posted by justwantin View Post

The 8 gig card can't see a /dev/mtd
I have never used /dev/mtd. Given that the card is addressable at /dev/mmcblkX, why do you need a /dev/mtd entry?


Regarding the addresses for u-boot, does this help:
http://wiki.lemaker.org/BananaPro/Pi...otable_SD_card

Quote:
fdt=/boot/guruplug-server-plus.dtb
bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw[/CODE] but I don't know where the 'fdt=/boot/guruplug-server-plus.dtb" comes from. I've either used your 'latest' u-boot, one from Debian, or this might be one I cross compiled awhile back.
They've made it up. It's just a variable name in u-boot. Whether it's a default one or not it doesn't matter unless you reference it from the command used to load a FTD into u-boot. However, there are some variable names such as "bootcmd" that need to be completed since u-boot uses them, but within them you can use whatever you want.

Most of the u-boot config I made (unless it has to use particular ones such as bootcmd), I prefixed with "slk" to avoid users having to change the defaults, in case they wanted to go back for any reason.

Last edited by drmozes; 10-15-2016 at 05:52 AM.
 
Old 10-17-2016, 03:47 PM   #5
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 889

Original Poster
Rep: Reputation: 123Reputation: 123
Quote:
why do you need a /dev/mtd entry?
I understand now that I don't, didn't before. I wanted to have a play with fw_printenv and fw_setenv. Did some searching . Sites I found talked about getting the offsets for /etc/fw_env.config from /proc/mtd
Quote:
Regarding the addresses for u-boot, does this help:
Same as at sunxi. Lemaker takes yonks to load in my part of the world maybe the rest of it too.
 
  


Reply

Tags
bababapro, cat /proc/mtd, slackwarearm


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cat /proc/cpuinfo Funnix Linux - Virtualization and Cloud 3 05-24-2015 11:20 AM
proc/mtd is empty ranjana kumari Linux - Embedded & Single-board computer 4 01-09-2013 04:01 AM
Doesn't work: spawn cat <file> | ssh root@$ip mtd -r -e linux write - linux wtfman Programming 3 01-14-2010 09:43 AM
cat /proc/cpuinfo false mycauldron Linux - General 6 05-06-2008 07:45 AM
cat /proc/ioports ashok449 Linux - Kernel 1 11-29-2007 01:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 11:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration