Linux Support
#21
(05-26-2016, 11:45 PM)UnixOutlaw Wrote: I don't want to run Android to get touch-screen LCD support - I want to run "native" Linux.

With Allwinner BSP it has always just been tweaking of hardware config (formerly known as fex files, now device tree stuff): http://forum.armbian.com/index.php/topic...etlastpost

It seems Allwinner chose to stay compatible to the old fex settings: http://linux-sunxi.org/Fex_Guide#disp_in...figuration  (output type for example: 1 is still LCD while 3 is HDMI and so on)

So grab the .dts from ayufan's github repo, optionally adjust the settings to your needs (LCD+HDMI in different modes) and enjoy the LCD. Since an automatic detection in u-boot would be nice I asked ayufan whether he already looked into.
  Reply
#22
BTW: When I looked into the first A64 SDK/BSP back in last Dec for obvious reasons display was set to LCD as default. I put the example fex file online back then: http://pastebin.com/26Q5tbXU (starting at line 408).

This SDK/BSP allowed defining stuff in the traditional way (fex file) and also as device tree (kernel 3.10). When longsleep started to work with BSP kernel coming from 'real' kernel sources he got rid off all the fex stuff immediately and defined everything solely in .dts -- since no LCD was available back then and since 'it just worked' he defined display settings to use HDMI. And since none of the linux-sunxi devs uses Pine64 with display connected (only to test out stuff asked by users here from time to time) nothing has changed over time. That's the whole story.

That Allwinner's BSP kernel can deal with LCD is a must since A64 is made for tablets. And today it's not a Android vs. Linux thing it was just ignorance (for different reasons) preventing the adoption of LCD settings from an Android image to Linux OS images.

It will become an Android vs. Linux thing as soon as we talk about Mainline u-boot/kernel since there display initialisation happens differently (or not at all ATM). But as long as all Linux images providing display output are based on Allwinner's BSP kernel (regardless whether patched up to 3.10.102 or not) using an LCD is just defining it in a configuration file (dual display config possible in different modes as known since years from other Allwinner implementations).
  Reply
#23
(09-20-2016, 01:55 AM)tkaiser Wrote: BTW: When I looked into the first A64 SDK/BSP back in last Dec for obvious reasons display was set to LCD as default. I put the example fex file online back then: http://pastebin.com/26Q5tbXU (starting at line 408).

This SDK/BSP allowed defining stuff in the traditional way (fex file) and also as device tree (kernel 3.10). When longsleep started to work with BSP kernel coming from 'real' kernel sources he got rid off all the fex stuff immediately and defined everything solely in .dts -- since no LCD was available back then and since 'it just worked' he defined display settings to use HDMI. And since none of the linux-sunxi devs uses Pine64 with display connected (only to test out stuff asked by users here from time to time) nothing has changed over time. That's the whole story.

That Allwinner's BSP kernel can deal with LCD is a must since A64 is made for tablets. And today it's not a Android vs. Linux thing it was just ignorance (for different reasons) preventing the adoption of LCD settings from an Android image to Linux OS images.

It will become an Android vs. Linux thing as soon as we talk about Mainline u-boot/kernel since there display initialisation happens differently (or not at all ATM). But as long as all Linux images providing display output are based on Allwinner's BSP kernel (regardless whether patched up to 3.10.102 or not) using an LCD is just defining it in a configuration file (dual display config possible in different modes as known since years from other Allwinner implementations).

Thanks for the background. Is there a detailed step by step to getting the LCD working on Ubuntu? That would be really helpful.
I do it live!
  Reply
#24
(09-20-2016, 07:25 AM)apple4ever Wrote:
(09-20-2016, 01:55 AM)tkaiser Wrote: BTW: When I looked into the first A64 SDK/BSP back in last Dec for obvious reasons display was set to LCD as default. I put the example fex file online back then: http://pastebin.com/26Q5tbXU (starting at line 408).

This SDK/BSP allowed defining stuff in the traditional way (fex file) and also as device tree (kernel 3.10). When longsleep started to work with BSP kernel coming from 'real' kernel sources he got rid off all the fex stuff immediately and defined everything solely in .dts -- since no LCD was available back then and since 'it just worked' he defined display settings to use HDMI. And since none of the linux-sunxi devs uses Pine64 with display connected (only to test out stuff asked by users here from time to time) nothing has changed over time. That's the whole story.

That Allwinner's BSP kernel can deal with LCD is a must since A64 is made for tablets. And today it's not a Android vs. Linux thing it was just ignorance (for different reasons) preventing the adoption of LCD settings from an Android image to Linux OS images.

It will become an Android vs. Linux thing as soon as we talk about Mainline u-boot/kernel since there display initialisation happens differently (or not at all ATM). But as long as all Linux images providing display output are based on Allwinner's BSP kernel (regardless whether patched up to 3.10.102 or not) using an LCD is just defining it in a configuration file (dual display config possible in different modes as known since years from other Allwinner implementations).

Thanks for the background. Is there a detailed step by step to getting the LCD working on Ubuntu? That would be really helpful.

No there is not;  which is the prime problem with so much surrounding the Allwinner SoC; no documentation. 

Lennyraposo estimated two weeks to get the LCD working with gnu+linux on the PineA64;  if its a dts thing he should have been able to say two hours-- and that would have been more than enough time. The problem is that noone yet knows the configuration ( except perhaps Allwinner ).
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#25
(09-20-2016, 07:25 AM)apple4ever Wrote: Is there a detailed step by step to getting the LCD working on Ubuntu? That would be really helpful.

I can't provide one since currently I don't even have a Pine64+ around ('lost' mine when we started to nail the 'GbE issue' down). Only as advice: Look at the commits from Sep 11th: https://github.com/ayufan-pine64/device-...its/master

Basically it's just getting the compiled DT, putting it next to the other .dtb files (depends on the OS image in question) and then adjust uEnvt.txt (or boot.cmd with Armbian) to load the correct one when the board boots.

So given we would talk about Armbian it should suffice to do this (as root of course):
Code:
wget -O /boot/dtb/allwinner/sun50i-a64-lcd-pine64-plus.dtb https://raw.githubusercontent.com/ayufan-pine64/device-pine64-common/19545248d729d0ddf056d3bed85eeee4a238ffd5/bootloader/pine64/sun50i-a64-lcd-pine64-plus.dtb
sed -i '1isetenv fdtfile sun50i-a64-lcd-pine64-plus.dtb' /boot/boot.cmd
mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
reboot

This will store ayufan's .dtb in the right location, then patch the bootscript to use this afterwards. This won't work with the other OS images (and I really don't care about any of those except longsleep's!) and of course no guarantee whatsoever.

With Armbian and a board with working Ethernet not that much can go wrong since all you need to recover from any of the steps above is to SSH into your board, remove line 1 from /boot/boot.cmd, do the mkimage call again and reboot.

I'm curious whether the moderator who answered you also will start again censoring/deleting posts as he did a few weeks ago... IMO it's a shame that he's still enable to censor other posts!

EDIT: All of the above just gives you the framebuffer on the LCD instead of (or in parallel to) HDMI. But for the more advanced modes you would have to check the links above (especially linux-sunxi wiki). Don't expect that touch functionality works out of the box. And please don't ask me, I'm personally not interested in 'Desktop Linux' at all or connecting Pine64 to any display.

All the hot 'desktop' stuff now happens driven by some talented community members here: https://github.com/ayufan-pine64/linux-p...its/master

So in case some talented Linux devs interested in 'Desktop Linux experience' are also here, that's the place to look at (and to 'port back' now that same kernel sources can be used -- Jon Smirl poked me a few weeks ago to look into that direction and I totally lost track, even forgot to answer him Sad    )
  Reply
#26
Seems touchscreen is also tweaking .dts: https://github.com/ayufan-pine64/device-...mon/pull/1

