How to Write an Image to the eMMC Module Tutorial
#30
(09-03-2017, 12:10 PM)MarkHaysHarris777 Wrote:
(09-03-2017, 07:43 AM)z4v4l Wrote: Why installation is not done by just like this:
1) insert an SD card card with the "minimal" linux.
2) snap an empty eMMC in
3) turn the board on, boot from SD
4) download an image and flash it into eMMC by that smartass script.

I know it's obvious and hardly nobody could think of it before, rather there are some obstacles to do so. What they are?


Hi, the reason your simplified approach will not work is that boot precedence and eMMC initialization create two problems which prevent it.  If there is an image on the eMMC already, then the eMMC will boot 'first'.  If there is no image on the eMMC then either the machine will not boot, or if it does boot,  both devices will not be 'seen' by the OS during initialization; both mmcblk0 and mmcblk1 must be present, AND the machine has to be booted from SD.

The jumper used has one function,  it grounds the clock line of the eMMC, deactivating it temporarily;  that way the SD card will boot-up because (for all intents and purposes) the eMMC is not there.  We interrupt the boot-up at the uboot timer and then continue the bootup with the jumper removed--  this allows the boot-up to continue on SD, but also allows the OS to 'see' the eMMC module during initialization.

Thanks for the question.

Seems I'm missing something here because

booted from sd

Code:
rock64@rock64:~$ /usr/bin/hostnamectl
  Static hostname: rock64
        Icon name: computer
       Machine ID: ba551e15e1de486494c058b5367a1a09
          Boot ID: 57ff54573ab34ebc8ac34780bb3a95dd
 Operating System: Debian GNU/Linux 9 (stretch)
           Kernel: Linux 4.4.77-rockchip-ayufan-92
     Architecture: arm64
         
rock64@rock64:~$ lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda            8:0    1 29.8G  0 disk
`-sda1         8:1    1 29.8G  0 part
mmcblk1      179:0    0 29.8G  0 disk
|-mmcblk1p1  179:1    0  3.9M  0 part
|-mmcblk1p2  179:2    0   64K  0 part
|-mmcblk1p3  179:3    0    4M  0 part
|-mmcblk1p4  179:4    0    4M  0 part
|-mmcblk1p5  179:5    0    4M  0 part
|-mmcblk1p6  179:6    0  112M  0 part
`-mmcblk1p7  179:7    0    1G  0 part /
mmcblk0      179:32   0 28.9G  0 disk
|-mmcblk0p1  179:33   0  3.9M  0 part
|-mmcblk0p2  179:34   0   64K  0 part
|-mmcblk0p3  179:35   0    4M  0 part
|-mmcblk0p4  179:36   0    4M  0 part
|-mmcblk0p5  179:37   0    4M  0 part
|-mmcblk0p6  179:38   0  112M  0 part /boot/efi
`-mmcblk0p7  179:39   0 28.8G  0 part
mmcblk0boot0 179:64   0    4M  1 disk
mmcblk0boot1 179:96   0    4M  1 disk
mmcblk0rpmb  179:128  0    4M  0 disk
   

booted from emmc
   
Code:
rock64@therock:~$ hostnamectl
 Static hostname: therock
       Icon name: computer
      Machine ID: 3b727929d77847c5834cba2762c208f7
         Boot ID: 64466c4d78084c9ba2b84b9e73afefe1
Operating System: Ubuntu 16.04.3 LTS
          Kernel: Linux 4.4.77-rockchip-ayufan-92
    Architecture: arm64
       
rock64@therock:~$ lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda            8:0    1 29.8G  0 disk
└─sda1         8:1    1 29.8G  0 part
mmcblk0rpmb  179:96   0    4M  0 disk
mmcblk0boot0 179:32   0    4M  1 disk
mmcblk0boot1 179:64   0    4M  1 disk
mmcblk0      179:0    0 28.9G  0 disk
├─mmcblk0p1  179:1    0  3.9M  0 part
├─mmcblk0p2  179:2    0   64K  0 part
├─mmcblk0p3  179:3    0    4M  0 part
├─mmcblk0p4  179:4    0    4M  0 part
├─mmcblk0p5  179:5    0    4M  0 part
├─mmcblk0p6  179:6    0  112M  0 part /boot/efi
└─mmcblk0p7  179:7    0 28.8G  0 part /

Can you enlight me?


Messages In This Thread
RE: How to Write an Image to the eMMC Module Tutorial - by rhille - 09-03-2017, 01:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Rock64 u-boot for eMMC Build Error mexicanflyer 0 1,041 09-18-2022, 02:29 PM
Last Post: mexicanflyer
Thumbs Up USB3.0 to eMMC Adapter... MattDralle 2 2,910 10-28-2021, 12:20 PM
Last Post: tllim
  Pine Rock64 eMMC lifespan moonspell79 3 3,686 08-19-2021, 06:46 PM
Last Post: bcnaz
  Download IDB fail when trying to flash Android image cherkasoff 0 4,264 04-05-2020, 07:41 AM
Last Post: cherkasoff
  Receiving errors about eMMC (?) acasta 11 15,688 09-24-2019, 10:26 PM
Last Post: ridgarou
  USB -> eMMC is now available. Luke 15 28,826 07-27-2019, 04:27 PM
Last Post: tllim
  Rock 64 network error as soon as I try to write or read. georgegohl888 1 2,950 03-12-2019, 09:35 AM
Last Post: georgegohl888
  Rock64 scipy, numpy, scikit-image, matplotlib issue with pip3 ictele 0 1,999 02-05-2019, 05:41 PM
Last Post: ictele
  flash image to sd/emmc through ethernet LMM 0 2,260 02-04-2019, 07:36 AM
Last Post: LMM
  HW image transitions in Python gaggleoxfoggy 7 7,910 11-24-2018, 10:41 AM
Last Post: gaggleoxfoggy

Forum Jump:


Users browsing this thread: 3 Guest(s)