MMC and SD?
#1
Is there any reason you can't install an OS (Debian please) on the MMC and keep the SD for data that you might want to plug into another machine?  Don't know if they're both mapped to the same address or something.  Maybe it's been answered before.

I would expect to do a dmesg when booted from the MMC and see a new device had been attached then be able to mount the partition(s) on it manually.  (Oh, that's right, it isn't kosher to hotplug an SD card, but like a USB stick or drive or SD in a USB reader.)  Or maybe boot from the SD as an alternative to what's on the MMC.  I've never had an MMC.
  Reply
#2
(10-21-2018, 05:11 PM)ab1jx Wrote: Is there any reason you can't install an OS (Debian please) on the MMC and keep the SD for data that you might want to plug into another machine?  Don't know if they're both mapped to the same address or something.  Maybe it's been answered before.

I would expect to do a dmesg when booted from the MMC and see a new device had been attached then be able to mount the partition(s) on it manually.  (Oh, that's right, it isn't kosher to hotplug an SD card, but like a USB stick or drive or SD in a USB reader.)  Or maybe boot from the SD as an alternative to what's on the MMC.  I've never had an MMC.


https://github.com/ayufan-rock64/linux-b...ash-spi.md

By the looks of it, MMC will load first and not touch the mSD card. Haven't ordered MMC yet so can't comment on how valid this is but I'm booting from USB, so flashing itself works Big Grin
  Reply
#3
Thanks.  By the boot order given in that it should already be booting from SPI flash, which it may be.  I just shut down, pulled the SD, powered it back up.  The red, white and green LEDs are on but I have no video so I can't tell what's going on.  My USB wifi adapter didn't get onto my AP with the usual hostname so it doesn't ping.  I'm using a small TV as a monitor on the Rock which has weird EDID that took a bunch of fiddling to set up, which was probably on the SD card.

Put the SD back and dmesg | grep -i spi shows:
Code:
[    1.198947] rockchip-spi ff190000.spi: no high_speed pinctrl state
[    1.200766] m25p80 spi32766.0: gd25q128 (16384 Kbytes)
[    1.201500] 1 ofpart partitions found on MTD device spi32766.0
[    1.202265] Creating 1 MTD partitions on "spi32766.0":
sfdisk -i doesn't show anything close to "16384 Kbytes"  (only 16 MB?).  I'll have to look around.
  Reply
#4
I'm a bit confused about what you're doing there - what are you trying to boot from SPI? I'm really new to all of this Big Grin
  Reply
#5
(10-22-2018, 03:30 PM)AckRite Wrote: I'm a bit confused about what you're doing there - what are you trying to boot from SPI? I'm really new to all of this Big Grin

I'm not sure why I see a 16 MB partition connected by SPI, I guess it's for the bootloader.  If I could read the screen it's probably telling me "no image found" or similar, but it's booted that far without problem which is why all the LEDs are lit like it's booted into Linux.

I thought maybe there was space for Linux in the SPI partition, but it's too small, that needs to be on MMC, SD or USB (or network).  Thought I'd found a free lunch but no.  Raspberry Pi has no MMC, not used to it.

It was a bumpy process getting the Rock64 running so I wasn't going to spend much time on it until it had been up and running for a month.  I turn on the TV it's connected to, see that it's still running, flip back to Star Trek and forget about it.
  Reply
#6
(10-22-2018, 09:17 PM)ab1jx Wrote:
(10-22-2018, 03:30 PM)AckRite Wrote: I'm a bit confused about what you're doing there - what are you trying to boot from SPI? I'm really new to all of this Big Grin

I'm not sure why I see a 16 MB partition connected by SPI, I guess it's for the bootloader.  If I could read the screen it's probably telling me "no image found" or similar, but it's booted that far without problem which is why all the LEDs are lit like it's booted into Linux.

