I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods
Amazon Honor System Click Here to Pay Learn More
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / Other I-Appliances / WebPal
Mounting Flash partitions

New MessageMounting Flash partitions (modified 0 times) oninesm
Profile
Is anyone able to mount any of the flash partitions once a root partition has been mounted?

If I use the params section to set up /dev/mtdblock as root it boots into linux just fine and the filesystem (cramfs?) on flash partition "root" is mounted. If instead I change the params section to mount my IDE hard drive as root, I cannot access the flash. It seems like MTD is not setting up the devices like I am expecting.

excerpt from dmesg:
Webpal: Probing for AMD compatible flash...
Webpal: Found 1 x 1MiB Fujitsu MBM29F800BA at 0x0
Using Compaq bootldr definition
Creating 4 MTD partitions on "Webpal":
0x000a0000-0x00100000 : "root"
0x00000000-0x00006000 : "boot"
0x00006000-0x00008000 : "params"
0x00008000-0x000a0000 : "kernel"
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
[...snip...]

Shouldn't it be giving me lines like "mtd: Giving out device 0 to root", "mtd: Giving out device 1 to boot", "mtd: Giving out device 2 to params", and "mtd: Giving out device 3 to kernel" ?

there are no /dev/mtd* devices in /dev, so I cannot mount them. /proc/mtd exists, and lists the flash partitions that should be available in /dev, they just aren't there.

cat /proc/mtd
dev: size erasesize name
mtd0: 00060000 00010000 "root"
mtd1: 00006000 00004000 "boot"
mtd2: 00002000 00002000 "params"
mtd3: 00098000 00010000 "kernel"

ls /dev/m*
/dev/mem /dev/midi01 /dev/midi1 /dev/mixer /dev/mixer3
/dev/midi0 /dev/midi02 /dev/midi2 /dev/mixer1 /dev/mpu401data
/dev/midi00 /dev/midi03 /dev/midi3 /dev/mixer2 /dev/mpu401stat

ls /dev/n*
/dev/nst0 /dev/nst0l /dev/nst1 /dev/nst1l /dev/null
/dev/nst0a /dev/nst0m /dev/nst1a /dev/nst1m

What am I missing? I'd like to be able to put some frequently read files on the "root" flash partition, so I can let the hard drive sleep instead of being reset after 30 seconds to read some trivial file. Anyone know what I can do to make these partitions available?

Mike

12-29-2003 10:08:46

New MessageRE:Mounting Flash partitions (modified 0 times) justdavesj
Profile | Email
I have no problem mounting the partitions using the mtdblock devices. You might try to mknod with these numbers and see if that works. I have the following on my webpal:

03:33pm:/dev$ ls -la mtd*
crw------- 1 root root 90, 0 Mar 10 2003 mtd0
crw------- 1 root root 90, 2 Mar 10 2003 mtd1
crw------- 1 root root 90, 4 Mar 10 2003 mtd2
crw------- 1 root root 90, 6 Mar 10 2003 mtd3
brw------- 1 root root 31, 0 Mar 10 2003 mtdblock0
brw------- 1 root root 31, 1 Mar 10 2003 mtdblock1
brw------- 1 root root 31, 2 Mar 10 2003 mtdblock2
brw------- 1 root root 31, 3 Mar 10 2003 mtdblock3
03:33pm:/dev$

03:35pm:/dev$ cat /proc/mtd
dev: size erasesize name
mtd0: 00058000 00058000 "Webpal root filesystem"
mtd1: 00006000 00006000 "Webpal boot firmware"
mtd2: 00002000 00002000 "Webpal parameters"
mtd3: 000a0000 000a0000 "Webpal kernel"
03:35pm:/dev$


My dmesg only finds the Fujitsu but does not "create MTD partitions". I manually symlinked /dev/cramfs, /dev/zImage, etc. to /dev/mtd0, /dev/mtd1, etc. I hope this helps.

dave

12-30-2003 16:37:18

New MessageRE:Mounting Flash partitions (modified 0 times) oninesm
Profile
Thanks so much for the reply. I thought that MTD was supposed to be the one setting up the /dev/mtd* devices. Now that I know that I can add them manually to the /dev directory I will try it out and see if it works.

Happy New Year!

Mike

12-31-2003 08:32:05

New MessageRE:Mounting Flash partitions (modified 0 times) disillusionment
Profile
I've been messing around with my WebPal I found at goodwill a weeks back. Flashed it over the modem using bigbrd's erx file, but I'm having trouble mounting the params partition...
I figured it was mounted like a regular partition, but at that point I'd have no idea how to edit it.

mount /dev/mtdblock1 /mnt

gives me a "cramfs: bad magic number" and then dies. I'd really like to be able to do this and get a network card up and running.

Thanks

Eli Cikowski

03-01-2005 21:18:47

New MessageRE:Mounting Flash partitions (modified 0 times) flippernet
Profile
Could you tell me where to find bigbird's modem erx because I've looked over the site a hundred times and can't locate it.
03-01-2005 22:52:46

New MessageRE:Mounting Flash partitions (modified 0 times) disillusionment
Profile
In the "Online Flashing" thread about 27 messages down. This is for flashing your webpal to linux via modem.

http://webpal.bigbrd.com/downloads/newbootp.tar.gz

