Image larger than flash

I’m trying to “burn” this image 2017-09-04-ubuntu-16.04-mate-desktop-bpi-r2-sd-emmc-v1.2.0.img onto the onboard flash of my R2. However dd never finishes as the image is larger than the flash onboard.

So booting from internal flash is not working… How can I get my R2 to boot without SD card?

Thank you in advance!

Check the filesize of the extracted image. It should not greater then 7456 MB =~ 8 GB.

The official image is: 7,948,206,080 bytes - more than what can fit on the onboard flash. The “preview” and smaller image do fit but will still not boot (only from SD).

Can you please have a try another image(0801)?

I tried “burning” the preview image into the onboard flash. The size of this image is exactly the same as flash, so everything is good. However the board will still not boot up from internal flash.

Has ANYONE actually succeed in booting from flash?

@Jan_Thogersen: have you tried to follow the steps described in Can't boot from emmc ?

Something is odd here. I downloaded the docker-preview image and followed the steps to write it to flash. However I can’t get the uboot command emmc to work. In the guide it says that when uboot enters the prompt it will say “BPI-R2>” which seems logical - however my uboot says “BPI-IoT>” and won’t respond to the emmc command.

Do I have the wrong uboot and from where is the uboot loaded? Is it on the SD card og already in flash?

Any help is appreciated!!

You see the “BPI-IoT>” because you’re using the Ubuntu image, you have to use the LEDE image to be able to enter the emmc command. After that you can copy the Ubuntu image again on the emmc.

Thank you!!! Now it boots from emmc.

Do you know what the emmc pconf 0x48 changes? I can’t find u-boot manual describing it.

where can i get the emmc-command (without using lede) to use it in debian/ubuntu?

can you make a tutorial, how to install an OS to emmc (which is not an emmc-img). maybe using current system on SD-Card (e.g. debian)

As said by @garywang the emmc command will be added to the Ubuntu github repository too:

Why is the emmc commands not available on the ubuntu image? I checked the u-boot configuration and the flags are set: CONFIG_SUPPORT_EMMC_BOOT and FEATURE_EMMC_BOOT_MODE

Would it be possible to burn the ubuntu image to internal emmc, then use the LEDE image to enter u-boot and change the pconf and then boot ubuntu on emmc? I tried but it does not boot…

I really really need ubuntu on the internal flash…

See comment before yours…it will be added…but it’s not done yet. Give gary time to add it :slight_smile:

@garywang how can uboot manually relaced (dd or similar)?

My point is, if someone could point me in the right direction, then maybe I could implement it. It looks like the subset of commands are in the code and are compiled into the u-boot image, however it’s not available when booting the image.

I tried inserting a #error in the specific emmc code and it broke the compilation. So it should be there… but isnt.

Guys, the emmc command was already added 6 days ago to the Ubuntu git repository:

way to write uboot seems to be here:

(sudo dd if=/dev/zero of=${TMP_FILE} bs=1M count=1) >/dev/null 2>&1 #TMP_FILE for LO is 1MB
LOOP_DEV=`sudo losetup -f --show ${TMP_FILE}`
(sudo dd if=$PRELOADER of=${LOOP_DEV} bs=1k seek=2) >/dev/null 2>&1
(sudo dd if=$UBOOT of=${LOOP_DEV} bs=1k seek=320) >/dev/null 2>&1

is the preloader for emmc and sd the same? how about the size? how to backup uboot before writing it?

(dd if=${TMP_FILE} of=${IMG_FILE} bs=1k skip=2 count=1022 status=noxfer) >/dev/null 2>&1 #LO-FILE (1M) will be written (from beginning) to img-file skipping the first 2 kB in output (partition table)

so if i backup the the first 1M of SD-card i will be safe, right?

writing only uboot must be that:

dd if=$UBOOT of=${SD_DEV} bs=1k seek=320 skip=2


I have done it here: How to update uboot without bpi-update