Jump to content

[WiP / Orange Pi One] Support for the upcoming Orange Pi One?


tkaiser

Recommended Posts

Regarding TV. I  my old 42" LG in 60Hz mode I have access to an option to choose TV or PC. TV uses overscan and PC regular full screen 720p.

By the way - would it be possible to make native 1360x768 fex (or 1366x768) because in reality majority of HD Ready displays are not 1280x720 but rather use this higher resolution LCD.

Link to comment
Share on other sites

What is the difference between OPiPC and OPiOne versions - only script.bin file or kernel is modified too?

 

The image is the same. We implemented board detection in armhwinfo and adjust settings on 1st boot in firstrun. We've tested this the last days at least 30 times and it worked very well. Only if the first automated reboot will be interrupted this can happen.

 

What we don't do is alter any settings afterwards. That means if you booted a new image the 1st time on an OPi PC then the cpufreq settings for the PC are written to /etc/default/cpufreq-utils and never changed later even if you then use the SD card to boot an OPi One (also hostname will not be adjusted and also script.bin won't be touched).

 

What you reported before seems to indicate that just that happened since with orangepione.bin you aren't able to exceed 1200 MHz since it's not allowed in the cooler_table settings.

 

At least I feel not very comfortable introducing even more automatisms that overwrite settings on every reboot therefore we decided that this auto detection happens only on the first boot since for changes to take effect it needs another reboot.

 

Anyone testing with different Oranges should be aware that then settings might not fit if the same SD card is used for different devices (you would've to alter the contents of /etc/default/cpufreq-utils prior to the reboot and also exchange script.bin). BTW: When testing I made the strange experience that my Orange Pi One switched to the higher voltage when we decreased the minimum cpufreq. That's why we chose 648 MHz now as minimum and not 480 MHz as on PC (where further decreasing the cpufreq makes some sense since we can work there with way more dvfs operating points and also further decrease voltage a bit -- on the One it should make no difference whether it idles at 480MHz or 648 MHz since voltage is more important. But I made then the exprience that for whatever reasons the higher voltage was chosen therefore limiting minimum settings to 648MHz improves consumption -- sounds strange, I know).

 

BTW: You seem to be the 3rd one with strange thermal effects on the One or maybe other users aren't just reporting enough.

Link to comment
Share on other sites

In case you can spend some time on further investigation it would be great if you could grab 

OrangePI_Ubuntu_Vivid_Mate.img.xz and update_kernel.sh from this mirror http://filez.zoobab.com/allwinner/orangepi/mega/ (or directly from loboris' Mega/GD). Burn his image (instructions and logon credentials), start it, run his update_kernel.sh and then either apply my fix for the Orange Pi One or directly overwrite his script.bin with ours, install RPI-Monitor again, reboot and report the thermal values you get then.

qdRoKue.png

i would say, similar behavior...

 

new highscore. 92° celsius :D

Edited by kripo
Link to comment
Share on other sites

would it be possible to make native 1360x768 fex (or 1366x768)

 

Nope, you would've to patch the sources before. Please be aware that the sun8i kernel sources we're currently using with H3 are missing literally hundreds of fixes the community made for sun7i (A20) already years ago. In the orangepi forums you'll find threads how to redefine HDMI modes (IIRC for 4:3 resolutions like 1024x768 and 1280x960) so that after patching sources you might use HDMI mode 2 for 1360x768 for example.

 

Being able to correctly deal with EDID would make much more sense IMO (these sun7i patches arent't applied yet and I fear that the core devs care that much since we're using the boards mostly headless)

Link to comment
Share on other sites

BTW: You seem to be the 3rd one with strange thermal effects on the One or maybe other users aren't just reporting enough.

I think people are not testing it enough.

Regarding OPi board switching - you could provide the script in the system to do this, then reboot, and SD can be used with other board with new settings.

Link to comment
Share on other sites

new highscore. 92° celsius :D

 

I won! ;) I used cpuburn-a8 to heat a Pine64+ up to 105°Ca few hours ago (then I stopped the cpuburn-a8 tasks since I have only 2 Pine64 to play with)

 

Regarding OPi board switching - you could provide the script in the system to do this, then reboot, and SD can be used with other board with new settings.

 

Then the next one is asking why the OS image he downloaded for Marvell Clearfog does not run when inserting the card into a Banana Pi ;)

 

I understand fully your concerns since it seems enticing to switch SD cards between OPi PC and One (in fact Xunlong tells users to do so, they simply renamed their download section for the PC to One/PC with causes all sorts of troubles on the One due to different voltage regulator and default 'up to 1.6 GHz' settings -- but their users are clueless, they fried their boards happily with wrong dvfs/thermal settings for months -- why should that change now with the One?).

 

But we already thought about that and maybe we'll add a check for a mismatch between board and actual settings (printing out a warning from motd at login for example). But definitely not for Orange Pi PC vs. One and now. We support a wide variety of boards and the Oranges are definitely not the most important ones. This will be a generic approach but not a quick hack (we already implemented too much of them to get support for H3 in this short time).

 

Anyway: If you plan to exchange SD cards between both types of boards simply exchange/relink script.bin and adjust the minimum cpufreq settings in /etc/defaults/cpufreq-utils prior to switching the card (I did that the last weeks maybe 50 times or even more).

Edited by wildcat_paris
tkaiser, you are kidding me... 121°C with kernel 4.2 on OdroidXU4... automatic system shutdown... no cooling with kernel... thanks Hardkernel :)
Link to comment
Share on other sites

Regarding TV. I  my old 42" LG in 60Hz mode I have access to an option to choose TV or PC. TV uses overscan and PC regular full screen 720p.

 

Changed but not active until next release. Thx.

 

Speaking of release: Igor just uploaded trusty/desktop Armbian 5.04 images: http://www.armbian.com/download/

Edited by wildcat_paris
added Armbian, can be confusing with Ubuntu 15.04
Link to comment
Share on other sites

Wrong Trusty image for orange pi pc/2, someone have put orangepi+ image insted on website :)

 

Would you mind to elaborate on the real problem you face? The links from the download section seem to be all correct and the only real difference between the 5.04 build for Plus and the other H3 boards is Ethernet initialisation at 1st boot. If you take an image for the Plus and run it on 2/PC/One (or vice versa) then the first automated reboot will fail since the kernel crashes with dubious mmc messages shortly before rebooting. But if you manually power cycle the board after the 2nd boot everything should just be fine.

 

@wildcat_paris would you please create an own H3 section in Debian / Ubuntu to redirect user questions from this developer thread?

Link to comment
Share on other sites

Hello,

 it is me again asking stupid questions. I am runnnig armbian 5.04 on an Orangepi Pc.  I have setup a headless mpd server that is working fine with sound on 2 channels via hdmi. For one of the next Kernels is it possible to get

# CONFIG_SND_SUNXI_SOC_DAUDIO0_INTERFACE is not set
# CONFIG_SND_SUNXI_SOC_DAUDIO0_PUBLIC_MACHINE is not set

set to "y" ? :)  I will change the fex/bin Files myself to get sound via i2s working.

 

The next stupid question: I am trying to setup lirc , how can i prevent " Cubietruck automatic lirc device detection" from running ? Every time my hardware.conf is destroyed...

 

Thanks in advance.

 

Regards

Link to comment
Share on other sites

For one of the next Kernels is it possible to get

# CONFIG_SND_SUNXI_SOC_DAUDIO0_INTERFACE is not set
# CONFIG_SND_SUNXI_SOC_DAUDIO0_PUBLIC_MACHINE is not set

set to "y" ? :)  I will change the fex/bin Files myself to get sound via i2s working.

 

Please grab kernel_5.04_I2S_enabled.tgz (md5sum 015343ab41aac843bc5149b681b3db72), install the contained debs using 'dpkg -i *.deb', setup I2S in script.bin, reboot, get everything working and start a new thread in the H3 section with a mini tutorial showing also your settings so that we can add I2S support starting with 5.05.

 

Thx!

 

PS: No idea about lirc unfortunately

Link to comment
Share on other sites

Changed but not active until next release. Thx.

Thanks. Recently I reviewed your fex files for One. Could you please not remove extra USB settings from OPiOne/Lite fex files? Those USBs exist on the PCB and I plan in the future to solder mini WiFi dongle directly to data lines (because I don't want to wait for Lite release).

 

I have a question - how to read from the system current CPU voltage? Is it available anywhere in /sys/class*?

Link to comment
Share on other sites

Could you please not remove extra USB settings from OPiOne/Lite fex files? Those USBs exist on the PCB and I plan in the future to solder mini WiFi dongle directly to data lines (because I don't want to wait for Lite release).

 

Ah, that's interesting. Ok, you create a mini tutorial showing how/where to solder such a dongle (with at least one nice picture) in the new H3 section and we're reenabling then USB ports for One/Lite (and also USB IRQ distribution accross CPU cores -- improves I/O performance under high load) in default settings for the next release. Deal?

 

BTW: Starting with 5.04 sunxi-tools are installed on all images by default. Therefore bin2fex/fex2bin are always there. Wo chose to install it even on other platforms than Allwinner/sunxi since bin2fex/fex2bin might be useful there too and the also included sunxi-fel tool can be used to boot other sunxi devices through USB (another example demonstrating how sunxi-fel speeds up development for new sunxi boards):

 

 

 

tk@pine64plus:~$ sunxi-fel 
Usage: sunxi-fel [options] command arguments... [command...]
	-v, --verbose			Verbose logging

	spl file			Load and execute U-Boot SPL
		If file additionally contains a main U-Boot binary
		(u-boot-sunxi-with-spl.bin), this command also transfers that
		to memory (default address from image), but won't execute it.

	uboot file-with-spl		like "spl", but actually starts U-Boot
		U-Boot execution will take place when the fel utility exits.
		This allows combining "uboot" with further "write" commands
		(to transfer other files needed for the boot).

	hex[dump] address length	Dumps memory region in hex
	dump address length		Binary memory dump
	exe[cute] address		Call function address
	read address length file	Write memory contents into file
	write address file		Store file contents into memory
	ver[sion]			Show BROM version
	clear address length		Clear memory
	fill address length value	Fill memory

tk@pine64plus:~$ sudo sunxi-fel ver
[sudo] password for tk: 
AWUSBFEX soc=00001680(H3) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000 

(Pine64+ able to boot an Orange Pi One without SD card inserted over USB -- might be more interesting the other way around, building a cluster using a bunch of Pine64+ without SD cards booted through USB from an OPi One)

 

 

 

EDIT: Since the H3 has no PMIC support there's no way to read out this stuff (this is normally done using an ADC in the PMIC that is accessible through I2C).

Link to comment
Share on other sites

@tkaiser,  many thanks for the files Your work is excellent . At the  moment it is working, sound is decent with my cheap i2s Dac but i had to use some dirty tricks, i am using an old .bin file. I think the gpio pins are sorted in a different way on armbian..

 

Before i am writing a small tutorial i will have a look at the pins..

 

Regards

Link to comment
Share on other sites

Ah, that's interesting. Ok, you create a mini tutorial showing how/where to solder such a dongle (with at least one nice picture) in the new H3 section and we're reenabling then USB ports for One/Lite (and also USB IRQ distribution accross CPU cores -- improves I/O performance under high load) in default settings for the next release. Deal?

 

Done: http://forum.armbian.com/index.php/topic/755-orange-pi-one-adding-analog-audio-out-tv-out-mic-usb-and-ir-receiver/

For installation photos I will need to wait until my dongle arrives from China.

Link to comment
Share on other sites

Done: http://forum.armbian.com/index.php/topic/754-orange-pi-one-adding-extra-usb-ports/

For installation photos I will need to wait until my dongle arrives from China.

 

Thx, am I'm allowed to use your photo also in the linux-sunxi wiki?

 

And can please any of the mods here make cbm801's and maybe the h3disp thread pinned in the H3 forum?

 

How about SoC current voltage? I mean to obtain this value same way as RPi Monitor?

 

As written above. Since there's no PMIC with support for ADC to measure real voltage/amperage I don't see a chance on any H3 board. RPi-Monitor for H3 already tricks when it's about the voltage. I trust in script.bin settings and use a calculated voltage that should match the specific dvfs operating point. On the other H3 boards that use SY8106A the value could theoretically being read through I2C but it seems RSB is used and at least I've never been able to even see the SY8106A using i2cdetect (on the One no way, it's just a dumb step-down converter)

 

BTW: Someone sent me an email that it should be possible according to schematics of both OPi PC and One to use already passive PoE (providing power through the 2 unused Ethernet cable pairs). I asked Steven/Xunlong about this feature weeks ago and Steven refused to implement it. So I gave it a try before, using a passive PoE injector: Neither works it with nor fries it the One.

 

BTW: Your request for enhancement is already implemented and will be available with the next release. But we're still thinking about a way to do this more generic and working with all the boards we support.

Link to comment
Share on other sites

Thx, am I'm allowed to use your photo also in the linux-sunxi wiki?

 

And can please any of the mods here make cbm801's and maybe the h3disp thread pinned in the H3 forum?

Yes, sure.

 

Regarding voltage - how to read it even like RPi tries to deduce it?

Link to comment
Share on other sites

As written above. Since there's no PMIC with support for ADC to measure real voltage/amperage I don't see a chance on any H3 board. RPi-Monitor for H3 already tricks when it's about the voltage. I trust in script.bin settings and use a calculated voltage that should match the specific dvfs operating point. On the other H3 boards that use SY8106A the value could theoretically being read through I2C but it seems RSB is used and at least I've never been able to even see the SY8106A using i2cdetect (on the One no way, it's just a dumb step-down converter)

Regarding PMIC, there is maybe some patch for Mainline that are coming : https://lkml.org/lkml/2015/2/24/207

(I found that while searching for plain I2C patches)

Link to comment
Share on other sites

Regarding voltage - how to read it even like RPi tries to deduce it?

 

You mean the value when you query on an original RPi in Raspbian the following:

vcgencmd measure_volts core

No idea, maybe they do also no real measurements but calculate it by a formula based on the dvfs operating points? Maybe I still don't understand what you're asking for but at least it should be clear that we've no way to really measure anything on the H3 boards without additional hardware and an ADC in between.

Link to comment
Share on other sites

No idea, maybe they do also no real measurements but calculate it by a formula based on the dvfs operating points? Maybe I still don't understand what you're asking for but at least it should be clear that we've no way to really measure anything on the H3 boards without additional hardware and an ADC in between.

I can read current cpu freq and temperature so I'd like to find out CPU voltage at current freq even if it is not properly measured. Just to check it during testing other Linux distros.

Link to comment
Share on other sites

I can read current cpu freq and temperature so I'd like to find out CPU voltage at current freq even if it is not properly measured.

 

This is what my RPi-Monitor for H3 approach is doing from the very beginning. I started with loboris' images and tried to get a clue why this H3 has to get so freaking hot. And the answer was: Overvoltage. But please keep in mind: It's just reading out the script.bin settings and real voltage might differ.

Link to comment
Share on other sites

LOL, I think I now know why Armbian still doesn't include this patch. I thought a few hours ago 'damn, you forgot to include an important patch', tried to apply the patch from your repo just to realise that compilation breaks (I tried it already two times in the last few days). This time I submitted the patch disabled so others with more knowledge could have a look into.

 

Setting CONFIG_FW_LOADER_USER_HELPER should not be selected. You want kernel FW loading support, not userspace. Probably the patch would be applied cleanly if it would be applied right after updates to 3.4.110.

Link to comment
Share on other sites

Ok so my problem with new trusty desktop 5.04 image is like this:
i put fresh card into orange pi 2 and it recognize it as orange pi+
when it restart i have error gmac0 gmac0 eth0: can't find hardware.

then when i wait 2-3 minutes it start to load, i can change password and it load desktop but:

eth0 is not working, it don't want to turn off because it's showing mmc error same in dmesg info.
lsmod show that: wifi/usb/mali working

i have connect to wifi and it works.

I have download that image from orangepi 2 tab.

Link to comment
Share on other sites

Setting CONFIG_FW_LOADER_USER_HELPER should not be selected. You want kernel FW loading support, not userspace. Probably the patch would be applied cleanly if it would be applied right after updates to 3.4.110.

 

Thx! That worked.

 

@rreignier: Would please try out the new kernel package and report back if all your WiFi dongles work now?

 

Ok so my problem with new trusty desktop 5.04 image is like this:

i put fresh card into orange pi 2 and it recognize it as orange pi+

when it restart i have error gmac0 gmac0 eth0: can't find hardware.

 

Thx for the feedback. I'm asking here Orange Pi 2 users since weeks but nobody responded so far. You're the first.

 

Obviously auto board detection went wrong (none of the devs has an Orange Pi 2 so we depend on feedback from you users!) so please do the following as root to workaround your problem and provide us with the necessary informations to be able to fix it. Please do as root

ln -sf /boot/bin/orangepi2.bin /boot/script.bin && reboot

and report back whether your Ethernet issue still exists. The 'reboot' won't work, you'll get error messages regarding mmc but you can safely ignore them and power cycle the board manually. More importantly please provide us with the output of

dmesg
/bin/bash -x /etc/init.d/armhwinfo start

Please use the spoiler function here or put it on pastebin.com and post the link. 

Link to comment
Share on other sites

Hi,

 

The mini FAQ is a good idea, it is nice to have all the infos gathered in one place. There should be a link in the Download page of the different H3 boards.

 

Tonight, I have planned to test i2c and SPI but I don't have many experience on that field on Linux because until now I have mostly used libraries on the RPi so everything was working out of the box.

 

I have spent some time to understand the GPIO system. I was trying to use the classical /sys/class/gpio/gpioX structure like explained in the linux-sunxi wiki but most of the GPIOs were "busy" (only the 4, 5, 11, 12 were free and 11 and 12 drive TWI0_SDA and TWI0_SCK, respectively PA11 and PA12). Then I have figured that the GPIOs are already exported in /sys/class/gpio_sw. I found it strange that it was different than the wiki.

But with this issue, I did not have enough time to test the SPI and i2c yet. I won't be able to test them before next week :(

 

I have tested the UART1 and trying to use UART1_RTS signal to trigger a RS-485 transceiver but I have measured a 3 ms turnaround (the delay to put back the transceiver in receiver mode after the transmission) and it is too long for my application. There is no RS-485 driver for Allwinner (yet). But the UART1_RX and UART1_TX work well for classical communication.

 

I have also tried some USB Wifi dongles. The one based RT5370 works well, but the other one, an Atheros AR9271 (which is one of the only Wifi chipset with a full open source driver since Linux 2.6) did not work because the firmware htc_9271.fw was missing:

[    5.503980] usb 2-1: ath9k_htc: Firmware htc_9271.fw requested
[    5.517296] usb 2-1: ath9k_htc: Failed to get firmware htc_9271.fw

While talking about drivers, it would be nice to have the Linux USB Gadgets modules (g_serial, g_ether, g_mass_storage, g_multi) available for the OTG port. I found them very useful to connect to the board and get a serial port and network connection when the Wifi or Ethernet is not set.

On 5.04 this worked for me. I can confirm that it works now. i did not do anything special, just plugged in the usb device and thats it.

 

 

[  555.360122] usb 3-1: new high-speed USB device number 2 using sunxi-ehci
[  555.663051] usb 3-1: ath9k_htc: Firmware htc_9271.fw requested
[  555.663191] usbcore: registered new interface driver ath9k_htc
[  555.960324] usb 3-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 51008
[  556.209805] ath9k_htc 3-1:1.0: ath9k_htc: HTC initialized with 33 credits
[  556.417957] ath9k_htc 3-1:1.0: ath9k_htc: FW Version: 1.4
[  556.417987] ath: EEPROM regdomain: 0x809c
[  556.418006] ath: EEPROM indicates we should expect a country code
[  556.418030] ath: doing EEPROM country->regdmn map search
[  556.418051] ath: country maps to regdmn code: 0x52
[  556.418072] ath: Country alpha2 being used: CN
[  556.418090] ath: Regpair used: 0x52
[  556.423951] ieee80211 phy0: Atheros AR9271 Rev:1
[  556.425492] Registered led device: ath9k_htc-phy0

 

As for 3D graphics it only works as root right now. You need to fix the permissions:

in /etc/udev/rules.d create 50-mali.rules with content

KERNEL=="mali", MODE="0660", GROUP="video"
KERNEL=="ump", MODE="0660", GROUP="video"
KERNEL=="disp", MODE="0660", GROUP="video"
KERNEL=="g2d", MODE="0660", GROUP="video"
KERNEL=="fb*", MODE="0660", GROUP="video"
KERNEL=="cedar_dev", MODE="0660", GROUP="video"

Be sure that the current user is in the group video.

Link to comment
Share on other sites

On 5.04 this worked for me. I can confirm that it works now. i did not do anything special, just plugged in the usb device and thats it.

 

Hmm... then it was already enough to include the missing firmware files. Anyway: Could you please try out the new kernel with backported firmware loader patch and report back?

 

Regarding Mali: Will be fixed with the next release. Thx for your feedback. Highly appreciated!

Link to comment
Share on other sites

Just installed with sudo dpkg -i linux-* and it installed without errors. Reboot worked so everything seems to work.

 

When i plug in wifi dongle:

 

[   74.630091] usb 3-1: new high-speed USB device number 2 using sunxi-ehci
[   74.967478] usb 3-1: ath9k_htc: Firmware htc_9271.fw requested
[   74.967632] usbcore: registered new interface driver ath9k_htc
[   75.256218] usb 3-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 51008
[   75.506728] ath9k_htc 3-1:1.0: ath9k_htc: HTC initialized with 33 credits
[   75.717498] ath9k_htc 3-1:1.0: ath9k_htc: FW Version: 1.4
[   75.717527] ath: EEPROM regdomain: 0x809c
[   75.717546] ath: EEPROM indicates we should expect a country code
[   75.717570] ath: doing EEPROM country->regdmn map search
[   75.717591] ath: country maps to regdmn code: 0x52
[   75.717612] ath: Country alpha2 being used: CN
[   75.717630] ath: Regpair used: 0x52
[   75.723720] ieee80211 phy0: Atheros AR9271 Rev:1
[   75.725649] Registered led device: ath9k_htc-phy0
So for me nothing changed if you meant me with trying the new kernel.
Link to comment
Share on other sites

Just installed with sudo dpkg -i linux-* and it installed without errors. Reboot worked so everything seems to work.

 

Thx for the confirmation. Just to be sure. Can you please post the output of

zgrep CONFIG_FW_LOADER_USER_HELPER /proc/config.gz

FYI: ce04fa0 and d78dbda (rules for mali were already prepared but got somehow lost)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines