Newbie questions


#1

To boot a Raspberry-Pi we need only to write the system on a SD card, insert the cartd in the SD and power ON. But for BPI-W2 things seem more complicated. The code must be written to SPI flash.

Many doc tell something like: Connect the serial port between the host and the board correctly… or connect USB to serial or degub port, etc

What is this port ? Is it part of the 40-pin GPIO ?

I bought DSD TECH 2PCS USB to TTL Serial Adapter but this one count 6 (4 used) pins. In the BPI-W2 doc I saw only 3 pins are used (CON2-P1 GND, CON2-P2 UART0-RX, CON2-P3 UART0-TX) is it correct ?

Is it possible to write and boot a Linux system on eMMC only (without SD card) ?

Is boot from sata SSD or USB 3 possible ?


(Yevgeniy Klymenko) #2

Nope. SPI flash for bootloader. You should use EMMC or microsd for OS.

4 pin uart near the 3 buttons(vcc not soldered).

Yeap. Just plug RX->TX, TX->RX, GND->GND U can use minicom on Linux or putty on Windows to access tty.

You can run Linux on EMMC without SD. But for partitioning, creating OS on EMMC you should run system from SD or sata, etc. Maybe you can access EMMC by USB-C with USB button. Not sure about this, not tried.

Yes. You must change root fs location in uEnv.txt .


#3

Thank a lot for your reply.

The DSD TECH 2PCS USB to TTL Serial Adapter connect well to board (I can the boot console output [below]). Next I want install ubuntu but I cannot get “debug menu” http://wiki.banana-pi.org/Getting_Started_with_BPI-W2 tell:

press “ctrl+q” then to power on the board, and when the screen appears’ d/g/r ', it can be released;

other tell:

Holding on press “ctrl + q” and power on board,after the screen show “d/g/r”,then loose “ctrl + q

or:

start BPI-R2 — !!! press power button for 10 seconds !!!

(assume “power button” is the one on the board)

but I never get the “debug menu”

Any idea ?

The bpi-w2 work well. I can get these info from Settings Model: Realtek Kylin 32-bit QTT_NAS Android version: 7.1.1

At the startup the uart console show the output:

[    0.114304] bl31_set_memory_protect 
INFO:    Non-Secure Boot or 1295 IC_REV >= B00 : no action !! 
[    0.123909] bl31_set_memory_protect ret = 0 
[    0.160666] ****** rtk_lockapi_init 619, chip: id=0x00000000, revision=0x00030000
[    0.169123] ****** rtk_lockapi_init 626, bypass mode
[    0.242978] rtk-usb-power-manager 98000000.rtk_usb_power_manager: rtk_dwc3_u2host status is okay
[    0.252915] rtk-usb-power-manager 98000000.rtk_usb_power_manager: ehci status is okay
[    0.261757] rtk-usb-power-manager 98000000.rtk_usb_power_manager: ohci status is okay
[    0.270594] rtk-usb-power-manager 98000000.rtk_usb_power_manager: rtk_dwc3_u3host status is okay
[    0.287353] rtk-usb-power-manager 98000000.rtk_usb_power_manager: create_debug_files
[    0.782544] [RTD129x PCIE Slot2] 9803b000.pcie2: PCIE device has link down in slot 2
[    0.791299] [RTD129x PCIE Slot2] 9803b000.pcie2: rtk_pcie2_hw_initial fail
[    1.016118] [RTD129x PCIE Slot1] 9804e000.pcie: PCIE device has link down in slot 1
[    1.024765] [RTD129x PCIE Slot1] 9804e000.pcie: rtk_pcie_hw_initial fail
[    1.036434] rtk119x-ir 98007000.irda: [rtk119x_ir_probe]: can't get multiple support from dtb, set to default->not support

