Based on the OpenWRT instruction page I have a choice between optionally installing on NOR, NAND or eMMC. What are pros and cons of each method (outside of size of memory)?
NOR and NAND are for recovery. eMMC should be slightly faster than SD card
You can access emmc only from nand/nor (after changing switch) because it shares mmc controller with sd slot
I’m the author of OpenWrt support for this device. While many users here may use this device as-is, it also serves as a reference platform for this SoC. As such the goal is to support as many potential uses of the SoC as possible, while for a final product one may never actually use all of them at once.
Which storage option(s) you will want to use really depends on your individual use case. Each storage option is more than large enough to store a production and recovery system when using OpenWrt.
So let me list pros and cons of each of them:
here: 32 MiB of NOR flash connected via SPI
- extremely reliable
- very low complexity
- quite small
- quite slow
in this case: 128 MiB single-layer-cell (SLC) NAND connected via SPI
- larger and faster than NOR
- moderate complexity
- low price
- wear-leveling is needed (added complexity in software)
- bad blocks may occur even when the part is new from factory
classic disc emulated on top of multi-layer-cell (MLC) NAND flash by a built-in proprietary/secret management controller.
- very large and very fast
- suitable for multimedia applications which need lots of storage (hence the name)
- very high complexity makes it hard or even impossible to estimate real-world reliability.
- high price
Some examples to illustrate the above
- you want a highly reliable device to be used as statically configured router or WiFi access point => use the NOR flash
- all the software you need end up being more than 16 MiB compressed size. All typical applications one would want on a router easily fit in 16 MiB, however, some fancy software written in Go may not, for example… => use the NAND flash
- if you write to the flash more frequently, NOR may be too slow. In this case, use NAND or store the frequently-written-to data on the eMMC.
- you want to store and serve some media content from your router => use the eMMC to store that content (while still booting from NAND or NOR)
- you want to run a general-purpose OS rather than OpenWrt => you will have to use the eMMC (because everything else is too small)
Thanks for the explanation.
I own a BPI-R3 used only as a WiFi AP and to learn OpenWRT until a stable version was released.
My planed use case is complete Wi-Fi router with fiber internet access, 4G WWAN (SMS and emergency internet access), DMZ, LAN and maybe IoT LAN.
I want NTP, DNS, DHCP, complete statistics and graphical report usage with long term (infinite) history and maybe Home Assistant.
Is eMMC endurant enough to support write required by collecting statistics every 5 mn or should I use NVMe SSD ?
It is possible to use NOR to store persistent files like all configurations files (dhcp, dns…) Then we can use NAND as recovery (with official OpenWRT release) and reformat eMMC without any risk to lose local OpenWRT configuration. (and maximise flash usage)
Lastly, for now… Where are my 8GB eMMC space ? How can I install big packages ?
root@bpi-r3:~# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 10240 10240 0 100% /rom tmpfs 1021824 1016 1020808 0% /tmp /dev/mmcblk0p66 89016 58544 30472 66% /overlay overlayfs:/overlay 89016 58544 30472 66% / tmpfs 512 0 512 0% /dev
Thanks for your works
Try this here:
I will try to follow your tutorial step by step. On my side, I managed to extend the partition to 1 GB, but with errors like filesystem not recognized or checksum errors.
Seems GPT partition table is corrupted at initial installation…