TonyMac32 Posted June 6, 2017 Posted June 6, 2017 I'll be off work shortly and can do a quick and dirty test after I look over the file. I was able to build Tinker board images using their main repo (not the "miniarm" one) following some instructions on tinkerboarding.co.uk , perhaps following those instructions but replacing the DTS with your own for a test?
TonyMac32 Posted June 7, 2017 Posted June 7, 2017 What kernel is this from? This looks interesting, lots of rk3188 references. Most of these "compatible"s I'm unfamiliar with, I think this will take someone writing a dts using this one as an information source. Interestingly, Pastebin is telling me to "learn something new in 2017". I think I've accomplished that... [edit] http://freaktab.com/forum/tv-player-support/rk3288-devices/ugoos-3288-devices/513884-rabian-debian-8-distribution-on-ut3s Claims the rock2 distros seemed to be compatible, gives somewhere to start on dts's since those are in the mainline if anyone is motivated. using that and the old dts you should be able to get something running reasonably quickly.
jeanrhum Posted June 7, 2017 Posted June 7, 2017 Rock2 images are no more available on Radxa servers. I saw in the same thread that firefly images seems to be also compatible. There is an ubuntu 16.04 image from may 2017. Most of these images should be flashed to emmc instead of running directly from sd card. Is there a procedure to change such images and run them directly from a sd card? Or is it possible to burn (eg. with etcher) them and it just works?
TonyMac32 Posted June 7, 2017 Posted June 7, 2017 Not as far as I know, the emmc and sd formats are a bit different. What I was intending to point out is that device trees for the Radxa devices are available in the kernel sources, so for the industrious experimenter building an image using the Armbian build system should not be difficult. My comparison of the shared decompiled dts and the 4.12 dts show the hardware to be very similar, I'll see if I get smoke by just substituting dtb's.
jgeisler Posted June 9, 2017 Posted June 9, 2017 The dts on pastebin is from the ugoos dualboot firmware v3.1 from 2015. On their blog it says that it features a Ubuntu 15.04 but no mention of the kernel version. uname -a says "Linux Ugoos_box 3.10.0 #44 SMP PREEMPT Thu Jul 30 15:21:59 HKT 2015 armv7l armv7l armv7l GNU/Linux". Libreelec was also ported to the UT3 http://www.cnx-software.com/2017/02/23/libreelec-is-now-running-on-ugoos-ut3-rockchip-rk3288-tv-box/. In the build_rk3288_ugoos-ut3s.sh on https://github.com/omegamoon/LibreELEC.tv it says PROJECT=Rockchip_rk3288 ARCH=arm DISTRO=MoonRock DEVICE_TREE=rk3288-ugoos-ut3s make rkimage But in the repo I could nowhere find the rk3288-ugoos-ut3s.dts or dtb.
TonyMac32 Posted June 12, 2017 Posted June 12, 2017 3.10... Man, knowing the work of art the 4.4 kernel is, I can only imagine what the source for that looks like ;-)
Myy Posted June 13, 2017 Posted June 13, 2017 @Peba were able to boot a Ugoos system using MiQi DTS and kernels. Few things didn't work well however. He blogged about it here : http://www.bitkistl.com/2016/10/ugoos-ut3-devices-with-firmware-from.html So, you might be able to use MiQi's DTS file as a start and solve the few remaining issues through trials, errors and DTS editing. It sounds painful and, yet, it might easier than trying to extract AND adapt DTS files targeting 3.10 kernels from random Android kernel images. Note that ARMbian already apply a few patches to MiQi's DTS files. These patches are available here : https://github.com/armbian/build/tree/master/patch/kernel/rockchip-dev Note that the Rockchip's maintained 4.4 kernel has DTS files named 'rk3288-box' which might also help : https://github.com/rockchip-linux/kernel/blob/release-4.4/arch/arm/boot/dts/rk3288-box.dts
Shimon Posted June 14, 2017 Posted June 14, 2017 On 6/13/2017 at 2:37 PM, Myy said: @Peba were able to boot a Ugoos system using MiQi DTS and kernels. Ugoos boxes are Linux ready OOTB, what about the topical cheapos though? I received one of those about a month ago but haven't even had time to unpack it
Myy Posted June 14, 2017 Posted June 14, 2017 10 hours ago, Shimon said: Ugoos boxes are Linux ready OOTB, what about the topical cheapos though? I received one of those about a month ago but haven't even had time to unpack it Well, you might want to try recompiling a kernel using the rk3288-box.dts to generate a DTB file. And then... 'May the source be with you, Shimon'
TonyMac32 Posted June 15, 2017 Posted June 15, 2017 If my reading over the boot method of these devices is correct, you should be able to trigger it to boot from an SD card via shorting a couple wires together, I think the UT3S uses that recovery button to do it. Similar buttons probably exist on the cheapies. 1
Shimon Posted June 15, 2017 Posted June 15, 2017 Thanks @TonyMac32 , that was exactly the gist of my question
jgeisler Posted June 15, 2017 Posted June 15, 2017 I flashed my UT3S now as described here: http://www.bitkistl.com/2016/10/ugoos-ut3-devices-with-firmware-from.html It does work out of the box really well, just as described in the above link. I even got hw accelerated video in Chromium youtube. FWIW, here is the dmesg: https://pastebin.com/0GvM8Rfa What is really interesting is that it boots via extlinux. That means that the dtb is a file in the file-system (/media/your_user_name/1E81-4CCA/). Here is the decompiled dtb, that came with the miqi image: https://pastebin.com/8j6qEgM1
James Kingdon Posted June 16, 2017 Posted June 16, 2017 6 hours ago, jgeisler said: I flashed my UT3S now as described here: http://www.bitkistl.com/2016/10/ugoos-ut3-devices-with-firmware-from.html It does work out of the box really well, just as described in the above link. I even got hw accelerated video in Chromium youtube. FWIW, here is the dmesg: https://pastebin.com/0GvM8Rfa What is really interesting is that it boots via extlinux. That means that the dtb is a file in the file-system (/media/your_user_name/1E81-4CCA/). Here is the decompiled dtb, that came with the miqi image: https://pastebin.com/8j6qEgM1 That's great news, I'll have to give that a go. Let's hope we can figure out how to get the fan working.
jgeisler Posted June 21, 2017 Posted June 21, 2017 I finally found the dts that omegamoon created for running openelec with a 4.4 kernel on a ugoos ut3(s/+?): https://github.com/omegamoon/linux-rockchip-kernel/blob/release-4.4/arch/arm/boot/dts/rk3288-ugoos-ut3s.dts It look very much like the one that came with the miqi image: https://pastebin.com/apRfExC3 It has a wireless-wlan and a wireless-bluetooth node, Some words in linux,phandle, phandle, [xzy]-supply, pinctrl-0, power-domains, iommus, remote-endpoint, phys, ddc-i2c-bus, rockchip,pins, gpios, sound-dai and dmas are different The serial@ff180000 is configured a bit differently tsadc@ff280000 is status "okay", instead of "disabled" dmc@ff610000 and syscon@ffac0000 are missing ddr-sram@1000 in bus_intmem@ff700000 is missing, Can anyone tell me if it might be safe to try to use this dts with the miqi image on my UT3S? (I boot from eMMC via extlinux, so I could just exchange the dtb in the filesystem). Would I risk not being able to boot anymore or not being able to reset the dtb to the currently working one? BTW: I'm trying to live my normal desktop life with the UT3S w/ miqi image and it works quite well so far. Only Xorg crashes once in a while and sends me to the login screen. No audio from the AV jack and no bluetooth.
James Kingdon Posted June 22, 2017 Posted June 22, 2017 Can you get into uboot and mount the eMMC as usb storage? I would expect that to happen before the dtb is involved, so if you can see the filesystem where the dtb is stored via uboot then you should have a means to replace it if the new one doesn't boot. (but you're way ahead of may in practical terms, so don't take my word for it!)
jgeisler Posted June 22, 2017 Posted June 22, 2017 Getting into uboot probably means to go via the serial interface? I have not yet cracked the box open. So, maybe I'll wait a little longer, or I try to figure out if the miqi image allows booting from sd and try it from there, or I feel luck and just give it a go.
James Kingdon Posted June 24, 2017 Posted June 24, 2017 Yes, you'd need the serial port hooked up. I've never managed to get uboot into interactive mode so I don't know how it works in practice after that.
jgeisler Posted June 26, 2017 Posted June 26, 2017 Lazarus! I felt lucky, but I wasn't, then came the serial console and I brought me back. After a bit of research I decided that it should be safe to boot the miqi image with the openelec UT3 device tree. I found out that all the different phandl, pinctrl-0, power-domains, iommus, remote-endpoint, phys, ddc-i2c-bus, rockchip,pins, gpios, sound-dai and dmas etc. - values are just some kind of pointer that can change from one run of dtc from dts to dtb and back so, the rk3288-ugoos-ut3s.dts only has the whole RAM configuration dropped, added wireless configuration, enabled temperature sensors, added debug console FIQ? So, I copied the compiled dtb to the boot file-system and edited extlinux.conf to use it. Reboot. Black screen. No way to reach the device via network. So off to some more learning. I took my ceramic cooktop-scraper, cracked open the box and connected the wrong pins (that suspicious looking 3-header is not the serial port). Fortunately, http://www.bitkistl.com/2015/04/ugoos-ut3s-first-impressions.html has us covered, except he doesn't mention to run the serial at 115200bps. Finally I got this rather nice boot log https://pastebin.com/Bhd7UKKd that leaves me wondering what went wrong. Wanting to go back to the old config, I interrupted u-boot autostart and told it to "ums mmc 1" which let me connect the OTG as a USB stick with the eMMC data of the UT3 on it. Connected this to my other PC, edited extlinux.conf back to use the old dtb, reset, and back I am writing this post on the UT3 (with the lid off and some wires hanging out). I guess, now I have to learn a bit more about device trees, before I start my next adventure.
James Kingdon Posted June 26, 2017 Posted June 26, 2017 Well recovered! I would have guessed the unpopulated header for the serial port too, I wonder what it is for.
EkSeL Posted July 9, 2017 Posted July 9, 2017 First, I have to thank @jeanrhum for posting the UT3S deal. Thanks! I have managed to boot my UT3S via SD card with the MyyQi kernel and the rootfs from the Miqi Armbian image without making any changes to the internal eMMC. My UT3S came with U-Boot 2014.10-RK3288-02 (Nov 10 2014 - 03:41:49) and I have not done any firmware updates. Here are the steps that I took: Follow this guide to creating a bootable Arch Linux ARM SD card. Make sure your UT3S will boot with it. The toolchain used in the above guide is too old to compile a mainline kernel. I used the gcc-linaro-5.4.1-2017.05-x86_64_arm-linux-gnueabihf toolchain which can be downloaded from here: https://releases.linaro.org/components/toolchain/binaries/latest-5/arm-linux-gnueabihf/ Download the MyyQi build script. At the top of GetPatchAndCompileKernel.sh I replaced the CROSS_COMPILE line with the following: export TOOLCHAIN_PATH=/path/to/toolchain export CROSS_COMPILE=${TOOLCHAIN_PATH}/gcc-linaro-5.4.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- export LD_LIBRARY_PATH=${TOOLCHAIN_PATH}/gcc-linaro-5.4.1-2017.05-x86_64_arm-linux-gnueabihf/lib:${TOOLCHAIN_PATH}/gcc-linaro-5.4.1-2017.05-x86_64_arm-linux-gnueabihf/libexec/gcc/arm-linux-gnueabihf/5.4.1 export PATH=${TOOLCHAIN_PATH}/gcc-linaro-5.4.1-2017.05-x86_64_arm-linux-gnueabihf/bin:$PATH Run GetPatchAndCompileKernel.sh The output should go to /tmp/MyyQi Do the following to write a bootable SD card: cd archlinux-firefly ./firefly-rk3288-kernel/mkkrnlimg /tmp/MyyQi/boot/zImage kernel.img ./firefly-rk3288-kernel/resource_tool /tmp/MyyQi/boot/rk3288-miqi.dtb ./bin/rockchip-mkbootimg/mkbootimg --kernel kernel.img --ramdisk initrd.img -o linux-boot.img # Remove links to firefly kernel rm create-linux-sdcard-usb/boot-linux.img rm create-linux-sdcard-usb/kernel-linux.img cp linux-boot.img create-linux-sdcard-usb/boot-linux.img cp kernel.img create-linux-sdcard-usb/kernel-linux.img cp resource.img create-linux-sdcard-usb/resource-linux.img cd create-linux-sdcard-usb sudo ./create-linux-sdcard-usb You should now have a bootable SD card with MyyQi kernel but no rootfs. Download the Miqi Armbian image and follow this guide for how to extract the rootfs from an Armbian image. Important: Make sure your rootfs image has the label "linuxroot". Copy firmware and modules from MyyQi kernal to rootfs image: cp /tmp/MyyQi/lib/* /path/to/rootfs/image/lib Write the rootfs image you have created to USB. If you would prefer to have the rootfs on the SD card you are using for booting: Copy the "create-linux-sdcard" script from the Linuxium RK3288 tools to archlinux-firefly/create-linux-sdcard-usb. Write SD card with rootfs: cd archlinux-firefly/create-linux-sdcard-usb ln -s /path/to/rootfs.img linux-rfs.img sudo ./create-linux-sdcard Put SD card (and optionally USB drive) in UT3S and power on. 2
James Kingdon Posted July 10, 2017 Posted July 10, 2017 Thanks for writing that up EkSel, much appreciated. My cable for flashing the emmc still hasn't arrived, so being able to try this on an sd card is a big help
jgeisler Posted July 11, 2017 Posted July 11, 2017 After some more failed attempts and a lot of reading on how the device tree works, I have now a dts file that boots clean with the miqi image on my UT3S. https://pastebin.com/eAWqkf9j https://pastebin.com/ZD4CRbRE (edit: now with phandle links instead of numbers) It should provide wifi and bluetooth but I some how cannot get them to work. Maybe the kernel lacks the drivers? Further it should utilize the fan in the thermal zones for the cpu an gpu. But that does not work either, the fan is not even listed as a cooling device. Turning the fan on via its GPIO works though. Edit: here https://cateee.net/lkddb/web-lkddb/ROCKCHIP_THERMAL.html it says "Rockchip thermal driver provides support for Temperature sensor ADC (TS-ADC) found on Rockchip SoCs. It supports one critical trip point. Cpufreq is used as the cooling device and will throttle CPUs when the Temperature crosses the passive trip point." Can that be? At least the temperature sensor is now enabled an can be read. What is still missing are the IR input, the audio jack, the power button, the power led and the RTC and probably some other stuff too. But at least I know now a bit more about how it all works.
debianxfce Posted July 12, 2017 Posted July 12, 2017 8 hours ago, jgeisler said: It should provide wifi and bluetooth but I some how cannot get them to work. Maybe the kernel lacks the drivers? This box runs ubuntu factory ready, so why tinker it more...Anyway, using armbian distribution build scripts and make ARCH=your_arm_cpu xconfig, it is easy to make a bootable microsd card image. The dts file must match to the linux/drivers/pincontrol and other device drivers. See the driver source code open,init, bind or attach functions and read the linux/Documentation folder. A expensive box this is, 86 euros at gearbest,com. Only 32-bit quad core cpu. Sunvell T95Z Plus does cost 50 euros and it has 8 core 64-bit cpu.
chrisf Posted July 12, 2017 Posted July 12, 2017 1 hour ago, debianxfce said: Only 32-bit quad core cpu. Sunvell T95Z Plus does cost 50 euros and it has 8 core 64-bit cpu. The rk3288 has much better single thread performance. It's faster than an S912 and an A17 does more per clock cycle than an A53 A quad core A17 at 1.6G would similar in mutli-threaded applications than a 8 core A53 at 1.5G in most cases
jgeisler Posted July 12, 2017 Posted July 12, 2017 3 hours ago, debianxfce said: This box runs ubuntu factory ready Well Ubuntu Vivid is quite dated. The miqi image (and Armbian soon?) gives me accelerated desktop and accelerated video in chromium (1080p on youtube with h264ify). And the box cost me only 36€.
jgeisler Posted July 12, 2017 Posted July 12, 2017 1 hour ago, chrisf said: A17 does more per clock cycle than an A53 Talking of this, did anybody notice that the dts for all the rk3288 boards state that is compatible = "arm,cortex-a12";? Does that make any difference?
debianxfce Posted July 12, 2017 Posted July 12, 2017 20 hours ago, chrisf said: The rk3288 has much better single thread performance. It's faster than an S912 and an A17 does more per clock cycle than an A53 A quad core A17 at 1.6G would similar in mutli-threaded applications than a 8 core A53 at 1.5G in most cases So one test at cnxsoft says. But in a real work 64-bit and 2x more cores is faster with Linux, because symmetric multitasking and memory use. I did buy some rk3xxx quad core tvbox over year ago and returned it, because it could boot only 2 of 10 times. It was very expensive then, over 100 eur. Also it is easy to make Debian testing Xfce work with Sunvell T95Z Plus.
chrisf Posted July 12, 2017 Posted July 12, 2017 3 hours ago, jgeisler said: Talking of this, did anybody notice that the dts for all the rk3288 boards state that is compatible = "arm,cortex-a12";? Does that make any difference? I doubt it, the A12, 15 and 17 are all similar. All VFPv4, all have virtualisation support, all are ARMv7, all have 128bit NEON
TonyMac32 Posted July 12, 2017 Posted July 12, 2017 IIRC, they are A12's but ARM called them A17 due to the performance level.
James Kingdon Posted July 13, 2017 Posted July 13, 2017 18 hours ago, debianxfce said: So one test at cnxsoft says. But in a real work 64-bit and 2x more cores is faster with Linux, because symmetric multitasking and memory use. It really does depend on the specific use case and the particular hardware being compared. A lot of tasks will have a significant component that is single threaded that will benefit from a faster single core speed, and a lot of 8 core SOCs are asymmetric which poses an additional layer of complexity for parallel work-loads. I was running a benchmark on an XU4 last night and realised that the threads were running in lock-step, so the slow cores were throttling the fast ones. I got better throughput by restricting the benchmark to just the 4 fast cores. If you have a large number of independent jobs then more cores work well (provided there's sufficient total memory bandwidth), but that tends to be more a server style of workload than a typical SBC case. Of the 8-way boards, the NanoPi M3 works the best for me so far, as long as I can stay within the 1G ram budget. Can't wait to get that running 64 bit.
Recommended Posts