RK3288 Android logo

1. Modification of the boot logo of the Android system

  • The boot of Android system is divided into u-boot logo and kernel logo.
  • The startup logo image must be in bmp format and the resolution must be an even number.
  • Place the created BMP format logo image in the Android source code kernel directory and recompile it.

2. Analysis of common problems of Android logo

1. RK3288 Android uboot logo display color difference

Reason:  uboot logo images can only be 8bpp bmp images (refer to uboot source code), generally 24bpp jpg and png images are used.

Solution:  Use an image conversion script or tool to convert it into an 8-bit 256-color bmp image.

For the correct format, refer to the figure below (bit depth 8bit, format bmp):

 

2. RK3288 Android uboot logo cannot be booted or has a black and white pattern after being powered on.

Reason:  The uboot logo image pixel does not support

Solution:  Use an image conversion script or tool to change the pixels

3. RK3288 Android uboot logo display is dark

Reason:  uboot logo backlight is low

Solution: When the uboot-logo is displayed on the LVDS screen, turn up the backlight enable

diff --git a/device/rockchip/common/ueventd.rockchip.rc b/device/rockchip/common/ueventd.rockchip.rc
index 9c1cd0cbfa..19ff54ef53 100644
--- a/device/rockchip/common/ueventd.rockchip.rc
+++ b/device/rockchip/common/ueventd.rockchip.rc
@@ -42,6 +42,7 @@
 /dev/timerirq             0660   system     system
 /dev/accelirq             0660   system     system
 /dev/compassirq           0660   system     system
+/dev/spi-b               0666   system     system
 
 # for GPS
 #/dev/ttyS3                0600   gps        gps
diff --git a/frameworks/base/cmds/bootanimation/BootAnimation.cpp b/frameworks/base/cmds/bootanimation/BootAnimation.cpp
index b75a338907..3f87c7b105 100755
--- a/frameworks/base/cmds/bootanimation/BootAnimation.cpp
+++ b/frameworks/base/cmds/bootanimation/BootAnimation.cpp
@@ -458,8 +458,19 @@ status_t BootAnimation::readyToRun() {
 bool BootAnimation::threadLoop()
 {
     bool r;
+    int fd = -1;
+    int arg = 1;
     // We have no bootanimation file, so we use the stock android logo
     // animation.
+
+    fd=open("/dev/spi-b",O_RDWR);              
+    if(fd < 0){                        
+       ALOGW("ybx open /dev/spi-b failed fd=%d,errno=%d",fd,errno);            
+    }          
+    if(fd >= 0){                       
+       ioctl(fd,1,&arg);                       
+       close(fd);
+    }
     if (mZip == NULL) {
         r = android();
     } else {
diff --git a/kernel/default_logo.bmp b/kernel/default_logo.bmp
index 75209a0bff..5bd7bc486f 100644
Binary files a/kernel/default_logo.bmp and b/kernel/default_logo.bmp differ
diff --git a/kernel/drivers/pwm/tlc5615.c b/kernel/drivers/pwm/tlc5615.c
index af69bad142..60bb02fc3a 100644
--- a/kernel/drivers/pwm/tlc5615.c
+++ b/kernel/drivers/pwm/tlc5615.c
@@ -41,6 +41,7 @@ dev_t devno;
 struct cdev *tlc_cdev;
 struct class *cls;
 struct device *spi_xiaohu_device;
+static int flag_open_backlight = 0;^M
 
 
 static int spi_request_gpio(void)
@@ -94,6 +95,10 @@ static void gpio_xiaohu_init(void){
   //gpio_set_value(ENBLK_S, 1);
   gpio_set_value(blk_en.gpio_num, blk_en.enable_level);
   gpio_set_value(ENBLK_T, 1);
+  gpio_set_value(MOSI, 0); ^M
+  gpio_set_value(ENBLK, 0);^M
+  gpio_set_value(ENBLK_S, 0);^M
+  gpio_set_value(ENBLK_T, 0);^M
   //gpio_set_value(VGA_RESET,1);
 }
 
@@ -162,7 +167,9 @@ void DAconvert(unsigned int value){
        ss_enable(0);
        if (value >= 10)
                isbackon = value;
-       EnBacklight(isbackon); // if value == 0 disable backlight
+^M
+       if(flag_open_backlight)^M
+               EnBacklight(isbackon); // if value == 0 disable backlight^M
  }
 
 
@@ -175,6 +182,7 @@ long spi_xiaohu_ioctl(struct file *file, unsigned cmd, unsigned long arg){
                        DAconvert(arg);
                break;
                case 1:
+                       flag_open_backlight = 1;^M
                        EnBacklight(arg);
                break;
        }

Guess you like

Origin blog.csdn.net/qq_53676406/article/details/131302443