Received Your Orange Pi One Board? You’ll Need to Tweak Your FEX File / script.bin

[Update: I’ve been informed that for some unknown reasons the voltage regulator outputs 1.3 and 1.5V instead of 1.1 and 1.3V on Orange Pi One with the settings and FEX file below, which could lead to overheating, and possibly damage the board under heavy load. A workaround is available here]

[Update2: And the temperatures reported by the kernel are wrong (too low), so it’s better not to use the higher voltage at all. More details and tests @ http://forum.armbian.com/index.php/topic/617-wip-support-for-the-upcoming-orange-pi-one/page-4#entry5261]

Orange Pi One is arguably the cheapest ARM Linux development board with networking available today for $9.99 plus shipping. It is very similar to Orange Pi PC with an Allwinner H3 quad core Cortex A7 processor, Ethernet, and HDMI, but has less memory as it comes with 512MB RAM instead of 1GB, and comes with a few less features too. The bad news is that Shenzhen Xunlong did not release any new firmware for Orange Pi One so far, but the good news is that Orange Pi PC firmware files work on Orange Pi One board.

Click to Enlarge
Orange Pi One (Click to Enlarge)

However, there’s an important hardware modification between Orange Pi PC and Orange Pi One, as SY8106A voltage regulator used in the former is controlled via I2C, while the former as a simpler SY8113B adjustable through GPIO, so thermal throttling wont work by default, and you’ll get plenty of error messages in the log that look like:


So Thomas, a developer and member of sunxi-linux community, looked into it and found that all you needed to do what to modify cooler_table and dvfs_table sections in the FEX file used to configure the hardware based on Allwinner processors:


So the new and lower cost PMIC only supports 1.1 and 1.3V which will let the processor run up to 648 MHz and 1.2 GHz respectively. The chart below shows the number of active CPUs, CPU voltage and CPU frequency (right scale), CPU usage in percent and SoC temperature (left scale) over about 20 minutes. In the first part the system is made to switch between , and after sysbench and cpuburn-a7 utility running, and showing how the system decreases the frequency, then voltage, then number of cores used as the temperature gets to close to 90 C.

Orange_Pi_One_CPU_Frequency_Voltage_Chart

If you just want something that works, you’ll just need to replace script.bin in the FAT partition of the SD card after you flash the firmware. I don’t own have the board to test, but I created Orange Pi One FEX file from the Orange Pi PC one, with modification from Thomas (See comments below) and generated the corresponding script.bin, which you need to rename and copy to your bootable SD card.  This will most probably soon be included in the latest community firmware releases. You can experiment with FEX files (text) and script.bin (resulting binary) using sunxi-tools in Linux.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus

30 Replies to “Received Your Orange Pi One Board? You’ll Need to Tweak Your FEX File / script.bin”

  1. Four things to mention: The SY8113B is not a real PMIC but just a simple voltage regulator that will be adjusted via resistors which will be driven through GPIO from the H3’s internal AR100 OpenRISC core (that acts as an internal PMIC replacement in some way).

    You should better regenerate script.bin based on this fex file (contains some fixes regarding unnecessary high load due to misconfigured USB port for example): https://github.com/ThomasKaiser/lib/blob/master/config/orangepione.fex

    For reasons unknown to me the new script.bin shows not that good results when used together with loboris/Xunlong OS images (maybe since they rely on Allwinner’s u-boot from 2011 where these fixes also have to be applied). When combined with mainline u-boot (as the preliminary Armbian builds for H3 do) the temperatures are way lower.

    Currently the Armbian team is working on full support for the various H3 models and it’s always a good idea to monitor the respective thread in our developer section: http://forum.armbian.com/index.php/topic/617-wip-support-for-the-upcoming-orange-pi-one/?view=getlastpost

  2. tkaiser :
    For reasons unknown to me the new script.bin shows not that good results when used together with loboris/Xunlong OS images (maybe since they rely on Allwinner’s u-boot from 2011 where these fixes also have to be applied). When combined with mainline u-boot (as the preliminary Armbian builds for H3 do) the temperatures are way lower.

    Its due too CPU governor setting set to Interactive in loboris images.

  3. @yovio
    Hmm… I’ve also configured ‘interactive’ in Armbian and I get:

    I still have no clue where the differences originate from (maybe different code/calibration and in reality temperatures are identical — I don’t have a thermometer to check so I solely rely on the internal read-out that’s also used for ‘budget cooling’)

  4. With the old linux kernel there used to be a lot of swapping going on, and that was with 1gig of ram.
    Does anyone know if this has been fixed with the new mainline kernel, especially with boards with 1/2 gig of ram?
    Is it possible to access this board through a serial/usb cable somehow? or do people just use ssh?
    Thanks for all the good work by the Armbian team.

  5. This is why one shouldn’t cheap out. Spend the extra $25-$27 and buy a RPi2 or Odroid-C1. Believe me that extra money is more than worth it as it saves you all of these headaches.

  6. I actually think 1/2 gig of ram should be ample.
    I remember writing code on a Palm Tunsten E with 32mbytes of ram. I used Superwaba, a java interpreter that runs on Palms, and I never ran out of ram on a large application that I wrote for it.
    If 1/2gig of ram is not enough ram then I wonder whether something has gone wrong in the Linux world. I think Android is a bit of a mess. Some of those inexpensive smart watches could easily run apps if only the Android OS wasn’t so bloated. To run Android on a watch it needs gigs of ram, or so it seems.

  7. I agree with invest a bit and go for Raspberry Pi. No one can beat it at all.

    No more pain for development because Raspberry Pi has a very large community to support and go beyond any competitors can catch up.

  8. @Nz1
    My research showed that kswapd issue was due to enabled CMA. If you lower the amount of memory allocated to CMA, the issue (almost) goes away. You can actually disable CMA and you won’t have the issue. However, in that case, Linux won’t be able to use this memory for anything other than framebuffer and video decoding.

    You must know that, at the time, CMA wasn’t part of the kernel. Allocating big chunks of memory to CMA was later recognized as a problem and there are some suggestions how to fix that (https://lkml.org/lkml/2014/5/7/810), but I’m not sure if they did anything about that in the mainline kernel.

  9. @Iridiumsat
    Sorry to say but you’re reading the wrong site if you wanted no “pain for development”.. maybe you haven’t noticed but this site is about presenting new platforms and pushing the status quo.

    Raspberry Pi isn’t that good anyway and has plenty of problems. Also in value terms this H3 board is kicking its butt.

  10. @cnxsoft
    “boot_clock” isn’t used by the kernel but Allwinner’s u-boot (Armbian relies on mainline u-boot and you would’ve to compile/replace u-boot/SPL for changes to take effect). But it defaults to 1008 so we left it at this value and generally refrain from ‘overclocking’.

    Regarding the kswapd issue: We don’t experience this using a different kernel branch than the usual kernel used on H3 boards: https://github.com/O-Computers/linux-sunxi/commits/h3-wip

    In the meantime we applied tons of fixes to the kernel (3.4.39 –> 3.4.110) so now all the patches for the older Allwinner SoCs are useable with H3 too. Within the next few minutes I’ll also add support for the Orange Pi Lite.

  11. Added important update at the top of the post, as something wrong with the voltage (too high), and better stick to using the lower voltage settings only.

    The latest Armbian images should fix this.

  12. @Mark Birss
    This is fixed in the meantime. Please visit the Armbian forum (see link in first comment) to get a clue how to fix this yourself (just a modification of boot.cmd), how to upgrade the image to a newer version (experienced people only) or check when to expect updates. We prepare 5.02 releases at this time already. Please don’t expect too much at the moment. For headless use the image is already fine but desktop stuff will take some time…

  13. Sorry, only very slightly off-topic…

    The “ASIC ERROR” and “ASIC WARING” messages filling up the SD card is also a problem for the latest Armbian Ubuntu (Xenial – Armbian_5.14_Nanopim1_Ubuntu_xenial_3.4.112.7z) release for the NanoPi-M1 (first cousin to the OP).

    The quick fix I used was to modify the /etc/default/cpufrequtils file and change MIN_SPEED from 240000 to 480000, then reboot. The messages go away and there’s a CPU temperature drop of 10~20C as the throttling starts working again.

  14. @PuceBaboon
    Thanks for bringing this to our attention (I added NanoPi M1 support to Armbian without physical access to such a board). In case you’re familiar with bin2fex/fex2bin you could adjust lines 733 and 743 in the fex file and try to replace all 480 MHz entries with 240 MHz again (NanoPi M1 is somewhat prone to overheating).

    But since FriendlyARM contacted me recently and is preparing to send out a few dev samples of NanoPi NEO I’ll have a look into next week, we will then provide an update for M1 too and then the problem will disappear by simply doing the usual ‘apt-get update/upgrade’.

  15. hi tkraiser,

    thanks for insulting me on cnx software’s website…. tho i am still looking for an answer.

    i know you’re a very knowledgeable tech. since knowledge is power, mind to enlighten me with details on how to turn off verbose on the orange pi.

    thanks.

    i have deeply searched the web for an answer, no luck.

    i have found ‘similar’ info for other PIs on other os, but no matter what i type on search engines, NOTHING comes up on the topic BUT QUESTIONS. if you have the answer, please kindly post it, so i can in return help others.

    thank you for your time tkraiser.

  16. @jp theroux

    Perhaps you are asking wrong questions at wrong place? You are asking a questions which are related to closed source boot loader which is not supported by community. You need to ask Allwinner Corporation – wish you luck.

    There is no grub.

  17. Thank you very much for your work man! Confirmed, just replacing the script.bin file worked flawlessly on the OPi One!

  18. @Moze
    That’s odd that you still had to do this after one year. The change should have already been implemented in the firmware. Where did you download the firmware image?

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC