35 35
Peba

Asus Tinkerboard

Recommended Posts

Well, I'm throwing in the towel for a little bit, trying to go over the build scripts for the rockchip linux and Armbian has my head fuzzy, especially since I'm not familiar with them.  the U-Boot mainline gives no output on either UART, so for anyone wishing to experiment:

 

go to  (build folder)/lib/config/sources/rockchip.conf

 

replace the original:

if [[ $BOARD == "tinkerboard" ]]; then
	BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
	BOOTDIR=$MAINLINE_UBOOT_DIR
	BOOTBRANCH="branch:master"
fi

with

 

if [[ $BOARD == "tinkerboard" ]]; then
	BOOTSOURCE='https://github.com/rockchip-linux/u-boot.git'
	BOOTDIR='u-boot-rk-linux'
	BOOTBRANCH="branch:release"
fi

Like I said before, this will at least get you the "Hello, I'm U-Boot" message on UART2.  Why it won't go past there I'm not completely sure yet, honestly with the number of config files all over I'm not certain of what I should be looking at.

Share this post


Link to post
Share on other sites
(edited)
13 hours ago, TonyMac32 said:

...Literally?  Oh dear...  :-D

 

To be honest, that statement was more about GPL violations with their H8 board (they thought they would be bound by an Allwinner NDA that prevents them publishing sources) and then the usual code quality since relying on Allwinner's BSP (so nothing special). With their new board it might look different: 

Edit: Both pcDuino9 and Tinker Board can be found in rockchip's wiki: http://rockchip.wikidot.com/linux-user-guide#toc0

 

The pcDuino9 is still called 'Fennec' while the Tinker Board has been renamed 2 months ago.

Edited by tkaiser
Added internal Rockchip names: fennec and minimarm

Share this post


Link to post
Share on other sites

I built the rockchip linux just to make 110% sure it worked, I'm posting from it now.  Can barely read what I'm typing, 4K output on the gui without scaling the text...

 

@tkaiser:  I assumed nothing actually shocked you, it was just a bit of fun is all.

Share this post


Link to post
Share on other sites

OK, so the U-Boot SPL is loading, but I believe it is dying when it returns to BROM, the RK3288 is not finding the actual U-boot image for some reason.  Would it be possible to post the console output from booting the MiQi?

Share this post


Link to post
Share on other sites
Spoiler

U-Boot SPL 2016.09-rc1-armbian (Feb 21 2017 - 14:09:16)
Trying to boot from MMC2


U-Boot 2016.09-rc1-armbian (Feb 21 2017 - 14:09:16 +0100)

Model: rk3288-miqi
DRAM:  2 GiB
MMC:   dwmmc@ff0c0000: 0dwmmc@ff0f0000: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
miqi init
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
1446 bytes read in 27 ms (51.8 KiB/s)
## Executing script at 00000000
U-boot loaded from SD
78 bytes read in 24 ms (2.9 KiB/s)
39172 bytes read in 53 ms (721.7 KiB/s)
4424316 bytes read in 360 ms (11.7 MiB/s)
8077688 bytes read in 629 ms (12.2 MiB/s)
## Loading init Ramdisk from Legacy Image at 21000000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4424252 Bytes = 4.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to 1fbc7000, end 1ffff23c ... OK
   Loading Device Tree to 1fbba000, end 1fbc6903 ... OK

Starting kernel ...

 


That's all what you can see on serial by default.

Share this post


Link to post
Share on other sites

Thanks Igor,

 

I was getting exactly 1 line from the serial console:

 

U-Boot SPL 2017.03-rc3-armbian (Mar 19 2017 - 14:17:16)

A question was raised about using Armbian on the tinkerboarding forum tkaiser mentioned in another thread, I put a comment as to my progress, got a reply from another user on the forum thread with a different U-boot burning procedure than is in the build script:

 

