[7] = { //720p
.pixclock = 0,
.refresh = 60,
.xres = 1280,
.yres = 720,
.hsync_len = 40,
.left_margin = 220,
.right_margin = 110,
.vsync_len = 5,
.upper_margin =20,
.lower_margin = 5,
.sync = 0,
},
[8] = { //1080p
.pixclock = 0,
.refresh = 60,
.xres = 1920,
.yres = 1080,
.hsync_len = 44,
.left_margin = 148,
.right_margin = 88,
.vsync_len = 5,
.upper_margin =36,
.lower_margin = 4,
.sync = 0,
},
2009年10月29日 星期四
2009年10月28日 星期三
2009年10月25日 星期日
nand testing
uboot write kernel
#tftpboot 0x2000000 uImage
#nand erase 0x400000 0x400000
#nand write 0x2000000 0x400000 0x400000
#nand read 0x2000000 0x400000 0x400000
#bootm 0x2000000
setenv bootcmd 'nand read 0x2000000 0x400000 0x400000;bootm 0x2000000'
setenv bootcmd 'nand read 0x2000000 0x400000 0x400000;setenv bootargs ${console} ${bootargs_root} nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}${bootargs_end} usb0Mode=${usb0Mode} usb1Mode=${usb1Mode} video=dovefb:lcd0:${lcd0_params},lcd1:${lcd1_params} clcd.lcd0_enable=${lcd0_enable} clcd.lcd1_enable=${lcd1_enable}; bootm 0x2000000'
mtd utility:
dump nand device by nanddump
#nanddump -p -f /tmp/mtd1 /dev/mtd1
see mtd1 file
#less /tmp/mtd1
erase nand device
#flash_erase /dev/mtd1
see mtd1 full 0xff
#less /tmp/mtd1
//===========================================
MTD utility
# flash_erase /dev/mtd2
Erase Total 1 Units
Performing Flash Erase of length 524288 at offset 0x0 done
#dd if=/dev/zero of=/tmp/zero.img bs=1k count=4
4+0 records in
4+0 records out
# flashcp zero.img /dev/mtd2
#nanddump -p -f /work/mtd2 /dev/mtd2
//========================================
//jffs2
http://blog.chinson.idv.tw/2007/11/arm-jffs2-nand-flash.html
//===============================================
# ./mtd_debug read /dev/mtd0 0 100 gliethttp.bin
Copied 100 bytes from address 0x00000000 in flash to gliethttp.bin
# hexdump gliethttp.bin
0000000 03ff ea00 350c e59f 001c e583 410e e3a0
0000010 4004 e583 4a03 e3a0 4001 e254 fffd 1aff
0000020 4106 e3a0 4004 e583 420f e202 5000 e594
0000030 4001 e084 5000 e594 4001 e084 5000 e594
0000040 4001 e084 5000 e594 4010 e3a0 4008 e583
0000050 4050 e3a0 4001 e254 fffd 1aff 4e1e e3a0
0000060 4008 e583
0000064
#
# ./mtd_debug read /dev/mtd2 0 100 gliethttp.bin;hexdump gliethttp.bin -Cv
Copied 100 bytes from address 0x00000000 in flash to gliethttp.bin
00000000 1f 8b 08 00 ca 14 7d 4a 02 03 e4 5a 0f 70 93 e7 |......}J...Z.p..|
00000010 79 7f 3f 49 36 b2 31 41 80 a0 0e 38 cd 57 70 16 |y.?I6.1A...8.Wp.|
00000020 93 18 f3 19 3b 60 12 9a d9 60 08 09 4e 22 c0 a4 |....;`...`..N"..|
00000030 b4 81 ca 42 92 6d 0d 59 d2 49 72 02 2b 4d dd 60 |...B.m.Y.Ir.+M.`|
00000040 72 84 e1 86 03 a7 21 01 8a d2 b2 4b 2e f3 56 76 |r.....!....K..Vv|
00000050 63 b7 34 0b 1d cd b1 1d 6b b3 95 36 dc 95 db d1 |c.4.....k..6....|
00000060 8b 90 d1 ea |....|
00000064
[root@Dove /]# flash_eraseall /dev/mtd2
Erasing 512 Kibyte @ 13300000 -- 7 % complete.
Skipping bad block at 0x13380000
Erasing 512 Kibyte @ 35080000 -- 20 % complete.
Skipping bad block at 0x35100000
Erasing 512 Kibyte @ 53180000 -- 32 % complete.
Skipping bad block at 0x53200000
Erasing 512 Kibyte @ 73d00000 -- 45 % complete.
Skipping bad block at 0x73d80000
Erasing 512 Kibyte @ 77a00000 -- 46 % complete.
Skipping bad block at 0x77a80000
Erasing 512 Kibyte @ ff680000 -- 99 % complete.
Skipping bad block at 0xff700000
Skipping bad block at 0xff780000
Skipping bad block at 0xff800000
Skipping bad block at 0xff880000
Skipping bad block at 0xff900000
Skipping bad block at 0xff980000
Skipping bad block at 0xffa00000
Skipping bad block at 0xffa80000
Erasing 512 Kibyte @ ffb00000 -- 100 % complete.
#tftpboot 0x2000000 uImage
#nand erase 0x400000 0x400000
#nand write 0x2000000 0x400000 0x400000
#nand read 0x2000000 0x400000 0x400000
#bootm 0x2000000
setenv bootcmd 'nand read 0x2000000 0x400000 0x400000;bootm 0x2000000'
setenv bootcmd 'nand read 0x2000000 0x400000 0x400000;setenv bootargs ${console} ${bootargs_root} nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}${bootargs_end} usb0Mode=${usb0Mode} usb1Mode=${usb1Mode} video=dovefb:lcd0:${lcd0_params},lcd1:${lcd1_params} clcd.lcd0_enable=${lcd0_enable} clcd.lcd1_enable=${lcd1_enable}; bootm 0x2000000'
mtd utility:
dump nand device by nanddump
#nanddump -p -f /tmp/mtd1 /dev/mtd1
see mtd1 file
#less /tmp/mtd1
erase nand device
#flash_erase /dev/mtd1
see mtd1 full 0xff
#less /tmp/mtd1
//===========================================
MTD utility
# flash_erase /dev/mtd2
Erase Total 1 Units
Performing Flash Erase of length 524288 at offset 0x0 done
#dd if=/dev/zero of=/tmp/zero.img bs=1k count=4
4+0 records in
4+0 records out
# flashcp zero.img /dev/mtd2
#nanddump -p -f /work/mtd2 /dev/mtd2
//========================================
//jffs2
http://blog.chinson.idv.tw/2007/11/arm-jffs2-nand-flash.html
//===============================================
# ./mtd_debug read /dev/mtd0 0 100 gliethttp.bin
Copied 100 bytes from address 0x00000000 in flash to gliethttp.bin
# hexdump gliethttp.bin
0000000 03ff ea00 350c e59f 001c e583 410e e3a0
0000010 4004 e583 4a03 e3a0 4001 e254 fffd 1aff
0000020 4106 e3a0 4004 e583 420f e202 5000 e594
0000030 4001 e084 5000 e594 4001 e084 5000 e594
0000040 4001 e084 5000 e594 4010 e3a0 4008 e583
0000050 4050 e3a0 4001 e254 fffd 1aff 4e1e e3a0
0000060 4008 e583
0000064
#
# ./mtd_debug read /dev/mtd2 0 100 gliethttp.bin;hexdump gliethttp.bin -Cv
Copied 100 bytes from address 0x00000000 in flash to gliethttp.bin
00000000 1f 8b 08 00 ca 14 7d 4a 02 03 e4 5a 0f 70 93 e7 |......}J...Z.p..|
00000010 79 7f 3f 49 36 b2 31 41 80 a0 0e 38 cd 57 70 16 |y.?I6.1A...8.Wp.|
00000020 93 18 f3 19 3b 60 12 9a d9 60 08 09 4e 22 c0 a4 |....;`...`..N"..|
00000030 b4 81 ca 42 92 6d 0d 59 d2 49 72 02 2b 4d dd 60 |...B.m.Y.Ir.+M.`|
00000040 72 84 e1 86 03 a7 21 01 8a d2 b2 4b 2e f3 56 76 |r.....!....K..Vv|
00000050 63 b7 34 0b 1d cd b1 1d 6b b3 95 36 dc 95 db d1 |c.4.....k..6....|
00000060 8b 90 d1 ea |....|
00000064
[root@Dove /]# flash_eraseall /dev/mtd2
Erasing 512 Kibyte @ 13300000 -- 7 % complete.
Skipping bad block at 0x13380000
Erasing 512 Kibyte @ 35080000 -- 20 % complete.
Skipping bad block at 0x35100000
Erasing 512 Kibyte @ 53180000 -- 32 % complete.
Skipping bad block at 0x53200000
Erasing 512 Kibyte @ 73d00000 -- 45 % complete.
Skipping bad block at 0x73d80000
Erasing 512 Kibyte @ 77a00000 -- 46 % complete.
Skipping bad block at 0x77a80000
Erasing 512 Kibyte @ ff680000 -- 99 % complete.
Skipping bad block at 0xff700000
Skipping bad block at 0xff780000
Skipping bad block at 0xff800000
Skipping bad block at 0xff880000
Skipping bad block at 0xff900000
Skipping bad block at 0xff980000
Skipping bad block at 0xffa00000
Skipping bad block at 0xffa80000
Erasing 512 Kibyte @ ffb00000 -- 100 % complete.
spin down
Hdparm –S <> /dev/
For example : SATA HD mount at /dev/sda1 ,you want SATA HD into sleep after 1 min
You need type command “hdparm –S 12 /dev/sda
reference:
http://yenjinc.info/?p=60
http://www.gentoo.org/doc/zh_tw/power-management-guide.xml
2009年10月23日 星期五
mtd utility
http://elinux.org/CompilingMTDUtils
http://nienfeng.blogspot.com/2008/08/mtd-partition-tools.html
http://nienfeng.blogspot.com/2008/08/mtd-partition-tools.html
訂閱:
文章 (Atom)