I have be playing around with this board for some time now. I got the serial port to work somewhat under Linux, can +q to get to the ymodem to try and load the 2 required file for booting (At least thats what I can parse from the docs): RTD1296_hwsetting_BOOT_4DDR4_4Gb_s1866_padding.bin
dvrboot.exe.bin
When I try the ymodem it never really completes, hang minicom util.
I was able to build the sdcard as doc’ed, but I think the above flash has to be done, no?
Any help would be great and appreciated. Otherwise I may try sending it back. Waste of $100.
seeing as kernel 4.9 can boot from SD alone I guess it might be possible to leave drvboot.exe.bin out.
Not sure about hwsetting.
I would try getting XP VM and use hypertrm (not sure if it would work under wine … worth a shot before deploying virtualbox / kvm / whatever)
I have tried with minicom on ubuntu machine when TeraTerm (hypertrm alternative on win7) failed.
I ended up downloading hypertrm and corresponding .dll file to run it under win7 - minicom failed same way as TeraTerm …
Am headed in that directions…I have a version of windows I can install. Will dual boot my machine with w7 and linux and give it a try.
BTW I tried building the sdcard with opensuse and mint - both were missing the static compiled /usr/bin/qemu-aarch64-static .
Then I tried Fedora distro and everything except minicom (flashing failed) worked. Just for the record. I appreciate your post. I really don’t like windows but I’ll give a try with hypertrm.
Is there anyone out there that has gotten a linux distro with hypertrm like software to work flashing the emmc or spi chips? I’m having a ton of trouble getting a laptop that came with win8 to reinstall windows.
this writeup makes sense and is clear from -
"Ubuntu
How to make and run the 64-bit ubuntu 16.04 on SD card 2018-4…
…
"
I was able to build the sdcard, BUT what’s ambiguous is the first section that has you tftp’ing. Its unclear whether I need to do that at al if I want the a bootable Ubuntu. If I do get this all to work I’ll write up what I did and post what I think is clear and straight forward. Sorry, but I feel I’ve spent a lot of time on getting a linux distro to boot. I have no need for an Android or Openwrt for this hardware. Thanks much for responding!
I did download win-10 and will add hypertrm and try. It would be great if the loaders could just discover the sd card and boot it. Of coarse I’m probably guilty of disliking microsoft and not having a copy I can use, VMwise or DualBoot.
I’ll also try 4.9, without flashing and see if it works.
I’m now committed to writing steps that work for this board for me, I’ll hope others can use.
4.9 boots fine with sw4 on position 1.
uImage + bluecore + dtb should be not in root of p1 but in full tree available in .tgz (bananapi/xxxx/yyy - forgot exactly where)
In my setup I ended up having set for kernel 4.4 in root of SD p1 and 4.9 in that full path.
With uboot provided in Ubuntu package flashed to emmc (sw4 on 0 boots from root of SD) and new uboot from 4.9 commit flashed on SD card (sw4 on 1 boots SD card as described above)
I flashed full package as described in guide to get Ubuntu (package linked in guide is 4.4) and from there it was sw4 on 0 to use.
Installed bpi-tools found on GitHub.
When kernel 4.9 showed up on GitHub I did bpi-update -c bpi-w2.conf
Tool downloaded whole commit and unpacked it wherever needed.
At that point I thought directory structure on SD p1 was mistake and I moved files to root of p1 - no boot at all.
Put 4.4 in root of SD p1 and try again.
There is another tool bpi-bootselect or sth.
Used it with uboot file found in bpi-w2.conf and new uboot got flashed to SD.
From now on - sw4 1 boots with that new uboot on SD (kernel 4.9)
Setup windows PC runs serial terminal tool like hypertrm (see 1…9).
Connect the serial port between the host and the board correctly using
Debug Uart pins, relevant parameters (115200, 8N1, none - I think this
means non hardware control),
press “ctrl+q” then to power on the board, and when this screen appears
’ d/g/r ', it can be released.
Input “h” and send hardware configuration binary files
(RTD1296_hwsetting_BOOT_4DDR4_4Gb_s1866_padding.bin)
in Y-modem mode on the terminal side.
Wait for the transfer to complete, then input below in console:
s98007058
01500000
Input “d” and send u-boot binary files (dvrboot.exe.bin)
in Y-modem mode on the terminal side.
Wait for the transmission to complete. Enter “g” then the
u-boot will be programmed to the EMMC automatically.
Using fdisk tool to create two partitions in SD card:
format the first partition as FAT32 (no less then 100M),
and the second partition as ext4. (mark 1st partition as bootable)
Copy the three files: bpi-w2.dtb, uImage, bluecore.audio to the
first partition.
Copy the all files in root filesystem which just built by us to the second
partition using root privilege:
cp -a rootfs/* /media/xxx/sdxx/
sync
Eject the SD card and insert it to the W2 board, on your own now
When tools are installed you can just use them for pretty straight forward updates.
1st one (when booted via sw4 on 0) to point to SD card for operations (mmcblk0 is internal at this point):
bpi-update -c bpi-w2.conf -d mmcblk1
this will get config file and all files mentioned there, unpack files for p1, set kernel modules on p2 …
then you can just run this:
bpi-bootsel
it will list uboot images available on your board and how to use it.
For some reason -c [conffile] was not working for me but it was fine when triggered manually (make sure this path is there after initial run of the command:
Power off the board, switch sw4 to 1 and boot up again. It will boot from SD with kernel 4.9.
From quick glance at tools code it looks like you will need to remove bpi-w2.conf for next release (it checks if the file is there before trying to download fresh one from github)
When booted with sw4 on 1 your SD card is mmcblk0 so that part can be left out when invoking same stuff again (mmcblk0 is default target)
Am I right in saying that the -
bpi-update -c bpi-w2.conf -d mmcblk1
will update the sdcard partition 1 (vfat) and partition 2 (ext4),
then the bpi-bootsel set the img to boot from?
Sorry, it still confuses me that I need to install to flash (emmc) a boot loader and a kernel and then install a bootloader and kernel on sdcard. Guess there are 2 levels of bootloading.
That post was before last SPI ROM update.
In the event you have booted from emmc (sw4 0) you need to specify -d mmcblk1 as target (SD) and then switch to sw4 1 (update files downloaded in the process were prepared to boot from SD)
If I remember it right there was some trick in bootloader on emmc to just do 1st step in there and then continue from SD (even with sw4 on 0 you needed sd card inserted to boot)
If you already have SPI rom updated and newest image flashed to SD that whole process is not required.
sw4 on 1 boots from SPI + SD as it was designed.
There is new thread with Ubuntu 18.04 image and there is guide how to upgrade SPI ROM.
If I remember right sw4 0 is supposed to be emmc only (bootloader and system root) and sw4 1 supposed to boot with SPI + SD.
Guide for Ubuntu 16.04 mentioned flashing uboot to emmc - that uboot was designed to boot from emmc but look for system root in SD (so you were in fact in the middle between sw4 0 and sw4 1 while having sw4 on 0)
Get etcher and flash the images to your sd with etcher. It is literally that simple. I thought I wasted 200$ on two boards until I downloaded etcher and flashed the sd card with any of the images available and set my sw4 to 0 and bam live Linux OS’s. Don’t give up on it man. It’s a good board but these programmers can’t write instructions worth a damned
Thanks…but I did give up. Its a nice board, I agree, but the doc on setting it up was pretty confusing. I did get it to install iptables, but never got the hdmi interface to work.
When I stepped back and thought about what I wanted the board for - as a internet facing router - I thought it was risky if I don’t have a good updating path on the kernel and software. I played with the board for about a month.
Sold the board on Amazon - 30$ loss - never got a response from the Chinese website I bought it on. If BPI get there infra-structure cleaned up I’d reconsider.
Not my instructions - I am user as you, not affiliated with devs here.
There was one topic here saying factory SPI rom have some bugs and it might not boot SD card with sw4 on 1 (the only setting SPI rom is actually in use). Someone had to power cycle board few times to finally complete boot process - it was freezing in the middle.
They made workaround (as in guide for Ubuntu 16.04) - flash specially cooked uboot on emmc (used when sw4 on 0) to look for kernel and root fs on SD card.
Without that workaround sw4 on 0 is full system load on emmc - no matter if you have SD plugged or not.
Now I am not sure about uboot in guide for 18.04 (if there is any designed for emmc) but if your board boots SD while sw4 is on 0 that is workaround in place.
I am glad it is working for you, but it is not 100% sure it will work for others. Always worth a shot though.