当前位置:   article > 正文

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

build_with_go_opt

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


随着Android版本的不断升级更新,Android系统对硬件的要求越来越高,特别是cpu和ddr,在Android11及之后的版本DDR容量就要求至少2GB,DDR容量1GB的设备运行高版本的Android系统就会越来越吃力。针对1GB 容量的DDR的设备,做一下优化和系统裁剪来降低系统的内存占用。

编译32bit的Android系统

针对64位的cpu可以使用32位的系统,从而减少系统的内存占用。
具体修改是在Boardconfig里面配置系统为32位,根据不同芯片配置方式会有差异,具体如下:

  1. 查看原来的系统配置
    这个配置信息在device下面的芯片目录中的Boardconfig里面配置,
    如RK3566/RK3568芯片:
device/rockchip/rk356x/BoardConfig.mk"
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := cortex-a55
TARGET_CPU_SMP := true

TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv8-2a
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := cortex-a55
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  1. 修改为32位的系统
    将上面的配置修改为32位系统的配置,修改方式就是把TARGET_2ND_的配置配到TARGET_ARCH上面,并将TARGET_2ND_*去掉, 如下:
@sys2_206:~/1_Android11_sdk_29/device/rockchip/rk356x$ git diff
diff --git a/BoardConfig.mk b/BoardConfig.mk
index e2773c1..9d1d68a 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -4,18 +4,18 @@

 CURRENT_SDK_VERSION := rk356x_ANDROID10.0_MID_V1.0

-TARGET_ARCH := arm64
-TARGET_ARCH_VARIANT := armv8-a
-TARGET_CPU_ABI := arm64-v8a
-TARGET_CPU_ABI2 :=
+TARGET_ARCH := arm
+TARGET_ARCH_VARIANT := armv8-2a
+TARGET_CPU_ABI := armeabi-v7a
+TARGET_CPU_ABI2 :=armeabi
 TARGET_CPU_VARIANT := cortex-a55
 TARGET_CPU_SMP := true

-TARGET_2ND_ARCH := arm
-TARGET_2ND_ARCH_VARIANT := armv8-2a
-TARGET_2ND_CPU_ABI := armeabi-v7a
-TARGET_2ND_CPU_ABI2 := armeabi
-TARGET_2ND_CPU_VARIANT := cortex-a55
+#TARGET_2ND_ARCH := arm
+#TARGET_2ND_ARCH_VARIANT := armv8-2a
+#TARGET_2ND_CPU_ABI := armeabi-v7a
+#TARGET_2ND_CPU_ABI2 := armeabi
+#TARGET_2ND_CPU_VARIANT := cortex-a55
  • 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

启用Android GO的配置

Android Go对当前的Android系统进行简化,使其可以在更小内存的手机上运行,它能让低端手机保持一定的系统更新、同时又不会过度消耗低端硬件资源。
Android上面可以通过配置打开GO的配置,具体配置如下:

BUILD_WITH_GO_OPT := true
  • 1

在产品的Boardconfig.mk加上这个配置即可。

系统裁剪

在编译32位系统和加上GO的配置还无法满足需求的情况下,可以根据产品的定义和需求对系统进行裁剪,具体可以裁剪的部分包括如下:

kernel裁剪

RK的kernel是一个通用版本的kernel,为了兼容各个芯片会把每个芯片的配置和产品上面的需要的外设都配置编译,这样就会导致kernel的固件比较大,固件大就会影响系统开机速度。按这个思路我们可以针对每个具体的产品对kernel进行瘦身裁剪,下面以RK3566和RK3568芯片平台为例进行裁剪。

裁剪前后的固件和开机时间对比
项目kernel裁剪前kernel裁剪后
kernel.img固件大小31M26M
uboot启动耗时1211.90 ms1139.649 ms
kernel启动完到init4.990744s1.017721s
android启动完成25.541467s19.436804s

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

  • uboot启动时间
Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
Adding bank: 0x09400000 - 0x80000000 (size: 0x76c00000)
Total: 1139.649 ms
  • 1
  • 2
  • 3
  • kernel阶段
[    1.014414] Run /init as init process
[    1.017721] init: init first stage started!
  • 1
  • 2
  • android阶段
[   19.436711] init: Service 'bootanim' (pid 170) exited with status 0 oneshot service took 16.457001 seconds in background
[   19.436804] init: Sending signal 9 to service 'bootanim' (pid 170) 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的配置,可以根据产品需要进行配置,因为RK3566开发板上面没有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
@@ -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根据产品需要进行配置,RK3566开发板上面没有所以去掉
-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转以太网模块,根据产品需要进行配置,RK3566开发板上面没有所以去掉
-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网卡,根据产品需要进行配置,RK3566开发板上面没有所以去掉
-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模块,根据产品需要进行配置,RK3566开发板上面用的是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来做按键,RK3566 EVB板子是通过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触摸板,根据需要配置,RK3566开发板上面没有所以去掉
-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
 #触摸屏,根据需要配置,RK3566开发板用的是GT9XX,其他的没用所以去掉,只留下需要的
-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_GSLX6801 is not set
+#CONFIG_TOUCHSCREEN_GSLX680_PAD is not set
+#CONFIG_TOUCHSCREEN_GSLX680_VR is not set
+#CONFIG_TOUCHSCREEN_GSL3673 is not set
+#CONFIG_TOUCHSCREEN_GSL3673_800X1280 is not set
+#CONFIG_TOUCHSCREEN_GSL3676 is not set
 CONFIG_TOUCHSCREEN_GT9XX=y
-CONFIG_TOUCHSCREEN_HYN_CST2XX=y
-CONFIG_TOUCHSCREEN_WACOM_W9013=y
+#CONFIG_TOUCHSCREEN_HYN_CST2XX is not set
+#CONFIG_TOUCHSCREEN_WACOM_W9013 is not set
 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相关的配置,根据需要配置,RK3566 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 RK3566 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
 # 充电部分,因为RK3566没有带电池,所以去掉
-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
 # 根据实际芯片进行配置,这里只要配置RK3568
-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根据实际需要配置,RK3566开发板上面没有所以去掉
-CONFIG_FUSB_30X=y
+#CONFIG_FUSB_30X is not set
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
  # REGULATOR配置,根据实际需要配置,RK3566开发板使用的是RK809,去掉其他不需要的
-CONFIG_REGULATOR_ACT8865=y
+#CONFIG_REGULATOR_ACT8865 is not set
 CONFIG_REGULATOR_FAN53555=y
 CONFIG_REGULATOR_GPIO=y
-CONFIG_REGULATOR_LP8752=y
-CONFIG_REGULATOR_MP8865=y
+#CONFIG_REGULATOR_LP8752 is not set
+#CONFIG_REGULATOR_MP8865 is not set
 CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK808=y
-CONFIG_REGULATOR_TPS65132=y
+#CONFIG_REGULATOR_TPS65132 is not set
 CONFIG_REGULATOR_XZ3216=y
-CONFIG_REGULATOR_DIO5632=y
+#CONFIG_REGULATOR_DIO5632 is not set
 CONFIG_MEDIA_SUPPORT=y
 CONFIG_MEDIA_CAMERA_SUPPORT=y
 CONFIG_MEDIA_CEC_SUPPORT=y
@@ -565,28 +565,28 @@ CONFIG_MEDIA_USB_SUPPORT=y
 CONFIG_USB_VIDEO_CLASS=y
 CONFIG_V4L_PLATFORM_DRIVERS=y
 CONFIG_VIDEO_ROCKCHIP_CIF=y
 # ISP1是rk3288 RK3326 RK3399上面使用,根据实际芯片进行配置
-CONFIG_VIDEO_ROCKCHIP_ISP1=y
+# CONFIG_VIDEO_ROCKCHIP_ISP1 is not set

 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_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_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
@@ -600,31 +600,31 @@ 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 is not set
+#CONFIG_DRM_ROCKCHIP_RK628 is not set
 CONFIG_DRM_PANEL_SIMPLE=y
-CONFIG_DRM_RK630_TVE=y
-CONFIG_DRM_RK1000_TVE=y
-CONFIG_DRM_SII902X=y
+#CONFIG_DRM_RK630_TVE is not set
+#CONFIG_DRM_RK1000_TVE is not set
+#CONFIG_DRM_SII902X is not set
 CONFIG_DRM_DW_HDMI_I2S_AUDIO=y
 CONFIG_DRM_DW_HDMI_CEC=y
 # MALI配置,RK356X使用的是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
 #RK356X上面没有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
@@ -826,13 +826,13 @@ 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 is not set
+# CONFIG_RK3368_SCPI_PROTOCOL is not set
 CONFIG_ROCKCHIP_IOMMU=y
-CONFIG_CPU_PX30=y
-CONFIG_CPU_RK3328=y
-CONFIG_CPU_RK3368=y
-CONFIG_CPU_RK3399=y
+# CONFIG_CPU_PX30 is not set
+# CONFIG_CPU_RK3328 is not set
+# CONFIG_CPU_RK3368 is not set
+# CONFIG_CPU_RK3399 is not set
 CONFIG_CPU_RK3568=y
 CONFIG_ANDROID_VERSION=0x08000000
 CONFIG_ROCKCHIP_PM_DOMAINS=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
@@ -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

UBOOT裁剪

UBOOT的启动时间包括uboot本身的代码运行时间加上加载boot.img(包含kernel和dtb)的时间,加载boot.img的时间上面已经介绍如何裁剪kernel,下面在介绍如何裁剪uboot使代码运行时间减少。
以RK356X平台为例进行裁剪:
裁剪前后uboot阶段耗时对比

项目uboot裁剪前uboot裁剪后
uboot启动耗时1139.649 ms1117.740 ms
@rk-intel-1:~/1_Android11_78/u-boot$ git diff
diff --git a/configs/rk3568_defconfig b/configs/rk3568_defconfig
index d2742454eb..52a1352450 100644
--- a/configs/rk3568_defconfig
+++ b/configs/rk3568_defconfig
@@ -13,9 +13,9 @@ CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_TARGET_EVB_RK3568=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
 #SPI NAND 和 NOR,根据产品需要配置,RK3566 EVB板子是EMMC存储,所以不需要nand的配置
-CONFIG_SPL_NAND_SUPPORT=y
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
+# CONFIG_SPL_NAND_SUPPORT=y
+# CONFIG_SPL_SPI_FLASH_SUPPORT=y
+# CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="rk3568-evb"
 CONFIG_DEBUG_UART=y
 CONFIG_FIT=y
@@ -29,7 +29,7 @@ CONFIG_BOOTDELAY=0
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_ANDROID_BOOTLOADER=y
 #AVB是Android Verified Boot,可以根据产品需要配置,如果无安全需求的可以关掉,需要配置Android上层的配置使用
-CONFIG_ANDROID_AVB=y
+# CONFIG_ANDROID_AVB=y
 CONFIG_ANDROID_BOOT_IMAGE_HASH=y
 CONFIG_SPL_BOARD_INIT=y
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
@@ -40,8 +40,8 @@ CONFIG_SPL_SHA256_SUPPORT=y
 CONFIG_SPL_CRYPTO_SUPPORT=y
 CONFIG_SPL_HASH_SUPPORT=y
 CONFIG_SPL_MMC_WRITE=y
 # MTD命令集,可以不需要
-CONFIG_SPL_MTD_SUPPORT=y
-CONFIG_SPL_MTD_WRITE=y
+# CONFIG_SPL_MTD_SUPPORT=y
+# CONFIG_SPL_MTD_WRITE=y
 CONFIG_SPL_ATF=y
 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
 CONFIG_SPL_AB=y
@@ -65,8 +65,8 @@ CONFIG_CMD_GPT=y
 CONFIG_CMD_BOOT_ANDROID=y
 CONFIG_CMD_BOOT_ROCKCHIP=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_MTD=y
-CONFIG_CMD_NAND=y
+# CONFIG_CMD_MTD=y
+# CONFIG_CMD_NAND=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_CMD_ITEST is not set
@@ -113,34 +113,34 @@ CONFIG_MMC_DW_ROCKCHIP=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_ROCKCHIP=y
-CONFIG_MTD=y
-CONFIG_MTD_BLK=y
-CONFIG_MTD_DEVICE=y
-CONFIG_NAND=y
-CONFIG_NAND_ROCKCHIP_V9=y
-CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
-CONFIG_SYS_NAND_U_BOOT_OFFS=0x8000
-CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND=0x10000
-CONFIG_MTD_SPI_NAND=y
-CONFIG_SPI_FLASH=y
-CONFIG_SF_DEFAULT_SPEED=20000000
-CONFIG_SPI_FLASH_EON=y
-CONFIG_SPI_FLASH_GIGADEVICE=y
-CONFIG_SPI_FLASH_MACRONIX=y
-CONFIG_SPI_FLASH_WINBOND=y
-CONFIG_SPI_FLASH_XMC=y
-CONFIG_SPI_FLASH_MTD=y
-CONFIG_DM_ETH=y
-CONFIG_DM_ETH_PHY=y
-CONFIG_DWC_ETH_QOS=y
-CONFIG_GMAC_ROCKCHIP=y
-CONFIG_PHY_ROCKCHIP_INNO_USB2=y
-CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
-CONFIG_PHY_ROCKCHIP_NANENG_EDP=y
+# CONFIG_MTD=y
+# CONFIG_MTD_BLK=y
+# CONFIG_MTD_DEVICE=y
+# CONFIG_NAND=y
+# CONFIG_NAND_ROCKCHIP_V9=y
+# CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
+# CONFIG_SYS_NAND_U_BOOT_OFFS=0x8000
+# CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND=0x10000
+# CONFIG_MTD_SPI_NAND=y
+# CONFIG_SPI_FLASH=y
+# CONFIG_SF_DEFAULT_SPEED=20000000
+# CONFIG_SPI_FLASH_EON=y
+# CONFIG_SPI_FLASH_GIGADEVICE=y
+# CONFIG_SPI_FLASH_MACRONIX=y
+# CONFIG_SPI_FLASH_WINBOND=y
+# CONFIG_SPI_FLASH_XMC=y
+# CONFIG_SPI_FLASH_MTD=y
+# CONFIG_DM_ETH=y
+# CONFIG_DM_ETH_PHY=y
+# CONFIG_DWC_ETH_QOS=y
+# CONFIG_GMAC_ROCKCHIP=y
+# CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+# CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
+# CONFIG_PHY_ROCKCHIP_NANENG_EDP=y
 CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_DM_FUEL_GAUGE=y
-CONFIG_POWER_FG_RK817=y
+# CONFIG_POWER_FG_RK817=y
 CONFIG_IO_DOMAIN=y
 CONFIG_ROCKCHIP_IO_DOMAIN=y
 CONFIG_DM_PMIC=y
@@ -150,8 +150,8 @@ CONFIG_REGULATOR_PWM=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_REGULATOR_RK8XX=y
 #充电部分,RK3566不带电池,所以不需要充电和电池相关配置
-CONFIG_DM_CHARGE_DISPLAY=y
-CONFIG_CHARGE_ANIMATION=y
+# CONFIG_DM_CHARGE_DISPLAY=y
+# CONFIG_CHARGE_ANIMATION=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM=y
 CONFIG_SPL_RAM=y
@@ -210,11 +210,11 @@ CONFIG_LZMA=y
 CONFIG_SPL_GZIP=y
 CONFIG_ERRNO_STR=y
 # CONFIG_EFI_LOADER is not set
-CONFIG_AVB_LIBAVB=y
-CONFIG_AVB_LIBAVB_AB=y
-CONFIG_AVB_LIBAVB_ATX=y
-CONFIG_AVB_LIBAVB_USER=y
-CONFIG_RK_AVB_LIBAVB_USER=y
+# CONFIG_AVB_LIBAVB=y
+# CONFIG_AVB_LIBAVB_AB=y
+# CONFIG_AVB_LIBAVB_ATX=y
+# CONFIG_AVB_LIBAVB_USER=y
+# CONFIG_RK_AVB_LIBAVB_USER=y
 CONFIG_OPTEE_CLIENT=y
 CONFIG_OPTEE_V2=y
 CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION=y
(END)
  • 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

Android服务的裁剪

build/make下面,可以在如下文件中对系统服务和资源进行裁剪,根据实际需要裁剪

 target/product/base_system.mk 
 target/product/base_vendor.mk 
 target/product/full_base.mk 
 target/product/handheld_product.mk 
 target/product/handheld_system.mk 
 target/product/handheld_system_ext.mk 
 target/product/languages_default.mk
 target/product/media_product.mk
 target/product/media_system.mk  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

Rockchip 平台APK的裁剪

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

Rockchip Android其他芯片平台的优化

Rockchip PX30/RK3326 Android开机时间优化

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/174249
推荐阅读
相关标签
  

闽ICP备14008679号