Difference between revisions of "Logo IMX8"
Sean.chuang (talk | contribs) |
Sean.chuang (talk | contribs) |
||
(46 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | |||
+ | | ||
= '''U-Boot Logo Customization''' = | = '''U-Boot Logo Customization''' = | ||
Line 4: | Line 6: | ||
=== ROM-5721 === | === ROM-5721 === | ||
− | MIPI-DSI to LVDS (AUO/G070VW01) | + | *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 [http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBVA_User_Guide#Build_Instructions '''Rebuild Yocto''']. | ||
+ | **Here is an example : | ||
+ | |||
+ | : | ||
+ | ::[[File:Logo IMX8 Modify HowToModify BOOTSIZE.jpg|RTENOTITLE]] | ||
+ | <ul style="list-style-type: circle;"> | ||
+ | <li>After generating the image file, user can '''[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBVA_User_Guide#Creating_boot-up_on-board_flash_from_built_sdcard_image Burn SD Card]''' and test.</li> | ||
+ | </ul> | ||
+ | |||
+ | ==== '''MIPI-DSI to LVDS (AUO/G070VW01)''' ==== | ||
− | #Change the dtb file used from imx8mm-rom5721-a1.dtb to imx8mm-rom5721-a1-dsi2lvds-g070vw01.dtb by modify CONFIG_DEFAULT_DEVICE_TREE in | + | #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". |
<pre style="margin-left: 40px;">CONFIG_DEFAULT_DEVICE_TREE="imx8mm-rom5721-a1-dsi2lvds-g070vw01"</pre> | <pre style="margin-left: 40px;">CONFIG_DEFAULT_DEVICE_TREE="imx8mm-rom5721-a1-dsi2lvds-g070vw01"</pre> | ||
<ol start="2"> | <ol start="2"> | ||
− | <li>Enable some options in | + | <li>Enable some options in config.</li> |
</ol> | </ol> | ||
<pre style="margin-left: 40px;">CONFIG_DM_PWM=y | <pre style="margin-left: 40px;">CONFIG_DM_PWM=y | ||
Line 19: | Line 35: | ||
<ol start="3"> | <ol start="3"> | ||
<li>Put logo bmp file into the directory "tools/logos/".</li> | <li>Put logo bmp file into the directory "tools/logos/".</li> | ||
− | <li>Overwrite LOGO_BMP definition at tools/Makefile to | + | <li>Overwrite LOGO_BMP definition at tools/Makefile to specific customer's logo.</li> |
+ | </ol> | ||
+ | |||
+ | : | ||
+ | ::[[File:Rom-5721 Logo IMX8 MIPI-DSI to LVDS Modify Makefile.jpg|RTENOTITLE]] | ||
+ | <ol start="5"> | ||
+ | <li>Reference [http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBVA_User_Guide#Setting_up_SDK i.MX8 Yocto3.0 user guide] to build and replace u-boot code.</li> | ||
+ | </ol> | ||
+ | |||
+ | ==== '''MIPI-DSI (AUO/G101UAN02)''' ==== | ||
+ | |||
+ | # 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". | ||
+ | <pre style="margin-left: 40px;">CONFIG_DEFAULT_DEVICE_TREE="imx8mm-rom5721-a1-auog101uan02"</pre> | ||
+ | <ol start="2" style="list-style-type: decimal;"> | ||
+ | <li>Enable some options in config.</li> | ||
</ol> | </ol> | ||
− | <pre style="margin-left: 40px;">[[ | + | <pre style="margin-left: 40px;">CONFIG_DM_PWM=y |
+ | CONFIG_BACKLIGHT_PWM=y | ||
+ | CONFIG_PWM_IMX=y | ||
+ | CONFIG_ADVANTECH_LOGO=y</pre> | ||
+ | <ul style="list-style-type: square;"> | ||
+ | <li>Step 3. to Step 5. are the same as above [http://ess-wiki.advantech.com.tw/view/Logo_IMX8#MIPI-DSI_to_LVDS_.28AUO.2FG070VW01.29 LVDS panel]</li> | ||
+ | </ul> | ||
+ | |||
+ | | ||
+ | |||
+ | === ROM-5722 === | ||
+ | |||
+ | *u-boot config | ||
+ | **imx8mp_rom5722a1_${MEM_SIZE}_defconfig | ||
+ | **MEM_SIZE : 2G/4G/6G | ||
+ | *Modify partitions size | ||
+ | **The steps are same with [http://ess-wiki.advantech.com.tw/view/Logo_IMX8#ROM-5721 ROM-5721]. | ||
+ | *After generating the image file, user can '''[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBVA_User_Guide#Creating_boot-up_on-board_flash_from_built_sdcard_image Burn SD Card]''' and test. | ||
+ | |||
+ | ==== '''LVDS (AUO/G070VW01)''' ==== | ||
+ | |||
+ | #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". | ||
+ | <pre style="margin-left: 40px;">CONFIG_DEFAULT_DEVICE_TREE="imx8mp-rom5722-a1-lvds0-auo"</pre> | ||
+ | <ol start="2"> | ||
+ | <li>Enable some options in config.</li> | ||
+ | </ol> | ||
+ | <pre style="margin-left: 40px;">CONFIG_VIDEO_IMX8MP_LVDS=y | ||
+ | CONFIG_DM_PWM=y | ||
+ | CONFIG_BACKLIGHT_PWM=y | ||
+ | CONFIG_PWM_IMX=y | ||
+ | CONFIG_ADVANTECH_LOGO=y</pre> | ||
+ | |||
+ | *Step 3. to Step 5. are the same as above ROM-5721 [http://ess-wiki.advantech.com.tw/view/Logo_IMX8#MIPI-DSI_to_LVDS_.28AUO.2FG070VW01.29 LVDS panel] | ||
+ | |||
+ | ==== ''' MIPI-DSI (AUO/G101UAN02)''' ==== | ||
+ | |||
+ | #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". | ||
+ | <pre style="margin-left: 40px;">CONFIG_DEFAULT_DEVICE_TREE="imx8mp-rom5722-a1-auog101uan02"</pre> | ||
+ | <ol start="2" style="list-style-type: decimal;"> | ||
+ | <li>Enable some options in config.</li> | ||
+ | </ol> | ||
+ | <pre style="margin-left: 40px;">CONFIG_DM_PWM=y | ||
+ | CONFIG_BACKLIGHT_PWM=y | ||
+ | CONFIG_PWM_IMX=y | ||
+ | CONFIG_ADVANTECH_LOGO=y</pre> | ||
+ | <ul style="list-style-type: square;"> | ||
+ | <li>Step 3. to Step 5. are the same as above ROM-5721 [http://ess-wiki.advantech.com.tw/view/Logo_IMX8#MIPI-DSI_to_LVDS_.28AUO.2FG070VW01.29 LVDS panel]</li> | ||
+ | </ul> | ||
+ | |||
+ | | ||
+ | |||
+ | === RSB-3720 === | ||
+ | |||
+ | *u-boot config | ||
+ | **imx8mp_rsb3720a1_${MEM_SIZE}_defconfig | ||
+ | **MEM_SIZE : 2G/4G/6G | ||
+ | *Modify partitions size | ||
+ | **The steps are same with [http://ess-wiki.advantech.com.tw/view/Logo_IMX8#ROM-5721 ROM-5721]. | ||
+ | *After generating the image file, user can '''[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX8/Yocto_LBVA_User_Guide#Creating_boot-up_on-board_flash_from_built_sdcard_image Burn SD Card]''' and test. | ||
+ | |||
+ | ==== '''LVDS (AUO/G070VW01)''' ==== | ||
+ | |||
+ | #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". | ||
+ | <pre style="margin-left: 40px;">CONFIG_DEFAULT_DEVICE_TREE="imx8mp-rsb3720-a1-lvds0-auo"</pre> | ||
+ | |||
+ | #Enable some options in config. | ||
+ | <pre style="margin-left: 40px;">CONFIG_VIDEO_IMX8MP_LVDS=y | ||
+ | CONFIG_DM_PWM=y | ||
+ | CONFIG_BACKLIGHT_PWM=y | ||
+ | CONFIG_PWM_IMX=y | ||
+ | CONFIG_ADVANTECH_LOGO=y</pre> | ||
+ | |||
+ | *Step 3. to Step 5. are the same as above ROM-5721 [http://ess-wiki.advantech.com.tw/view/Logo_IMX8#MIPI-DSI_to_LVDS_.28AUO.2FG070VW01.29 LVDS panel] | ||
+ | ==== ''' MIPI-DSI (AUO/G101UAN02)''' ==== | ||
− | </pre> | + | #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". |
+ | <pre style="margin-left: 40px;">CONFIG_DEFAULT_DEVICE_TREE="imx8mp-rsb3720-a1-auog101uan02"</pre> | ||
+ | <ol start="2" style="list-style-type: decimal;"> | ||
+ | <li>Enable some options in config.</li> | ||
+ | </ol> | ||
+ | <pre style="margin-left: 40px;">CONFIG_DM_PWM=y | ||
+ | CONFIG_BACKLIGHT_PWM=y | ||
+ | CONFIG_PWM_IMX=y | ||
+ | CONFIG_ADVANTECH_LOGO=y</pre> | ||
+ | <ul style="list-style-type: square;"> | ||
+ | <li>Step 3. to Step 5. are the same as above ROM-5721 [http://ess-wiki.advantech.com.tw/view/Logo_IMX8#MIPI-DSI_to_LVDS_.28AUO.2FG070VW01.29 LVDS panel]</li> | ||
+ | </ul> | ||
+ | |||
+ | | ||
= '''Kernel Solution''' = | = '''Kernel Solution''' = | ||
Line 45: | Line 161: | ||
<br/> 4、替代原有的圖片。<br/> $ make clean SUB_DIR=./drivers/video/logo/ //來清除logo目錄下的.c和.o檔案<br/> 注:apus板子的圖片名叫logo_dec_clut224.ppm,所以只要用第三步生成的圖片替代即可。 | <br/> 4、替代原有的圖片。<br/> $ make clean SUB_DIR=./drivers/video/logo/ //來清除logo目錄下的.c和.o檔案<br/> 注:apus板子的圖片名叫logo_dec_clut224.ppm,所以只要用第三步生成的圖片替代即可。 | ||
+ | |||
+ | = '''Yocto Openembedded Solution''' = | ||
+ | |||
+ | === Change Yocto Openembedded Logo Solution === | ||
+ | |||
+ | 1. Download psplash:git clone [git://git.yoctoproject.org/psplash 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 | ||
+ | |||
+ | | ||
+ | <syntaxhighlight lang="bash"> #!/bin/bash | ||
+ | acloal | ||
+ | autoheader | ||
+ | automake | ||
+ | autoconf | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | 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. | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | /* 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); | ||
+ | */ | ||
+ | </syntaxhighlight> |
Latest revision as of 05:11, 14 December 2023
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 :
- After generating the image file, user can Burn SD Card and test.
MIPI-DSI to LVDS (AUO/G070VW01)
- 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"
- 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
- Put logo bmp file into the directory "tools/logos/".
- Overwrite LOGO_BMP definition at tools/Makefile to specific customer's logo.
- Reference i.MX8 Yocto3.0 user guide to build and replace u-boot code.
MIPI-DSI (AUO/G101UAN02)
- 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"
- 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
- The steps are same with ROM-5721.
- After generating the image file, user can Burn SD Card and test.
LVDS (AUO/G070VW01)
- 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"
- 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)
- 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"
- 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
- The steps are same with ROM-5721.
- After generating the image file, user can Burn SD Card and test.
LVDS (AUO/G070VW01)
- 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"
- 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)
- 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"
- 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格式
- 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);
*/