Logo IMX8

From ESS-WIKI
Jump to: navigation, search

 

U-Boot Logo Customization

ROM-5721

  • u-boot config
    • imx8mm_rom5721a1_${MEM_SIZE}_defconfig
    • MEM_SIZE : 1G/2G/4G
  • Modify partitions size
    • After change the u-boot logo maybe cause flash.bin to be too large (more then 8MB).
    • User should extend boot partition size by modify BOOT_SPACE value in "image_types_advantech_imx8.bbclass" and Rebuild Yocto.
    • Here is an example :
RTENOTITLE
  • After generating the image file, user can Burn SD Card and test.

MIPI-DSI to LVDS (AUO/G070VW01)

  1. Change the dtb file used from imx8mm-rom5721-a1.dtb to imx8mm-rom5721-a1-dsi2lvds-g070vw01.dtb by modify CONFIG_DEFAULT_DEVICE_TREE in "imx8mm_rom5721a1_${MEM_SIZE}_defconfig".
CONFIG_DEFAULT_DEVICE_TREE="imx8mm-rom5721-a1-dsi2lvds-g070vw01"
  1. Enable some options in config.
CONFIG_DM_PWM=y
CONFIG_BACKLIGHT_PWM=y
CONFIG_PWM_IMX=y
CONFIG_VIDEO_TC358775=y
CONFIG_ADVANTECH_LOGO=y
  1. Put logo bmp file into the directory "tools/logos/".
  2. Overwrite LOGO_BMP definition at tools/Makefile to specific customer's logo.
RTENOTITLE
  1. Reference i.MX8 Yocto3.0 user guide to build and replace u-boot code.

MIPI-DSI (AUO/G101UAN02)

  1.  Change the dtb file used from imx8mm-rom5721-a1.dtb to imx8mm-rom5721-a1-auog101uan02.dtb by modify CONFIG_DEFAULT_DEVICE_TREE in "imx8mm_rom5721a1_${MEM_SIZE}_defconfig".
CONFIG_DEFAULT_DEVICE_TREE="imx8mm-rom5721-a1-auog101uan02"
  1. Enable some options in config.
CONFIG_DM_PWM=y
CONFIG_BACKLIGHT_PWM=y
CONFIG_PWM_IMX=y
CONFIG_ADVANTECH_LOGO=y
  • Step 3. to Step 5. are the same as above LVDS panel

 

ROM-5722

  • u-boot config
    • imx8mp_rom5722a1_${MEM_SIZE}_defconfig
    • MEM_SIZE : 2G/4G/6G
  • Modify partitions size
  • After generating the image file, user can Burn SD Card and test.

LVDS (AUO/G070VW01)

  1. Change the dtb file used from imx8mp-rom5722-a1.dtb to imx8mp-rom5722-a1-lvds0-auo.dtb by modify CONFIG_DEFAULT_DEVICE_TREE in "imx8mp_rom5722a1_${MEM_SIZE}_defconfig".
CONFIG_DEFAULT_DEVICE_TREE="imx8mp-rom5722-a1-lvds0-auo"
  1. Enable some options in config.
CONFIG_VIDEO_IMX8MP_LVDS=y
CONFIG_DM_PWM=y
CONFIG_BACKLIGHT_PWM=y
CONFIG_PWM_IMX=y
CONFIG_ADVANTECH_LOGO=y
  • Step 3. to Step 5. are the same as above ROM-5721 LVDS panel

 MIPI-DSI (AUO/G101UAN02)

  1. Change the dtb file used from imx8mp-rom5722-a1.dtb to imx8mp-rom5722-a1-auog101uan02.dtb by modify CONFIG_DEFAULT_DEVICE_TREE in "imx8mp_rom5722a1_${MEM_SIZE}_defconfig".
CONFIG_DEFAULT_DEVICE_TREE="imx8mp-rom5722-a1-auog101uan02"
  1. Enable some options in config.
CONFIG_DM_PWM=y
CONFIG_BACKLIGHT_PWM=y
CONFIG_PWM_IMX=y
CONFIG_ADVANTECH_LOGO=y
  • Step 3. to Step 5. are the same as above ROM-5721 LVDS panel

 

RSB-3720

  • u-boot config
    • imx8mp_rsb3720a1_${MEM_SIZE}_defconfig
    • MEM_SIZE : 2G/4G/6G
  • Modify partitions size
  • After generating the image file, user can Burn SD Card and test.