tools/mkimage -n rk3288 -T rksd -d spl/u-boot-spl-dtb.bin out
cat u-boot-dtb.bin >> out
sudo dd if=out of=/dev/sdb seek=64 conv=notrunc

(obviously /dev/sdb would be the image file in the case of the build script, I executed this directly onto the SD I had already flashed with the complete image)

 

This was a success, at least as far as the U-Boot issue is concerned:

 

U-Boot SPL 2017.03-rc3-armbian (Mar 19 2017 - 14:17:16)


U-Boot 2017.03-rc3-armbian (Mar 19 2017 - 14:17:16 -0400)

Model: Tinker-RK3288
DRAM:  2 GiB
MMC:   dwmmc@ff0c0000: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:
Error: ethernet@ff290000 address not set.
No ethernet found.
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot/boot.scr
1446 bytes read in 20 ms (70.3 KiB/s)
## Executing script at 00000000
U-boot loaded from eMMC
102 bytes read in 17 ms (5.9 KiB/s)
** File not found /boot/dtb/rk3288-miniarm **
** Unrecognized filesystem type **
** File not found dtb/rk3288-miniarm **
4668288 bytes read in 362 ms (12.3 MiB/s)
7418384 bytes read in 560 ms (12.6 MiB/s)
## Loading init Ramdisk from Legacy Image at 21000000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4668224 Bytes = 4.5 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...
=>

So, to track down the device tree issue...

 

[EDIT]   I simply knocked the ".dtb" extension off of the device tree in /boot/dtb/ and I'm at the linux command line on the HDMI output. 

Share this post


Link to post
Share on other sites

Hello from Armbian!  4K output is configured by default, however my monitor was not behaving properly.  Otherwise USB, ethernet, etc are working, And it is smoother than the ASUS tinkerOS 1.4

 

It could be that the MiQi is more robust bootloader wise, it might be able to overlook some formatting differences on the SD card where the Tinker Board cannot, my net crawling did uncover some comments to that effect concerning the Tinker Board being "inflexible".

Share this post


Link to post
Share on other sites

:-/  it won't boot again.  if I run the commands manually with the resulting SD it works perfectly (including the fix for the dtb), but it's somehow not writing to the image correctly.  Perhaps the original definition for the MiQi isn't being overridden by the one in the if block?

 

I manually followed the script and noticed "u-boot-dtb.img" was in the package, not "u-boot-dtb.bin".  Manually performing the flash using the package contents failed boot, while using the U-Boot folder directly worked.  The bin is 64 bytes smaller than the img.

 

I repeated the failed process and used the *.bin instead and the board booted.

 

[last edit]  I am testing using

dd if=$1/u-boot-dtb.img bs=64 skip=1 >> out 

To skip that header.

Share this post


Link to post
Share on other sites

@Igor, I'll check it out once I get home from work.  I only noticed because I typed the commands looking at my forum post, not at the script.  It yelled at me so I was forced to look at the filenames...:lol:

 

@Myy, yes, I saw that was one of the operating modes when the device saw no bootable media.  Is there any utility for that mode without NAND media?

Share this post


Link to post
Share on other sites

I'll play with the build later today and test, there was the question I struck out about whether or not the write_uboot_platform() function is overriding the other when the if [[$board == tinkerboard]] condition is true.  I abandoned it upon finding the image/binary difference.  

 

[edit]  Pull request in to make the write_uboot_platform in the tinkerboard if block use the .bin

 

That did not solve it by itself, I just noticed it when I took a quick look.

Share this post


Link to post
Share on other sites
17 hours ago, TonyMac32 said:

I saw that was one of the operating modes when the device saw no bootable media.  Is there any utility for that mode without NAND media?

Well, my main use of rockchip tools was to put a working UBoot, by typing ' upgrade_tool db rk3288_boot.bin ' when my MiQi was out of service, in order to be able to use UBoot commands afterwards (through a UART console). That said, I do not know if these commands can do the same on Tinkberboards.

