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


Recommended Posts

BTW: Mainline Ethernet driver patch at least applied properly:

I was really happy to see the new patches come in :-)

 

Sadly sun8i-h3.dtsi seems to have disappeared. I don't know if it is missing from the kernel source or if it is added in by Armbian but it's no longer in sources/linux-vanilla/v4.4.5/arch/arm/boot/dts

 

Edit:

It does appear to be a kernel issue not an Armbian issue, I've just downloaded the last Linux tarball, extracted the dtsi file and dropped it into armbian/sources which improved things somewhat.

 

However, 0002-ARM-dts-sun8i-Add-Orange-Pi-PC-support.patch still fails. I'll look at that next.

Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

However, 0002-ARM-dts-sun8i-Add-Orange-Pi-PC-support.patch still fails. I'll look at that next.

 

Set 'KERNELBRANCH="v4.5"' in userpatches/lib.config and it should work out of the box. Montjoie's patches work against 4.5 :)

 

But regarding H3/A83T/A64 Ethernet I would watch linux-sunxi IRC closely the next days...

Link to post
Share on other sites

Set 'KERNELBRANCH="v4.5"' in userpatches/lib.config and it should work out of the box. Montjoie's patches work against 4.5 :)

 

But regarding H3/A83T/A64 Ethernet I would watch linux-sunxi IRC closely the next days...

Thanks for that, I'll try it now.

I'm assuming that that doesn't solve the missing dtsi issue though?

 

I'll keep an eye on linux-sunxi, I do read through the chats logs from time to time, they are very interesting. I have this weeks security now to digest first though :-)

 

Edit branch 4.5 doesn't appear to work either  :(

  CC      drivers/net/phy/b53/b53_phy_fixup.o
drivers/net/phy/b53/b53_phy_fixup.c: In function ‘b53_phy_fixup’:
drivers/net/phy/b53/b53_phy_fixup.c:32:27: error: ‘struct phy_device’ has no member named ‘bus’
  struct mii_bus *bus = dev->bus;
                           ^
drivers/net/phy/b53/b53_phy_fixup.c:34:9: error: ‘struct phy_device’ has no member named ‘addr’
  if (dev->addr != B53_PSEUDO_PHY)
         ^
make[4]: *** [drivers/net/phy/b53/b53_phy_fixup.o] Error 1
make[3]: *** [drivers/net/phy/b53] Error 2
make[2]: *** [drivers/net/phy] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
[ error ] ERROR in function compile_kernel [ common.sh:224 ]
Link to post
Share on other sites

Sorry, I forgot to mention that you've to move 'bananapi-r1-switch-driver.patch' out of your way to get 4.5 compiled. But Ethernet won't work (now) anyway.

Ahh ok, if I get stuck again I'll try it in a bit.