[ROS: openRPC() intr_scpu_dev_r buf  0x00e2ffa1 s  0x00e2ffa1 e  0x00e4ffa1 i  0x00e2ffa1
[ROS: openStubRPC() intr_w buf  0x00e6ffa1 s  0x00e6ffa1 e  0x00e8ffa1 i  0x00e6ffa1[AVCPU] Set Debug level flag  0x8fc4de74 *flag  0x0fc38ef8 ucache  0xafc38ef8 
[AVCPU] Set Debug level *ptrDebugFlag  0x00000001 


......


[    1.832231] card->mmc_avail_type = 0x00000013 
[    1.843050] Inherit bootcode tuning phase: TX=0xf, RX=0x13
[    1.893780] rtk-dwc3-type_c 98013200.rtk_dwc3_drd_type_c: create_debug_files
===== OpenWRT + Android =====
[    2.448264] hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    2.650518] usb usb1-port1: port 1, status 0101, change 0000, 12 Mb/s
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level


......


ext4 etc mounted!
mount: /dev: filesystem mounted, but mount(8) failed: No such file or directory
[    6.181380] init: could not import file '/init.lighttpd.rc' from '/init.kylin.rc': No such file or directory
[    6.702883] init: Failed to read from /dev/hw_random: No such device
[    6.709698] init: could not open /dev/keychord: No such file or directory
[    6.728290] init: do_start: Service watchdogd not found
[    6.787483] init: Failed to read from /dev/hw_random: No such device
[    7.519475] Do not detect the SDIO card and close the clock
[    7.525249] rtk_sdmmc_get_cd: SD card does not exist, regCARD_EXIST = 0
[    7.529927] jnl: version magic '4.1.35-04005-g6c2818e-dirty SMP preempt mod_unload aarch64' should be '4.1.35-04005-dirty SMP preempt mod_unload aarch64'
[    7.534599] jnl: version magic '4.1.35-04005-g6c2818e-dirty SMP preempt mod_unload aarch64' should be '4.1.35-04005-dirty SMP preempt mod_unload aarch64'
[    7.538060] jnl: version magic '4.1.35-04005-g6c2818e-dirty SMP preempt mod_unload aarch64' should be '4.1.35-04005-dirty SMP preempt mod_unload aarch64'
[    7.540709] jnl: version magic '4.1.35-04005-g6c2818e-dirty SMP preempt mod_unload aarch64' should be '4.1.35-04005-dirty SMP preempt mod_unload aarch64'
[    7.918521] init: /recovery not specified in fstab
[    7.924577] init: do_start: Service debuggerd64 not found
[    8.413980] init: SELinux:  Could not stat /data/dalvik-cache/arm64: No such file or directory.
[    8.422960] init: SELinux:  Could not stat /data/dalvik-cache/mips: No such file or directory.
[    8.431954] init: SELinux:  Could not stat /data/dalvik-cache/mips64: No such file or directory.
[    8.441039] init: SELinux:  Could not stat /data/dalvik-cache/x86: No such file or directory.
[    8.450133] init: SELinux:  Could not stat /data/dalvik-cache/x86_64: No such file or directory.
[    8.605605] init: insmod: open("/system/vendor/modules/jnl.ko") failed: No such file or directory
[    8.616273] init: insmod: open("/system/vendor/modules/ufsd.ko") failed: No such file or directory[AVCPU] Set Debug level flag  0x8fc4914c *flag  0x010c07b0 ucache  0xa10c07b0 
[AVCPU] Set Debug level *ptrDebugFlag  0x00000000 
[    8.684726] init: cannot find '/system/bin/install-recovery.sh' (No such file or directory), disabling 'flash_recovery'
[    8.702260] init: cannot find '/system/bin/jpuinit' (No such file or directory), disabling 'jpuinit'
[    8.703547] init: couldn't write 4132 to /dev/cpuset/camera-daemon/tasks: No such file or directory
kylin32:/ $ [    8.739149] init: cannot find '/sbin/verity_kylin.sh' (No such file or directory), disabling 'verity'
[   17.370565] init: no such service 'regService'
[   17.375288] init: no such service 'regService'
[   18.208773] r8169 98016000.gmac eth0: rtl_csiar_cond == 0 (loop: 100, delay: 10).
[   18.217772] r8169 98016000.gmac eth0: rtl_csiar_cond == 1 (loop: 100, delay: 10).
[   18.744223] audit: rate limit exceeded
[   20.418691] init: avc:  denied  { set } for property=ctl.xen_tcp_server pid=7130 uid=0 gid=0 scontext=u:r:realtek:s0 tcontext=u:object_r:ctl_default_prop:s0 tclass=property_service permissive=1
[   21.030920] audit: rate limit exceeded
[   22.803683] audit: rate limit exceeded
[   23.638914] init: avc:  denied  { set } for property=tmp.exec_ubus pid=6749 uid=1000 gid=1000 scontext=u:r:system_app:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service permissive=1
[   23.839550] init: avc:  denied  { set } for property=tmp.exec_ubus pid=8507 uid=0 gid=0 scontext=u:r:realtek:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service permissive=1
[   23.857996] audit: rate limit exceeded

#4

this board boots as soon as you plug in power barrel (power button is not required).

if you wish to go this route this is how it goes:

hold ctrl+q while having your terminal opened and ready to get console output and power on the board after that.

another thing is - this guide you are following is old. there is perfectly working SD image that might just work for you without all that hassle

try this:


#5

I am completely lost with BPI-W2…

I try to install bpi-tools to burn a SD card following the instructions from

but uart console don’t have sudo command !

When I try to install bpi-tools on my Ubuntu system I got this error at sudo bpi-tools --upgrade

/usr/bin/bpi-tools: line 36: curl: command not found

bpi-copy is there but fail with: /usr/bin/bpi-copy: line 117: pv: command not found

???

Does Android on BPI-W2 have a terminal and how to access the terminal ?

What can we do with this Android ? For me Android is totally useless !


#6

if you log in with root / bananapi to console you have all permissions required - sudo is not needed.

simple apt-get install is enough

On ubuntu:

sudo apt-get install curl pv

If it will complain about other command not found try sudo apt-get install whatever it will complain about

Generally what you need is to get bpi-w2.img written on SD card:

you can either burn W2 ubuntu image to SD from your own laptop with bpi-copy or via any other means (dd command , image burning software …) - no matter laptop OS

burn image to SD on your laptop (similar way as you did for raspberry), plug SD into bpi-w2, switch SW4 (next to 40pin header on bpi-w2) to ‘1’, plug power

you are on ubuntu now ;]

