BPI-R2 new image : ubuntu 16.04 V1.2.1 BT and WIFI AP mode are working fine 2017-11-27

(peter.r.volkov) #51

Is it ok, that I encounter “no space left on device” while trying to get this image ( 2017-09-04 MD5:8c554bfe1f2e84c74fc60aef298282fa) to emmc via “bpi-copy .img.zip” or dd ? Why the image is so big?

(Frank W.) #52

This image is larger than emmc…it’s been posted in another thread

Workaround: https://softwarebakery.com/shrinking-images-on-linux

just for reference: BPI-R2 new Image:Ubuntu-16.04-mate-desktop-bpi-r2-sd-emmc-v1.2.0.img.zip 2017-09-04 (not the same image, but steps to shrink the image are the same)

another way would be:

  • dd only the first 1MB to mmcblk1
  • run fdisk to check partition table (make sure its not leaving boundaries) and resync part-table
  • create filesystem on both partitions (p1=vfat,p2=ext4)
  • copy content (files) from boot and root to emmc-partitions

(peter.r.volkov) #53

Thank you so much, Frank. At the moment bpiR2 is a useless brick without your helpful advices. I wonder why one would upload image with substrings BPIR2 and EMMC that does not fit into R2’s emmc without hacks to the official downloads page. Gary or whoever, please don’t do that in the future.

(Frank W.) #54

they simply not check the size…i assume that they use a 8GB SD which is a bit smaller than emmc and make a dd from it

you’ll find instructions in my wiki how to install a Operating System from scratch

  • burn preloader+uboot
  • create partitions
  • install debootstrap of debian (same way should work for ubuntu)
  • install kernel you want (4.4 with hdmi, 4.14 with port-separation), uploaded 4.4.118 and 4.14.22 today :wink:

(peter.r.volkov) #55

Shrinked image was written to emmc, but nothing is being loaded from emmc. Only RGB leds are glowing after restart. Though this shrinked image is working from SD. :thinking:

(Frank W.) #56

have you make “pconf 0x48” in uboot and burned preloader to boot0-block?


(peter.r.volkov) #57

have you make “pconf 0x48” in uboot

no. Is uboot included in ubuntu image? How do I start its console? Can it be made from terminal with mmc-tools you mentioned in http://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:storage#install_os_on_emmc ?

(Frank W.) #58

Uboot is included and started before kernel is loaded. You can access it with debug-uart.

mmc-tools i’ve mentioned are imho only for reading, did not find out how to write pconf yet

(peter.r.volkov) #59

mmc-utils shows that Boot config bytes is 0x0. Have no uart adapter to attach via uart, bad luck. No other way to set Boot configuration bytes?

(peter.r.volkov) #60

I did it with mmc-utils:

mmc bootpart enable 1 1 /dev/mmcblk1

found this solution at http://linux-mmc.vger.kernel.narkive.com/iqgrQyiF/mmc-utils-boot-enable-conflict-with-mmc-blk-part-switch

Now ubuntu image is being loaded from emmc. Thank you

eMMC partition information, mmc-tools on a live system
(Frank W.) #61

Nice,can you look if partition config is now 0x48 and if this stays active after reboot/preloader-flash?

(peter.r.volkov) #62

Yes. It is persistent. System loads well after poweroff, and Boot configuration bytes aka PARTITION_CONFIG == 0x48

(Frank W.) #63

Ok,thank you,thats an alternate way for users having problems entering uboot-console (missing uart cable or similar) and want to use emmc. Will add this to my wiki

(Günter) #64

Concerning booting from EMMC I see the setting of the flash be changed to writeable. My question is, after the image is programmed, can I set the flash back to be read only or are there log files that need to be written to the flash?

So my question is, shouldn’t there be a

echo 1 > /sys/block/mmcblk1boot0/force_ro

at the end?



(gary) #65

Don’t need to make it to be read-only, because the setting is not persistent.


@garywang, where can I download your script that builds ubuntu and creates the img file from scratch?

(Frank W.) #67

I guess there is no script…you can try this adapted to ubuntu: https://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:debian


Thanks @frank-w, the instructions cut off at the point where you create the emmc image from the built binaries? I’m looking to see what is everything that gets pulled into the image.

(Frank W.) #69

You create a bootable system with exising sd-image and replace rootfs with debootstrapped system…after that you make simply a dd (reversed way like flash img to sd/emmc). After that you can mount that img and clear unnecessary things like loga


If VLAN is not working, any other method to implement switch function among the 4 LAN ports? plus, WAN/LAN segregation working but WAN is unidentified.