使用128M和512M的内核配置都是一样的,内核里都不包含显示驱动,设备树里除了内存地址范围不同,其他也都相同。128M的保留内存只有19980k,不知道512M的reserved-memory为什么117404K,请问要如何调整reserved-memory?
128M:
512M:
2023/06/25 11:18
把设备树里面reserved-memory删除display相关内容
output/build/linux-custom/arm64/boot/dts/nuvoton/ma35d1.dtsi
把以下内容
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
display_buf: display_buf@0 {
reg = <0x0 0x8C800000 0x0 0x3000000>; /* 48MiB */
no-map;
};
vc8k_buf: vc8k_buf@0 {
reg = <0x0 0x8A800000 0x0 0x2000000>; /* 32MiB */
no-map;
};
gc520l_buf: gc520l_buf@0 {
reg = <0x0 0x8A000000 0x0 0x800000>; /* 8MiB */
no-map;
};
rproc_buf: rproc_buf@0 {
reg = <0x0 0x80020000 0x0 0x60000>; /* 384KB */
no-map;
};
};
修改成
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
rproc_buf: rproc_buf@0 {
reg = <0x0 0x80020000 0x0 0x60000>; /* 384KB */
no-map;
};
};
同时需要修改内核Makefile
output/build/linux-custom/arch/arm64/boot/dts/nuvoton/Makefile
把以下内容:
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_ARCH_MA35D1) += ma35d1-iot-128m.dtb \
ma35d1-iot-256m.dtb \
ma35d1-iot-512m.dtb \
ma35d1-som-256m.dtb \
ma35d1-som-512m.dtb \
ma35d1-som-1g.dtb
always := $(dtb-y)
clean-files := *.dtb
修改成:
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_ARCH_MA35D1) += ma35d1-iot-512m.dtb
always := $(dtb-y)
clean-files := *.dtb