(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?