I have used this tool on windows (not from this website - this one is for ubuntu):

Android do not have google services (or any other app store ) installed. To get any app you need to transfer .apk manually (usb / network / SD) and install from there.

You can always install 3rd party store like xda-lab / apkmirror / whatever via .apk, and rest from there - like on your smartphone (android is android after all - platform does not matter)


#7

Thank you. With yours explanantions I was able to bpi-copy image to burn SD card.

W2 linux image web page show:

If your board startup log print “SPI ROM:20180907”, then you don’t need to update spi rom.

But the capture log from uart don’t have anuthing started with “SPI ROM” How to get the spi rom version ?

I can boot the lastest Ubuntu (2018-09-16-ubuntu-18.04-mate) but this one has HDMI problem. At the boot time uart show many lines:

[AO][_AO_if_video_HDMI_mode]HDMI not enabled

After may reboot I was able to get the desktop playing with cntl-alt-Fx and alt-Fx (cntl-alt-F7 don’t show the desktop) but I was not able to reproduce the process to get desktop even after retry many time!

2018-09-17-debian-9-stretch-mate work well except it was slow. Is it normal ?

What is the purpose of the 3 buttons: Power Key, Reset Key, LSADC Key ? I read LSADC Key involve u-boot but I don’t know what to do with this. The Power Key must show something at startup when hold for 10 seconds but I have never notice naything.


#8

I do not recall having SPI ROM version prior to upgrade either.

There is a guide about upgrading SPI rom here on the forum. Just remember that plugging usb-c to your laptop will boot this board taking power via USB cable (no need barrel plug)