修改cmdline 把内存改成512MB
#添加cmdline的方式
— — 在BoardConfig.mk中修改
device/mediateksample/aiv8167sm3_bsp/BoardConfig.mk
BOARD_KERNEL_CMDLINE = bootopt=64S3,32N2,32N2 mem=512MB
— — 在dts 里面修改
kernel-4.4\arch\arm\boot\dts\*.dts
/ {
model = "Atmel AT91SAM9M10G45-EK";
compatible = "atmel,at91sam9m10g45ek", "atmel,at91sam9g45", "atmel,at91sam9";
chosen {
bootargs = "mem=64M root=/dev/mtdblock1 rw rootfstype=jffs2";
stdout-path = "serial0:115200n8";
};
— — 在Makefile里面修改
build/core/Makefile
INTERNAL_KERNEL_CMDLINE := $(strip $(BOARD_KERNEL_CMDLINE) buildvariant=$(TARGET_BUILD_VARIANT) $(VERITY_KEYID))
ifdef INTERNAL_KERNEL_CMDLINE
INTERNAL_BOOTIMAGE_ARGS += --cmdline "$(INTERNAL_KERNEL_CMDLINE)"
endif
#把内存修改成512MB并验证
diff
index f1aa6d75fa..a66d1a2ff1 100644
--- a/device/xxx/xxx/BoardConfig.mk
+++ b/device/xxx/xxx/BoardConfig.mk
@@ -23,9 +23,9 @@ MTK_INTERNAL_CDEFS += $(foreach t,$(AUTO_ADD_GLOBAL_DEFINE_BY_NAME_VALUE),$(if $
MTK_GLOBAL_CFLAGS += $(MTK_INTERNAL_CDEFS)
ifneq ($(MTK_K64_SUPPORT), yes)
-BOARD_KERNEL_CMDLINE = bootopt=64S3,32N2,32N2
+BOARD_KERNEL_CMDLINE = bootopt=64S3,32N2,32N2 mem=512MB
else
-BOARD_KERNEL_CMDLINE = bootopt=64S3,32N2,64N2
+BOARD_KERNEL_CMDLINE = bootopt=64S3,32N2,64N2 mem=512MB
endif
PRODUCT_CHARACTERISTICS := tablet
开机启动
#总结
我们这个项目的内存原来是1GB的,但是考虑到降成本的方案,降成本这个事情应该是每个嵌入式工程师都需要面对的,如果没有降成本,那我们可能没有很多事情做,每天打酱油那是非常令人烦恼的。
评论