通过关闭kenrel一些宏定义优化开机速度
CONFIG_BLK_DEV_LOOP=y Loopback device support CONFIG_SERIAL_MSM_HS=y CONFIG_SERIAL_MSM_HSL=y CONFIG_SERIAL_MSM_HSL_CONSOLE=y By enabling these configs, it is possible to enable it’s onboard high-speed serial port for machine, based on the MSM™ chipset family of SoCs CONFIG_CC_OPTIMIZE_FOR_SIZE=y By disabling this config, boot time improvement of ~ 100 ms As it causes GCC to generate jump-to-jump code, which causes cache line bouncing and hurting performance, disable this config CONFIG_RMNET_DATA_DEBUG_PKT Enable debug for RmNet data to support MAP data feature for data connectivity CONFIG_DEBUG_SET_MODULE_RONX Sets loadable kernel module data as no execute (NX) and text as read only (RO)
特别说一下CONFIG_CC_OPTIMIZE_FOR_SIZE:
需要修改makefile和pef config。 else -KBUILD_CFLAGS += -O2 +KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,) endif
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y +#CONFIG_CC_OPTIMIZE_FOR_SIZE=y