I thought maybe there was space for Linux in the SPI partition, but it's too small, that needs to be on MMC, SD or USB (or network).  Thought I'd found a free lunch but no.  Raspberry Pi has no MMC, not used to it.

It was a bumpy process getting the Rock64 running so I wasn't going to spend much time on it until it had been up and running for a month.  I turn on the TV it's connected to, see that it's still running, flip back to Star Trek and forget about it.

AFAIK SPI is like BIOS on desktop motherboards, its a small partition to set some basic stuff and most importantly to boot a small piece of code to direct booting in the next direction, be it network, emmc, usb etc...without SPI afaik the board dont have enough basic information (and/or drivers) to boot from network or usb as example...so basically its "only" 16mb but also, 16mb is enough for what its meant to do...

PS: i know that compare SPI to BIOS is gross oversimplification, it was just an example...
  Reply
#7
SPI itself is the interface right?  https://en.wikipedia.org/wiki/Serial_Per..._Interface  There's probably some sort of EEPROM chip at the other end.  But yeah, it's the really low level stuff.  Hmm, I wonder if that's like on a Raspberry Pi too, the GPU actually boots first and boots the CPU.  The SPI storage could be the boot stuff for the GPU.  This can run Android so it would need to be set up the same, there are a couple different images you download and "flash" (write) to make it work.  "Recovery" and the image that contains Android.  This would be analogous to Recovery.

Anyway, apparently you can use both MMC and SD which is what I was trying to figure out.  The Ayufan or Armbian images can be used on either.
  Reply
#8
(10-23-2018, 04:20 PM)ab1jx Wrote: SPI itself is the interface right?  https://en.wikipedia.org/wiki/Serial_Per..._Interface  There's probably some sort of EEPROM chip at the other end.  But yeah, it's the really low level stuff.  Hmm, I wonder if that's like on a Raspberry Pi too, the GPU actually boots first and boots the CPU.  The SPI storage could be the boot stuff for the GPU.  This can run Android so it would need to be set up the same, there are a couple different images you download and "flash" (write) to make it work.  "Recovery" and the image that contains Android.  This would be analogous to Recovery.

Anyway, apparently you can use both MMC and SD which is what I was trying to figure out.  The Ayufan or Armbian images can be used on either.

To compare this to the raspi id say that its closer in comparison with the small fat partition where the raspi have some pre-boot files and some basic config files where you set memory, overclock, audio etc...and this pre-boot partition can be compared to the android "recovery" mode, yea...but again, its gross oversimplification.
Ive read somewhere that you can have OSs on both SD and MMC and switch between them with a jumper (need SPI flashed for this to work tho), i was thinking to place an external switch on that jumper and use it as a hackish dual boot, no idea if that can be done that way but cant see why not...
  Reply
#9
Sounds like more trouble than it's worth.  It'll boot from the MMC or the SD if plugged in.  The boot order from Ayufan's write up:
Boot order:
    SPI flash
    eMMC (disable with jumper)
    microSD
    USB drive
    PXE
I used to set up i386 Windows machines to prefer floppy or CD boot over the hard drive if anything was plugged in there.  So if something happened to what was on the hard drive there was an alternative.

But I wasn't imagining it, you can boot from SPI (if it's flashed)
"Traditionally, booting Linux on the ROCK64 required an eMMC or microSD card, however it is now possible to boot without those, assuming the SPI memory has been flashed. The ROCK64 contains an onboard 128Mbit SPI flash memory, which can be flashed with U-Boot in order to provide additional boot options:"

From the top of https://github.com/ayufan-rock64/linux-b...ash-spi.md
But you download a u-boot-flash image and write that to SD, then on first boot it goes into SPI.  I just have the regular image, and not many spare SDs.  Sounds like it doesn't boot into Linux though.
  Reply
#10
Hi,

you wrote that the eMMC boot can be  disabled with a jumper; Ayufan also wrote this here.

but i didn't see what jumper?
someone can tell it?

regards
  Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)