And also nice: just looked through some of the commits the Android guys did on top of longsleep's kernel just to realize that HDMI-CEC is taken from H3 and a quick search for the term and author's name later I was already back in Armbian forum: http://forum.armbian.com/index.php/topic...er-for-h3/

That's how open source collaboration should happen: in the open and without being blinkered Smile

Now for better 'Linux Support' to happen only some more talented devs would be needed that are interested in 'Desktop Linux' also (I fear that does not apply to the usual linux-sunxi tinkerers active now)
  Reply
#27
(09-20-2016, 09:33 AM)tkaiser Wrote: Seems touchscreen is also tweaking .dts: https://github.com/ayufan-pine64/device-...mon/pull/1

And also nice: just looked through some of the commits the Android guys did on top of longsleep's kernel just to realize that HDMI-CEC is taken from H3 and a quick search for the term and author's name later I was already back in Armbian forum: http://forum.armbian.com/index.php/topic...er-for-h3/

That's how open source collaboration should happen: in the open and without being blinkered Smile

Now for better 'Linux Support' to happen only some more talented devs would be needed that are interested in 'Desktop Linux' also (I fear that does not apply to the usual linux-sunxi tinkerers active now)

The touch panel is slightly more than just dts tweaking, you also need to patch the panel driver and make sure it's compiled when building the kernel.
However once that is done, the touch panel works great, I have it running under armbian at the moment.
  Reply
#28
(10-26-2016, 11:55 AM)vintagewaffle Wrote: The touch panel is slightly more than just dts tweaking, you also need to patch the panel driver and make sure it's compiled when building the kernel.
However once that is done, the touch panel works great, I have it running under armbian at the moment.

Help me out here because I'm a bit unsure what you are saying. I'm under the impression that Armbian is headless. How would the touch panel even be relevant in that environment?
  Reply
#29
I'd suggest vintagewaffle installed a GUI ontop of the legacy Armbian image... there's nothing stopping you from doing that - just requires a fair amount of tweaking that's all... Me? I run DietPI on one of my Pines (with Pine 7" display - in a Lego "playbox" enclosure), and the XFCE debian build on the other one...

Would be nice to find vintagewaffle's recipe for doing this - if there is a "recipe"...
  Reply
#30
(10-26-2016, 06:09 PM)HayseedGeek Wrote:
(10-26-2016, 11:55 AM)vintagewaffle Wrote: The touch panel is slightly more than just dts tweaking, you also need to patch the panel driver and make sure it's compiled when building the kernel.
However once that is done, the touch panel works great, I have it running under armbian at the moment.

Help me out here because I'm a bit unsure what you are saying. I'm under the impression that Armbian is headless. How would the touch panel even be relevant in that environment?

There is nothing stopping you running a DE/GUI on Armbian - in fact they documented the steps to install a simple desktop environment here. However, these are the generic instructions - the Pine64 specific stuff has been documented by tkaiser here.

And as far as relevance... it would be great to be have a information display with system load, uptime, network address, service status, etc... just one possibility...
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Information LCD Support on Linux pfeerick 8 19,006 02-08-2021, 03:30 PM
Last Post: HBeserra
  [EXPERIMENTAL] Linux on the LCD screen Terra854 24 34,703 07-21-2017, 07:41 AM
Last Post: apple4ever
  Touch screen support shariq_2001 14 19,526 12-07-2016, 07:47 AM
Last Post: Luke
Photo Playbox LCD on Linux MackPI 10 15,900 10-19-2016, 07:49 AM
Last Post: Zoidiano0
  Received a bad LCD, can't get support. bryanlyon 3 4,850 09-27-2016, 03:55 AM
Last Post: Luke
  Touchscreen support? NoahJ 12 15,384 07-09-2016, 12:01 PM
Last Post: yodermk
  LVDS support Flood_of_SYNs 2 6,395 12-22-2015, 05:08 PM
Last Post: balornt

Forum Jump:


Users browsing this thread: 1 Guest(s)