LVDS (AUO/G070VW01)

  1. Change the dtb file used from imx8mp-rsb3720-a1.dtb to imx8mp-rsb3720-a1-lvds0-auo.dtb by modify CONFIG_DEFAULT_DEVICE_TREE in "imx8mp_rsb3720a1_${MEM_SIZE}_defconfig".
CONFIG_DEFAULT_DEVICE_TREE="imx8mp-rsb3720-a1-lvds0-auo"
  1. Enable some options in config.
CONFIG_VIDEO_IMX8MP_LVDS=y
CONFIG_DM_PWM=y
CONFIG_BACKLIGHT_PWM=y
CONFIG_PWM_IMX=y
CONFIG_ADVANTECH_LOGO=y
  • Step 3. to Step 5. are the same as above ROM-5721 LVDS panel

 MIPI-DSI (AUO/G101UAN02)

  1. Change the dtb file used from imx8mp-rsb3720-a1.dtb to imx8mp-rsb3720-a1-auog101uan02.dtb by modify CONFIG_DEFAULT_DEVICE_TREE in "imx8mp_rsb3720a1_${MEM_SIZE}_defconfig".
CONFIG_DEFAULT_DEVICE_TREE="imx8mp-rsb3720-a1-auog101uan02"
  1. Enable some options in config.
CONFIG_DM_PWM=y
CONFIG_BACKLIGHT_PWM=y
CONFIG_PWM_IMX=y
CONFIG_ADVANTECH_LOGO=y
  • Step 3. to Step 5. are the same as above ROM-5721 LVDS panel

 

Kernel Solution

Modify the drivers/video/logo/logo_linux_clut224.ppm

客製化logo 圖片儲存成png格式

  1. pngtopnm linuxlogo.png > linuxlogo.pnm // **首次使用者需要apt-get install netpbm**
    # pnmquant 224 linuxlogo.pnm > linuxlogo224.pnm // **轉成224色**
    # pnmtoplainpnm linuxlogo224.pnm > linuxlogo224.ppm

mv linuxlogo224.ppm logo_linux_clut224.ppm
logo_linux_clut224.ppm替換kernel/drivers/video/logo/logo_linux_clut224.ppm


1、裝載pngtopnm工具。
$ sudo apt-get install netpbm
注:裝載完以后就會有pngtopnm,pnmquant,pnmtoplainpnm三個工具。

2、選取logo的圖片:
 首先選取一個自己喜歡的圖片,然后通過GIMP軟體將該圖片儲存為.png格式,
 比如儲存為linuxlogo.png.


3、制作.ppm格式的圖片:
$ pngtopnm linuxlogo.png > linuxlogo.pnm
$ pnmquant 224 linuxlogo.pnm > linuxlogo224.pnm
$ pnmtoplainpnm linuxlogo224.pnm > linuxlogo224.ppm

或者
$bmptoppm linuxlogo.bmp > linuxlogo.ppm //生成ppm
$ppmquant 224 linuxlogo.ppm > linuxlogo224.ppm //轉換成224色彩
$pnmnoraw linuxlogo224.ppm > linuxlogo224.ppm //轉換成ascii格式


4、替代原有的圖片。
$ make clean SUB_DIR=./drivers/video/logo/ //來清除logo目錄下的.c和.o檔案
注:apus板子的圖片名叫logo_dec_clut224.ppm,所以只要用第三步生成的圖片替代即可。

Yocto Openembedded Solution

Change Yocto Openembedded Logo Solution

1. Download psplash:git clone git://git.yoctoproject.org/psplash

2. Change Image to .c file and .h file  : ./make-image-header.sh xxlogo.h POKY ,then will be create Image file xxlogo.c , xxlogo.h

3. Chage xxlogo.c : #include "psplash-poky-img.h change #include "xxlogo.h"

4. Create autogen.sh shell script, will be create Makefile.

Example

 

 #!/bin/bash 
acloal 
autoheader
automake
autoconf

7. Run "make" and create the "psplash" "psplash-write".

8. Copy psplash and psplash-write to rootfs in /usr/bin/

9. If you will be remove "progress bar", please remark the code.

Remove psplash_draw_progress function define in psplash.c. In psplash.c.

/* Draw progress bar border */
/*
  psplash_fb_draw_image (fb,
                          (fb->width  - BAR_IMG_WIDTH)/2,
                          SPLIT_LINE_POS(fb),
                          BAR_IMG_WIDTH,
                          BAR_IMG_HEIGHT,
                          BAR_IMG_BYTES_PER_PIXEL,
                          BAR_IMG_ROWSTRIDE,
                          BAR_IMG_RLE_PIXEL_DATA);
*/