Linux Kernel MTD question
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · In message <[email protected]> you wrote:
How can I put the Environment variables or configurations in 0x00060000-0x00080000, or put User Data in 0x005C0000-0x1000000? Use U-boot command? Or....
It is up to you to define a memory map for your flash device(s) and create appropriate partitions for this map in Linux (and probably in U-Boot, too, using the new "mtdparts" command).
Then you can use standard commands in U-Boot (erase, cp) and in Linux (erase_all, cp) to store any data you likein your flash.
It is *your* design. *You* must create it.
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] The IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group.
Yes. You are right. It's design by myself.
But I meet a problem. If I have three configuration files, A.conf, B.conf and C.conf, then I hope save them in one of partitions of MTD, 0x005C0000-0x10000000.
Two questions:
1. How to build these configuration files into an image for U-boot with mkimage?
2. In kernel, how to get these data? I use "mount /dev/mtd4 /mnt", but it failed by block device required.
Thanks,
Johnson Cheng
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Monday, August 22, 2005 9:07 PM
To: JohnsonCheng
Cc: [email protected]
Subject: Re: Linux Kernel MTD question
Quoted 4 lines · In message <[email protected]> you wrote:
How can I put the Environment variables or configurations in 0x00060000-0x00080000, or put User Data in 0x005C0000-0x1000000? Use U-boot command? Or....
It is up to you to define a memory map for your flash device(s) and create appropriate partitions for this map in Linux (and probably in U-Boot, too, using the new "mtdparts" command).
Then you can use standard commands in U-Boot (erase, cp) and in Linux (erase_all, cp) to store any data you likein your flash.
It is *your* design. *You* must create it.
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] The IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group.
Quoted 9 lines · JohnsonCheng
Yes. You are right. It's design by myself.
But I meet a problem. If I have three configuration files, A.conf, B.conf and C.conf, then I hope save them in one of partitions of MTD, 0x005C0000-0x10000000.
Two questions:
1. How to build these configuration files into an image for U-boot with mkimage?
2. In kernel, how to get these data? I use "mount/dev/mtd4/mnt", but it failed by block device required.
for this second issue, you might try mounting the block device, which is probably called /dev/mtdblock4 or something similar.
rday
It doesn't work, too.
Error message: Invalid argument.
Thanks,
Johnson Cheng
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Robert P. J. Day
Sent: Tuesday, August 23, 2005 11:24 AM
To: JohnsonCheng
Cc: [email protected]
Subject: RE: Linux Kernel MTD question
Quoted 9 lines · JohnsonCheng
Yes. You are right. It's design by myself.
But I meet a problem. If I have three configuration files, A.conf, B.conf and C.conf, then I hope save them in one of partitions of MTD, 0x005C0000-0x10000000.
Two questions:
1. How to build these configuration files into an image for U-boot with mkimage?
2. In kernel, how to get these data? I use "mount/dev/mtd4/mnt", but it failed by block device required.
for this second issue, you might try mounting the block device, which is probably called /dev/mtdblock4 or something similar.
rday
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Hi Johnson,
Quoted 2 lines · JohnsonCheng
It doesn't work, too.
Error message: Invalid argument.
Well, do you have an mtdblock4 entry in /dev?
Also, you should specify your filesystem type to mount, like in:
mount -t jffs2 /dev/mtdblock4 /mnt
BTW, -t jffs2 is just an example.
HTH,
-Scop.
Dear Ricardo and Wolfgang,
Very thanks for your kindly support.
I am sorry I made a mistake.
Before you mount /dev/mtdblock4, you have to use mke2fs to format it. Now I think my MTD function is almost ready, except write. When I run "dd if=/dev/mtd1 of=kernel.img", it's OK.
But when I run "dd if=kernel.img of=/dev/mtd1", it's failed. No error message printed, and the process time is shortly, cause Bad CRC.
Thanks,
Johnson Cheng
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ricardo Scop
Sent: Wednesday, August 24, 2005 3:17 AM
To: JohnsonCheng; 'Robert P. J. Day'
Cc: [email protected]
Subject: Re: Linux Kernel MTD question
Hi Johnson,
Quoted 2 lines · JohnsonCheng
It doesn't work, too.
Error message: Invalid argument.
Well, do you have an mtdblock4 entry in /dev?
Also, you should specify your filesystem type to mount, like in:
mount -t jffs2 /dev/mtdblock4 /mnt
BTW, -t jffs2 is just an example.
HTH,
-Scop.
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Before doing a write to /dev/mtd1 try running
~# eraseall /dev/mtd1
(eraseall is from the mtd-utils package.)
Alex
Quoted 48 lines · On Wed, 24 Aug 2005 13:02:31 +0800 "JohnsonCheng" <[email protected]>…
Dear Ricardo and Wolfgang,
Very thanks for your kindly support.
I am sorry I made a mistake.
Before you mount/dev/mtdblock4, you have to use mke2fs to format it. Now I think my MTD function is almost ready, except write. When I run "dd if=/dev/mtd1 of=kernel.img", it's OK.
But when I run "dd if=kernel.img of=/dev/mtd1", it's failed. No error message printed, and the process time is shortly, cause Bad CRC.Thanks,
Johnson Cheng-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ricardo Scop
Sent: Wednesday, August 24, 2005 3:17 AM
To: JohnsonCheng; 'Robert P. J. Day'
Cc: [email protected]
Subject: Re: Linux Kernel MTD questionHi Johnson,
Quoted 2 lines · JohnsonCheng
It doesn't work, too.
Error message: Invalid argument.Well, do you have an mtdblock4 entry in /dev?
Also, you should specify your filesystem type to mount, like in:
mount -t jffs2
/dev/mtdblock4/mntBTW, -t jffs2 is just an example.
HTH,
-Scop.
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Good idea. It works well.
The latest version of mtd utility for erase flash is flash_eraseall.
Thank you very much,
Johnson Cheng
-----Original Message-----
From: Alex Zeffertt [mailto:[email protected]]
Sent: Wednesday, August 24, 2005 4:50 PM
To: JohnsonCheng
Cc: [email protected]
Subject: Re: Linux Kernel MTD question
Before doing a write to /dev/mtd1 try running
~# eraseall /dev/mtd1
(eraseall is from the mtd-utils package.)
Alex
Quoted 48 lines · On Wed, 24 Aug 2005 13:02:31 +0800 "JohnsonCheng" <[email protected]>…
Dear Ricardo and Wolfgang,
Very thanks for your kindly support.
I am sorry I made a mistake.
Before you mount/dev/mtdblock4, you have to use mke2fs to format it. Now I think my MTD function is almost ready, except write. When I run "dd if=/dev/mtd1 of=kernel.img", it's OK.
But when I run "dd if=kernel.img of=/dev/mtd1", it's failed. No error message printed, and the process time is shortly, cause Bad CRC.Thanks,
Johnson Cheng-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ricardo Scop
Sent: Wednesday, August 24, 2005 3:17 AM
To: JohnsonCheng; 'Robert P. J. Day'
Cc: [email protected]
Subject: Re: Linux Kernel MTD questionHi Johnson,
Quoted 2 lines · JohnsonCheng
It doesn't work, too.
Error message: Invalid argument.Well, do you have an mtdblock4 entry in /dev?
Also, you should specify your filesystem type to mount, like in:
mount -t jffs2
/dev/mtdblock4/mntBTW, -t jffs2 is just an example.
HTH,
-Scop.
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
When I want to turn on MTD with TQM8XXL, I can't find it in kernel 2.6.12.3. I use "MTD\Mapping drivers for chip access\CFI Flash device in physical memory map", it seems only one partition can be used.
Thanks,
Johnson Cheng
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Wolfgang Denk
Sent: Monday, August 22, 2005 9:07 PM
To: JohnsonCheng
Cc: [email protected]
Subject: Re: Linux Kernel MTD question
Quoted 4 lines · In message <[email protected]> you wrote:
How can I put the Environment variables or configurations in 0x00060000-0x00080000, or put User Data in 0x005C0000-0x1000000? Use U-boot command? Or....
It is up to you to define a memory map for your flash device(s) and create appropriate partitions for this map in Linux (and probably in U-Boot, too, using the new "mtdparts" command).
Then you can use standard commands in U-Boot (erase, cp) and in Linux (erase_all, cp) to store any data you likein your flash.
It is *your* design. *You* must create it.
Best regards,
Wolfgang Denk
Signature · 8 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] The IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group. _______________________________________________ Linuxppc-embedded mailing list [email protected] https://ozlabs.org/mailman/listinfo/linuxppc-embedded