Share this post


Link to post
Share on other sites

I tried a few odds and ends last night, I'm going to have to break out the hex editor and compare the initial image to what results when I use the commands on the SD directly.

 

[edit]

 

Somehow the u-boot-dtb.bin is still not getting into the image.  :huh:  It should be living at sector 132  according to the drive I have that boots, but was nowhere to be found in the image file.

 

... So, are you ready for this?

 

the "> /dev/null 2<&1" to snuff out the output was making it throw the entire command into the bitbucket. 

 

Pull request submitted for the change.

Share this post


Link to post
Share on other sites

Forgot to mention:  It works for me with that single adjustment.  I was trying to see if there were errors and it suddenly worked, so I turned the problem back on and back off again to verify.

 

 _____ _       _             _                         _
|_   _(_)_ __ | | _____ _ __| |__   ___   __ _ _ __ __| |
  | | | | '_ \| |/ / _ \ '__| '_ \ / _ \ / _` | '__/ _` |
  | | | | | | |   <  __/ |  | |_) | (_) | (_| | | | (_| |
  |_| |_|_| |_|_|\_\___|_|  |_.__/ \___/ \__,_|_|  \__,_|


Welcome to ARMBIAN 5.27 stable Ubuntu 16.04.2 LTS 4.4.55-rockchip
System load:   0.00             Up time:       1 hour           Local users:   2       
Memory usage:  10 % of 2011Mb   IP:            10.0.0.35
CPU temp:      45°C
Usage of /:    15% of 15G       storage/:      97% of 30G

tony@tinkerboard:~$

 

I also played with the dev release just for kicks, there is no "miniarm" or tinkerboard dtb in there, so I copied one over from my other drive and it fired right up to desktop.

 

|_   _(_)_ __ | | _____ _ __| |__   ___   __ _ _ __ __| |
  | | | | '_ \| |/ / _ \ '__| '_ \ / _ \ / _` | '__/ _` |
  | | | | | | |   <  __/ |  | |_) | (_) | (_| | | | (_| |
  |_| |_|_| |_|_|\_\___|_|  |_.__/ \___/ \__,_|_|  \__,_|


Welcome to ARMBIAN 5.27.170322 nightly Ubuntu 16.04.2 LTS 4.11.0-rockchip
System load:   1.21             Up time:       33 sec
Memory usage:  7 % of 2007Mb    IP:            10.0.0.37
CPU temp:      44°C
Usage of /:    15% of 15G


[ 7 updates to install: apt upgrade ]

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

tony@tinkerboard:~$

 

Share this post


Link to post
Share on other sites

So, with the now-working U-Boot setup, the only thing to get the Dev image with Kernel 4.11 working is a device tree for the miniarm.  Trouble is, I don't know how to go about patching that. 

Share this post


Link to post
Share on other sites

On quick comparison there are few minor differences - LEDs are wired differently, eMMC section is useless but generally it should work with MiQi dtb. Have you try?


If it works, we only need to create a patch to create this file. Put our tools into "create patches" and when prompted, create a rk3288-miniarm.dts file with adjusted LED gpio and removed eMMC. Than push resulted patch (when tested) to patches/kernel/rockchip-dev 
 

Share this post


Link to post
Share on other sites

Tinker board  on amazon.com, $69 US, MiQi, $99 US.  For the extra $30 you get RTC battery connector, 16GB eMMC, and... what else?  Not sure.

 

Actually for the eMMC, the higher price sounds justifiable.

 

Share this post


Link to post
Share on other sites
5 hours ago, richardk said:

Tinker board  on amazon.com, $69 US, MiQi, $99 US.  For the extra $30 you get RTC battery connector, 16GB eMMC, and... what else?  Not sure.

 

Actually for the eMMC, the higher price sounds justifiable.

 

 

Could Be.  For my part, however, I want to use the massive library of available hardware for the Raspberry Pi with a proper SoC.

Share this post


Link to post
Share on other sites

Hi, I also created a Image with the current armbian git builder and it's working, eth0 is working, wlan is not important at the moment.

 

Great work, thank you.

 

Share this post


Link to post
Share on other sites
On 24.3.2017 at 8:56 PM, tpc010 said:

wlan is not important at the moment

 

RTL8723BS is used on the Tinkerboard (also used on Pine64 or NextThing's CHIP) so all that's needed is throwing in a patch for the driver, adjusting DT and adding this to the board's config:

MODULES="hci_uart rfcomm hidp 8723bs"

 

Share this post


Link to post
Share on other sites
(edited)
46 minutes ago, manuti said:

And what do you think about porting to a cheep Android TVBox like http://www.enybox.com/En/product/html/?200.html ?

Is possible? Is easy? Or interesting?

 

 

i expect it will, and i suppose it will greatly depend on the quality of the kernel source provided by the  MiQi or Asus projects..

 

But i can already see that the official Rockchip git (linux kernel) is quite active.

@tkaiser will probably elaborate on that front.

 

That's another nice cheap one i see, and very good to see it has gigabit, i hope my Q8 will be as well.

Could i ask you to test the Gigabit speed quality on your android (adb or terminal with iperf or iperf3).

 

Also i don't see serial headers on your picture, did you locate it ?

It would also be nice to see if you can access command prompt i uboot.

 

But considering its price, if your Gbe tests are good, i'll probably order one of those.

 

-- edit --

 

can you tell me what's the reference of the small chip next to the mini/micro usb port ?

thx

Edited by mdel

Share this post


Link to post
Share on other sites
26 minutes ago, mdel said:

@tkaiser will probably elaborate on that front.

Nope, not interested in RK3288 :)

 

Your small chip is one of the reasons (since it's an Terminus USB2 hub, so 'shared bandwidth' which is kinda boring):

FE21.jpg

 

Regarding GbE I doubt further tests are needed (since the GbE MAC is inside the SoC and combined everywhere with an external RTL8211E PHY). If you destroy settings or at least don't care about those then you end up with something like this while everyone else reports 930-940 Mbits/sec (most probably that's iperf in 'duplex mode' vs. unidirectional -- that's always the mess with numbers flying around on the internet, without the exact test setup also mentioned they're always just 'numbers without meaning' :) ).

 

Edit: As usual with Gigabit Ethernet... settings matter: http://freaktab.com/forum/tv-player-support/rk3288-devices/21530-poor-wired-network-rate-with-rk3288-board?p=395824#post395824

Share this post


Link to post
Share on other sites
23 minutes ago, tkaiser said:

Nope, not interested in RK3288

okay well we'll have to hope that the kernel will not be tailored to very specific boards then.

rockchip-linux seems "extremely" active compared to what i can see of allwinner / amlogic, any reason why you're not interested in their socs ?

 

Right the PHY is up top near the hdmi connector then, i can never remember if those socs output directly to hdmi or not..

Okay yeah usb hub well, if you can reclaim the otg port maybe you get two hosts. Traces were kind of indicating that the usb ports were connected to the soc but well..

 

23 minutes ago, tkaiser said:

If you destroy settings or at least don't care about those then you end up with something like this

What kind of settings are you referring to ? 

I think you already told me about some timings (configuration of the PHY chip ?) and traces length but i couldn't find that post back..

 

i read on that thread "According to a user of Firefly forum , i modded the RX Delay of the gmac from 10 to 16" (he refers to the DTS file)

I also noticed while testing my poor S912 Gbe box (barely 100Mbps uplink) that trying various dtb would influence that, but did not go any further.

 

frankly i'd be perfectly satisfied with 400-500Mbps uplink (we "only" have 200Mbps net uplink here and lans are on powerline adapters almost everywhere so it'll never get that high) and 800Mps downlink..

 

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
35 35