1、准备驱动文件
2、添加到相应目录
把motorcomm.c、yt8614-phy.h放到Linux的linux-5.19.1/drivers/net/phy/
把motorcomm_phy.h放到Linux的linux-5.19.1/include/linux/
3、修改Makefile
增加:obj-$(CONFIG_MOTORCOMM_PHY) += motorcomm.o
4、修改Kconfig
增加:
config MOTORCOMM_PHY
tristate "Motorcomm PHYs"
help
Enables support for Motorcomm network PHYs.
Currently supports the YT8511 gigabit PHY.
修改文件:lib/functions/host/docker.sh
修改内容:修改容器内pip国内源

修改文件:./config/boards/orangepizero2w.csc
修改内容:

修改文件:lib/functions/configuration/main-config.sh
修改内容:

./compile.sh build BOARD=orangepizero2w BRANCH=current BUILD_DESKTOP=no BUILD_MINIMAL=no KERNEL_CONFIGURE=yes RELEASE=jammy UBOOT_MIRROR=gitee DOWNLOAD_MIRROR=china REGIONAL_MIRROR=china MAINLINE_MIRROR=bfsu GHCR_MIRROR=dockerproxy GITHUB_MIRROR=ghproxy
[ It still works, but please prefer the new way. First, run './compile.sh BOARD=orangepizero2w BRANCH=current kernel-config'; then commit your changes; then build the image as normal. This workflow ensures consistent hashing results. ]
./compile.sh BOARD=orangepizero2w BRANCH=current kernel-config
./compile.sh BOARD=orangepizero2w BRANCH=current uboot-config
加上这三行就可以了
RUN pip install -U pip
RUN pip config set global.index-url http://mirrors.aliyun.com/pypi/simple
RUN pip config set install.trusted-host mirrors.aliyun.com
下载nodejs,当前最新版本是 node 16.8
国外下载地址:https://nodejs.org/en
国内下载地址:http://nodejs.cn/download
下载完成之后双击文件【node-v16.8.0-x64.msi】安装。nodejs全局环境变量配置参考 https://www.cnblogs.com/yyee/p/15209612.html
检查nodejs是否安装:
node -v

如果未安装nodejs,照下步骤安装:
pnpm get registry
pnpm config set registry https://registry.npmmirror.com/
pnpm config set registry https://registry.npmjs.org/
pnpm get registry
npm install -g pnpm -registry=https://registry.npmmirror.com/
npm run dev –port 端口号
Prerequisites: The board should be running Linux and connected to terminal console.
Note: For log level debug support, the restool version should be LSDK-2003-RC1 or above and MC version should be 10.20.0 or above.
To check restool version:
$ root@localhost:~# restool -v
restool LSDK-20.04
To check MC version:
root@localhost:~# restool -m
MC firmware version: 10.24.0
For debugging, use the ls-debug script available in the LSDK rootfs. There is no need to create the debug object.
ls-debug -h
| -h, –help | ls-debug help information |
| -ts, –timestamp=X | Enable/Disable timestamp printing, X is ON or OFF |
| -c, –console=X | Enable/Disable printing in UART console, X is ON or OFF |
| -l, –log=X | Enable/Disable printing in DDR log, X is ON or OF |
| -u, –uart=X | Set UART ID of the console, X = [0 – 4], 0 = OFF |
| -ll, –level=X | Set logging level, X = [0 – 5]0: Global1: Debug2: Info3: Warning4: Error5: Critical |
| -m, mem, –memory | Dump information about memory modules available |
| dpxy.z | Dump information about MC respective object |
For example, to enable logging in console with log level INFO:
$ ls-debug --log=on --console=on --level=2
dpdbg.0 created
DDR log printing ON
UART console printing ON
Log level set to 2
$ root@localhost:~# ls-debug --memory
Memory dumped information available in MC log/console
$ root@localhost:~# cat `find /dev/ -name "*mc_console"`
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dpdbg_open on DPDBG
[I, RESMAN] Handling command: dpdbg_dump on DPDBG
[I, DPNI] Memory info:
[I, DPNI] MC DDR #1 cacheable memory
[I, DPNI] Total: 134217728 bytes
[I, DPNI] Used: 14802708 bytes
[I, DPNI] Free: 119415020 bytes
[I, DPNI] MC DDR #1 non-cacheable memory
[I, DPNI] Total: 50331648 bytes
[I, DPNI] Used: 27680 bytes
[I, DPNI] Free: 50303968 bytes
[I, DPNI] DMEM1 memory
[I, DPNI] Total: 81920 bytes
[I, DPNI] Used: 27168 bytes
[I, DPNI] Free: 54752 bytes
[I, DPNI] DMEM2 memory
[I, DPNI] Total: 81920 bytes
[I, DPNI] Used: 27168 bytes
[I, DPNI] Free: 54752 bytes
[I, DPNI] DDR #1 memory
[I, DPNI] Total: 1610612736 bytes
[I, DPNI] Used: 143163392 bytes
[I, DPNI] Free: 1467449344 bytes
[I, DPNI] PEB memory
[I, DPNI] Total: 2097152 bytes
[I, DPNI] Used: 524288 bytes
[I, DPNI] Free: 1572864 bytes
[I, DPNI] DP-DDR memory
[I, DPNI] Total: 4294967296 bytes
[I, DPNI] Used: 0 bytes
[I, DPNI] Free: 4294967296 bytes
[I, RESMAN] Handling command: dpdbg_close on DPDBG
[I, RESMAN] Handling command: dprc_close for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_set_irq_mask for DPRC 1 on portal id 0
[I, RESMAN] Handling command: dprc_set_irq_enable for DPRC 1 on portal id 0
root@localhost:~#
export PATH="${PATH}:/opt/arm-anykav500-linux-uclibcgnueabi/bin"
临时生效,必须使用绝对路径。
sudo ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4
……
186
187 extern YYSTYPE yylval;
188 //extern YYLTYPE yylloc;
189 int yyparse (void);
……
1193 /* The lookahead symbol. / 1194 int yychar; 1195 1196 / The semantic value of the lookahead symbol. / 1197 YYSTYPE yylval; 1198 / Location data for the lookahead symbol. / 1199 static YYLTYPE yylloc 1200 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 1201 = { 1, 1, 1, 1 } 1202 # endif 1203 ; 1204 / Number of syntax errors so far. */
1205 int yynerrs;
1206
……
调整yylloc为局部符号.
./mkfs.jffs2: error while loading shared libraries: liblzo2.so.2: cannot open shared object file: No such file or directory
sudo apt-get update //更新源,可以先执行第二步,不能安装则尝试更新源
sudo apt-get install liblzo2-dev:i386
阿里云个人镜像(速度最快,下边是中科大的公共镜像,个人镜像的获取方法见本文最后)
https://ustc-edu-cn.mirror.aliyuncs.com
网易镜像
百度镜像
docker官方国内镜像
https://registry.docker-cn.com
中科大镜像(不要用这个,现在已无法外网访问,仅限学校内网使用)
https://docker.mirrors.ustc.edu.cn
修改/etc/docker/daemon.json(如果没有则新建此文件)
内容如下:
{
"registry-mirrors": ["https://ustc-edu-cn.mirror.aliyuncs.com"]
}
也可以配置多个地址:
{
"registry-mirrors": ["https://ustc-edu-cn.mirror.aliyuncs.com",
"https://hub-mirror.c.163.com"
]
}
docker info
git config –global url.”https://gitclone.com/”.insteadOf https:// git clone https://github.com/tendermint/tendermint.git