I'm mostly trying to just get SPI working at the moment, Ethernet would have been a nice bonus. I've not managed to make Armbian compile at all yet today :-( But I've just noticed that 5.06 has come thorough so I might have more luck with that :-)

Link to post
Share on other sites

I tried to make dev(4.4.6) and next(4.6-rc1) images, but they both do not work(Does not start the kernel) :(

 

DEV (4.6-rc1) : freeze when detect USB devices

 

 

U-Boot SPL 2016.03-armbian (Apr 03 2016 - 18:30:48)
DRAM: 1024 MiB
Trying to boot from MMC1
 
 
U-Boot 2016.03-armbian (Apr 03 2016 - 18:30:48 +0400) Allwinner Technology
 
CPU:   Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi PC
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
 
In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
starting USB...
USB0:

 

next (4.4.6) : File not found /boot/dtb/sun8i-h3-orangepi-pc.dtb

 

 

U-Boot SPL 2016.03-armbian (Apr 03 2016 - 19:39:26)
DRAM: 1024 MiB
Trying to boot from MMC
 
 
U-Boot 2016.03-armbian (Apr 03 2016 - 19:39:26 +0400) Allwinner Technology
 
CPU:   Allwinner H3 (SUN8I)
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
 
In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
USB4:   USB EHCI 1.00
USB5:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 2 USB Device(s) found
scanning bus 4 for devices... 1 USB Device(s) 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
2425 bytes read in 292 ms (7.8 KiB/s)
## Executing script at 43100000
0 bytes read in 231 ms (0 Bytes/s)
0 bytes read in 201 ms (0 Bytes/s)
** File not found /boot/dtb/sun8i-h3-orangepi-pc.dtb **
** Unrecognized filesystem type **
** File not found /dtb/sun8i-h3-orangepi-pc.dtb **
5260576 bytes read in 5626 ms (913.1 KiB/s)
Kernel image @ 0x46000000 [ 0x000000 - 0x504520 ]
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
SCRIPT FAILED: continuing...
 
USB device 0:
    Device 0: Vendor:          Rev: PMAP Prod: USB DISK 2.0
            Type: Removable Hard Disk
            Capacity: 7385.2 MB = 7.2 GB (15124984 x 512)
... is now current device
Scanning usb 0:1...
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-sunxi
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
No ethernet found.
=>

Link to post
Share on other sites

I am still searching for the HDMI 8 channel Output and i noticed something strange:

root@orangepipc:~# cat /proc/asound/cards
 0 [audiocodec     ]: audiocodec - audiocodec
                      audiocodec
 1 [sndhdmi        ]: sndhdmi - sndhdmi
                      sndhdmi
root@orangepipc:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=audiocodec
    audiocodec, 
    Default Audio Device
dmix:CARD=audiocodec,DEV=0
    audiocodec, 
    Direct sample mixing device

there are no sunxi specific modules. Browsing other Forums with AllwinnerBoards there are always things like:

0 [sunxicodec     ]: sunxi-CODEC - sunxi-CODEC
                  sunxi-CODEC  Audio Codec
1 [sunxisndhdmi   ]: sunxi-sndhdmi - sunxi-sndhdmi
                  sunxi-sndhdmi

I can not "unload" the "sndhdmi" module and replace it for testing with "sunxi-sndhdmi" because it is built in. Is there any way to test this?

 

Regards

Link to post
Share on other sites

I got a problem with Jessie Server on my Orange Pi One and Orange Pi PC, I even tried different USB chargers, micro SDs, connection via HDMI and SSH but the problem is still there.

 

The problem is that armbian restarts everytime after I change the root password and after the restart it promps me again to change it and so on.

Link to post
Share on other sites

@tkaiser I have downloaded (http://kaiser-edv.de/tmp/4U4tkD/Armbian_5.07_Orangepih3_Debian_jessie_4.6.0-rc1.7z) and tested the OS for orange pi pc. I just want to report there no display in HDMI port but I can connect to ssh. 

 

I also notice the login banner is bananapi m2+

 

see image http://snag.gy/18rph.jpg

 

 

I prepared 3 new test images, two for Orange Pi One/PC/2 and one for the Plus (MD5 sum and image name): http://kaiser-edv.de/tmp/4U4tkD/

 

2fe714c80d035de6035dfe04cd07b309  Armbian_5.03_Orangepi2_PC_One_Debian_jessie_3.4.110.zip

128001930a180168dff043fc11b4b634  Armbian_5.03_Orangepi2_PC_One_Ubuntu_trusty_3.4.110_desktop.zip

cbd303d71da6207e727f60c5943954ff  Armbian_5.03_Orangepih3_Debian_jessie_3.4.110.zip

71087e71c0ab226f15800b29a648ffcb  Armbian_5.03_Orangepih3_Debian_wheezy_3.4.110.zip

9459673a680eb8bfa3c33f48d4481a13  Armbian_5.03_Orangepiplus_Debian_jessie_3.4.110_desktop.zip

f20bb8476788e4b5c0f5fbd7b874e6ea  Armbian_5.03_Orangepiplus_Debian_wheezy_3.4.110.zip

ccf10f46206b916c556374aaa0378179  Armbian_5.03_Orangepih3_Debian_jessie_4.4.2.zip

1a73e031fb106eb3b96265572630c37d  Armbian_5.03_Orangepiplus_Debian_jessie_4.4.2.zip

 

EDIT: Images are available from now on at the usual location: http://www.armbian.com/download/

 

Don't try to run those for One/PC/2 on the Plus and vice versa!

 

We tried to provide a single OS image that detects on which board it's running at first boot but due to the horrible code quality of this 3.4.x kernel we got from Allwinner it seems not possible (if you're interested in details, follow this discussion TL;DR: It's not working, without further wasting more time we now plan to provide one OS image for One/PC/2 and later the Lite and a separate for the Plus)

 

Serial console is disabled there (mostly by accident and also to prevent One users from crying, they'll see prior to the first reboot countless 'ARISC ERROR' messages that will magically disappear after the first reboot). Please be patient and don't touch the system for the first 3 or even up to 5 minutes since the first boot takes longer and then an automated reboot will happen.

 

If you want to have (extensive) output on the serial console, then please edit /boot/boot.cmd so that the kernel cmd_line arguments read:

setenv bootargs "console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait rootfstype=ext4 cgroup-enable=memory swapaccount=1 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 hdmi.audio=EDID:0 panic=10 consoleblank=0 enforcing=0 loglevel=8"

Afterwards it's necessary to run

mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

In case you want to try out a kernel with CONFIG_DEBUG_BUGVERBOSE=y please download and extract kernel_5.03_h3_unified_verbose_debug.tgz and use dpkg -i *sun8i*.deb afterwards.

 

In case you want to get an idea what's going on with your board, think about installing RPi-Monitor. See a few posts/pages before or have a look at install-rpi-monitor-for-h3.sh.

 

And most importantly please keep in mind that these are test versions only. Not intended for any sort of productive use, they're just there to get feedback from you to help us improve things. Igor is out of lab this week, me then too. We just want to collect some feedback in the meantime and will release new images later that will be more user friendly.

 

In case you want to change the display resolution (720p is currently default) you'll have to tweak fex settings. You might use the h3disp script skeleton for this purpose and adjust lines 63/64, execute it (set DVIUsed=FALSE when you use no HDMI-to-DVI converter and HDMIMode according to the following table) and reboot. In the meantime I improved h3disp -- see next post below.

 

Please be prepared that none of the images is ready yet, we're still busy nailing down really basic problems and had no time/motivation to tune GUI/desktop stuff. This will take still some time.

Link to post
Share on other sites
I also notice the login banner is bananapi m2+

Yes ! this is a known issue, it is cause by autodetection been broken when executed on Mainline, since some drivers not present yet in DTS.

(Like the CPU temperature is not working, at least on by boards with 4.6.0-rc1)

 

For HDMI, there is some code from Jef Moine if you wish to try it out and compile you own kernel, hoping this will be merged soon in Sunxi MainLine.

(http://moinejf.free.fr/opi2/index.html)

Link to post
Share on other sites

Yes ! this is a known issue, it is cause by autodetection been broken when executed on Mainline

 

Auto detection is unfortunately broken by design and we will revert to a different variant after 2.5 months of spending countless hours on getting it to work: https://github.com/igorpecovnik/lib/issues/231

 

BTW: Ethernet driver for mainline should be ready now:

 

https://github.com/montjoie/linux/commits/sun8i-emac-wip

 

http://irclog.whitequark.org/linux-sunxi/2016-04-13#16131235;

Link to post
Share on other sites

Is it possible to add support for dynamic switching btw HDMI and AV ports for video output without stopping OS & removing SD-card & replacing config files? Or feeding signal to both ports, so a regular monitor can be connected to HDMI port, and a small TFT & car display to AV port?

 

Does stereo audio output work through AV port in any Armbian release for OPI PC? It doesn't work in loboris' Ubuntu image at all, but AV video works by replacing script.bin with attached file.

 

It would be nice, if this PUBLIC forum start answering (not ignoring) user questions instead of posting mostly developer monologues. Otherwise why Armbian site front pages ask for user feedback and discussion? :P  

script.bin.zip

Link to post
Share on other sites

Hi,
 

just a big thanks to your great and helpfull armbian. I remove xfce4 to kde because i like Konsole with full selection, copy, pastle easy with one hand (and one beer).
KDE-standard work perfectly (automount for usb device) and sound work great (buggy driver to activate it on mixer) on jack output. (just remove nodm, xfce4 package after deactivate X at startup, then install kde, lightdm).

I have been suprised about vdpau, first i try VLC...unusable for 720p divx. mpv work fine but poorly gui.
So I try to compile myself FFmpeg with vdpau support,,,some depandancy error about mesa or mali driver, I choose to override header used for sunxi mali driver by standard header and it's work fine.
I have FFplay to play 720p smoothly without bug like sunxi vdpau. Perfectly usable in fullscreen in SDL mode (FFplay use Single Display Library for overlay) ans same cpu usage as sunxi vdpau...very strange story!

So i try to compile VLC myself with my new FFmpeg library but i didn't success to have same speed like FFplay...no understanding about that for now.


To have sound (jackoutput) in SDL overlay mode (ffplay) you have to set some value (default system sound driver) :

/etc/asound.conf

pcm.!default {
    type hw
    card 0
}

ctl.!default {
    type hw
    card 0
}

ans set two env variable :

export SDL_AUDIODRIVER=alsa
export AUDIODEV=plughw:audiocodec,0

I hope it's help someone. Again thank you very much for Armbian OS team, ready outthebox on a H3 OPPC!
You rocks guy!!

Link to post
Share on other sites

It would be nice, if this PUBLIC forum start answering (not ignoring) user questions instead of posting mostly developer monologues. Otherwise why Armbian site front pages ask for user feedback and discussion? :P  

 

Ok, you chose the 'Armbian build framework' subforum inside the 'Development' forum to hijack a thread that has already 12 pages to hide some totaly unrelated user questions inside and the first thing is to complain about 'mostly developer monologues' (in the most internal forum we might have)? Really?

 

Don't you think your chances to get answers might be higher if you choose an appropriate forum and an appropriate 'style'? Regarding your questions: By modifying script.bin (read the documentation) you're able to use 2 displays in parallel. Regarding Audio: No idea.

 

Please open up a new thread in the correct forum if further questions arise.

Link to post
Share on other sites

@tkaiser

 

Sorry for arguably posting in the wrong spot. I came to this thread by clicking the Forum Topic link on the Armbian H3 page.  You might want to correct that link, if this thread is not intended for user feedback and questions.

 

However, you might agree that enabling hardware support is acutely relevant to Ambian moving to the new kernel discussed here. Pls enable mentioned audio and video dual port support in the new build.

 

Relevant info can be found (with Google Translate if needed) in this and that threads. While some folks think only HDMI audio is the must, this is not the case. The OPI devices can and should support both HDMI and Analog audio simultaneously, and in fact many Armbian users would prefer listening to music quietly via AV analog headphones, and expect next Armbian release to support that.  :)

 

A relevant issue would arise from using HDMI and AV video ports simultaneously. Will Mali GPU driver support such setup? With one GPU thread dedicated to HDMI, and another to AV output processing? What Mali driver version would support that - v5 or 6? This is all rather developer related issues than distro usage questions, so hope suitable here.

Link to post
Share on other sites

 

What was your CPU load (value?) at playing 720P videos with FFPlay compiled without Mali support?

When OPPC play The martian 720p with ffplay, each core was between 25-35% used. (edit : it's not 720p but 720x360 video...)

I try a 1080p youtube video (h264 (high) 3182kb/s) i was unable to play it from /tmp/. Maybe an profile (high) issue...

My display is configured in 720p (h3disp -m 5)

Link to post
Share on other sites

You might want to correct that link, if this thread is not intended for user feedback and questions.

 

Thx for the suggestion. @Igor: We should either change the link to H3 forum or be more explanative. Something like this:

  • Development progress: Please check the forum thread
  • New issues: Check the dedicated H3 forum please

Regarding HDMI/AV/Audio issues. Please keep in mind what Armbian is: An open source project run by volunteers in their spare time (we're neither Xunlong nor is this the hotline). We do this mostly to fulfill our own needs. My use cases for H3 devices are server/IoT centric so at least I won't look into this anytime soon or at all. I do not even know how to deal with Audio in Linux but would believe based on @boobypi's description that it should work?

 

It's a well known problem that none of our devs is that much interested in desktop stuff so there's still a lot of room for improvements. Please keep also in mind that some stuff can not be 'enabled' but has to be configured. Applies to display modes for example. When you just want to use HDMI we already provide a CLI tool to save you from dealing with script.bin (use h3disp to switch resolution, color mode and DVI vs. HDMI). But I fear this isn't possible for any display related issues since you have to configure stuff there (please read through display configuration info I already posted).

 

You should also keep in mind that Mali/GPU is pretty irrelevant when we're talking about HW accelerated video decoding (it's libvdpau/Cedrus that does the magic here).

Link to post
Share on other sites

@zamar19: the audio via AV port works just fine on OPI PC in Armbian 5.05, but you need to unmute it:

 

    amixer set -c 0 'Audio lineout' unmute

 

Then test it by

 

    speaker-test -twav -c2 -Dhw:0
 
@Igor: Maybe first_run should unmute the Audio lineout by default?
 
[That said, for my application (shairport-sync), the native audio of the OPI PC, like that of the NTC Chip and Raspberry PI 2b+, is unusable (either bad quality and/or loud pops when switching songs).]
Link to post
Share on other sites

Possible, but not really an urgent issue to deal with.

 

If Armbian is built to attract mass users as it appears from its website, enabling or properly configuring hardware in the distro is a must, since most consumers simply wouldn't know how to do it even after spending plenty of times on the forums. Eng-Shien Wu above suggested the easy approach, and I can't understand what kind of "issue" it can possibly present: just add one line of code to 1st run script.   :D

 

You should also keep in mind that Mali/GPU is pretty irrelevant when we're talking about HW accelerated video decoding (it's libvdpau/Cedrus that does the magic here).

 

As to libvdpau, did you mean Mali drivers aren't used for hardware accelerated video decoding? Well, by definitionVDPAU is implemented in X11 software device drivers, but relies on acceleration features in the hardware GPU. So Mali appears to be utmost relevant when talking about GPU accelerated video decoding, since H3 doesn't have any other GPU.

 

But... I wasn't talking avobe about video decoding, but rather generally about GPU support for both signal types at high resolutions: HDMI and AV outputs. And it was published that in earlier driver versions only one GPU core was enabled by default, but in newer drivers both cores - this is quite important for efficient hardware acceleration and dual display support. Btw, Mali devs posted Mali 450 recent drivers, so if asked on their forum, they might just post latest drtivers for Mali 400 as well, since its an old GPU model with development halted.

 

For my application (shairport-sync), the native audio of the OPI PC, like that of the NTC Chip and Raspberry PI 2b+, is unusable (either bad quality and/or loud pops when switching songs).

 

What do you substitute it with?

Link to post
Share on other sites

@zamar19

 

Mali GPU is a 3D rendering engine, responsible for X11 rendering acceleration;

CedarX and Cedrus are libraries for a Video Engine, responsible for decoding/encoding video streams like MPEG2 and H264, i.e. when playing video. Video engine is separate from Mali GPU;

There is also a Display Engine, responsible for dealing with video outputs like HDMI, VGA or Composite and stuff like changing resolution on-the-fly This is separate from Mali GPU too.

Link to post
Share on other sites

Well, by definitionVDPAU is implemented in X11 software device drivers, but relies on acceleration features in the hardware GPU. So Mali appears to be utmost relevant when talking about GPU accelerated video decoding, since H3 doesn't have any other GPU.

 

What's called GPU in one wiki article is called video engine in the more relevant sunxi wiki article: http://linux-sunxi.org/Cedrus

 

As per your other suggestions: Feel free to join development efforts to improve things. BTW: before we switched to Allwinner's new BSP kernel a few days ago we were able to increase Mali performance with this commit (Quake 3 framerates jumped from 27 fps to +40 fps). Now this patch doesn't work any more so maybe now the settings in the fex file are honoured or not. In case someone wants to look into... great!

Link to post
Share on other sites

@zamar19

 

There are numerous "just one line of code" things / issues waiting to be implemented and for each we need to decide whether is urgent or important. The project is open (source), so anyone can join and add this line of code. Many people operate this way, otherwise we could go crazy ;) This generally applies to all wishes. We already (the core team) do our best. Faster improving and bug fixing can only come from you.

How to contribute to the code?

Link to post
Share on other sites

"@zador.blood.stained

 

Thanks for useful for many clarification. Does this generic approach apply to "any" GPU type, including familiar GPUs for PC from Nvidia, AMD and Intel, or its only specific for ARM devices based Allwinner chips?

 

If that is Allwinner and/or ARM specific, would it be a correct assumption that all above listed engines are usually incorporated into a PC GPU, unless its integrated into an Intel or similar CPU?

 

Enable audio? Possible, but not really an urgent issue to deal with.

 

I'd look at you at a computer store, when you buy a laptop and then run back to return it because half of its ports and buttons don't work. Most consumers 1st thought would be the device they waited 2 months for is broken. :o And to ship it back, they must pay more than it costs. Now try to explain everyone "this is not our 1st priority". Folks can forgive anything software wise, but not "broken" brand new hardware. I know Steven had very limited chipsets knowledge when started shipping new OPIs. The devices got bad mouse reputation initially due to "non-working" hardware. But this philosophy can't be carried on, it backfires every time, and this is simply bad business.

 

I can try to run that fix and enable AV port video and audio, but think about thousands of non-coders, ordinary people who are getting a non-working device, and the getting popular Armbian just "doesn't care" about them. They will ask question: "WHOM do you care about, if not US?"       B)

Link to post
Share on other sites
Guest
This topic is now closed to further replies.