1

Sorry if I used wrong subject, but my problem is explained completely here: https://forum.armbian.com/topic/5561-how-to-configure-scriptbincustomfex-for-spi-lcd/?tab=comments#comment-42545

I did create .conf files within etc/modprobe.d and etc/modules-loud.d , also in share/X11/xorg.conf.d directories, and after booting system I can see my LCD turns on (only blank black screen), like when I ran this command:

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

But nothing more... I should run `startx' command manually to get a gray blank screen with a black mouse and right-click ability!

But I like this happens automatically after booting! I searched my OS docuements and found this:

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).

But I don't know how to change it? Also I know my LCD uses fb8 as framebuffer. Also my OS is armbian-5.30(Ubuntu server 16.04 ported for allwinner-h3 nanopi-m1 board)

Also there is a guide here but I couldn't understand it truely: http://linux-sunxi.org/Fex_Guide#spi_configuration

3

Sunxi is not ubuntu. Just put startx command into /etc/rc.local to run at boot time.

  • Thank you Ipor! But I have two questions: 1-What's script.bin? can I change it to make boot faster? 2-If I want to write a program in C++, and it starts at startup(like a kiosk linux), Should I put my program inside /etc/rc.local ? How? – user145959 Nov 1 '17 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.