• Rockchip PX30/RK3326 Android开机时间优化


    Rockchip PX30/RK3326 Android开机时间优化

    RK的kernel是一个通用版本的kernel,为了兼容各个芯片会把每个芯片的配置和产品上面的需要的外设都配置编译,这样就会导致kernel的加载的驱动模块很多,拖慢开机速度,而这些驱动中有一些是具体产品上没有用到的,可以进行删减的。按这个思路我们可以针对每个具体的产品对kernel进行瘦身裁剪,下面以PX30和RK3326芯片平台为例进行裁剪。
    具体的kernel模块加载时间和模块信息可以通过下面的文章获取
    kernel打印模块驱动加载时间

    裁剪前后的固件和开机时间对比

    项目kernel裁剪前kernel裁剪后
    kernel.img固件大小31M25M
    uboot启动耗时871.766 ms826.115 ms
    kernel启动完到init1.273138s1.200982s
    android启动完成29.871925s23.537320s

    启动时间可以根据如下log判断:

    • uboot启动时间
    Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
    Adding bank: 0x08c00000 - 0x80000000 (size: 0x77400000)
    Total: 826.115 ms
    
    • 1
    • 2
    • 3
    • kernel阶段
    [    1.215979] Run /init as init process
    [    1.226837] init: init first stage started!
    
    • 1
    • 2
    • android阶段
    [   23.537320] init: Service 'bootanim' (pid 151) exited with status 0 oneshot service took 19.760000 seconds in background
    [   23.537402] init: Sending signal 9 to service 'bootanim' (pid 151) process group...
    
    • 1
    • 2

    裁剪内容

    裁剪主要是对rockchip_defconfig的配置内容进行裁剪,具体如下:

    diff --git a/arch/arm64/configs/rockchip_defconfig b/arch/arm64/configs/rockchip_defconfig
    old mode 100644
    new mode 100755
    index b0f9a348a881..6be9a9d1a48b
    --- a/arch/arm64/configs/rockchip_defconfig
    +++ b/arch/arm64/configs/rockchip_defconfig
    @@ -10,9 +10,9 @@ CONFIG_TASK_DELAY_ACCT=y
     CONFIG_TASK_XACCT=y
     CONFIG_TASK_IO_ACCOUNTING=y
     CONFIG_PSI=y
     # 把内核的配置信息编译进内核中,以后可以通过scripts/extract-ikconfig脚本从内核镜像中提取这些信息, 可以去掉
    -CONFIG_IKCONFIG=y
    -CONFIG_IKCONFIG_PROC=y
    -CONFIG_IKHEADERS=m
    +# CONFIG_IKCONFIG is not set
    +# CONFIG_IKCONFIG_PROC is not set
    +# CONFIG_IKHEADERS is not set
     CONFIG_LOG_BUF_SHIFT=19
     CONFIG_CGROUPS=y
     CONFIG_MEMCG=y
    @@ -44,10 +44,10 @@ CONFIG_EMBEDDED=y
     # CONFIG_COMPAT_BRK is not set
     CONFIG_PROFILING=y
     CONFIG_ARCH_ROCKCHIP=y
     #PCIE的配置,可以根据产品需要进行配置,因为PX30开发板上面没有PCIE,所以这里就删掉PCIE配置
    -CONFIG_PCI=y
    -CONFIG_PCIEPORTBUS=y
    -CONFIG_PCIE_ROCKCHIP_HOST=y
    -CONFIG_PCIE_DW_ROCKCHIP=y
    +# CONFIG_PCI is not set
    +# CONFIG_PCIEPORTBUS is not set
    +# CONFIG_PCIE_ROCKCHIP_HOST is not set
    +# CONFIG_PCIE_DW_ROCKCHIP is not set
     # CONFIG_ARM64_ERRATUM_826319 is not set
     # CONFIG_ARM64_ERRATUM_827319 is not set
     # CONFIG_ARM64_ERRATUM_824069 is not set
     @@ -78,8 +78,8 @@ CONFIG_COMPAT=y
     CONFIG_PM_WAKELOCKS=y
     CONFIG_PM_WAKELOCKS_LIMIT=0
     # CONFIG_PM_WAKELOCKS_GC is not set
    -CONFIG_PM_DEBUG=y
    -CONFIG_PM_ADVANCED_DEBUG=y
    +#CONFIG_PM_DEBUG=y
    +#CONFIG_PM_ADVANCED_DEBUG=y
     CONFIG_ENERGY_MODEL=y
     CONFIG_CPU_IDLE=y
     CONFIG_ARM_CPUIDLE=y
    @@ -288,7 +288,7 @@ CONFIG_DM_DEFAULT_KEY=y
     CONFIG_DM_SNAPSHOT=y
     CONFIG_DM_UEVENT=y
     CONFIG_DM_VERITY=y
     #AVB功能,根据Android上层是否开启AVB来确定是否配置
    -CONFIG_DM_VERITY_AVB=y
    +#CONFIG_DM_VERITY_AVB=y
     CONFIG_DM_VERITY_FEC=y
     CONFIG_DM_BOW=y
     CONFIG_DM_ANDROID_VERITY_AT_MOST_ONCE_DEFAULT_ENABLED=y
    @@ -357,7 +357,7 @@ CONFIG_STMMAC_ETH=y
     # CONFIG_NET_VENDOR_VIA is not set
     # CONFIG_NET_VENDOR_WIZNET is not set
     CONFIG_ROCKCHIP_PHY=y
     # RK630根据产品需要进行配置,PX30开发板上面没有所以去掉
    -CONFIG_RK630_PHY=y
    +# CONFIG_RK630_PHY is not set
     CONFIG_PPP=y
     CONFIG_PPP_BSDCOMP=y
     CONFIG_PPP_DEFLATE=y
    @@ -375,27 +375,27 @@ CONFIG_SLIP_MODE_SLIP6=y
     CONFIG_USB_CATC=y
     CONFIG_USB_KAWETH=y
     CONFIG_USB_PEGASUS=y
     #USB转以太网模块,根据产品需要进行配置,PX30开发板上面没有所以去掉
    -CONFIG_USB_RTL8150=y
    -CONFIG_USB_RTL8152=y
    +# CONFIG_USB_RTL8150 is not set
    +# CONFIG_USB_RTL8152 is not set
     CONFIG_USB_USBNET=y
     CONFIG_USB_NET_CDC_EEM=y
     CONFIG_USB_NET_CDC_MBIM=y
     #USB网卡,根据产品需要进行配置,PX30开发板上面没有所以去掉
    -CONFIG_USB_NET_DM9601=y
    -CONFIG_USB_NET_SMSC75XX=y
    -CONFIG_USB_NET_SMSC95XX=y
    -CONFIG_USB_NET_GL620A=y
    +# CONFIG_USB_NET_DM9601 is not set
    +# CONFIG_USB_NET_SMSC75XX is not set
    +# CONFIG_USB_NET_SMSC95XX is not set
    +# CONFIG_USB_NET_GL620A is not set
     CONFIG_USB_NET_PLUSB=y
    -CONFIG_USB_NET_MCS7830=y
    -CONFIG_USB_NET_RNDIS_HOST=y
    -CONFIG_USB_ALI_M5632=y
    -CONFIG_USB_AN2720=y
    -CONFIG_USB_EPSON2888=y
    -CONFIG_USB_KC2190=y
    -CONFIG_USB_NET_CX82310_ETH=y
    +# CONFIG_USB_NET_MCS7830 is not set
    +# CONFIG_USB_NET_RNDIS_HOST=y
    +# CONFIG_USB_ALI_M5632 is not set
    +# CONFIG_USB_AN2720 is not set
    +# CONFIG_USB_EPSON2888 is not set
    +# CONFIG_USB_KC2190 is not set
    +# CONFIG_USB_NET_CX82310_ETH is not set
     CONFIG_USB_NET_KALMIA=y
     CONFIG_USB_NET_QMI_WWAN=y
     CONFIG_USB_HSO=y
    -CONFIG_USB_NET_INT51X1=y
    +# CONFIG_USB_NET_INT51X1 is not set
     CONFIG_USB_IPHETH=y
     CONFIG_USB_SIERRA_NET=y
     # CONFIG_WLAN_VENDOR_ADMTEK is not set
    @@ -417,80 +417,80 @@ CONFIG_USB_SIERRA_NET=y
     CONFIG_WL_ROCKCHIP=y
     CONFIG_WIFI_BUILD_MODULE=y
     #WIFI模块,根据产品需要进行配置,PX30开发板上面用的是AP6XXX,其他的几个配置去掉
     CONFIG_AP6XXX=m
    -CONFIG_RTL8723CS=m
    -CONFIG_RTL8821CS=m
    -CONFIG_RTL8822BS=m
    -CONFIG_LTE=y
    -CONFIG_LTE_RM310=y
    +# CONFIG_RTL8723CS is not set
    +# CONFIG_RTL8821CS is not set
    +# CONFIG_RTL8822BS is not set
    +# CONFIG_LTE is not set
    +# CONFIG_LTE_RM310 is not set
     CONFIG_INPUT_EVDEV=y
     CONFIG_KEYBOARD_ADC=y
     # CONFIG_KEYBOARD_ATKBD is not set
      #通过GPIO来做按键,PX30EVB板子是通过ADC,所以这里去掉GPIO的配置项
    -CONFIG_KEYBOARD_GPIO=y
    +# CONFIG_KEYBOARD_GPIO is not set
     # CONFIG_INPUT_MOUSE is not set
     CONFIG_INPUT_JOYSTICK=y
     CONFIG_JOYSTICK_XPAD=y
     CONFIG_JOYSTICK_XPAD_FF=y
     CONFIG_JOYSTICK_XPAD_LEDS=y
     #USB触摸板,根据需要配置,PX30开发板上面没有所以去掉
    -CONFIG_INPUT_TABLET=y
    -CONFIG_TABLET_USB_ACECAD=y
    -CONFIG_TABLET_USB_AIPTEK=y
    -CONFIG_TABLET_USB_GTCO=y
    -CONFIG_TABLET_USB_HANWANG=y
    -CONFIG_TABLET_USB_KBTAB=y
    +#CONFIG_INPUT_TABLET is not set
    +#CONFIG_TABLET_USB_ACECAD is not set
    +#CONFIG_TABLET_USB_AIPTEK is not set
    +#CONFIG_TABLET_USB_GTCO is not set
    +#CONFIG_TABLET_USB_HANWANG is not set
    +#CONFIG_TABLET_USB_KBTAB= is not set
     CONFIG_INPUT_TOUCHSCREEN=y
     #触摸屏,根据需要配置,PX30开发板用的是GT1X,其他的没用所以去掉,只留下需要的
     CONFIG_INPUT_TOUCHSCREEN=y
    -CONFIG_TOUCHSCREEN_GSLX6801=y
    -CONFIG_TOUCHSCREEN_GSLX680_PAD=y
    -CONFIG_TOUCHSCREEN_GSLX680_VR=y
    -CONFIG_TOUCHSCREEN_GSL3673=y
    -CONFIG_TOUCHSCREEN_GSL3673_800X1280=y
    -CONFIG_TOUCHSCREEN_GSL3676=y
    -CONFIG_TOUCHSCREEN_GT9XX=y
    -CONFIG_TOUCHSCREEN_HYN_CST2XX=y
    -CONFIG_TOUCHSCREEN_WACOM_W9013=y
    +#CONFIG_TOUCHSCREEN_GSLX6801=y
    +#CONFIG_TOUCHSCREEN_GSLX680_PAD=y
    +#CONFIG_TOUCHSCREEN_GSLX680_VR=y
    +#CONFIG_TOUCHSCREEN_GSL3673=y
    +#CONFIG_TOUCHSCREEN_GSL3673_800X1280=y
    +#CONFIG_TOUCHSCREEN_GSL3676=y
    +#CONFIG_TOUCHSCREEN_GT9XX=y
    +#CONFIG_TOUCHSCREEN_HYN_CST2XX=y
    +#CONFIG_TOUCHSCREEN_WACOM_W9013=y
     CONFIG_TOUCHSCREEN_GT1X=y
    -CONFIG_TOUCHSCREEN_FTS=y
    -CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5=y
    -CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICETREE_SUPPORT=y
    -CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_I2C=y
    -CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICE_ACCESS=y
    -CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_LOADER=y
    -CONFIG_ROCKCHIP_REMOTECTL=y
    -CONFIG_ROCKCHIP_REMOTECTL_PWM=y
    # SENSOR相关的配置,根据需要配置,PX30 EVB没有sensor所以都去掉
    -CONFIG_SENSOR_DEVICE=y
    -CONFIG_GSENSOR_DEVICE=y
    -CONFIG_GS_MMA8452=y
    -CONFIG_MPU6880_ACC=y
    -CONFIG_MPU6500_ACC=y
    -CONFIG_GS_KXTJ9=y
    -CONFIG_GS_LIS3DH=y
    -CONFIG_GS_MMA7660=y
    -CONFIG_GS_MC3230=y
    -CONFIG_GS_SC7660=y
    -CONFIG_GS_SC7A20=y
    -CONFIG_GS_SC7A30=y
    -CONFIG_GS_MXC6655XA=y
    -CONFIG_GS_LSM303D=y
    -CONFIG_LSM330_ACC=y
    -CONFIG_BMA2XX_ACC=y
    -CONFIG_GS_DA223=y
    -CONFIG_COMPASS_DEVICE=y
    -CONFIG_COMPASS_AK8975=y
    -CONFIG_COMPASS_AK8963=y
    -CONFIG_GYROSCOPE_DEVICE=y
    -CONFIG_GYRO_L3G4200D=y
    -CONFIG_GYRO_L3G20D=y
    -CONFIG_GYRO_EWTSA=y
    -CONFIG_GYRO_MPU6500=y
    -CONFIG_GYRO_MPU6880=y
    -CONFIG_GYRO_LSM330=y
    -CONFIG_LIGHT_DEVICE=y
    -CONFIG_LS_CM3217=y
    -CONFIG_LS_CM3218=y
    -CONFIG_LS_STK3410=y
    -CONFIG_PROXIMITY_DEVICE=y
    -CONFIG_PS_STK3410=y
    -CONFIG_HALL_DEVICE=y
    -CONFIG_HS_MH248=y
    +#CONFIG_TOUCHSCREEN_FTS is not set
    +#CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5 is not set
    +#CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICETREE_SUPPORT is not set
    +#CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_I2C is not set
    +#CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICE_ACCESS is not set
    +#CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_LOADER is not set
    +#CONFIG_ROCKCHIP_REMOTECTL is not set
    +#CONFIG_ROCKCHIP_REMOTECTL_PWM is not set
    +#CONFIG_SENSOR_DEVICE is not set
    +#CONFIG_GSENSOR_DEVICE is not set
    +#CONFIG_GS_MMA8452 is not set
    +#CONFIG_MPU6880_ACC is not set
    +#CONFIG_MPU6500_ACC is not set
    +#CONFIG_GS_KXTJ9 is not set
    +#CONFIG_GS_LIS3DH is not set
    +#CONFIG_GS_MMA7660 is not set
    +#CONFIG_GS_MC3230 is not set
    +#CONFIG_GS_SC7660 is not set
    +#CONFIG_GS_SC7A20 is not set
    +#CONFIG_GS_SC7A30 is not set
    +#CONFIG_GS_MXC6655XA is not set
    +#CONFIG_GS_LSM303D is not set
    +#CONFIG_LSM330_ACC is not set
    +#CONFIG_BMA2XX_ACC is not set
    +#CONFIG_GS_DA223 is not set
    +#CONFIG_COMPASS_DEVICE is not set
    +#CONFIG_COMPASS_AK8975 is not set
    +#CONFIG_COMPASS_AK8963 is not set
    +#CONFIG_GYROSCOPE_DEVICE is not set
    +#CONFIG_GYRO_L3G4200D is not set
    +#CONFIG_GYRO_L3G20D is not set
    +#CONFIG_GYRO_EWTSA is not set
    +#CONFIG_GYRO_MPU6500 is not set
    +#CONFIG_GYRO_MPU6880 is not set
    +#CONFIG_GYRO_LSM330 is not set
    +#CONFIG_LIGHT_DEVICE is not set
    +#CONFIG_LS_CM3217 is not set
    +#CONFIG_LS_CM3218 is not set
    +#CONFIG_LS_STK3410 is not set
    +#CONFIG_PROXIMITY_DEVICE is not set
    +#CONFIG_PS_STK3410 is not set
    +#CONFIG_HALL_DEVICE is not set
    +#CONFIG_HS_MH248 is not set
     CONFIG_INPUT_MISC=y
     CONFIG_INPUT_UINPUT=y
     CONFIG_INPUT_RK805_PWRKEY=y
    @@ -511,9 +511,9 @@ CONFIG_HW_RANDOM_ROCKCHIP=y
     CONFIG_I2C_CHARDEV=y
     CONFIG_I2C_GPIO=y
     CONFIG_I2C_RK3X=y
     # SPI PX30 EVB板没有使用,所以去掉
    -CONFIG_SPI=y
    -CONFIG_SPI_ROCKCHIP=y
    -CONFIG_SPI_SPIDEV=y
    +# CONFIG_SPI is not set
    +# CONFIG_SPI_ROCKCHIP is not set
    +# CONFIG_SPI_SPIDEV is not set
     CONFIG_PINCTRL_RK805=y
     CONFIG_GPIO_SYSFS=y
     CONFIG_POWER_AVS=y
    @@ -521,12 +521,12 @@ CONFIG_ROCKCHIP_IODOMAIN=y
     CONFIG_POWER_RESET_GPIO=y
     CONFIG_SYSCON_REBOOT_MODE=y
     CONFIG_TEST_POWER=y
     # 充电部分,因为PX30没有带电池,所以去掉
    -CONFIG_CHARGER_BQ25700=y
    -CONFIG_BATTERY_CW2015=y
    -CONFIG_BATTERY_RK817=y
    -CONFIG_CHARGER_RK817=y
    -CONFIG_BATTERY_RK818=y
    -CONFIG_CHARGER_RK818=y
    +#CONFIG_CHARGER_BQ25700 is not set
    +#CONFIG_BATTERY_CW2015 is not set
    +#CONFIG_BATTERY_RK817 is not set
    +#CONFIG_CHARGER_RK817 is not set
    +#CONFIG_BATTERY_RK818 is not set
    +#CONFIG_CHARGER_RK818 is not set
     CONFIG_THERMAL=y
     CONFIG_THERMAL_WRITABLE_TRIPS=y
     CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y
    @@ -536,26 +536,26 @@ CONFIG_THERMAL_GOV_USER_SPACE=y
     CONFIG_CPU_THERMAL=y
     CONFIG_DEVFREQ_THERMAL=y
     CONFIG_ROCKCHIP_THERMAL=y
     # 根据实际芯片进行配置,这里只要配置PX30/RK3326
    -CONFIG_RK3368_THERMAL=y
    +#CONFIG_RK3368_THERMAL is not set
     CONFIG_WATCHDOG=y
     CONFIG_DW_WATCHDOG=y
    -CONFIG_MFD_RK618=y
    -CONFIG_MFD_RK628=y
    -CONFIG_MFD_RK630_I2C=y
    +#CONFIG_MFD_RK618 is not set
    +#CONFIG_MFD_RK628 is not set
    +#CONFIG_MFD_RK630_I2C is not set
     CONFIG_MFD_RK808=y
     # fusb根据实际需要配置,PX30开发板上面没有所以去掉
    -CONFIG_FUSB_30X=y
    +#CONFIG_FUSB_30X is not set
     CONFIG_REGULATOR=y
     CONFIG_REGULATOR_FIXED_VOLTAGE=y
      # REGULATOR配置,根据实际需要配置,PX30开发板使用的是RK809,去掉其他不需要的
    -CONFIG_REGULATOR_ACT8865=y
    -CONFIG_REGULATOR_FAN53555=y
    +#CONFIG_REGULATOR_ACT8865=y
    +#CONFIG_REGULATOR_FAN53555=y
     CONFIG_REGULATOR_GPIO=y
    -CONFIG_REGULATOR_LP8752=y
    -CONFIG_REGULATOR_MP8865=y
    +#CONFIG_REGULATOR_LP8752=y
    +#CONFIG_REGULATOR_MP8865=y
     CONFIG_REGULATOR_PWM=y
     CONFIG_REGULATOR_RK808=y
    -CONFIG_REGULATOR_TPS65132=y
    -CONFIG_REGULATOR_XZ3216=y
    -CONFIG_REGULATOR_DIO5632=y
    +#CONFIG_REGULATOR_TPS65132=y
    +#CONFIG_REGULATOR_XZ3216=y
    +#CONFIG_REGULATOR_DIO5632=y
     CONFIG_MEDIA_SUPPORT=y
     CONFIG_MEDIA_CAMERA_SUPPORT=y
     CONFIG_MEDIA_CEC_SUPPORT=y
    @@ -566,65 +566,65 @@ CONFIG_USB_VIDEO_CLASS=y
     CONFIG_V4L_PLATFORM_DRIVERS=y
     CONFIG_VIDEO_ROCKCHIP_CIF=y
     CONFIG_VIDEO_ROCKCHIP_ISP1=y
    -CONFIG_VIDEO_ROCKCHIP_ISP=y
    +#CONFIG_VIDEO_ROCKCHIP_ISP=y
     # CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
    
     # camera的sensor型号,根据实际需要进行配置,删掉不需要的配置
    -CONFIG_VIDEO_DW9714=y
    -CONFIG_VIDEO_VM149C=y
    -CONFIG_VIDEO_TC35874X=y
    -CONFIG_VIDEO_RK628_CSI=y
    -CONFIG_VIDEO_LT6911UXC=y
    -CONFIG_VIDEO_LT8619C=y
    -CONFIG_VIDEO_OV2680=y
    -CONFIG_VIDEO_OV5648=y
    -CONFIG_VIDEO_OV5695=y
    -CONFIG_VIDEO_OV8858=y
    -CONFIG_VIDEO_OV13850=y
    -CONFIG_VIDEO_GC0312=y
    -CONFIG_VIDEO_GC032A=y
    -CONFIG_VIDEO_GC2145=y
    -CONFIG_VIDEO_GC2355=y
    -CONFIG_VIDEO_GC2385=y
    -CONFIG_VIDEO_GC4C33=y
    -CONFIG_VIDEO_GC8034=y
    -CONFIG_VIDEO_SGM3784=y
    +#CONFIG_VIDEO_DW9714=y
    +#CONFIG_VIDEO_VM149C=y
    +#CONFIG_VIDEO_TC35874X=y
    +#CONFIG_VIDEO_RK628_CSI=y
    +#CONFIG_VIDEO_LT6911UXC=y
    +#CONFIG_VIDEO_LT8619C=y
    +#CONFIG_VIDEO_OV2680=y
    +#CONFIG_VIDEO_OV5648=y
    +#CONFIG_VIDEO_OV5695=y
    +#CONFIG_VIDEO_OV8858=y
    +#CONFIG_VIDEO_OV13850=y
    +#CONFIG_VIDEO_GC0312=y
    +#CONFIG_VIDEO_GC032A=y
    +#CONFIG_VIDEO_GC2145=y
    +#CONFIG_VIDEO_GC2355=y
    +#CONFIG_VIDEO_GC2385=y
    +#CONFIG_VIDEO_GC4C33=y
    +#CONFIG_VIDEO_GC8034=y
    +#CONFIG_VIDEO_SGM3784=y
    
     # CONFIG_VGA_ARB is not set
     CONFIG_DRM=y
     CONFIG_DRM_IGNORE_IOTCL_PERMIT=y
     # PX30/RK3326不支持DP和HDMI,所以去掉DP和HDMI相关的配置
    -CONFIG_ROCKCHIP_ANALOGIX_DP=y
    -CONFIG_ROCKCHIP_CDN_DP=y
    -CONFIG_ROCKCHIP_DW_HDMI=y
    +#CONFIG_ROCKCHIP_ANALOGIX_DP=y
    +#CONFIG_ROCKCHIP_CDN_DP=y
    +#CONFIG_ROCKCHIP_DW_HDMI=y
     CONFIG_ROCKCHIP_DW_MIPI_DSI=y
    -CONFIG_ROCKCHIP_INNO_HDMI=y
    +#CONFIG_ROCKCHIP_INNO_HDMI=y
     CONFIG_ROCKCHIP_LVDS=y
     CONFIG_ROCKCHIP_DRM_TVE=y
     CONFIG_ROCKCHIP_RGB=y
    -CONFIG_DRM_ROCKCHIP_RK618=y
    -CONFIG_DRM_ROCKCHIP_RK628=y
    +#CONFIG_DRM_ROCKCHIP_RK618=y
    +#CONFIG_DRM_ROCKCHIP_RK628=y
     CONFIG_DRM_PANEL_SIMPLE=y
    -CONFIG_DRM_RK630_TVE=y
    -CONFIG_DRM_RK1000_TVE=y
    -CONFIG_DRM_SII902X=y
    -CONFIG_DRM_DW_HDMI_I2S_AUDIO=y
    -CONFIG_DRM_DW_HDMI_CEC=y
    -CONFIG_MALI400=y
    -CONFIG_MALI450=y
    +#CONFIG_DRM_RK630_TVE=y
    +#CONFIG_DRM_RK1000_TVE=y
    +#CONFIG_DRM_SII902X=y
    +#CONFIG_DRM_DW_HDMI_I2S_AUDIO=y
    +#CONFIG_DRM_DW_HDMI_CEC=y
    
     # MALI配置,PX30/RK3326使用的是BIFROST的驱动,所以删掉其他的配置,MALI_MIDGARD是RK3399上面使用
    -CONFIG_MALI400=y
    -CONFIG_MALI450=y
    +# CONFIG_MALI400 is not set
    +# CONFIG_MALI450 is not set
     # CONFIG_MALI400_PROFILING is not set
     CONFIG_MALI_SHARED_INTERRUPTS=y
     CONFIG_MALI_DT=y
     CONFIG_MALI_DEVFREQ=y
    -CONFIG_MALI_MIDGARD=y
    +# CONFIG_MALI_MIDGARD is not set
     CONFIG_MALI_EXPERT=y
     CONFIG_MALI_PLATFORM_THIRDPARTY=y
     CONFIG_MALI_PLATFORM_THIRDPARTY_NAME="rk"
    -CONFIG_MALI_DEBUG=y
    +# CONFIG_MALI_DEBUG is not set
     CONFIG_MALI_PWRSOFT_765=y
     CONFIG_MALI_BIFROST=y
     CONFIG_MALI_BIFROST_DEVFREQ=y
     CONFIG_MALI_PLATFORM_NAME="rk"
     CONFIG_MALI_BIFROST_EXPERT=y
    -CONFIG_MALI_BIFROST_DEBUG=y
    +# CONFIG_MALI_BIFROST_DEBUG is not set
     CONFIG_BACKLIGHT_LCD_SUPPORT=y
     # CONFIG_LCD_CLASS_DEVICE is not set
     CONFIG_BACKLIGHT_CLASS_DEVICE=y
    @@ -633,11 +633,11 @@ CONFIG_BACKLIGHT_PWM=y
     CONFIG_ROCKCHIP_MULTI_RGA=y
     CONFIG_IEP=y
     CONFIG_ROCKCHIP_MPP_SERVICE=y
     #PX30/RK3326上面没有VDPU1 RKVDEC  VEPU1,所以删掉
    -CONFIG_ROCKCHIP_MPP_RKVDEC=y
    +# CONFIG_ROCKCHIP_MPP_RKVDEC is not set
     CONFIG_ROCKCHIP_MPP_RKVDEC2=y
     CONFIG_ROCKCHIP_MPP_RKVENC=y
    -CONFIG_ROCKCHIP_MPP_VDPU1=y
    -CONFIG_ROCKCHIP_MPP_VEPU1=y
    +# CONFIG_ROCKCHIP_MPP_VDPU1 is not set
    +# CONFIG_ROCKCHIP_MPP_VEPU1 is not set
     CONFIG_ROCKCHIP_MPP_VDPU2=y
     CONFIG_ROCKCHIP_MPP_VEPU2=y
     CONFIG_ROCKCHIP_MPP_IEP2=y
    @@ -657,21 +657,21 @@ CONFIG_SND_SOC_ROCKCHIP_I2S_TDM=y
     CONFIG_SND_SOC_ROCKCHIP_PDM=y
     CONFIG_SND_SOC_ROCKCHIP_SPDIF=y
     CONFIG_SND_SOC_ROCKCHIP_MULTICODECS=y
     # 声卡的配置,根据需要进行配置,删除多余的配置
    -CONFIG_SND_SOC_ROCKCHIP_RT5651=y
    +#CONFIG_SND_SOC_ROCKCHIP_RT5651 is not set
     CONFIG_SND_SOC_ROCKCHIP_HDMI=y
     CONFIG_SND_SOC_BT_SCO=y
    -CONFIG_SND_SOC_CX2072X=y
    +#CONFIG_SND_SOC_CX2072X is not set
     CONFIG_SND_SOC_DUMMY_CODEC=y
    -CONFIG_SND_SOC_ES7202=y
    -CONFIG_SND_SOC_ES7210=y
    -CONFIG_SND_SOC_ES7243E=y
    -CONFIG_SND_SOC_ES8311=y
    -CONFIG_SND_SOC_ES8316=y
    -CONFIG_SND_SOC_ES8396=y
    -CONFIG_SND_SOC_RK3328=y
    +#CONFIG_SND_SOC_ES7202 is not set
    +#CONFIG_SND_SOC_ES7210 is not set
    +#CONFIG_SND_SOC_ES7243E is not set
    +#CONFIG_SND_SOC_ES8311 is not set
    +#CONFIG_SND_SOC_ES8316 is not set
    +#CONFIG_SND_SOC_ES8396 is not set
    +#CONFIG_SND_SOC_RK3328 is not set
     CONFIG_SND_SOC_RK817=y
     CONFIG_SND_SOC_RK_CODEC_DIGITAL=y
    -CONFIG_SND_SOC_RT5640=y
    +#CONFIG_SND_SOC_RT5640 is not set
     CONFIG_SND_SOC_SPDIF=y
     CONFIG_SND_SIMPLE_CARD=y
     CONFIG_HIDRAW=y
    #PX30/RK3326不支持USB3.0,所以可以删掉USB3.0相关配置
     CONFIG_USB_MON=y
    -CONFIG_USB_XHCI_HCD=y
    +#CONFIG_USB_XHCI_HCD=y
     CONFIG_USB_EHCI_HCD=y
     CONFIG_USB_EHCI_HCD_PLATFORM=y
     CONFIG_USB_OHCI_HCD=y
     # CONFIG_USB_OHCI_HCD_PCI is not set
     CONFIG_USB_OHCI_HCD_PLATFORM=y
     CONFIG_USB_PRINTER=y
     CONFIG_USB_STORAGE=y
     CONFIG_USB_STORAGE_DATAFAB=y
    @@ -767,7 +767,7 @@ CONFIG_USB_STORAGE_KARMA=y
     CONFIG_USB_STORAGE_CYPRESS_ATACB=y
     CONFIG_USB_STORAGE_ENE_UB6250=y
     CONFIG_USB_UAS=y
    -CONFIG_USB_DWC3=y
    +#CONFIG_USB_DWC3=y
     CONFIG_USB_DWC2=y
     CONFIG_USB_SERIAL=y
     CONFIG_USB_SERIAL_GENERIC=y
    @@ -778,9 +778,9 @@ CONFIG_USB_GADGET_DEBUG_FILES=y
     CONFIG_USB_GADGET_VBUS_DRAW=500
     CONFIG_USB_CONFIGFS=y
     CONFIG_USB_CONFIGFS_UEVENT=y
     CONFIG_USB_CONFIGFS_F_FS=y
     CONFIG_USB_CONFIGFS_F_ACC=y
     CONFIG_USB_CONFIGFS_F_AUDIO_SRC=y
    # PX30 EVB板子没有使用LED灯,所以去掉相关配置
    @@ -796,13 +796,13 @@ CONFIG_MMC_SDHCI_OF_ARASAN=y
     CONFIG_MMC_SDHCI_OF_DWCMSHC=y
     CONFIG_MMC_DW=y
     CONFIG_MMC_DW_ROCKCHIP=y
    -CONFIG_LEDS_CLASS_FLASH=y
    -CONFIG_LEDS_GPIO=y
    -CONFIG_LEDS_RGB13H=y
    -CONFIG_LEDS_TRIGGER_TIMER=y
    -CONFIG_LEDS_TRIGGER_HEARTBEAT=y
    -CONFIG_LEDS_TRIGGER_BACKLIGHT=y
    -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
    +#CONFIG_LEDS_CLASS_FLASH=y
    +#CONFIG_LEDS_GPIO=y
    +#CONFIG_LEDS_RGB13H=y
    +#CONFIG_LEDS_TRIGGER_TIMER=y
    +#CONFIG_LEDS_TRIGGER_HEARTBEAT=y
    +#CONFIG_LEDS_TRIGGER_BACKLIGHT=y
    +#CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
     CONFIG_RTC_CLASS=y
     CONFIG_RTC_DRV_RK808=y
     CONFIG_DMADEVICES=y
     # 芯片相关配置,根据实际芯片进行配置,这里只配置PX30,PX30和RK3326同一个配置
    @@ -826,14 +826,14 @@ CONFIG_COMMON_CLK_SCMI=y
     # CONFIG_COMMON_CLK_XGENE is not set
     CONFIG_COMMON_CLK_PWM=y
     CONFIG_MAILBOX=y
    -CONFIG_RK3368_MBOX=y
    -CONFIG_RK3368_SCPI_PROTOCOL=y
    +#CONFIG_RK3368_MBOX=y
    +#CONFIG_RK3368_SCPI_PROTOCOL=y
     CONFIG_ROCKCHIP_IOMMU=y
     CONFIG_CPU_PX30=y
    -CONFIG_CPU_RK3328=y
    -CONFIG_CPU_RK3368=y
    -CONFIG_CPU_RK3399=y
    -CONFIG_CPU_RK3568=y
    +#CONFIG_CPU_RK3328=y
    +#CONFIG_CPU_RK3368=y
    +#CONFIG_CPU_RK3399=y
    +#CONFIG_CPU_RK3568=y
     CONFIG_ANDROID_VERSION=0x08000000
     CONFIG_ROCKCHIP_PM_DOMAINS=y
     CONFIG_ROCKCHIP_PVTM=y
    
    #删除PX30和RK3326没有使用的到USB3.0和HDMI及PCIE的配置
    @@ -857,16 +857,16 @@ CONFIG_PWM=y
     CONFIG_PWM_ROCKCHIP=y
     CONFIG_PHY_ROCKCHIP_CSI2_DPHY=y
     CONFIG_PHY_ROCKCHIP_EMMC=y
    -CONFIG_PHY_ROCKCHIP_INNO_HDMI_PHY=y
    +#CONFIG_PHY_ROCKCHIP_INNO_HDMI_PHY=y
     CONFIG_PHY_ROCKCHIP_INNO_MIPI_DPHY=y
     CONFIG_PHY_ROCKCHIP_INNO_USB2=y
    -CONFIG_PHY_ROCKCHIP_INNO_USB3=y
    +#CONFIG_PHY_ROCKCHIP_INNO_USB3=y
     CONFIG_PHY_ROCKCHIP_INNO_VIDEO_COMBO_PHY=y
     CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y
     CONFIG_PHY_ROCKCHIP_NANENG_EDP=y
    -CONFIG_PHY_ROCKCHIP_PCIE=y
    +#CONFIG_PHY_ROCKCHIP_PCIE=y
     CONFIG_PHY_ROCKCHIP_SNPS_PCIE3=y
    -CONFIG_PHY_ROCKCHIP_TYPEC=y
    +#CONFIG_PHY_ROCKCHIP_TYPEC=y
     CONFIG_PHY_ROCKCHIP_USB=y
     CONFIG_ANDROID=y
     CONFIG_ANDROID_BINDER_IPC=y
    
    @@ -874,7 +874,7 @@ CONFIG_ROCKCHIP_EFUSE=y
     CONFIG_ROCKCHIP_OTP=y
     CONFIG_TEE=y
     CONFIG_OPTEE=y
     # NAND FLASH配置,根据需要进行配置,RK3566 EVB是用eMMC,所以删掉nand配置
    -CONFIG_RK_NAND=y
    +# CONFIG_RK_NAND is not set
     CONFIG_RK_HEADSET=y
     CONFIG_ROCKCHIP_RKNPU=y
     CONFIG_EXT4_FS=y
    #去掉debug相关配置,在量产的时候可以去掉,开发的时候建议保留
    @@ -930,8 +930,8 @@ CONFIG_CRYPTO_ANSI_CPRNG=y
     CONFIG_CRYPTO_DEV_ROCKCHIP=y
     CONFIG_CRYPTO_DEV_ROCKCHIP_DEV=y
     CONFIG_PRINTK_TIME=y
    -CONFIG_DEBUG_INFO=y
    -CONFIG_DEBUG_FS=y
    +# CONFIG_DEBUG_INFO is not set
    +# CONFIG_DEBUG_FS is not set
     CONFIG_MAGIC_SYSRQ=y
     CONFIG_SOFTLOCKUP_DETECTOR=y
     CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
    @@ -939,5 +939,5 @@ CONFIG_PANIC_TIMEOUT=5
     CONFIG_SCHEDSTATS=y
     CONFIG_SCHED_STACK_END_CHECK=y
     # CONFIG_DEBUG_PREEMPT is not set
    -CONFIG_ENABLE_DEFAULT_TRACERS=y
    -CONFIG_BUG_ON_DATA_CORRUPTION=y
    +# CONFIG_ENABLE_DEFAULT_TRACERS is not set
    +# CONFIG_BUG_ON_DATA_CORRUPTION=y is not set
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250
    • 251
    • 252
    • 253
    • 254
    • 255
    • 256
    • 257
    • 258
    • 259
    • 260
    • 261
    • 262
    • 263
    • 264
    • 265
    • 266
    • 267
    • 268
    • 269
    • 270
    • 271
    • 272
    • 273
    • 274
    • 275
    • 276
    • 277
    • 278
    • 279
    • 280
    • 281
    • 282
    • 283
    • 284
    • 285
    • 286
    • 287
    • 288
    • 289
    • 290
    • 291
    • 292
    • 293
    • 294
    • 295
    • 296
    • 297
    • 298
    • 299
    • 300
    • 301
    • 302
    • 303
    • 304
    • 305
    • 306
    • 307
    • 308
    • 309
    • 310
    • 311
    • 312
    • 313
    • 314
    • 315
    • 316
    • 317
    • 318
    • 319
    • 320
    • 321
    • 322
    • 323
    • 324
    • 325
    • 326
    • 327
    • 328
    • 329
    • 330
    • 331
    • 332
    • 333
    • 334
    • 335
    • 336
    • 337
    • 338
    • 339
    • 340
    • 341
    • 342
    • 343
    • 344
    • 345
    • 346
    • 347
    • 348
    • 349
    • 350
    • 351
    • 352
    • 353
    • 354
    • 355
    • 356
    • 357
    • 358
    • 359
    • 360
    • 361
    • 362
    • 363
    • 364
    • 365
    • 366
    • 367
    • 368
    • 369
    • 370
    • 371
    • 372
    • 373
    • 374
    • 375
    • 376
    • 377
    • 378
    • 379
    • 380
    • 381
    • 382
    • 383
    • 384
    • 385
    • 386
    • 387
    • 388
    • 389
    • 390
    • 391
    • 392
    • 393
    • 394
    • 395
    • 396
    • 397
    • 398
    • 399
    • 400
    • 401
    • 402
    • 403
    • 404
    • 405
    • 406
    • 407
    • 408
    • 409
    • 410
    • 411
    • 412
    • 413
    • 414
    • 415
    • 416
    • 417
    • 418
    • 419
    • 420
    • 421
    • 422
    • 423
    • 424
    • 425
    • 426
    • 427
    • 428
    • 429
    • 430
    • 431
    • 432
    • 433
    • 434
    • 435
    • 436
    • 437
    • 438
    • 439
    • 440
    • 441
    • 442
    • 443
    • 444
    • 445
    • 446
    • 447
    • 448
    • 449
    • 450
    • 451
    • 452
    • 453
    • 454
    • 455
    • 456
    • 457
    • 458
    • 459
    • 460
    • 461
    • 462
    • 463
    • 464
    • 465
    • 466
    • 467
    • 468
    • 469
    • 470
    • 471
    • 472
    • 473
    • 474
    • 475
    • 476
    • 477
    • 478
    • 479
    • 480
    • 481
    • 482
    • 483
    • 484
    • 485
    • 486
    • 487
    • 488
    • 489
    • 490
    • 491
    • 492
    • 493
    • 494
    • 495
    • 496
    • 497
    • 498
    • 499
    • 500
    • 501
    • 502
    • 503
    • 504
    • 505
    • 506
    • 507
    • 508
    • 509
    • 510
    • 511
    • 512
    • 513
    • 514
    • 515
    • 516
    • 517
    • 518
    • 519
    • 520
    • 521
    • 522
    • 523
    • 524
    • 525
    • 526
    • 527
    • 528
    • 529
    • 530
    • 531
    • 532
    • 533
    • 534
    • 535
    • 536
    • 537
    • 538
    • 539
    • 540
    • 541
    • 542
    • 543
    • 544
    • 545
    • 546
    • 547
    • 548
    • 549
    • 550
    • 551
    • 552
    • 553
    • 554
    • 555
    • 556
    • 557
    • 558
    • 559
    • 560
    • 561
    • 562
    • 563
    • 564
    • 565
    • 566
    • 567
    • 568
    • 569
    • 570
    • 571
    • 572
    • 573
    • 574
    • 575
    • 576
    • 577
    • 578
    • 579
    • 580
    • 581
    • 582
    • 583
    • 584
    • 585
    • 586
    • 587
    • 588
    • 589
    • 590
    • 591
    • 592
    • 593
    • 594
    • 595
    • 596
    • 597
    • 598
    • 599
    • 600
    • 601
    • 602
    • 603
    • 604
    • 605
    • 606
    • 607
    • 608
    • 609
    • 610
    • 611
    • 612
    • 613
    • 614
    • 615
    • 616
    • 617
    • 618
    • 619
    • 620
    • 621

    Rockchip 平台APK的裁剪

    Android11的代码中可以在vendor/rockchip/common/apps/apps.mk中去掉不需要的apk,可以根据需求进行删减,这里面的apk都是可以删减的。
    Android12对应的mk文件在device/rockchip/common/modules/rockchip_apps.mk中指定RK的app。

    Rockchip其他新芯片平台的优化

    Rockchip RK356X Android平台内存优化及系统裁剪

  • 相关阅读:
    MySQL---函数的类型和演示
    【科研】浅学Cross-attention?
    jsbridge实战1:xcode swift 构建iOS app
    千兆光模块和万兆光模块的区别?
    ARM开发(四)新手小白如何阅读芯片手册,裸机驱动开发步骤以及纯汇编实现点灯,汇编结合c点灯,c实现点灯
    SSM - Springboot - MyBatis-Plus 全栈体系(十八)
    【开源】JAVA+Vue.js实现创意工坊双创管理系统
    进销存系统和ERP系统怎么选?有什么区别?
    算法导论实战(六)(算法导论习题三十四、三十五章)
    TDengine 入门教程⑦——数据库管理工具 | IDEA 连接 TDengine
  • 原文地址:https://blog.csdn.net/weixin_43245753/article/details/126198686