Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何为仓库添加支持? #990

Closed
13584452567 opened this issue Feb 1, 2023 · 5 comments
Closed

如何为仓库添加支持? #990

13584452567 opened this issue Feb 1, 2023 · 5 comments
Labels
documentation Improvements or additions to documentation essence Recommended essence posts support This need is supported

Comments

@13584452567
Copy link
Contributor

我有一块EAIDK-610的开发板,主控为RK3399。我自己为它编译了armbian固件,我想问一问可否提交这块板子的支持到这个仓库里面,可以的话需要提供哪些文件?
目前这块板子在uboot和kernel源码中都得到了支持。

@ophub
Copy link
Owner

ophub commented Feb 1, 2023

https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/build-armbian/u-boot/rockchip

第一处:这是u-boot的目录,你起个目录放比如叫:eaidk610

r302 :L1-Pro :rk3328 :rk3328-l1pro-1296mhz.dtb :NA :NA :btld-rk3328.bin :stable :rockchip :rk3328 :l1pro :yes

第二处:这是配置信息,根据你的设备添加一行。其中MAINLINE_UBOOT和BOOTLOADER_IMG有些设备是两个文件,有些是一个文件,你参考配置里面的其他5个rockchip对比一下就知道了。在打包时候使用:

[[ "${PLATFORM}" == "rockchip" ]] && {
if [[ -n "${BOOTLOADER_IMG}" && -n ${MAINLINE_UBOOT} ]]; then
dd if="${uboot_path}/rockchip/${board}/${BOOTLOADER_IMG}" of="${loop_new}" conv=fsync,notrunc bs=512 seek=64 2>/dev/null
dd if="${uboot_path}/rockchip/${board}/${MAINLINE_UBOOT}" of="${loop_new}" conv=fsync,notrunc bs=512 seek=16384 2>/dev/null
#echo -e "${INFO} For [ ${board} ] write bootloader: ${BOOTLOADER_IMG}"
elif [[ -n "${BOOTLOADER_IMG}" ]]; then
dd if="${uboot_path}/rockchip/${board}/${BOOTLOADER_IMG}" of="${loop_new}" conv=fsync,notrunc bs=512 skip=64 seek=64 2>/dev/null
#echo -e "${INFO} For [ ${board} ] write bootloader: ${BOOTLOADER_IMG}"
fi
}

第三处:启动配置文件

https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/build-armbian/armbian-files/platform-files/rockchip/bootfs

配置信息在armbianEnv.txt里面,dtb放一个(虽然打包时会被替换了,这里主要是为了让大家方便了解)

第四处:添加构建选项
在/rebuild文件里build_armbian函数里添加设备board编号,只能使用6.x.y内核的需要在同时添加到must_kernel_6xy里。

在/.github/workflows/build-armbian.yml文件的armbian_board里添加相同的选项。

build_armbian=(

https://github.com/ophub/amlogic-s9xxx-armbian/blob/80f5e4846b6ccdfe04217040b31ff43bc7ebf214/rebuild#L104

@13584452567
Copy link
Contributor Author

十分感谢!

@ophub ophub added documentation Improvements or additions to documentation support This need is supported labels Feb 1, 2023
@ophub
Copy link
Owner

ophub commented Feb 1, 2023

#991

感谢13584452567分享,已经合并,欢迎有设备的朋友测试使用。

@ophub ophub added the essence Recommended essence posts label Feb 1, 2023
@ophub
Copy link
Owner

ophub commented Feb 2, 2023

5cc5851

新增设备的方法我更新到了说明文档里了,大家有觉得使用不便或说明不清晰的地方随时反馈意见。

@ophub
Copy link
Owner

ophub commented Mar 1, 2023

添加系统文件

通用文件放在:build-armbian/armbian-files/common-files 目录下,各平台通用。

平台文件分别放在 build-armbian/armbian-files/platform-files/ 目录下,AmlogicRockchipAllwinner 分别共用各自平台的文件,其中 bootfs 目录下是 /boot 分区的文件,rootfs 目录下的是 Armbian 系统文件。

如果个别设备有特殊差异化设置需求,在 build-armbian/armbian-files/different-files 目录下添加以 BOARD 命名的独立目录,根据需要建立 bootfs 目录添加系统 /boot 分区下的相关文件,如果建立了 bootfs 目录,制作 Armbian 镜像时将会删除从通用文件和平台文件中添加的 bootfs 相关的文件,使用此目录下的文件。根据需要建立 rootfs 目录添加系统文件,各文件夹命名以 Armbian 系统中的实际路径为准,用于添加新文件,或覆盖从通用文件和平台文件中添加的同名文件。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation essence Recommended essence posts support This need is supported
Projects
None yet
Development

No branches or pull requests

2 participants