一、分支切换出错

openwrt&lede编译笔记

导致这样的错误是在本地环境中修改过target/linux/ramips/image/mt7620.mk文件,

备份target/linux/ramips/image/mt7620.mk文件,再git reset --hard

git checkout openwrt-18.06    成功切换

或者直接强制切换


date:2018/6/7

二、[mktplinkfw2] *** error: rootfs image is too big

Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP)

固件内容超过了8M

编译的是mzk的目标板,使用的16M flash   直接把Default8M更改为Default16M就编译通过


三、DTB marker not found!

通过grep命令查看  打印该错误信息的源码在./patch-image/src/patch-dtb.c

openwrt&lede编译笔记

是因为没有匹配到文件中的OWRTDTB:

在一个正常编译的环境下(4.4的内核)匹配查找到./target/linux/ramips/patches-3.18  存放补丁的目录文件,原因是我在更换内核(3.18)的时候没有添加

openwrt&lede编译笔记

添加相应的补丁文件就能成功编译


date:2018/6/15

四、openwrt gcc版本更换

修改编译根目录下的.config文件中的CONFIG_GCC_VERSION="7.3.0";7.3.0是编译openwrt固件正在使用gcc版本


五、更换内核需要添加或修改的目录(rampis)

参考:https://blog.csdn.net/flexman09/article/details/51862858

1、include/kernel-version.mk

LINUX_VERSION-3.18 = .20        #内核替换成版本:3.18.20

2、target/linux/generic/config-3.18

3、target/linux/generic/pending-3.18

4、target/linux/ramips/files-3.18

5、target/linux/ramips/pathes-3.18

5、target/linux/ramips/mt7620/config-3.18

6、target/linux/ramips/Makefile    #KERNEL_PATCHVER:=3.18

可能改动的文件:

target/linux/generic/files

target/linux/ramips/mt7620/profiles

相关文章: