Closed wnpllrzodiac closed 11 months ago
https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/compile-kernel/README.cn.md
看仓库的说明,-r参数的语法:如 owner@branch
或 owner/repo
或 owner/repo@branch
步骤1:把你的config-5.10模版放在 /compile-kernel/tools/config
里替换了现在的 config-5.10(现在是主线的config,必须换成kernel_rx35xx的,去kernel仓库下载一个现在的内核,解压复制里面的config改名)
步骤2:编译 sudo ./recompile -k 5.10.1 -r unifreq/linux-5.10.y-rk35xx
https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/compile-kernel/README.cn.md
看仓库的说明,-r参数的语法:如
owner@branch
或owner/repo
或owner/repo@branch
步骤1:把你的config-5.10模版放在
/compile-kernel/tools/config
里替换了现在的 config-5.10(现在是主线的config,必须换成kernel_rx35xx的,去kernel仓库下载一个现在的内核,解压复制里面的config改名)步骤2:编译
sudo ./recompile -k 5.10.1 -r unifreq/linux-5.10.y-rk35xx
好的,我看了代码摸索出来是如下 -r wnpllrzodiac/linux-5.10.y-rk35xx@pantherx2
我试试你的方法,多谢!
1) 下载了个包5.10.160-rk35xx-flippy-2311a.tar.gz 2) 解压 header-5.10.160-rk35xx-flippy-2311a.tar.gz 里面的.config 覆盖 compile-kernel/tools/config/config-5.10 3) sudo ./recompile -k 5.10.1 -r unifreq/linux-5.10.y-rk35xx 问题似乎没有解决
[ STEPS ] Start compilation kernel [ linux-5.10.y-rk35xx-main ]...
SYNC include/config/auto.conf.cmd
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
LEX scripts/kconfig/lexer.lex.c
YACC scripts/kconfig/parser.tab.[ch]
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTCC scripts/kconfig/lexer.lex.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTLD scripts/kconfig/conf
*
* Restart config...
*
*
* GCC plugins
*
GCC plugins (GCC_PLUGINS) [Y/n/?] (NEW)
遇到了新问题 代码没有编译,直接产生了镜像文件,看了一下,新的dtb没有加入。 sudo ./recompile -k 5.10.161 -r wnpllrzodiac/linux-5.10.y-rk35xx@pantherx2 -a false 看起来是编译报错了。
HDRINST usr/include/linux/neighbour.h
HDRINST usr/include/linux/pps.h
DTC arch/arm64/boot/dts/rockchip/rk3566-jp-tvbox.dtb
DTC arch/arm64/boot/dts/rockchip/rk3566-panther-x2.dtb
DTC arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dtb
HDRINST usr/include/linux/bt-bmc.h
HDRINST usr/include/linux/io_uring.h
DTC arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-rpi-cm4-io.dtb
HDRINST usr/include/linux/tipc_sockets_diag.h
DTC arch/arm64/boot/dts/rockchip/overlay/rk3588-spi0-m2-cs1-spidev.dtbo
Error: arch/arm64/boot/dts/rockchip/rk3566-panther-x2.dts:556.1-16 Label or path usb_host0_xhci not found
Error: arch/arm64/boot/dts/rockchip/rk3566-panther-x2.dts:573.1-15 Label or path usb2phy0_host not found
Error: arch/arm64/boot/dts/rockchip/rk3566-panther-x2.dts:577.1-14 Label or path usb2phy0_otg not found
FATAL ERROR: Syntax error parsing input tree
make[2]: *** [scripts/Makefile.lib:386: arch/arm64/boot/dts/rockchip/rk3566-panther-x2.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
DTC arch/arm64/boot/dts/rockchip/overlay/rk3588-spi1-m1-cs0-spidev.dtbo
HDRINST usr/include/linux/tls.h
HDRINST usr/include/linux/tc_act/tc_mirred.h
DTC arch/arm64/boot/dts/rockchip/overlay/rk3588-spi1-m1-cs1-spidev.dtbo
HDRINST usr/include/linux/tc_act/tc_tunnel_key.h
DTC arch/arm64/boot/dts/rockchip/overlay/rk3588-spi4-m2-cs0-spidev.dtbo
make[1]: *** [scripts/Makefile.build:516: arch/arm64/boot/dts/rockchip] Error 2
make: *** [Makefile:1471: dtbs] Error 2
make: *** Waiting for unfinished jobs....
[ STEPS ] Install modules...
sed: can't read modules.order: No such file or directory
make: *** [Makefile:1556: _modinst_] Error 2
Usage: /usr/local/toolchain/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-strip <option(s)> in-file(s)
Removes symbols and sections from files
The options are:
-I --input-target=<bfdname> Assume input file is in format <bfdname>
-O --output-target=<bfdname> Create an output file in format <bfdname>
-F --target=<bfdname> Set both input and output format to <bfdname>
-p --preserve-dates Copy modified/access timestamps to the output
-D --enable-deterministic-archives
Produce deterministic output when stripping archives
-U --disable-deterministic-archives
Disable -D behavior (default)
-R --remove-section=<name> Also remove section <name> from the output
--remove-relocations <name> Remove relocations from section <name>
--strip-section-headers Strip section headers from the output
-s --strip-all Remove all symbol and relocation information
-g -S -d --strip-debug Remove all debugging symbols & sections
--strip-dwo Remove all DWO sections
--strip-unneeded Remove all symbols not needed by relocations
--only-keep-debug Strip everything but the debug information
-M --merge-notes Remove redundant entries in note sections (default)
--no-merge-notes Do not attempt to remove redundant notes
-N --strip-symbol=<name> Do not copy symbol <name>
--keep-section=<name> Do not strip section <name>
-K --keep-symbol=<name> Do not strip symbol <name>
--keep-section-symbols Do not strip section symbols
--keep-file-symbols Do not strip file symbol(s)
-w --wildcard Permit wildcard in symbol comparison
-x --discard-all Remove all non-global symbols
-X --discard-locals Remove any compiler-generated symbols
-v --verbose List all object files modified
-V --version Display this program's version number
-h --help Display this output
--info List object formats & architectures supported
-o <file> Place stripped output into <file>
/usr/local/toolchain/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-strip: supported targets: elf64-littleaarch64 elf64-bigaarch64 elf32-littleaarch64 elf32-bigaarch64 elf32-littlearm elf32-bigarm pei-aarch64-little pe-aarch64-little elf64-little elf64-big elf32-little elf32-big elf32-littlearm-fdpic elf32-bigarm-fdpic srec symbolsrec verilog tekhex binary ihex plugin
[ STEPS ] Install headers...
find: ‘Module.symvers’: No such file or directory
[ SUCCESS ] The headers is installed successfully.
[ STEPS ] Create chroot...
[ INFO ] Armbian PLATFORM: [ rockchip ]
cp: cannot stat '/home/zodiac/work/git/amlogic-s9xxx-armbian/compile-kernel/kernel/linux-5.10.y-rk35xx-pantherx2/System.map': No such file or directory
cp: cannot stat '/home/zodiac/work/git/amlogic-s9xxx-armbian/compile-kernel/kernel/linux-5.10.y-rk35xx-pantherx2/arch/arm64/boot/Image': No such file or directory
cp: cannot stat '/home/zodiac/work/git/amlogic-s9xxx-armbian/compile-kernel/output/chroot/root/boot/vmlinuz-5.10.160-ophub': No such file or directory
[ INFO ] Enter the chroot armbian system...
[ INFO ] Current system: [ aarch64 ]
[ INFO ] Current path: [ / ]
[ INFO ] Compile the kernel version: [ 5.10.160-ophub ]
[ STEPS ] Generate uInitrd file...
update-initramfs: Generating /boot/initrd.img-5.10.160-ophub
depmod: WARNING: could not open modules.builtin at /lib/modules/5.10.160-ophub: No such file or directory
depmod: WARNING: could not open modules.builtin.modinfo at /lib/modules/5.10.160-ophub: No such file or directory
/usr/bin/cat: /var/tmp/mkinitramfs_sZcQ5m/lib/modules/5.10.160-ophub/modules.builtin: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = "zh_CN.UTF-8",
LC_NUMERIC = "zh_CN.UTF-8",
LC_IDENTIFICATION = "zh_CN.UTF-8",
LC_MEASUREMENT = "zh_CN.UTF-8",
LC_NAME = "zh_CN.UTF-8",
LC_TELEPHONE = "zh_CN.UTF-8",
LC_ADDRESS = "zh_CN.UTF-8",
LC_MONETARY = "zh_CN.UTF-8",
LC_TIME = "zh_CN.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
W: Can't find modules.builtin.modinfo (for locating built-in drivers' firmware, supported in Linux >=5.2)
W: Couldn't identify type of root file system for fsck hook
depmod: WARNING: could not open modules.builtin at /var/tmp/mkinitramfs_sZcQ5m/lib/modules/5.10.160-ophub: No such file or directory
depmod: WARNING: could not open modules.builtin.modinfo at /var/tmp/mkinitramfs_sZcQ5m/lib/modules/5.10.160-ophub: No such file or directory
update-initramfs: Armbian: Converting to u-boot format: /boot/uInitrd-5.10.160-ophub
Image Name: uInitrd
Created: Mon Nov 20 11:14:47 2023
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 11921412 Bytes = 11642.00 KiB = 11.37 MiB
Load Address: 00000000
Entry Point: 00000000
update-initramfs: Armbian: Symlinking /boot/uInitrd-5.10.160-ophub to /boot/uInitrd
'/boot/uInitrd' -> 'uInitrd-5.10.160-ophub'
update-initramfs: Armbian: done.
[ SUCCESS ] The initrd.img and uInitrd file is Successfully generated.
[ INFO ] File situation in the /boot directory after update:
-rw-r--r-- 1 root root 217675 Nov 20 11:14 config-5.10.160-ophub
-rw-r--r-- 1 root root 11921412 Nov 20 11:14 initrd.img-5.10.160-ophub
-rw-r--r-- 1 root root 11921476 Nov 20 11:14 uInitrd-5.10.160-ophub
[ INFO ] Copy the generated files from [ /home/zodiac/work/git/amlogic-s9xxx-armbian/compile-kernel/output/chroot/root/boot ]
[ STEPS ] Packing the [ 5.10.160-ophub ] dtbs packages...
[ SUCCESS ] The [ dtb-rockchip-5.10.160-ophub.tar.gz ] file is packaged.
[ STEPS ] Packing the [ 5.10.160-ophub ] boot, modules and header packages...
[ SUCCESS ] The [ boot-5.10.160-ophub.tar.gz ] file is packaged.
[ SUCCESS ] The [ modules-5.10.160-ophub.tar.gz ] file is packaged.
[ SUCCESS ] The [ header-5.10.160-ophub.tar.gz ] file is packaged.
[ SUCCESS ] The [ sha256sums ] file has been generated
[ INFO ] Kernel series files are stored in [ /home/zodiac/work/git/amlogic-s9xxx-armbian/compile-kernel/output ].
[ STEPS ] Clear the space and update-grub...
[ SUCCESS ] All processes have been completed.
[ STEPS ] Server space usage after compilation:
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext4 491G 47G 420G 10% /
[ SUCCESS ] All process completed successfully.
可能你新加的代码有问题,你编译f大仓库的肯定可以顺利完成。
可能你新加的代码有问题,你编译f大仓库的肯定可以顺利完成。
是的。f大的 linux-5.10.y-rk35xx 分支编译没问题。 估计5.x的代码不兼容 pantherx2的6.x的dts,我删掉了几个部分,能编译过了。
@ophub 内核编译好了,也打包上传release目录了。但是更新内核后,又变砖了。 好像设置 -u rk35xx 并不生效。始终都是stable。所以我release只能打stable 的tag 询问下,/etc/ophub-release 需要手动修改适配吗?目前我没有改,都是默认状态。不知道启动的时候会不读读取这个文本做逻辑
root@armbian:~# armbian-update -k 5.10.160 -r wnpllrzodiac/linux-5.10.y-rk35xx
[ STEPS ] Welcome to the kernel update tool.
[ STEPS ] Start checking dependencies...
[ INFO ] Dependency check completed.
[ STEPS ] Start initializing parameters...
[ INFO ] Armbian platform: [ rockchip ]
[ INFO ] Kernel download repository: [ wnpllrzodiac/linux-5.10.y-rk35xx ]
[ INFO ] Kernel tags: [ stable ]
[ INFO ] Specify kernel: [ 5.10.160 ]
[ INFO ] Backup kernel: [ yes ]
[ INFO ] Armbian is running on: [ /dev/mmcblk1 ]
[ STEPS ] Start querying kernel version...
[ STEPS ] Start downloading kernel package...
[ INFO ] Download kernel from: [ https://github.com/wnpllrzodiac/linux-5.10.y-rk35xx/releases/download/kernel_stable/5.10.160.tar.gz ]
[ INFO ] Download kernel to: [ /tmp/tmp.W2OPspS1rQ ]
^C
root@armbian:~# ^C
root@armbian:~# armbian-update -k 5.10.160 -r wnpllrzodiac/linux-5.10.y-rk35xx
[ STEPS ] Welcome to the kernel update tool.
[ STEPS ] Start checking dependencies...
[ INFO ] Dependency check completed.
[ STEPS ] Start initializing parameters...
[ INFO ] Armbian platform: [ rockchip ]
[ INFO ] Kernel download repository: [ wnpllrzodiac/linux-5.10.y-rk35xx ]
[ INFO ] Kernel tags: [ stable ]
[ INFO ] Specify kernel: [ 5.10.160 ]
[ INFO ] Backup kernel: [ yes ]
[ INFO ] Armbian is running on: [ /dev/mmcblk1 ]
[ STEPS ] Start querying kernel version...
[ STEPS ] Start downloading kernel package...
[ INFO ] Download kernel from: [ https://github.com/wnpllrzodiac/linux-5.10.y-rk35xx/releases/download/kernel_stable/5.10.160.tar.gz ]
[ INFO ] Download kernel to: [ /tmp/tmp.kXTHnRqlf6 ]
[ STEPS ] Start checking kernel package...
[ INFO ] Kernel name: [ 5.10.160-ophub ]
[ INFO ] Start performing sha256sum verification...
[ INFO ] (1/4) Verification of [ boot-5.10.160-ophub.tar.gz ] succeeded.
[ INFO ] (2/4) Verification of [ dtb-rockchip-5.10.160-ophub.tar.gz ] succeeded.
[ INFO ] (3/4) Verification of [ modules-5.10.160-ophub.tar.gz ] succeeded.
[ INFO ] (4/4) Verification of [ header-5.10.160-ophub.tar.gz ] succeeded.
[ STEPS ] Start backing up current kernel...
[ INFO ] (1/4) Backup of [ boot-6.1.59-ophub.tar.gz ] succeeded.
[ INFO ] (2/4) Backup of [ dtb-rockchip-6.1.59-ophub.tar.gz ] succeeded.
[ INFO ] (3/4) Backup of [ modules-6.1.59-ophub.tar.gz ] succeeded.
[ INFO ] (4/4) Backup of [ header-6.1.59-ophub.tar.gz ] succeeded.
[ INFO ] [ sha256sums ] file has been generated.
[ INFO ] Current kernel backup path: [ /ddbr/backup/6.1.59 ].
[ STEPS ] Start unpacking kernel...
[ INFO ] (1/4) Unpacking [ boot-5.10.160-ophub.tar.gz ] succeeded.
[ INFO ] (2/4) Unpacking [ dtb-rockchip-5.10.160-ophub.tar.gz ] succeeded.
[ INFO ] (3/4) Unpacking [ modules-5.10.160-ophub.tar.gz ] succeeded.
[ INFO ] (4/4) Unpacking [ header-5.10.160-ophub.tar.gz ] succeeded.
[ SUCCESS ] Kernel update successful. Armbian system is restarting...
你上面的命令里没有使用-u
先同步最新脚本,昨天已经添加了rk35xx的支持了: https://github.com/ophub/amlogic-s9xxx-armbian/commit/e9e50aef2a24b40e0ffeedd9a1929eca8814dfd8
armbian-sync
再打开这个文件修改下默认设置,以后就不用输那么多参数了,当然不改每次记得输入也可以
nano /etc/ophub-release
KERNEL_REPO='wnpllrzodiac/linux-5.10.y-rk35xx'
KERNEL_TAGS='rk35xx'
好的。回家我再试试。变砖又要线刷了。u盘好像也不能启动
你上面的命令里没有使用-u
先同步最新脚本,昨天已经添加了rk35xx的支持了: e9e50ae
armbian-sync
再打开这个文件修改下默认设置,以后就不用输那么多参数了,当然不改每次记得输入也可以
nano /etc/ophub-release
KERNEL_REPO='wnpllrzodiac/linux-5.10.y-rk35xx' KERNEL_TAGS='rk35xx'
以上你的修改只针对升级步骤吗?我现在的问题是升级成功后,重启就连不上机器了。
armbian-update就是更换内核的脚本。使用armbian-sync拉去最新版,你的不让使用rk35xx可能是因为你使用的昨天以前的固件,没更新这个脚本,不让你使用rk35xx
你是什么机器,rk35xx内核可用的机型是rk3528/rk3566/rk3568的部分机型。你是在内核里添加了什么?
armbian-update就是更换内核的脚本。使用armbian-sync拉去最新版,你的不让使用rk35xx可能是因为你使用的昨天以前的固件,没更新这个脚本,不让你使用rk35xx
你是什么机器,rk35xx内核可用的机型是rk3528/rk3566/rk3568的部分机型。你是在内核里添加了什么?
pantherX2
https://github.com/unifreq/linux-5.10.y-rk35xx/pull/4 添加了pantherX2 的dtb支持。这样我就可以在5.x内核上用到编解码特性了。
回家发现设备能正常启动,网卡驱动没了。没网没显示接口。没法整了。
ethtool -i eth0 driver: st_gmac version: 6.1.60-ophub firmware-version: expansion-rom-version: bus-info: supports-statistics: yes supports-test: yes supports-eeprom-access: no supports-register-dump: yes supports-priv-flags: no
mount /dev/mmcblk0p1 /mnt/mmc
journalctl -f
如果你只是想替换内核的话,完全可以手动编译出然后去替换boot分区的内核映像。
如果你只是想替换内核的话,完全可以手动编译出然后去替换boot分区的内核映像。
ophub的armbian-update 工具是可以走完流程升级的。只是现在重启后,网卡ip获取失败了
从日志看 dhcp 45秒超时了。 我现在想编一个完整版系统镜像,再试试。 目前没有办法串口调试。pantherx2没有显示输出,没网络的话没法调试。
2023-11-20T23:34:15.691421+08:00 armbian NetworkManager[927]: <info> [1700494455.6909] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
2023-11-20T23:35:00.614866+08:00 armbian NetworkManager[927]: <info> [1700494500.6129] device (eth0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
2023-11-20T23:35:00.615770+08:00 armbian NetworkManager[927]: <info> [1700494500.6153] manager: NetworkManager state is now DISCONNECTED
2023-11-20T23:35:00.617678+08:00 armbian NetworkManager[927]: <warn> [1700494500.6169] device (eth0): Activation: failed for connection 'Wired connection 1'
2023-11-20T23:35:00.618987+08:00 armbian NetworkManager[927]: <info> [1700494500.6184] device (eth0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
2023-11-20T23:35:00.649238+08:00 armbian NetworkManager[927]: <info> [1700494500.6487] dhcp4 (eth0): canceled DHCP transaction
WARN: brmfmac driver doesn't work properly with virtual interfaces and it can cause kernel panic. For this reason we disallow virtual interfaces for your adapter. For more info: https://github.com/oblique/create_ap/issues/203 ERROR: Invalid passphrase length 7 (expected 8..63)
根据本项目的教程,使用github actions进行编译吧
https://github.com/ophub/amlogic-s9xxx-armbian/blob/main/documents/README.cn.md
镜像光盘打出来了。我通过修改首次启动脚本,开启wifi连接,能进到5.10.x内核了。看了下 /dev/mpp_service 等服务还是没有。所以基本放弃这个分支了。eth0确实无法正常使用,但以不重要。看来目前,也只有istoreos的版本。支持mpp硬件编解码。他们的内核文件结构又不一样,/boot分区下,一个img,一个dtb就没有了。
https://github.com/ophub/amlogic-s9xxx-armbian/issues/2027#issuecomment-1892941064 有人說rk35xx eth問題是因為uboot問題(wifi能用), 最後eth和mpp_service 解決沒
sudo ./recompile -k 5.10.y-rk35xx -r https://github.com/wnpllrzodiac/linux-5.10.y-rk35xx@pantherx2 出现了很多需要配置的选项。是不是config模板有问题,缺了很多配置项?