SD card prepartion have issue.

Discussion in 'UDOO NEO' started by pavan, Jul 23, 2019.

  1. pavan

    pavan UDOOer

    Joined:
    Jul 6, 2019
    Messages:
    14
    Likes Received:
    11
    Hi Team,

    Directly writing image to SD card working fine.
    sudo dd bs=1M if=udoobuntu-udoo-neo-desktop_20190623-2007.img of=/dev/sdb ==> Working fine.

    Issue :
    ====
    Creating own SPL and Uboot file and writing to SD card, at the time have issue.

    How to create own SD card partition and how to write SPL,Uboot to SD card.

    While write to SD card i am facing below issue.

    Could you please help on this.

    Code:
    linux$
    linux$ lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 465.8G 0 disk
    ├─sda1 8:1 0 95.4G 0 part /
    ├─sda2 8:2 0 3.8G 0 part [SWAP]
    ├─sda3 8:3 0 250G 0 part /media/linux/d3013e39-a19c-402e-8736-0ccd0b2bb896
    └─sda4 8:4 0 116.6G 0 part /media/linux/3b7afe20-bab2-406a-8c64-811e78f911e2
    sdb 8:16 1 7.5G 0 disk
    ├─sdb1 8:17 1 32M 0 part /media/linux/boot1
    └─sdb2 8:18 1 2.6G 0 part /media/linux/udoobuntu
    sr0 11:0 1 1024M 0 rom
    linux$
    linux$
    linux$
    linux$
    linux$
    linux$ ls
    SPL u-boot.img zImage dts
    System.map
    linux$ sudo dd if=SPL of=/dev/sdb1 seek=1 bs=1k
    [sudo] password for linux:
    31+0 records in
    31+0 records out
    31744 bytes (32 kB, 31 KiB) copied, 0.000417137 s, 76.1 MB/s
    linux$
    linux$
    linux$ ls
    SPL u-boot.img zImage dts
    System.map
    linux$
    linux$ sudo dd if=u-boot.img of=/dev/sdb1 seek=69 bs=1k
    230+1 records in
    230+1 records out
    236260 bytes (236 kB, 231 KiB) copied, 0.00160651 s, 147 MB/s
    linux$ sync
    linux$
    linux$
    linux$
    ls: cannot access ''$'\022''± 2ε╥'$'\a''ε.Ü_'$'\001': Input/output error
    ls: cannot access ''$'\b''╨"f'$'\v''h'$'\f''i.'$'\001''<'$'\r': Input/output error
    ls: cannot access ''$'\a''εü?'$'\001''≡.'$'\b''╡ ': Input/output error
    ls: cannot access 'ಠ≈m '$'\001''≡.╣² ': Input/output error
    ls: cannot access ''$'\003''╤'$'\001'')'$'\024''┐c#.g#┬': Input/output error
    ls: cannot access ''$'\032''`,J.ó⌡µ': Input/output error
    ls: cannot access 'w └≤'$'\a''0c(.'$'\005''╤ ': Input/output error
    ls: cannot access 'pG.'$'\b''╡ ': Input/output error
    ls: cannot access '#╨'$'\022''KÜi┬≤.AQ┬': Input/output error
    ls: cannot access ''$'\t\003\003''çpgpg.'$'\017''jo': Input/output error
    ls: cannot access ''$'\a''╤'$'\002''≡'$'\003\003\006''!.[': Input/output error
    ls: cannot access '¿°éç.'$'\001''(s': Input/output error
    ls: cannot access 'hfú@'$'\005''Ω'$'\003\001''.ß@'$'\035': Input/output error
    ls: cannot access '─≤'$'\002''D'$'\003''⌠.'$'\b''α─': Input/output error
    ls: cannot access ''$'\032''o'$'\020''▒B⌠@R.'$'\001''α"': Input/output error
    ls: cannot access ''$'\002''(ö┐'$'\030''F.)α'$'\003': Input/output error
    ls: cannot access '└≤ü@'$'\002''('$'\017''╨.'$'\003''('$'\022': Input/output error
    ls: cannot access '@q!⌠@aög.┘j!': Input/output error
    ls: cannot access 'nk'$'\033''h▄ic'$'\006''.'$'\005''╘ ': Input/output error
    ls: cannot access '┬≤Aq┬≤┬T.'$'\002'')'$'\020': Input/output error
    ls: cannot access '/k.'$'\024''0x': No such file or directory
    '¥· !'$'\001''¬.'$'\f''┐'$'\023' ''$'\036''H'$'\003''⌐'$'\n''≡Φ■'
    ''$'\001''.'$'\022''&' '%H'$'\v''≡├ #i.$H'
    '▐└¡'$'\v' ''$'\b''╡'$'\b''h'$'\v''≡'$'\002'' .l≥p'
    '╔.'$'\003\003''[' '-I'$'\033''≡Ä√.∞╨0'
    '╛.'$'\024''≡ƒ' ''$'\003''!'$'\032''≡î■'$'\a''f'
    '╦■."≡'$'\017' '¬i+`Za.p╜8'
    '■≈\■'$'\f'' ■≈.'$'\025''ⁿ'$'\004' '#╣'$'\003''i'$'\023''╣.╜Φ°'
    ''$'\004''≡≡'$'\005\004''≡'$'\017\004''.└≤'$'\a' 'i·'$'\001''≡»·╜Φ.'$'\b''@'$'\f'
    ''$'\a''╤'$'\002''≡'$'\003\003\006''!.[' jfrnsfjf.Rnô
    ''$'\b''╜' 'jh╤p.B°'$'\b'
    ''$'\t''.'$'\002' ''$'\032''`,J.ó⌡µ'
    ''$'\f''≡┤ⁿ'$'\001''! |.'$'\t''%'$'\021' ''$'\001\002\032''`'$'\024''JO⌠.ös'$'\023'
    ''$'\r' ''$'\002''J'$'\023''`pG.'$'\004''!á'
    ''$'\r' ''\''j'$'\022''α ≈â .&i'$'\a'
    ''$'\r' '/k.'$'\024''0x'
    ''$'\r' ''$'\027''k.'$'\024''0X'
    ''$'\r' 'KF'$'\033''hs╡'$'\005''F.'$'\033''l'$'\001'
    ''$'\r' '┌`kf[n4j.'$'\032''ak'
    ''$'\r' '≤╨'$'\036''K'$'\032''hB≡.'$'\001\002\032'
    ''$'\020''.,' ''$'\t''k'$'\034''h. h)'
    ''$'\022''.'$'\037\020' '┌küc┌k'$'\020'':.┌cp'
    ''$'\035''°.'$'\001''*'$'\001' 'k■'$'\001''Ü F.!."≡?'
    ''$'\a''0c('$'\006''╤■≈.ô └' '#╨'$'\022''KÜi┬≤.AQ┬'
    '■≈╢■└≤'$'\a''0.d('$'\004' 'l╣'$'\004''6'$'\b''.±╨.°τq'
    ''$'\a''°└≤'$'\a''0f(.'$'\v''╨ ' L⌠çç╣CÇç.,
    ''$'\a''.0f ' ''$'\n'' LF ≈╓ⁿ.─°╨'
    linux$
    linux$
    linux$
    linux$
    
    After writing SPL and Uboot to SD card, displaying above junk values.

    Can you please suggest me, how to write SPL and Uboot.img file to SD card.

    Thanks,
    Pavan.
     
    huthamcau likes this.
  2. pavan

    pavan UDOOer

    Joined:
    Jul 6, 2019
    Messages:
    14
    Likes Received:
    11
    If any know about this issue, please help on this.
     
    huthamcau likes this.
  3. ektor5

    ektor5 Administrator Staff Member

    Joined:
    Jul 1, 2013
    Messages:
    97
    Likes Received:
    48
    Hi Pavan,
    You wrongly flashed the uboot directly on the filesystem instead of the whole disk:

    Right commands:
    Code:
    sudo dd if=SPL of=/dev/sdb seek=1 bs=1k
    sudo dd if=u-boot.img of=/dev/sdb seek=69 bs=1k
    
    Have a nice day,
    Ek5
     
    evaloverde, huthamcau and waltervl like this.
  4. pavan

    pavan UDOOer

    Joined:
    Jul 6, 2019
    Messages:
    14
    Likes Received:
    11
    Hi Ek5,

    Thanks for reply, i have tried same thing as below.

    But it not showing any thing in SD card.

    Could you please suggest me, am i doing correct or not ?
    Code:
    linux$ ls
    dts  SPL  System.map  u-boot.img  zImage
    linux$ sudo dd if=SPL of=/dev/sdb seek=1 bs=1k
    31+0 records in
    31+0 records out
    31744 bytes (32 kB, 31 KiB) copied, 0.00386453 s, 8.2 MB/s
    linux$
    linux$ sudo dd if=u-boot.img of=/dev/sdb seek=69 bs=1k
    230+1 records in
    230+1 records out
    236244 bytes (236 kB, 231 KiB) copied, 0.00100831 s, 234 MB/s
    linux$
    linux$
    linux$ lsblk
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 465.8G  0 disk
    ├─sda1   8:1    0  95.4G  0 part /
    ├─sda2   8:2    0   3.8G  0 part [SWAP]
    ├─sda3   8:3    0   250G  0 part
    └─sda4   8:4    0 116.6G  0 part
    sdb      8:16   1   7.5G  0 disk
    └─sdb1   8:17   1   7.5G  0 part /media/linux/7E09-5BB6
    sr0     11:0    1  1024M  0 rom
    linux$
    linux$
    linux$ ls
    linux$
    linux$pwd
    /media/linux/7E09-5BB6
    linux$
    
    Hi Team,

    if any one knows about this issue, could you please help on this.

    Thanks,
    Pavan
     
    Last edited by a moderator: Jul 31, 2019
    huthamcau likes this.
  5. ektor5

    ektor5 Administrator Staff Member

    Joined:
    Jul 1, 2013
    Messages:
    97
    Likes Received:
    48
    Hi pavan,
    This is not an issue, it is normal.

    After dd-ing the disk, the kernel doesn't reload the partition table automatically.
    You can do that manually by executing `partprobe` or rebooting.

    BR,
    Ek5
     
    evaloverde likes this.
  6. pavan

    pavan UDOOer

    Joined:
    Jul 6, 2019
    Messages:
    14
    Likes Received:
    11
    Hi Ek5,

    Thanks for you response.

    Can you please share the step for

    1.How to create exact space of fat32 for SPL and U-boot in SD card.
    2.How to write SPL and U-boot file into SD card.
    3.How to write zImage and rootfs into SD.

    Could you please share the details. I didn't able to find the exact details in internet.
     
  7. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
  8. pavan

    pavan UDOOer

    Joined:
    Jul 6, 2019
    Messages:
    14
    Likes Received:
    11
    Thanks for response waltervl.

    I have tried but not luck, if you did anything like that ... can you please share any example scripts.

    Same thing i will try in my side.

    Thanks,
    Pavan.
     
  9. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    The mkudoobuntu script is the script. Not much more to share.
    I personelly have no experience with this so cannot help you.

    Why do you want to create a new SPL and uboot?
     
  10. pavan

    pavan UDOOer

    Joined:
    Jul 6, 2019
    Messages:
    14
    Likes Received:
    11
    Thanks for reply.

    Actually i am looking for how to create our own custom udoo neo operation system.

    This is actual requirement.
     

Share This Page