BPI-R2 new Image:Ubuntu-16.04-mate-desktop-bpi-r2-sd-emmc-v1.2.0.img.zip 2017-09-04


(gary) #1

BPI-R2 new Image :2017-09-04-ubuntu-16.04-mate-desktop-bpi-r2-sd-emmc-v1.2.0.img.zip

WIFI working fine and boot from eMMC flash.

V1.2 Release notes

  1. About this release

    This release is for banana pi R2 board which is based on MTK7623N, and it just includes Ubuntu image which is based on Ubuntu 16.04.2 LTS Mate Desktop with Linux kernel 4.4.70, we can get the Linux kernel 4.4.70 from the link https://github.com/BPI-SINOVOIP/BPI-R2-bsp.

    The file system is based on Ubuntu 16.04.2 LTS Mate Desktop, the default user name/password are pi/bananapi , root/bananapi.

  2. What’s new in this release

    1. Support HDMI audio

    2. Support onboard WIFI module(MT6625), The wifi interface is enabled by default in latest image which is released by banana-pi please use command “echo 0>/dev/wmtWifi” to turn it off and use the command “echo 1>/dev/wmtWifi” to enable it.

    3. Enable EMMC

    4. Change the DDR frequency from 1.3GHZ to 1.6GHZ

    5. Both PWM4 and PWM5 work

    6. Add the utility iperf to this image

  3. Known limitations

    1. BT isn’t supported

    2. MIPI interface doesn’t work

    3. Sometimes Linux kernel 4.4.70 can’t boot successfully

    4. Somtimes HDMI doesn’t work fine

    5. AP mode isn’t supported yet

  4. Image link:

    Google drive: https://drive.google.com/file/d/0B_YnvHgh2rwjNUFiY0F2aURxY00/view?usp=sharing

    Baidu drive: http://pan.baidu.com/s/1jH4pl5c

    md5sum: 8c554bfe1f2e84c74fc60aef298282fa


(gary) #2

boot.log (66.7 KB)

The boot log is attached, FYI


(bpi team) #3

#4

Thank you! Great work!

Does this mean AP mode will be supported in future?


(gary) #5

We see there is a code to support AP function, but looks like it doesn’t work so far, we will try to support this feature if the code provided by vendor is good to support AP.


(sunarowicz) #6

