Image Q&A

Q: How to make an image compatible with multiple screen parameters?

(Considering for spi panel)

The screen parameters are configured in config.ini.

There are two places to load config.ini, one is uboot bootlogo, and the other is insmod mi_sys.ko.

When an image is required to be compatible with multiple screen parameters, it is recommended to add a corresponding config.ini for each screen parameter, and determine the imported screen parameters by reading the panel ID in the panel.

  1. Where uboot bootlogo needs to be implemented

  2. Add an environment variable in insmod mi_sys.ko to control whether to load config.ini when booting.

    By default, config.ini will be loaded during insmod mi_sys.ko when booting, but the parameter bUseConfig_tool can be added after insmod mi_sys.ko to control whether to load config.ini.

    If insmod mi_sys.ko bUseConfig_tool=0, config.ini will not be loaded when insmod mi_sys.ko;

    If insmod mi_sys.ko bUseConfig_tool=1 or bUseConfig_tool is not added, config.ini will be loaded when insmod mi_sys.ko.

    Compatibility with multiple screen parameters requires users to load .ini files in the application.

    Loading the .ini file relies on /config/config_tool; run the program in the boot script to get panel id, and then use /config/config_tool to parse the .ini file according to the panel id.

    This method can be verified: delete all config.ini, restart the board, the related programs cannot run. Enter the /config directory, run ./load_config config.ini PQconfig.ini, it will run normally.

...