LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 03-14-2018, 08:29 PM   #16
blue_z
Member
 
Registered: Jul 2015
Location: USA
Distribution: Ubuntu, Lubuntu, Mint, custom embedded
Posts: 104

Rep: Reputation: Disabled

Quote:
Originally Posted by OkCalis View Post
I'm 100% sure that U-Boot is located on the NAND flash.
Then prove it.
I fail to understand how you can be so confident when you don't have specific addresses!
How does a project function without having a flash memory map, and specifies/uses bogus partitions (that don't identify/protect boot images)?
Who installed the U-Boot image, and how was it done?

Since you claim you erased the partition before flashing the JFFS2 image, so instead of erasing the whole chip for the suggested experiment, just erase that "partition" again.
A negative result will be a little ambiguous, whereas a positive result (no errors) would clearly point the finger at a bad image.

Regards

Last edited by blue_z; 03-14-2018 at 08:30 PM.
 
1 members found this post helpful.
Old 03-16-2018, 03:22 AM   #17
OkCalis
Member
 
Registered: Dec 2017
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Then prove it.
Here you go:

Code:
U-Boot > nand read 0xC0700000 0x0 0x200

NAND read: device 0 offset 0x0, size 0x200
 512 bytes read: OK
U-Boot > md 0xC0700000 0x200
c0700000: f0e1fc6c 64707516 64657461 6f627073    l....updatedspbo
c0700010: 6f6c746f 72656461 7466743d 30632070    otloader=tftp c0
c0700020: 30303037 6d203030 6f797469 2f70616d    700000 mityomap/
c0700030: 42707364 2e746f6f 3b74756f 6e616e20    dspBoot.out; nan
c0700040: 72652064 20657361 30303031 31203030    d erase 100000 1
c0700050: 30303030 6e203b30 20646e61 74697277    00000; nand writ
c0700060: 30632065 30303037 31203030 30303030    e c0700000 10000
c0700070: 30312030 30303030 3d4c003b 70746674    0 100000;.L=tftp
c0700080: 37306320 30303030 696d2030 6d6f7974     c0700000 mityom
c0700090: 642f7061 6f427073 6f2e746f 743b7475    ap/dspBoot.out;t
c07000a0: 20707466 30303763 30303030 74696d20    ftp c7000000 mit
c07000b0: 616d6f79 69622f70 7972616e 6e69622e    yomap/binary.bin
c07000c0: 6f6f623b 70736474 63783020 30303730    ;bootdsp 0xc0700
c07000d0: 00303030 66743d4d 63207074 30303730    000.M=tftp c0700
c07000e0: 20303030 7974696d 70616d6f 7073642f    000 mityomap/dsp
c07000f0: 746f6f42 74756f2e 6674203b 63207074    Boot.out; tftp c
c0700100: 30303037 20303030 7974696d 70616d6f    7000000 mityomap
c0700110: 6d6f632f 2e746e69 3b6e6962 6f6f6220    /comint.bin; boo
c0700120: 70736474 63783020 30303730 00303030    tdsp 0xc0700000.
c0700130: 666e3d50 30312073 2e30312e 342e3732    P=nfs 10.10.27.4
c0700140: 652f3a35 726f7078 696d2f74 74656b72    5:/export/ehagtm
c0700150: 622f7366 2f746f6f 616d4975 6d2e6567    fs/boot/uImage.m
c0700160: 656b7269 74203b74 20707466 36437830    irket; tftp 0xC6
c0700170: 30303037 6d203030 6f797469 2f70616d    700000 mityomap/
c0700180: 42707364 2e746f6f 3b74756f 74667420    dspBoot.out; tft
c0700190: 78302070 30303743 30303030 74696d20    p 0xC7000000 mit
c07001a0: 616d6f79 79682f70 64697262 6e69622e    yomap/hybrid.bin
c07001b0: 6f62203b 7364746f 78302070 30373643    ; bootdsp 0xC670
c07001c0: 30303030 6c73203b 20706565 3d520032    0000; sleep 2.R=
c07001d0: 2073666e 312e3031 37322e30 3a35342e    nfs 10.10.27.45:
c07001e0: 7078652f 2f74726f 6b72696d 73667465    /export/ehagtmfs
c07001f0: 6f6f622f 49752f74 6567616d 72696d2e    /boot/uImage.eha
c0700200: 3b74656b 74667420 78302070 30373643    gtm; tftp 0xC670
c0700210: 30303030 74696d20 616d6f79 73642f70    0000 mityomap/ds
c0700220: 6f6f4270 756f2e74 74203b74 20707466    pBoot.out; tftp 
c0700230: 37437830 30303030 6d203030 6f797469    0xC7000000 mityo
c0700240: 2f70616d 72627968 622e6469 203b6e69    map/hybrid.bin; 
c0700250: 746f6f62 20707364 36437830 30303037    bootdsp 0xC67000
c0700260: 203b3030 65656c73 3b322070 6f6f6220    00; sleep 2; boo
c0700270: 30206d74 37304378 30303030 31540030    tm 0xC0700000.T1
c0700280: 73666e3d 2e303120 322e3031 35342e37    =nfs 10.10.27.45
c0700290: 78652f3a 74726f70 72696d2f 6674656b    :/export/ehagtmf
c07002a0: 6f622f73 752f746f 67616d49 696d2e65    s/boot/uImage.mi
c07002b0: 74656b72 6674203b 30207074 37364378    rket; tftp 0xC67
c07002c0: 30303030 696d2030 6d6f7974 642f7061    00000 mityomap/d
c07002d0: 6f427073 6f2e746f 203b7475 70746674    spBoot.out; tftp
c07002e0: 43783020 30303037 20303030 7974696d     0xC7000000 mity
c07002f0: 70616d6f 6e75742f 72696665 622e7473    omap/tunefirst.b
c0700300: 203b6e69 746f6f62 20707364 36437830    in; bootdsp 0xC6
c0700310: 30303037 61003030 69736d72 66743d6d    700000.armsim=tf
c0700320: 63207074 30303730 20303030 7974696d    tp c0700000 mity
c0700330: 70616d6f 7073642f 746f6f42 74756f2e    omap/dspBoot.out
c0700340: 6674203b 63207074 30303037 20303030    ; tftp c7000000 
c0700350: 7974696d 70616d6f 6d72612f 2e6d6973    mityomap/armsim.
c0700360: 3b6e6962 6f6f6220 70736474 43783020    bin; bootdsp 0xC
c0700370: 30303730 00303030 65726162 6174656d    0700000.baremeta
c0700380: 6f6f626c 69703d74 3120676e 30312e30    lboot=ping 10.10
c0700390: 2e37322e 203b3534 2073666e 30373063    .27.45; nfs c070
c07003a0: 30303030 2e303120 322e3031 35342e37    0000 10.10.27.45
c07003b0: 78652f3a 74726f70 72696d2f 6674656b    :/export/ehagtmf
c07003c0: 6f622f73 752f746f 67616d49 696d2e65    s/boot/uImage.mi
c07003d0: 74656b72 6674203b 63207074 30303030    rket; tftp c0000
c07003e0: 20303030 7974696d 70616d6f 7073642f    000 mityomap/dsp
c07003f0: 746f6f42 74756f2e 6674203b 63207074    Boot.out; tftp c
c0700400: 30303037 20303030 7974696d 70616d6f    7000000 mityomap
c0700410: 6e69622f 2e797261 3b6e6962 6f6f6220    /binary.bin; boo
c0700420: 70736474 63783020 30303030 3b303030    tdsp 0xc0000000;
c0700430: 656c7320 33207065 6f62203b 206d746f     sleep 3; bootm 
c0700440: 30373063 30303030 72616200 74656d65    c0700000.baremet
c0700450: 73646c61 6f6f6270 66743d74 63207074    aldspboot=tftp c
c0700460: 30303730 20303030 7974696d 70616d6f    0700000 mityomap
c0700470: 7073642f 746f6f42 74756f2e 6674203b    /dspBoot.out; tf
c0700480: 63207074 30303037 20303030 7974696d    tp c7000000 mity
c0700490: 70616d6f 6e69622f 2e797261 3b6e6962    omap/binary.bin;
c07004a0: 6f622020 7364746f 78302070 30373063      bootdsp 0xc070
c07004b0: 30303030 75616200 74617264 31313d65    0000.baudrate=11
c07004c0: 30303235 6f6f6200 67726174 656d3d73    5200.bootargs=me
c07004d0: 36393d6d 7830404d 30303063 30303030    m=96M@0xc0000000
c07004e0: 6e6f6320 656c6f73 7974743d 312c3253     console=ttyS2,1
c07004f0: 30323531 20386e30 746f6f72 65642f3d    15200n8 root=/de
c0700500: 666e2f76 666e2073 6f6f7273 30313d74    v/nfs nfsroot=10
c0700510: 2e30312e 342e3732 652f3a35 726f7078    .10.27.45:/expor
c0700520: 696d2f74 74656b72 69207366 30313d70    t/ehagtmfs ip=10
c0700530: 2e30312e 332e3732 30313a30 2e30312e    .10.27.30:10.10.
c0700540: 342e3732 30313a35 2e30312e 342e3732    27.45:10.10.27.4
c0700550: 35323a35 35322e35 35322e35 3a302e35    5:255.255.255.0:
c0700560: 6b72694d 562d7465 6f3a3a4d 62006666    ehagtm-VM::off.b
c0700570: 63746f6f 703d646d 20676e69 312e3031    ootcmd=ping 10.1
c0700580: 37322e30 0035342e 746f6f62 616c6564    0.27.45.bootdela
c0700590: 00313d79 746f6f62 656c6966 6d49753d    y=1.bootfile=uIm
c07005a0: 00656761 6f6d6564 73666e3d 2e303120    age.demo=nfs 10.
c07005b0: 322e3031 35342e37 78652f3a 74726f70    10.27.45:/export
c07005c0: 72696d2f 6674656b 6f622f73 752f746f    /ehagtmfs/boot/u
c07005d0: 67616d49 6f772e65 3b736b72 74667420    Image.works; tft
c07005e0: 78302070 30373643 30303030 74696d20    p 0xC6700000 mit
c07005f0: 616d6f79 73642f70 6f6f4270 756f2e74    yomap/dspBoot.ou
c0700600: 74203b74 20707466 37437830 30303030    t; tftp 0xC70000
c0700610: 6d203030 6f797469 2f70616d 72627968    00 mityomap/hybr
c0700620: 622e6469 203b6e69 746f6f62 20707364    id.bin; bootdsp 
c0700630: 36437830 30303037 203b3030 65656c73    0xC6700000; slee
c0700640: 3b322070 6f6f6220 30206d74 37304378    p 2; bootm 0xC07
c0700650: 30303030 74650030 74636168 5661443d    00000.ethact=DaV
c0700660: 69636e69 414d452d 74650043 64646168    inci-EMAC.ethadd
c0700670: 30373d72 3a33623a 623a3564 64313a35    r=70:b3:d5:b5:1d
c0700680: 0032613a 61746466 3d726464 30637830    :a2.fdtaddr=0xc0
c0700690: 30303036 66003030 6f627464 623d746f    600000.fdtboot=b
c07006a0: 7a746f6f 63783020 30303730 20303030    ootz 0xc0700000 
c07006b0: 7b24202d 61746466 7d726464 6466003b    - ${fdtaddr};.fd
c07006c0: 6c696674 61643d65 2d303538 6b64636c    tfile=da850-lcdk
c07006d0: 6274642e 6c696600 64646165 30633d72    .dtb.fileaddr=c0
c07006e0: 30303030 66003030 73656c69 3d657a69    000000.filesize=
c07006f0: 64323331 00346439 74736f68 656d616e    132d9d4.hostname
c0700700: 72694d3d 2d74656b 69004d56 64646170    =ehagtm-VM.ipadd
c0700710: 30313d72 2e30312e 332e3732 696c0030    r=10.10.27.30.li
c0700720: 3d78756e 676e6970 2e303120 322e3031    nux=ping 10.10.2
c0700730: 35342e37 666e203b 30312073 2e30312e    7.45; nfs 10.10.
c0700740: 342e3732 652f3a35 726f7078 696d2f74    27.45:/export/mi
c0700750: 74656b72 622f7366 2f746f6f 616d4975    rketfs/boot/uIma
c0700760: 6d2e6567 656b7269 62203b74 6d746f6f    ge.ehagtm; bootm
c0700770: 74756c00 7466743d 78302070 30373643    .lut=tftp 0xC670
c0700780: 30303030 74696d20 616d6f79 73642f70    0000 mityomap/ds
c0700790: 6f6f4270 756f2e74 74203b74 20707466    pBoot.out; tftp 
c07007a0: 37437830 30303030 6d203030 6f797469    0xC7000000 mityo
c07007b0: 2f70616d 2e74756c 3b6e6962 6f6f6220    map/lut.bin; boo
c07007c0: 70736474 43783020 30303736 00303030    tdsp 0xC6700000.
c07007d0: 6b72696d 6e3d7465 31207366 30312e30    ehagtm=nfs 10.10
c07007e0: 2e37322e 2f3a3534 6f707865 6d2f7472    .27.45:/export/e
c07007f0: 656b7269 2f736674 746f6f62 6d49752f    hagtmfs/boot/uIm
The U-Boot environment variables are stored at the beginning of the NAND flash. This was the reason I was that confident.

I also attached two screenshots, where people who were working on the board before me flashed U-Boot on the board. From the lines "Flashing ... at 0x00000000" and the image sizes, I suspect the U-Boot resides in the range (0x00000000:0x000700C4), ignoring bad blocks and assuming the two images were flashed back to back. Hence, I'll reserve the first 1MB for the U-Boot and UBL.

Quote:
Since you claim you erased the partition before flashing the JFFS2 image, so instead of erasing the whole chip for the suggested experiment, just erase that "partition" again.
Sorry, I don't understand how this differs from what I did in my previous posts. I already erased the partition and flashed the JFFS2 image multiple times.

Meanwhile, I found out the model of the NAND flash on the custom board (Cypress), and compared it to the one on the MityDsp (Micron). Both of them have 512MB=4Gb of capacity, and same block and page sizes. However, Micron has a bus width of 8 bits, whereas Cypress has 16 bits. I also verified that by putting prints throughout the kernel source code.

When the kernel on MityDsp boots, it prints out the manufacturer ID as 0x2C and chip ID as 0xDC, and it explicitly prints the NAND's part number as "Micron MT29F4G08ABADAWP". On the custom board, manufacturer and chip IDs are 0x01 and 0xBC, respectively, but the model is identified as "AMD Davinci NAND.1" only. I think I should modify the kernel to identify the flash somehow.

Got any more suggestions?
Thanks again.
Attached Thumbnails
Click image for larger version

Name:	a.png
Views:	44
Size:	29.4 KB
ID:	27207   Click image for larger version

Name:	b.png
Views:	39
Size:	11.3 KB
ID:	27208  

Last edited by OkCalis; 03-16-2018 at 09:02 AM. Reason: Update
 
Old 03-17-2018, 06:22 PM   #18
blue_z
Member
 
Registered: Jul 2015
Location: USA
Distribution: Ubuntu, Lubuntu, Mint, custom embedded
Posts: 104

Rep: Reputation: Disabled
Quote:
Originally Posted by OkCalis View Post
Sorry, I don't understand how this differs from what I did in my previous posts. I already erased the partition and flashed the JFFS2 image multiple times.

Got any more suggestions?
Go back and reread my posts and/or the MTD FAQ for JFFS2 to refresh your memory as to what procedure that this erasing is for.

Regards
 
Old 03-21-2018, 01:35 AM   #19
OkCalis
Member
 
Registered: Dec 2017
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
B1. Erase the NAND flash.
B2. Boot with the custom kernel and NFS rootfs, then mount the JFFS2 on the NAND.
B3. Write some files to the JFFS2, and verify.
B4. Unmount, reboot, mount and verify.
This worked!

All this time, I was trying to flash the JFFS2 image through U-Boot. To do the test covered in MTD FAQ, I installed "mtdutils" to the ARM and simply followed the steps. Although I used the same JFFS2 image to write to the NAND, doing so in Linux instead of U-Boot did the trick.

Thank you for both your help and your patience.
 
  


Reply

Tags
arm, ecc, kernel panic


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
install custom kernel and rootfs on board SMDKV210 lolhangman Linux - Embedded & Single-board computer 0 07-21-2016 02:45 PM
Is it needed to build target kernel with MTD when i am having these for my board? ayyasprings Linux - Embedded & Single-board computer 7 12-05-2014 04:27 AM
[SOLVED] Custom kernel on Dell Optiplex panics: cannot mount root partition (null) Gullible Jones Linux - Desktop 5 07-15-2014 02:12 PM
Kernel panics : trying to write / read on tiny tty driver diwsdiwa Linux - Kernel 0 05-13-2013 11:44 AM
custom kernel panics DAChristen29 Ubuntu 2 07-18-2005 06:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 09:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration