|
手里有个路由板子,想装个frpc做内网穿透,但是光这个东西就4M多,原来的8M闪存是肯定不够的,反正有16M的闪存,上上去吧
这里记录一下怎么修改这个东西,目前手里只有ramips设备,就以它为例,其他架构可能有所不同!
到openwrt/target/linux/ramips/dts目录下打开你要编译的设备的dts文件,这里以mt7620a_phicomm_psg1208.dts为例
找到spi这一项,修改后面带#注释部分
- &spi0 {
- status = "okay";
- flash@0 {
- compatible = "jedec,spi-nor";
- reg = <0>;
- spi-max-frequency = <80000000>;
- m25p,fast-read;
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
- partition@0 {
- label = "u-boot";
- reg = <0x0 0x30000>;
- read-only;
- };
- partition@20000 {
- label = "u-boot-env";
- reg = <0x30000 0x10000>;
- read-only;
- };
- factory: partition@30000 {
- label = "factory";
- reg = <0x40000 0x10000>;
- read-only;
- };
- partition@40000 {
- compatible = "denx,uimage";
- label = "firmware";
- reg = <0x50000 0xfb0000>; #此处原来是0x7b0000,因为从8M改到16M,大了8M,7这个地方给它加8,就是十六进制的F
- };
- };
- };
- };
复制代码
然后再改一个文件
openwrt/target/linux/ramips/image这个目录下的对应的cpu文件,我的设备是mt7620,就打开它,然后所有的mt7620设备的信息都在这里,搜到psg1208这个地方修改后面带#注释部分
- define Device/phicomm_psg1208
- SOC := mt7620a
- IMAGE_SIZE := 15872k #此处原来是7872K,依然在7这个地方给他加8,十进制就是15
- DEVICE_VENDOR := Phicomm
- DEVICE_MODEL := PSG1208
- DEVICE_PACKAGES := kmod-mt76x2
- SUPPORTED_DEVICES += psg1208
- endef
- TARGET_DEVICES += phicomm_psg1208
复制代码
这么操作可行!!!
|
|