I`m trying to make Ubuntu booting from EMMC. I follow steps on how to copy Ubuntu image to EMMC here: https://bananapi.gitbooks.io/banana-pi-bpi-r2-open-source-smart-router/content/linux-image.html. But I cannot copy the image to EMMC because of not enough space there.

root@bpi-iot-ros-ai:/home/pi# bpi-copy /media/pi/Flash/2017-09-04-ubuntu-16.04-mate-desktop-bpi-r2-sd-emmc-v1.2.0.img.zip 
SRC=/media/pi/Flash/2017-09-04-ubuntu-16.04-mate-desktop-bpi-r2-sd-emmc-v1.2.0.img.zip
DST=
COPYMODE=imagetodisk
imagetodisk
bpi-copy(v1.2.1(github)), bananapi image & disk tools

Usage: bpi-copy [OPTIONS]...
       bpi-copy [ --help | -v | --version ]
       bpi-copy IMGFILE
       bpi-copy IMGDIR
       bpi-copy IMGFILE DEVICE
       bpi-copy DEVICE IMGFILE

Warning: Try to write /media/pi/Flash/2017-09-04-ubuntu-16.04-mate-desktop-bpi-r2-sd-emmc-v1.2.0.img.zip to BOOTDISK /dev/mmcblk1
==============================================================
Mon Oct 16 04:21:52 CST 2017
*** start COPY (blue led on ) .....
INFO: /dev/mmcblk1 : SD/eMMC !!
umount device: /dev/mmcblk1
==============================================================
IMGFILE=/media/pi/Flash/2017-09-04-ubuntu-16.04-mate-desktop-bpi-r2-sd-emmc-v1.2.0.img.zip
==============================================================
zip
dd: error writing '/dev/mmcblk1': No space left on device                      ]
7.28GiB 0:18:40 [6.65MiB/s] [                   <=>                            ]
0+66932 records in
0+66931 records out
***  end  COPY (blue led off) .....
Mon Oct 16 04:40:43 CST 2017
==============================================================
RUNTIME 18:51
OK!! You can remove the BOOTDISK /dev/mmcblk1 now!!

Any idea how to resolve that?

BTW: No blue LED is on during copy process.

Thx.


(gary) #7

Can you please try it with a 16GB SD card?


(Frank W.) #8

@garywang the emmc is fixed to 8GB :wink: so the image is to large for emmc

maybe you can resize the image like that: https://softwarebakery.com/shrinking-images-on-linux


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

@frank-w, yeah exactly. In fact I was not sure why @garywang advised me to use larger SD card when I try to write image to emmc. It is interesting that the same image fits fine to 8GB SD card but not to 8GB emmc. Actually only 7.28GB fits there. Couldn’t it be because I have already LEDE written to emmc? But I suppose it should be overwritten when writing new image. Or am I wrong? Should I somehow erase emmc before writing new image there? If so, how?

BTW thank you for pointing me at image shrinking. But I’m not sure if it would help me because, if I remember well, there is only approx. 0.4GB unused space on 8GB SD card after writing image there. But approx. 0.7GB is missing for writing the same image to emmc right now.


(Frank W.) #10

hi, don’t know the structure of emmc…but lede should be overridden by the new image. maybe you cannot write emmc beginning at “block 0”

as my advice, try to shrink the image (~200MB free space on root-Partition) and try again writing it to emmc

remeber 8G are not 8GB in storage hardware due to different calculations…https://en.wikipedia.org/wiki/Byte (decimal vs. binary)


(sunarowicz) #11

Thank you for the image shrinking advise. It does the trick. Now I finally boot Ubuntu from emmc! I already know why the original 8GB image doesn’t fit into 8GB emmc. It is because there is 250MB large boot partition on emmc which is used for booting instead of the boot partition on the image I suppose. For writing image to emmc there is roughly only 7.3GB of space available. Maybe except of shrinking the image the boot partition it contains could be removed (or shrinked to almost zero size) as well. Just an idea, not tested yet.

Anyway one should add the shrinking advise into the steps on how to setup booting from emmc here: https://bananapi.gitbooks.io/banana-pi-bpi-r2-open-source-smart-router/content/linux-image.html. Or even better to make the image smaller…:wink:


(Frank W.) #12

Don’t you write full sd to full emmc,only root-partition?

I see dd above writes to mmcblk1,so the full emmc…partition-layout should be same as sd


(sunarowicz) #13

Don’t you write full sd to full emmc,only root-partition?

Hmm, yes I do. I write full SD to emmc. I follow the instruction on the referenced page. Step 5 says:

5. bpi-copy /path_to_your_image/xxx.img.zip

So I so with the image that is provided on the same page… I’m sorry if I’m missing something, but there is clearly no evidence that it has to be customised image with the root partition only.:confused:

I see dd above writes to mmcblk1,so the full emmc…partition-layout should be same as sd

Yes, it was also my initial understanding that it overwrites the whole emmc with the whole SD image and preserved its structure (ie. partitions in SD image). But in the preceding step (hope already existing) emmc boot partition /dev/mmcblk1boot0 is written with the BPI-R2-EMMC-boot0-0k.img image. And this boot partition takes some 250MB from 8GB emmc. Therefore 8GB SD image could never fit in the remaining space.


(Frank W.) #14

writing a larger boot-partition needs to move root-partition.where do you have the info about boot-0k.img? => OK, Step 4 in manual behind your link “bpi-bootsel BPI-R2-EMMC-boot0-0k.img.gz /dev/mmcblk1boot0 #write once” but this is done before bpi-copy which semms to overwrite that previous bootloader. https://github.com/BPI-SINOVOIP/bpi-tools/blob/master/bpi-copy from line 311

Out of space error occours in first step (full image write). I assume that emmc is only a bit smaller than sd-image. you write direct on the pi,right? Where lies the image? You must have space for the zip on sdcard…extraction should be done direct to dd (without needing disc space).

Making the images smaller is much more work, but that prevents errors like that and reduce downloadsize and disk-space. Also on my debian image there are kernels for different devices and some old logs (full syslog from other devices).

  • unused data (other kernels,modules for other devices) can be deleted if image is only for one device.

  • personal data (users/login,homedir-content) must be cleaned

  • logs should be cleared (echo -n “”>logfile to preserve rights)

  • tmp/cache,backup-files cleared

  • free space should be overwritten by 0-bytes (no restore and better packing)

All can be done in img-file mounted as loop-device

It’s not so easy to create a public image :slight_smile:


Boot process\FreeBSD porting
(sunarowicz) #15

Yes, I write directly on BPI and have the image on USB flash.

It seems you are right that bpi-copy overwrites the whole emmc. Below is the comparison of the shrinked image file structure (first pic) with the emmc structure (second pic) after writing that image with bpi-copy into it.

Structures are the same. Then I really don’t understand why my first attempt on writing the original (not shrinked) 8GB image failed because out of space error as soon as only some 7.3GB has been written. At that point there still had to be some 0.7GB space available on emmc. And I also don’t understand why bpi-bootsel step nr. 4 has to be done when the next bpi-copy step overwrites what it does. Strange…

But never mind. Thanks to you I can shrink image and write it on emmc when I need.

Thx!


(Frank W.) #16

you can look at devices size (windowtitle in your screenshots or fdisk-command)…i think emmc is a bit smaller than sd.


(sunarowicz) #17

Frank, you are right. EMMC is really smaller than the original SD image 2017-09-04-ubuntu-16.04-mate-desktop-bpi-r2-sd-emmc-v1.2.0.img (not shrinked). Even more I compared it with the previous Ubuntu Mate image and with Raspbian image too. All these are the same size as emmc! See the sizes below:

emmc									7818182656 bytes
2017-09-04-ubuntu-16.04-mate-desktop-bpi-r2-sd-emmc-v1.2.0.img		7948206080 bytes
2017-08-01-ubuntu-16.04-mate-desktop-preview2-bpi-r2-sd-emmc.img	7818182656 bytes
2017-09-14-raspbian-stretch-preview-bpi-r2-sd-emmc.img			7818182656 bytes

So only the image I intended to write into emmc cannot fit there… But I already know how to shrink it so no problem anymore.


BPI-R2 Ethernet Switch