is where the files to make the erx files are. Be sure to read the whole thread and the instructions that are with the package to make sure you do it right.

03-02-2005 00:15:59

New MessageRE:Mounting Flash partitions (modified 0 times) flippernet
Profile
Thank you for the reply.

Yes, I've read that thread and even downloaded newbootp.tar.gz but it's source code and I'm not a linux programmer, nor do I know how to set up a cross compile environment for it. In short, I'm lost even with it.

This may be a silly question but since all these webpals are the same would it be possible for someone to post, or link to, an already made erx?

03-02-2005 06:53:22

New MessageRE:Mounting Flash partitions (modified 0 times) bigbrd
Profile
When I first did the erx stuff, it needed more testing so I didn't put an .erx file out in a
public place. After that, there didn't seem to be much interest, so a file never made
it out to a public place.

Give me a couple days and I'll put together a new file. What I need to do is to make
sure that the kernel file that I pick has some reasonable set of drivers, etc. So,
I'll need to manually test it on a webpal to make sure it will boot up.

I'll try and do that tomorrow (Friday) and put something out tomorrow evening for
people to try over the weekend.

Note, that even after you load the erx file, you still don't have a root partition
so you have to build some sort of root partition on a hard disk or compact flash
card. I couldn't get a mini-root partition to fit in the maximum size of the erx
file...thus, it only leaves you with the bootstrap, params file, and kernel file.

Bill

03-03-2005 21:57:18

New MessageRE:Mounting Flash partitions (modified 0 times) bigbrd
Profile
Here are some answers to some of the questions that were recently asked:

If you want to mount a cramfs that you've copied to the root partition, you need
to change the params partition so it contains in the command line, the text:

command= ... root=/dev/mtdblock3 init=/linuxrc

Note that mtdblock3 is now the root partition. In the past it was /mtdblock0.
The current partitions are now:

0: bootp
1: params
2: kernel
3: root (optional)

The boot parameters are contained in the params partition. Its /dev/mtdblock1.
The params partition is just a ASCII text file that ends with at least two CRs in a row. The
rest of the partition is ignored. So, you don't have to mount it, you can just cat from it to
read it and cat to it to write it. Note, before writing it, I think you have to erase it first using
the "erase" program from the mtd utilities. There is a statically linked copy
on

http://bill.danielson.com/erase

The source is in the mtd package so one
could rebuild it, possibly statically linking it so there isn't an issue
which which libraries you are using (uclibc, etc). I used uclibc to
statically link it and its only then about 35K.

Search the webpal archives for "mtd" and you see how to use these
programs and what /dev entries you need if they aren't there already.

I've updated the linuxpgm.erx file to contain a newer bootp program. Some of the earlier
ones had problems programming partitions via bootp. If your bootp version is 3.2, you may have
problems and will have to reprogram you partitions (at least until you replace the
bootp with a new version) from linux.

Assuming you have a bootp that is 3.3 or later,
the easiest way to update the various partitions is to use the wpflash program in
either parallel or serial mode. If you haven't built a serial adapter, then
you have to use parallel mode. You'll need a linux box with a parallel port
and a laplink parallel connector (I used a Belkin f3d508-10 cable which costs
5-10 bucks). You install the parport driver on your linux system (modprobe parport
usually does this if it isn't already loaded) and then can use the wpflash -p write <partition-name> <file>.
The only tricky thing is sometimes the linux system and the webpal don't sync up when you
hit reset as requested....if this happens, try it again, or hold down the reset button,
start wpflash and then release the reset button on the webpal.

P.S. If anyone gets stuck with version 3.2 and can't reprogram their flash, I can reprogram
your flash if you mail it to me with return postage/mailer. Email me at the
address at the bottom of my web page http://webpal.bigbrd.com if you are interested.

Bill

03-04-2005 01:20:22

New MessageRE:Mounting Flash partitions (modified 0 times) bigbrd
Profile
Forgot to mention that if you are cat'ing the mtd partitions,
you should use the character devices /dev/mtdX rather than
the block devices /dev/mtdblockX. Be careful when
creating the mtdX /dev/ entries since the minor
numbers increment by 2 rather than 1 for each
successive device....search the archives for
"mtd" for more info.
03-04-2005 01:47:55

New MessageRE:Mounting Flash partitions (modified 0 times) disillusionment
Profile
Thanks for the answers! It appears I'm stuck with 3.2 right now, and I am having trouble using the parallel programmer (it hangs at Initializing Flash...). But from what I understand, I can (from within linux on the webpal) erase and cat things like zImage and params to their /dev/mtd* partitions. If that's the way it works, the I should have not problem getting the params for a network card in there (unless of course it's not supported by the kernel I've got running), and downloading all the new stuff to the webpal. Otherwise I guess I'd have to pull the HD, or build the serial interface if that would work at all.
03-04-2005 09:54:27

New MessageRE:Mounting Flash partitions (modified 0 times) oninesm
Profile
Yes, once you are up and running in a Linux environment, the flash memory is available to erase and reflash within the Linux environment. Double check your work before rebooting though! I did a simple reflash of the params section once, but had some windows/pc linefeeds in it the params file. My webpal was dead until justdavesj was kind enough to reflash it for me in one of his boxes.
05-05-2005 00:40:08

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3