AnsweredAssumed Answered

Failed write on /dev/mtd0

Question asked by Kirill Brilliantov on Sep 26, 2012
Latest reply on Sep 27, 2012 by Israel Perez Gonzalez

Hello!

Our board have one Micron (2Gb, x16, 1.8) NAND chip, I add NAND chip description in Linux and configure partitions table in board-specific file, also I add initrd support. After this I rebuild Linux and burn it via MFG tool in memory. After booting Linux I logged in system via SSH and check partitions tabel via /proc/partitions - it correct.

Now I need write U-Boot and Linux on NAND, for this I use kobs-ng version : [ 1.2 ] nad nandwrite 1.5.0.

I try write U-Boot:

~ # echo 1 > /sys/devices/platform/mxc_nandv2_flash.0/ignorebad

~ # cat /sys/devices/platform/mxc_nandv2_flash.0/ignorebad

1

~ # ./kobs-ng init --chip_0_device_path=/dev/mtd0 u-boot.bin

mtd: device "/dev/mtd0" can't be opened

Unable to open mtd device(s)

kobs-ng version : [ 1.2 ]

ROM Version 2

This is a very strange because I root.

I try use nandwrite, but this is not solve problem:

~ # ./nandwrite -mp /dev/mtd0 u-boot.bin

nandwrite: error!: /dev/mtd0

       error 13 (Permission denied)

~ # ./kobs-ng dump -v

MTD CONFIG:

  chip_0_device_path = "/dev/mtd0"

  chip_1_device_path = "(null)"

  search_exponent = 2

  data_setup_time = 80

  data_hold_time = 60

  address_setup_time = 25

data_sample_time = 6

  row_address_size = 3

  column_address_size = 2

  read_command_code1 = 0

  read_command_code2 = 48

  boot_stream_major_version = 1

  boot_stream_minor_version = 0

  boot_stream_sub_version = 0

  ncb_version = 3

  boot_stream_1_address = 0

  boot_stream_2_address = 0

mtd: opening: "/dev/mtd0"

mtd: device "/dev/mtd0" can't be opened

Unable to open mtd device(s)

kobs-ng version : [ 1.2 ]

ROM Version 2

~ # ./kobs-ng imgverify -v u-boot.bin

u-boot.bin: verifying using key '00000000000000000000000000000000'

u-boot.bin: is a valid bootstream for key '00000000000000000000000000000000'

 

 

Why I can't write on /dev/mtd0 and how can I solve this problem?

Thank you and excuse me my bad english.

Outcomes