ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
5.8k stars 1.86k forks source link

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

Closed 13584452567 closed 1 year ago

13584452567 commented 1 year ago

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

ophub commented 1 year ago

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

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

https://github.com/ophub/amlogic-s9xxx-armbian/blob/184424dab591ac47142aef4c372812b7ee2aeb44/build-armbian/armbian-files/common-files/etc/model_database.conf#L158

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

https://github.com/ophub/amlogic-s9xxx-armbian/blob/184424dab591ac47142aef4c372812b7ee2aeb44/rebuild#L525-L534

第三处:启动配置文件

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里添加相同的选项。

https://github.com/ophub/amlogic-s9xxx-armbian/blob/48052d4bc38e694ffefd20703784d09e39519b22/rebuild#L85

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

https://github.com/ophub/amlogic-s9xxx-armbian/blob/48052d4bc38e694ffefd20703784d09e39519b22/.github/workflows/build-armbian.yml#L20

13584452567 commented 1 year ago

十分感谢!

ophub commented 1 year ago

https://github.com/ophub/amlogic-s9xxx-armbian/pull/991

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

ophub commented 1 year ago

https://github.com/ophub/amlogic-s9xxx-armbian/commit/5cc585147a9bee56df938a6564a427894d052fd8

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

ophub commented 1 year ago

添加系统文件

通用文件放在: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 系统中的实际路径为准,用于添加新文件,或覆盖从通用文件和平台文件中添加的同名文件。