本文介绍了如何将SPI LCD设置为ubuntu上的默认显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台2.2TFT-LCD和一块基于ARM的主板(nanopi-m1),上面有Ubuntu-server-16.04。我有一个名为NOTRO的帧缓冲驱动程序(https://github.com/notro/fbtft )在内核上使用fbtft支持并通过以下命令使我的显示工作:



I have a 2.2" TFT-LCD and an ARM-based board(nanopi-m1) with Ubuntu-server-16.04 on it. I have a framebuffer driver named NOTRO(https://github.com/notro/fbtft) that uses fbtft support on kernel and makes my display work by this commands:

sudo modprobe fbtft_device custom name=fb_ili9341 gpios=reset:1,dc:201,led:6 speed=16000000 rotate=90 bgr=1





使用上述命令我的LCD开启并且我有一个空白的黑屏。然后我必须运行此命令才能拥有我的x-manager屏幕:





With above command my LCD turns on and I have a blank black screen. Then I must run this command to have my x-manager screen:

FRAMEBUFFER=/dev/fb8 startx





但是现在,我想改变我的Linux设置以在启动时自动执行这些命令。但我不知道如何?



我必须说我也安装了这些套餐:





But now, I like to change my Linux settings to do these commands automatically at startup. but I don't know how?

I must say I have installed these packages too:

xorg, xserver-xorg-video-fbdev, openbox





我的尝试:



我确实用我的内容将我的/boot.script.bin转换为custom.fex文件:



What I have tried:

I did convert my /boot.script.bin to custom.fex file with this content:

GNU nano 2.5.3              File: custom.fex

[product]
version = "100"
machine = "FriendlyARM NanoPi M1"

[platform]
debug_mode = 1
eraseflag = 1
next_work = 2

[target]
boot_clock = 1008
storage_type = -1

[key_detect_en]
keyen_flag = 0

[fel_key]
fel_key_max = 7
fel_key_min = 2





然后我必须改变我想要启动的内容并再次将其转换为.bin文件。

我也找到了这个教程,但我害怕改错了!





Then I must change what I want to boot here and convert it to .bin file again.
Also I found this tutorial for that but I am afraid of changing it wrong!

 script.bin/fex file

The settings in the [disp_init] section of the script.bin/fex file define the display output enabled at boot.

An example configuration for HDMI:

[disp_init]
disp_init_enable = 1
disp_mode = 0
screen0_output_type = 3
screen0_output_mode = 4
fb0_framebuffer_num = 2
fb0_format = 10
fb0_pixel_sequence = 0
fb0_scaler_mode_enable = 0

    disp_mode selects single-screen output or different dual screen modes. Generally this is 0, which means use screen0 with fb0 (one screen).
    screen0_output_type = 3 means HDMI output.
    screen0_output_mode selects the video/monitor mode to use (resolution and refresh rate). See the table in the Fex guide.
    fb0_framebuffer_num selects the number of buffers for fb0, generally you need 2 or more for video acceleration or Mali (3D), 3 is better.
    fb0_format and fb0_pixel_sequence determine the pixel format in the framebuffer. The above example (values of 10 and 0) selects the most common variant of 32bpp truecolor (ARGB).
    fb0_scaler_mode_enable selects whether the scaler should be enabled. Enabling it does not really scale pixels, it configures the scaler to scale pixels 1-to-1 which can fix screen refresh-related problems at 1080p resolution. See the section below.

Similar parameter are defined for screen1 (which is usually disabled in practice). 

推荐答案


这篇关于如何将SPI LCD设置为ubuntu上的默认显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 15:45
查看更多