2009-08-05 12:22:28     rewriting kernel mtdblock

Document created by Aaronwu Employee on Sep 24, 2013
Version 1Show Document
  • View in full screen mode

2009-08-05 12:22:28     rewriting kernel mtdblock

Emanuele Italia (ITALY)

Message: 78409   

 

Hello,

 

 

 

i'm trying to rewrite the Kernel "partition" from uclinux, i get the idea from this link:

 

 

 

http://blackfin.uclinux.org/gf/project/asterisk/forum/?action=ForumBrowse&_f

 

orum_action=MessageReply&message_id=71542

 

 

 

There is a part of script that show how to do it:

 

DEVICE = `cat / proc / mtd | grep Kernel | awk-F": " '(print $ 1)'`

echo erasing device $ DEVICE

eraseall / dev / $ DEVICE

Cd / mnt

Echo loading new kernel please wait

dd if = vmImage of = / dev / $ DEVICE

 

 

 

 

it works till "eraseall"  but when i execute "dd" it give me back an error.

 

 

 

cat /proc/mtd

 

dev:    size   erasesize  name

 

mtd0: 01000000 00001000 "ROMfs"

 

mtd1: 00800000 00020000 "linux kernel"

 

mtd2: 0f800000 00020000 "file system"

 

 

 

dd if=./vmImage of=/dev/mtd1

 

nand_write: Attempt to write not page aligned data

 

dd: writing '/dev/mtd1': Invalid argument

 

1+0 records in

 

0+0 records out

 

 

 

do you have any ideas or suggestions?

 

 

 

Thanks in advance,

 

 

 

 

 

Emanuele

 

TranslateQuoteReplyEditDelete

 

 

2009-08-05 12:43:09     Re: rewriting kernel mtdblock

Mike Frysinger (UNITED STATES)

Message: 78413   

 

just cat the image directly into the mtdblock

 

cat vmImage > /dev/mtdblock1

QuoteReplyEditDelete

 

 

2009-08-07 03:37:40     Re: rewriting kernel mtdblock

Emanuele Italia (ITALY)

Message: 78479   

 

it works!

 

Thank you,

 

 

 

Emanuele

Attachments

    Outcomes