Browse Source

!19 update to phytium-linux-buildroot_v2.0

Merge pull request !19 from weishanshan/master
pull/20/MERGE phytium-linux-buildroot_v2.0
guochunrong2020 10 months ago
committed by Gitee
parent
commit
410b696b9b
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
  1. 9
      Makefile
  2. 471
      README.md
  3. 2
      board/phytium/common/debian-package-installer
  4. BIN
      board/phytium/common/linux-4.19/scripts/genksyms/genksyms
  5. 13
      board/phytium/common/post-build.sh
  6. 2
      board/phytium/common/ubuntu-additional_packages_list
  7. 2
      board/phytium/common/ubuntu-package-installer
  8. 6
      board/phytium/genimage-4.19.cfg
  9. 6
      board/phytium/genimage-5.10.cfg
  10. 1
      configs/desktop.config
  11. 4
      configs/e2000_optee.config
  12. 0
      configs/ethercat.config
  13. 4
      configs/jailhouse.config
  14. 5
      configs/linux_4.19.config
  15. 6
      configs/linux_4.19_rt.config
  16. 3
      configs/linux_5.10_rt.config
  17. 64
      configs/phytium_d2000_debian_defconfig
  18. 69
      configs/phytium_d2000_debian_desktop_defconfig
  19. 134
      configs/phytium_d2000_defconfig
  20. 2
      configs/phytium_d2000_linux_4.19_rt.config
  21. 9
      configs/phytium_d2000_linux_5.10.config
  22. 9
      configs/phytium_d2000_linux_5.10_rt.config
  23. 64
      configs/phytium_d2000_ubuntu_defconfig
  24. 68
      configs/phytium_d2000_ubuntu_desktop_defconfig
  25. 72
      configs/phytium_d2000_ubuntu_qt5_defconfig
  26. 16
      configs/phytium_debian_defconfig
  27. 13
      configs/phytium_defconfig
  28. 62
      configs/phytium_e2000_debian_defconfig
  29. 12
      configs/phytium_e2000_jailhouse_4.19.config
  30. 9
      configs/phytium_e2000_jailhouse_5.10.config
  31. 2
      configs/phytium_e2000_linux_4.19.config
  32. 2
      configs/phytium_e2000_linux_4.19_rt.config
  33. 2
      configs/phytium_e2000_linux_5.10_rt.config
  34. 62
      configs/phytium_e2000_ubuntu_defconfig
  35. 64
      configs/phytium_e2000_ubuntu_desktop_defconfig
  36. 14
      configs/phytium_e2000_xenomai_cobalt_4.19.config
  37. 12
      configs/phytium_e2000_xenomai_mercury_4.19.config
  38. 4
      configs/phytium_initrd_defconfig
  39. 17
      configs/phytium_ubuntu_defconfig
  40. 14
      configs/phytium_xenomai_cobalt_5.10.config
  41. 82
      configs/phytiumpi_defconfig
  42. 15
      configs/phytiumpi_sdcard.config
  43. 66
      configs/phytiumpi_ubuntu_desktop_defconfig
  44. 2
      configs/x100.config
  45. 17
      configs/xenomai_cobalt_4.19.config
  46. 4
      configs/xenomai_cobalt_5.10.config
  47. 15
      configs/xenomai_mercury_4.19.config
  48. 4
      configs/xenomai_mercury_5.10.config
  49. 34
      linux/kernel-patches/0001-disable-smmu-in-dts.patch
  50. 57
      linux/kernel-patches/jailhouse/0001-modify-the-dts-of-d2000-and-ft2004-linux-kernel-to-r.patch
  51. 36
      linux/kernel-patches/jailhouse/0001-modify-the-dts-of-e2000-linux-4.19-kernel-to-reserve.patch
  52. 15
      linux/kernel-patches/jailhouse/0001-modify-the-dts-of-e2000-linux-kernel-to-reserve-memo.patch
  53. 138
      linux/kernel-patches/x100/0001-disable-dc.patch
  54. 15
      package/igh-ethercat/igh-ethercat.mk
  55. 2
      package/jailhouse/jailhouse.mk
  56. 7
      package/util-linux/util-linux.mk
  57. 45
      package/xenomai/xenomai.mk
  58. 77
      utils/grant_sudo_perm.sh

9
Makefile

@ -591,7 +591,7 @@ prepare: $(BUILD_DIR)/buildroot-config/auto.conf
$(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
.PHONY: world
world: target-post-image
world: grant_sudo_perm target-post-image
.PHONY: prepare-sdk
prepare-sdk: world
@ -820,6 +820,13 @@ target-post-image: $(TARGETS_ROOTFS) target-finalize staging-finalize
$(call MESSAGE,"Executing post-image script $(s)"); \
$(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
.PHONY: grant_sudo_perm
grant_sudo_perm:
ifeq ($(BR2_ROOTFS_SKELETON_UBUNTU)$(BR2_ROOTFS_SKELETON_DEBIAN),y)
@echo "*************************"
@$(TOPDIR)/utils/grant_sudo_perm.sh || exit 1
endif
.PHONY: source
source: $(foreach p,$(PACKAGES),$(p)-all-source)

471
README.md

@ -1,10 +1,10 @@
# phytium-linux-buildroot
Buildroot是一种简单、高效且易于使用的工具,可以通过交叉编译生成嵌入式Linux系统。Buildroot的用户手册位于docs/manual/manual.pdf。
phytium-linux-buildroot基于Buildroot,适配了飞腾E2000、D2000开发板,支持ubuntu文件系统、debian文件系统、initrd文件系统、buildroot最小文件系统的编译。
phytium-linux-buildroot基于Buildroot,适配了飞腾嵌入式CPU、桌面CPU相关开发板,支持ubuntu文件系统、debian文件系统、initrd文件系统、基于busybox最小文件系统的编译。
# 开发环境
## 系统要求
Buildroot被设计为在Linux系统上运行,我们只支持在ubuntu20.04、ubuntu22.04、debian11这三种主机系统上运行phytium-linux-buildroot,不支持其他系统。
Buildroot被设计为在x86 Linux系统上运行,我们只支持在ubuntu20.04、ubuntu22.04、debian11这三种x86主机上运行phytium-linux-buildroot,不支持其他系统。
首先,Buildroot需要主机系统上安装如下Linux程序,请检查是否已安装:
```
• Build tools:
@ -38,8 +38,11 @@ Buildroot被设计为在Linux系统上运行,我们只支持在ubuntu20.04、u
## 下载phytium-linux-buildroot
`$ git clone https://gitee.com/phytium_embedded/phytium-linux-buildroot.git`
# 查看支持的defconfig
# 默认配置文件和扩展配置文件
为飞腾CPU平台构建的文件系统的配置文件位于configs目录。
其中,以defconfig结尾的为默认配置文件,以config结尾的为扩展配置文件。
defconfig可以和config文件进行组合,用以扩展特定的功能,但要注意不能随意组合。
## defconfig
在phytium-linux-buildroot根目录下执行`$ make list-defconfigs`,返回configs目录中的defconfig配置文件。
```
$ cd xxx/phytium-linux-buildroot
@ -47,77 +50,108 @@ $ make list-defconfigs
```
其中以phytium开头的为飞腾相关的defconfig配置文件,包含:
```
phytium_d2000_debian_defconfig - Build for phytium_d2000_debian
phytium_d2000_debian_desktop_defconfig - Build for phytium_d2000_debian_desktop
phytium_d2000_defconfig - Build for phytium_d2000
phytium_d2000_ubuntu_defconfig - Build for phytium_d2000_ubuntu
phytium_d2000_ubuntu_desktop_defconfig - Build for phytium_d2000_ubuntu_desktop
phytium_d2000_ubuntu_qt5_defconfig - Build for phytium_d2000_ubuntu_qt5
phytium_e2000_debian_defconfig - Build for phytium_e2000_debian
phytium_e2000_debian_desktop_defconfig - Build for phytium_e2000_debian_desktop
phytium_e2000_defconfig - Build for phytium_e2000
phytium_e2000_ubuntu_defconfig - Build for phytium_e2000_ubuntu
phytium_e2000_ubuntu_desktop_defconfig - Build for phytium_e2000_ubuntu_desktop
phytium_initrd_defconfig - Build for phytium_initrd
phytiumpi_defconfig - Build for phytiumpi
phytiumpi_ubuntu_desktop_defconfig - Build for phytiumpi_ubuntu_desktop
```
phytium_debian_defconfig - Build for debian system
phytium_defconfig - Build for busybox minimal system
phytium_initrd_defconfig - Build for initrd
phytium_ubuntu_defconfig - Build for ubuntu system
```
## config
config文件是功能扩展配置文件,具体的文件及功能如下:
| config | 功能 |
|------------------------|--------|
| linux_xxx.config | 内核配置文件,含有linux 4.19、4.19 rt和5.10 rt内核版本 |
| desktop.config | XFCE桌面 |
| e2000_optee.config | Phytium-optee |
| xenomai_xxx.config | cobalt_4.19、cobalt_5.10、mercury_4.19和mercury_5.10 |
| ethercat.config | ethercat |
| jailhouse.config | jailhouse |
| x100.config | X100 |
| phytiumpi_sdcard.config | 飞腾派配置文件 |
## 配置文件的组合
defconfig可以和config文件进行组合,用以扩展特定的功能,defconfig与config的组合关系如下:
| deconfig | config |
|------------------------|--------|
| phytium_ubuntu_defconfig | linux_xxx.config、desktop.config、e2000_optee.config、xenomai_xxx.config、ethercat.config、jailhouse.config、x100.config、phytiumpi_sdcard.config |
| phytium_debian-defconfig | linux_xxx.config、desktop.config、e2000_optee.config、xenomai_xxx.config、ethercat.config、x100.config、phytiumpi_sdcard.config |
| phytium_defconfig | linux_xxx.config、e2000_optee.config、phytiumpi_sdcard.config |
| phytium_initrd_defconfig | |
# 编译文件系统
## 为E2000编译文件系统
### 编译默认配置的文件系统
## 编译默认配置的文件系统
(1)加载defconfig
`$ make phytium_e2000_xxx_defconfig`
其中`phytium_e2000_xxx_defconfig`为以下文件系统之一:
```
phytium_e2000_ubuntu_defconfig
phytium_e2000_ubuntu_desktop_defconfig
phytium_e2000_defconfig
phytium_e2000_debian_defconfig
phytium_e2000_debian_desktop_defconfig
`$ make phytium_xxx_defconfig`
其中`phytium_xxx_defconfig`为以下文件系统之一:
```
phytium_ubuntu_defconfig
phytium_debian_defconfig
phytium_defconfig
```
(2)编译
`$ make`
(3)镜像的输出位置
生成的根文件系统、内核、E2000 img 镜像位于output/images目录。
生成的根文件系统、内核、img 镜像位于output/images目录。
#### E2000 img 镜像
目前buildroot支持编译E2000 img 镜像(disk.img),生成的E2000 img 镜像位于output/images目录。E2000 img 镜像包含了根文件系统、内核、设备树和GRUB。
使用E2000 img 镜像安装系统,不需要像之前那样将存储设备手动分区再拷贝文件,只需要将disk.img文件写入存储设备即可。
### img 镜像
目前buildroot支持编译img 镜像(disk.img),生成的img 镜像位于output/images目录。img 镜像包含了根文件系统、内核、设备树和GRUB。
使用img 镜像安装系统,不需要像之前那样将存储设备手动分区再拷贝文件,只需要将disk.img文件写入存储设备即可。
## 支持的功能
### 更换文件系统的linux内核版本
defconfig中的内核版本默认是linux 5.10。我们支持在编译文件系统时将内核版本更换为linux 4.19,linux 4.19 rt,linux 5.10 rt。
关于E2000 linux内核的信息请参考:`https://gitee.com/phytium_embedded/phytium-linux-kernel`
关于linux内核的信息请参考:`https://gitee.com/phytium_embedded/phytium-linux-kernel`
更换内核版本的操作步骤为:
(1)使用phytium_e2000_xxx_defconfig作为基础配置项,合并支持其他内核版本的配置:
`$ ./support/kconfig/merge_config.sh configs/phytium_e2000_xxx_defconfig configs/phytium_e2000_linux_xxx.config`
其中`configs/phytium_e2000_linux_xxx.config`为以下配置片段文件之一:
(1)使用phytium_debian_defconfig、phytium_ubuntu_defconfig或phytium_defconfig作为基础配置项,合并支持其他内核版本的配置:
`$ ./support/kconfig/merge_config.sh configs/phytium_xxx_defconfig configs/linux_xxx.config`
其中`configs/linux_xxx.config`为以下配置片段文件之一:
```
configs/phytium_e2000_linux_4.19.config
configs/phytium_e2000_linux_4.19_rt.config
configs/phytium_e2000_linux_5.10_rt.config
configs/linux_4.19.config
configs/linux_4.19_rt.config
configs/linux_5.10_rt.config
```
这三个文件分别对应于linux 4.19,linux 4.19 rt,linux 5.10 rt内核。
(2)编译
`$ make`
(3)镜像的输出位置
生成的根文件系统、内核、E2000 img 镜像位于output/images目录。
生成的根文件系统、内核、img 镜像位于output/images目录。
### 支持XFCE桌面
(1)使用phytium_debian_defconfig或phytium_ubuntu_defconfig作为基础配置项,合并支持desktop的配置:
`$ ./support/kconfig/merge_config.sh configs/phytium_xxx_defconfig configs/desktop.config`
(2)编译
`$ make`
(3)镜像的输出位置
生成的根文件系统、内核位于output/images 目录。
#### ubuntu系统安装桌面
`./support/kconfig/merge_config.sh configs/phytium_ubuntu_defconfig configs/desktop.config`默认安装了xfce桌面,配置并编译它可以获得带xfce桌面的ubuntu系统。如果需要在开发板上安装其他桌面,重新配置并编译`phytium_ubuntu_defconfig`,然后在开发板启动这个不带桌面的ubuntu系统,登录系统。
##### 动态获取 IP 地址
```
$ sudo dhclient
$ ping www.baidu.com
```
##### 安装桌面
###### 安装GNOME桌面
```
$ sudo apt update
$ sudo apt -y install ubuntu-gnome-desktop
```
###### 安装KDE桌面
```
$ sudo apt update
$ sudo apt -y install kubuntu-desktop
```
###### 安装XFCE桌面
```
$ sudo apt update
$ sudo apt -y install xfce4 xfce4-terminal
在安装过程中,它会要求你选择显示管理器是gdm3还是lightdm,这里选择的是lightdm。
安装完成后重启系统,在图形登录界面点击用户名右边的ubuntu logo按钮,选择桌面环境“Xfce Session”,输入密码登录。
```
### 支持Phytium-optee
本项目还支持编译Phytium-optee,关于Phytium-optee的信息请参考:`https://gitee.com/phytium_embedded/phytium-optee`
Phytium-optee只支持E2000开发板,关于Phytium-optee的信息请参考:`https://gitee.com/phytium_embedded/phytium-optee`
defconfig默认不编译Phytium-optee,如果需要编译Phytium-optee请执行:
(1)使用phytium_e2000_xxx_defconfig作为基础配置项,合并支持optee的配置:
`$ ./support/kconfig/merge_config.sh configs/phytium_e2000_xxx_defconfig configs/phytium_e2000_optee.config`
目前Phytium-optee支持的开发板有E2000D DEMO、E2000Q DEMO,默认配置为E2000d DEMO。如果需要更改,请将
`configs/phytium_e2000_optee.config`中`BR2_PACKAGE_PHYTIUM_OPTEE_BOARD`变量的值修改为`"e2000qdemo"`。
注意:phytium-linux-buildroot的最新代码已包含了Phytium-optee的依赖,如果您使用的phytium-linux-buildroot不是最新版本,
在执行编译之前需要额外安装依赖:
```
sudo apt install python3-pip
pip3 install pycryptodome
pip3 install pyelftools
pip3 install cryptography
```
(1)使用phytium_debian_defconfig、phytium_ubuntu_defconfig或phytium_defconfig作为基础配置项,合并支持optee的配置:
`$ ./support/kconfig/merge_config.sh configs/phytium_xxx_defconfig configs/e2000_optee.config`
目前Phytium-optee支持的E2000开发板有E2000D DEMO和E2000Q DEMO。
(2)编译
`$ make`
(3)镜像的输出位置
@ -125,38 +159,38 @@ pip3 install cryptography
后续部署及使用方法,请参考`https://gitee.com/phytium_embedded/phytium-embedded-docs/tree/master/optee`
### 支持xenomai
本项目还支持编译xenomai,关于xenomai的信息请参考:`https://gitee.com/phytium_embedded/linux-kernel-xenomai`
支持将xenomai内核及用户态的库、工具编译安装到debian系统上。如果需要编译xenomai请执行:
(1)使用phytium_e2000_debian_xxx_defconfig作为基础配置项,合并支持xenomai的配置:
`$ ./support/kconfig/merge_config.sh configs/phytium_e2000_debian_xxx_defconfig configs/phytium_e2000_xenomai_xxx.config`
其中,`phytium_e2000_debian_xxx_defconfig`为`phytium_e2000_debian_defconfig`或`phytium_e2000_debian_desktop_defconfig`;
`phytium_e2000_xenomai_xxx.config`为以下配置片段文件之一:
```
phytium_e2000_xenomai_cobalt_4.19.config (xenomai cobalt 4.19内核+xenomai-v3.1.3.tar.gz)
phytium_e2000_xenomai_cobalt_5.10.config (xenomai cobalt 5.10内核+xenomai-v3.2.2.tar.gz)
phytium_e2000_xenomai_mercury_4.19.config (linux 4.19 rt内核+xenomai-v3.1.3.tar.gz)
phytium_e2000_xenomai_mercury_5.10.config (linux 5.10 rt内核+xenomai-v3.2.2.tar.gz)
xenomai支持E2000和D2000开发板,关于xenomai的信息请参考:`https://gitee.com/phytium_embedded/linux-kernel-xenomai`
支持将xenomai内核及用户态的库、工具编译安装到debian或ubuntu系统上。如果需要编译xenomai请执行:
(1)使用phytium_debian_defconfig或phytium_ubuntu_defconfig作为基础配置项,合并支持xenomai的配置:
`$ ./support/kconfig/merge_config.sh configs/phytium_xxx_defconfig configs/xenomai_xxx.config`
其中,`xenomai_xxx.config`为以下配置片段文件之一:
```
xenomai_cobalt_4.19.config (xenomai cobalt 4.19内核+xenomai-v3.1.3.tar.gz)
xenomai_cobalt_5.10.config (xenomai cobalt 5.10内核+xenomai-v3.2.2.tar.gz)
xenomai_mercury_4.19.config (linux 4.19 rt内核+xenomai-v3.1.3.tar.gz)
xenomai_mercury_5.10.config (linux 5.10 rt内核+xenomai-v3.2.2.tar.gz)
```
(2)编译
`$ make`
(3)镜像的输出位置
生成的根文件系统、内核、E2000 img 镜像位于output/images目录。
生成的根文件系统、内核、img 镜像位于output/images目录。
(4)文件的安装路径
xenomai用户态的库、工具被安装到根文件系统:
头文件安装到/usr/include/xenomai,配置文件安装到/etc,其它内容分别被安装到/usr目录下的bin,demo,lib,sbin,share。
xenomai用户态的库、工具被安装到根文件系统的/usr/xenomai目录。
关于xenomai的启动及测试工具等更多信息,请参考`https://gitee.com/phytium_embedded/phytium-embedded-docs/tree/master/xenomai`
### 支持ethercat
本项目还支持编译ethercat,关于ethercat的信息请参考:`https://gitee.com/phytium_embedded/ether-cat`
支持将ethercat驱动及用户态的库、工具编译安装到debian系统上,ethercat只支持linux 4.19 rt,linux 5.10 rt内核。如果需要编译ethercat请执行:
(1)使用phytium_e2000_debian_xxx_defconfig作为基础配置项,合并支持rt内核,及ethercat的配置:
`./support/kconfig/merge_config.sh configs/phytium_e2000_debian_xxx_defconfig configs/phytium_e2000_linux_xxx_rt.config configs/phytium_e2000_ethercat.config`
其中,`phytium_e2000_debian_xxx_defconfig`为`phytium_e2000_debian_defconfig`或`phytium_e2000_debian_desktop_defconfig`;
`phytium_e2000_linux_xxx_rt.config`为`phytium_e2000_linux_4.19_rt.config`或`phytium_e2000_linux_5.10_rt.config`。
ethercat支持E2000开发板,关于ethercat的信息请参考:`https://gitee.com/phytium_embedded/ether-cat`
支持将ethercat驱动及用户态的库、工具编译安装到debian或ubuntu系统上,ethercat支持linux 4.19 rt,linux 5.10 rt,xenomai_cobalt_4.19,xenomai_cobalt_5.10内核。如果需要编译ethercat请执行:
(1)使用phytium_debian_defconfig或phytium_ubuntu_defconfig作为基础配置项,合并支持rt内核,及ethercat的配置:
`./support/kconfig/merge_config.sh configs/phytium_xxx_defconfig configs/linux_xxx_rt.config configs/ethercat.config`
其中,`linux_xxx_rt.config`为`linux_4.19_rt.config`或`linux_5.10_rt.config`。
或者合并支持xenomai内核:
`./support/kconfig/merge_config.sh configs/phytium_xxx_defconfig configs/xenomai_cobalt_xxx.config configs/ethercat.config`
其中,`xenomai_cobalt_xxx.config`为`xenomai_cobalt_4.19.config`或`xenomai_cobalt_5.10.config`。
(2)编译
`$ make`
(3)镜像的输出位置
生成的根文件系统、内核、E2000 img 镜像位于output/images目录。
生成的根文件系统、内核、img 镜像位于output/images目录。
(4)文件的安装路径
将ethercat的驱动模块安装到根文件系统的/lib/modules/version/ethercat/目录,并且通过将ec_macb加入/etc/modprobe.d/blacklist.conf
黑名单的方式,使得开机时不自动加载ec_macb模块,而是让用户手动加载。
@ -164,17 +198,15 @@ ethercat用户态的库、工具被安装到根文件系统:
配置文件安装到/etc,其它内容分别被安装到/usr目录下的bin,include,lib,sbin,share。
关于ethercat的使用方法等更多信息,请参考`https://gitee.com/phytium_embedded/phytium-embedded-docs/tree/master/ethercat`
### 支持jailhouse(E2000)
本项目还支持为E2000编译jailhouse,关于jailhouse的信息请参考:`https://gitee.com/phytium_embedded/phytium-jailhouse`
### 支持jailhouse
jailhouse支持E2000、D2000和FT-2000/4开发板,关于jailhouse的信息请参考:`https://gitee.com/phytium_embedded/phytium-jailhouse`
支持将jailhouse编译安装到ubuntu系统,如果需要编译jailhouse请执行:
(1)使用phytium_e2000_ubuntu_xxx_defconfig作为基础配置项,合并支持jailhouse的配置:
`./support/kconfig/merge_config.sh configs/phytium_e2000_ubuntu_xxx_defconfig configs/phytium_e2000_jailhouse_xxx.config`
其中,`phytium_e2000_ubuntu_xxx_defconfig`为`phytium_e2000_ubuntu_defconfig`或`phytium_e2000_ubuntu_desktop_defconfig`;
`phytium_e2000_jailhouse_xxx.config`为`phytium_e2000_jailhouse_4.19.config`或`phytium_e2000_jailhouse_5.10.config`。
(1)使用phytium_ubuntu_defconfig作为基础配置项,合并支持jailhouse的配置:
`./support/kconfig/merge_config.sh configs/phytium_ubuntu_defconfig configs/jailhouse.config`
(2)编译
`$ make`
(3)镜像的输出位置
生成的根文件系统、内核、E2000 img 镜像位于output/images目录。
生成的根文件系统、内核、img 镜像位于output/images目录。
(4)文件的安装路径
jailhouse相关的文件被安装到根文件系统:
```
@ -187,95 +219,29 @@ pyjailhouse安装到/usr/local/lib/python3.8/dist-packages。
```
关于jailhouse的使用方法等更多信息,请参考`https://gitee.com/phytium_embedded/phytium-jailhouse/blob/master/Readme.md`
## 为D2000编译文件系统
`D2000 内核不开源,请联系相关的飞腾FAE,技术支持获取。`
与“为E2000编译文件系统”相比,“为D2000编译文件系统”还需要“准备内核源码”和“编译initrd”。
### 准备内核源码
(1)在phytium-linux-buildroot的根目录下创建files目录,将内核源码拷贝到files目录并根据内核版本进行重命名,比如linux-4.19.tar.gz
`$ mkdir files`
`$ cp xxx/linux-4.19-master.tar.gz files/linux-4.19.tar.gz`
(2)计算内核源码的哈希值
```
$ sha256sum files/linux-4.19.tar.gz
22a2345f656b0624790dcbb4b5884827c915aef00986052fd8d9677b9ee6b50e files/linux-4.19.tar.gz
```
编辑linux/linux.hash文件,将linux-4.19.tar.gz对应行的哈希值修改为刚刚计算的哈希值,如下所示:
`sha256 22a2345f656b0624790dcbb4b5884827c915aef00986052fd8d9677b9ee6b50e linux-4.19.tar.gz`
注意:每次更新files目录里面的内核源码,都需要同时修改linux/linux.hash里面内核源码对应的哈希值,这是为了验证files目录中的文件与dl目录中的文件一致。
### 支持X100
在ubuntu和debian系统中安装了linux-headers和dkms,从而支持使用dkms来构建内核模块。
在配置及编译文件系统时,需要合并x100.config,不能同时合并e2000_vpu.config:
```
$ ./support/kconfig/merge_config.sh configs/phytium_ubuntu_defconfig configs/desktop.config configs/x100.config
$ make
```
系统启动后,可以使用dpkg命令安装X100的deb包。
### 编译initrd
### initrd
initrd支持E2000和D2000开发板,如果需要使用initrd,请按照以下步骤编译:
(1)配置及编译initrd
```
$ make phytium_initrd_defconfig
$ make
```
(2)将编译好的initrd备份保存
`$ cp xxx/phytium-linux-buildroot/output/images/rootfs.cpio.gz ~/initrd`
(3)清理编译结果
`$ make clean`
### 编译默认配置的文件系统
(1)加载defconfig
`$ make phytium_d2000_xxx_defconfig`
其中`phytium_d2000_xxx_defconfig`为以下文件系统之一:
```
phytium_d2000_ubuntu_defconfig
phytium_d2000_ubuntu_desktop_defconfig
phytium_d2000_defconfig
phytium_d2000_debian_defconfig
phytium_d2000_debian_desktop_defconfig
```
(2)编译文件系统
`$ make`
(3)镜像的输出位置
生成的根文件系统、内核位于output/images目录。
### 支持无桌面qt5 eglfs
本项目还支持将qt5 eglfs编译安装到无桌面的ubuntu系统,对应的配置文件为`phytium_d2000_ubuntu_qt5_defconfig`,用来运行在D2000+X100上。
如果需要编译qt5 eglfs请执行:
(1)加载defconfig
`$ make phytium_d2000_ubuntu_qt5_defconfig`
(2)编译文件系统
`$ make`
(3)镜像的输出位置
生成的根文件系统、内核位于output/images目录。
(4)文件的安装路径
qt5相关的文件被安装到根文件系统的/usr目录:
头文件安装到/usr/include/qt5,库安装到/usr/lib,plugins安装到/usr/lib/qt/plugins,examples安装到/usr/lib/qt/examples。
### 支持jailhouse(D2000/FT-2000/4)
本项目还支持为D2000/FT-2000/4编译jailhouse,编译步骤与为E2000编译jailhouse的步骤类似,请参考“为E2000编译文件系统>支持jailhouse(E2000)”。
除了将第(1)步,修改为:
(1)使用phytium_d2000_ubuntu_defconfig作为基础配置项,合并支持jailhouse的配置:
`./support/kconfig/merge_config.sh configs/phytium_d2000_ubuntu_defconfig configs/phytium_d2000_jailhouse.config`
其余步骤与为E2000编译jailhouse的步骤相同。
### 更换文件系统的linux内核版本
defconfig中的内核版本默认是linux 4.19。我们支持在编译文件系统时将内核版本更换为linux 5.10,linux 5.10 rt,linux 4.19 rt。
各自的内核需要向技术支持人员获取,并重新命名,参考linux 4.19的做法
更换内核版本的操作步骤为:
(1)使用phytium_d2000_xxx_defconfig作为基础配置项,合并支持其他内核版本的配置:
`$ ./support/kconfig/merge_config.sh configs/phytium_d2000_xxx_defconfig configs/phytium_d2000_linux_xxx.config`
其中`configs/phytium_d2000_linux_xxx.config`为以下配置片段文件之一:
```
configs/phytium_d2000_linux_5.10.config
configs/phytium_d2000_linux_5.10_rt.config
configs/phytium_d2000_linux_4.19_rt.config
```
这三个文件分别对应于linux 5.10,linux 5.10 rt,linux 4.19 rt内核。
(2)编译
`$ make`
(3)镜像的输出位置
生成的根文件系统、内核、D2000 img 镜像位于output/images目录。
`$ cp ./output/images/rootfs.cpio.gz ~/initrd`
## 为phytiumpi编译SD卡镜像
(1)加载defconfig
`$ make phytiumpi_xxx_defconfig`
其中`phytiumpi_xxx_defconfig`为以下文件系统之一:
```
phytiumpi_defconfig
phytiumpi_ubuntu_desktop_defconfig
```
### 支持为phytiumpi编译SD卡镜像
飞腾派开发板默认只能通过SD卡启动,如果需要编译飞腾派SD卡镜像,请按照以下步骤编译:
(1)使用phytium_debian_defconfig、phytium_ubuntu_defconfig或phytium_defconfig作为基础配置项,合并支持phytiumpi_sdcard的配置:
`$ ./support/kconfig/merge_config.sh configs/phytium_xxx_defconfig configs/phytiumpi_sdcard.config`
(2)编译
`$ make`
(3)镜像的输出位置
@ -300,19 +266,34 @@ phytiumpi_ubuntu_desktop_defconfig
`$ make -C xxx/phytium-linux-buildroot/ O=$(pwd) phytium_xxx_defconfig`
(3)对于使用`merge_config.sh`合并配置文件的情况,在buildroot源码目录运行:
`$ mkdir xxx/foo-output`
`$ ./support/kconfig/merge_config.sh -O xxx/foo-output configs/phytium_xxx_defconfig configs/phytium_xxx.config`
`$ ./support/kconfig/merge_config.sh -O xxx/foo-output configs/phytium_xxx_defconfig configs/xxx.config`
运行上述命令之一,buildroot会在输出目录中创建一个Makefile,所以在输出目录中再次运行make时,不再需要指定O变量和buildroot源码树的路径。
因此配置完成后,编译的命令为:
`$ cd xxx/foo-output`
`$ make`
## buildroot中修改内核进行编译
buildroot中编译内核源码的目录是`output/build/linux-<version>`,如果在该目录对内核进行了修改(例如修改内核配置或源码),
当运行`make clean`后该目录会被删除,所以在该目录中直接修改内核是不合适的。
因此,buildroot对于这种情况提供了一种机制:`<PKG>_OVERRIDE_SRCDIR`机制。
操作方法是,创建一个叫做local.mk的文件,其内容是:
```
$ cat local.mk
LINUX_OVERRIDE_SRCDIR = /home/xxx/linux-kernel
```
将local.mk文件和buildroot的.config文件放在同一个目录下,对于树内构建是顶层的buildroot源码目录,对于树外构建是树外构建的输出目录。
LINUX_OVERRIDE_SRCDIR指定了一个本地的内核源码目录,这样buildroot就不会去下载、解压、打补丁内核源码了,而是使用LINUX_OVERRIDE_SRCDIR
指定的内核源码目录。
这样开发人员首先在LINUX_OVERRIDE_SRCDIR指定的目录对内核进行修改,然后运行`make linux-rebuild`或`make linux-reconfigure`即可。
该命令首先将LINUX_OVERRIDE_SRCDIR中的内核源码同步到`output/build/linux-custom`目录,然后进行配置、编译、安装。
如果想要编译、安装内核,并重新生成系统镜像,请运行`make linux-rebuild all`。
# 在开发板上启动系统
## 在E2000开发板上启动系统
### 安装系统
## 安装系统
可以通过手动分区的方式安装系统,将存储设备分区、格式化后,再将buildroot生成的文件拷贝到对应的分区;
也可以使用E2000 img 镜像安装系统,这种方式不需要手动将存储设备分区再拷贝文件,只需要将disk.img文件写入存储设备即可。
#### 手动分区安装系统
也可以使用img 镜像安装系统,这种方式不需要手动将存储设备分区再拷贝文件,只需要将disk.img文件写入存储设备即可。
### 手动分区安装系统
(1)主机端将存储设备分成两个分区(以主机识别设备名为/dev/sdb 为例,请按实际识别设备名更改)
`$ sudo fdisk /dev/sdb`
这将启动fdisk程序,在其中输入命令:
@ -344,11 +325,12 @@ $ sync
$ cd ~
$ sudo umount /dev/sdb2
```
#### 使用E2000 img 镜像安装系统
E2000 img 镜像(disk.img)写入存储设备:
### 使用img 镜像安装系统
将img 镜像(disk.img)写入存储设备:
`$ sudo dd if=xxx/phytium-linux-buildroot/output/images/disk.img of=/dev/sdb bs=1M`
`$ sync`
## 启动系统
### U-Boot启动系统
安装系统后,将存储设备接到开发板,启动开发板电源,串口输出U-Boot命令行,设置U-Boot环境变量来启动系统。
SATA盘:
@ -368,7 +350,7 @@ U盘:
```
### UEFI启动系统
如果是使用E2000 img 镜像安装系统,将存储设备接到开发板,启动开发板电源,即可自动启动系统。
如果是使用img 镜像安装系统,将存储设备接到开发板,启动开发板电源,即可自动启动系统。
如果是通过手动分区的方式安装系统,安装系统后,还需要在主机端配置存储设备的EFI分区中的/EFI/BOOT/grub.cfg文件,确保菜单条目中内核命令行参数root的值为根分区(这里是第二个分区)。
(1)通过分区UUID
获取第二个分区的UUID:
@ -378,108 +360,28 @@ U盘:
将grub.cfg中root的值设置为"root=/dev/sda2"。
然后将存储设备接到开发板,启动开发板电源,自动启动系统。
## 在D2000开发板上启动系统
### 安装系统
(1)主机端将存储设备分成两个分区(以主机识别设备名为/dev/sdb 为例,请按实际识别设备名更改)
`$ sudo fdisk /dev/sdb`
这将启动fdisk程序,在其中输入命令:
```
输入g创建GPT分区表;
输入n创建分区,需要创建两个分区;
输入t将第一个分区的分区类型修改为'EFI System';
输入p打印分区表,确保输出中包含'Disklabel type: gpt'及第一个分区的类型为'EFI System';
输入w将分区表写入磁盘并退出。
```
(2)格式化分区
```
$ sudo mkfs.vfat /dev/sdb1
$ sudo mkfs.ext4 /dev/sdb2
```
(3)主机端将内核、设备树、GRUB和initrd拷贝到第一个分区(EFI分区),将根文件系统拷贝到第二个分区(根分区)
```
$ sudo mount /dev/sdb1 /mnt
$ sudo cp xxx/phytium-linux-buildroot/output/images/Image /mnt
$ sudo cp xxx/phytium-linux-buildroot/output/images/d2000-devboard-dsk.dtb /mnt(用于U-Boot启动)
$ sudo cp -r xxx/phytium-linux-buildroot/output/images/efi-part/EFI/ /mnt(用于UEFI启动)
$ sudo cp ~/initrd /mnt
$ sync
$ sudo umount /dev/sdb1
$ sudo mount /dev/sdb2 /mnt
$ sudo cp xxx/phytium-linux-buildroot/output/images/rootfs.tar /mnt
$ cd /mnt
$ sudo tar xvf rootfs.tar
$ sync
$ cd ~
$ sudo umount /dev/sdb2
```
### U-Boot启动系统
安装系统后,将存储设备接到开发板,启动开发板电源,串口输出U-Boot命令行,设置U-Boot环境变量来启动系统。
SATA盘:
```
=>setenv bootargs console=ttyAMA1,115200 earlycon=pl011,0x28001000 root=/dev/sda2 rootdelay=5 rw initrd=0x93000000,85M
=>fatload scsi 0:1 0x90100000 d2000-devboard-dsk.dtb
=>fatload scsi 0:1 0x90200000 Image
=>fatload scsi 0:1 0x93000000 initrd
=>booti 0x90200000 - 0x90100000
```
U盘:
```
=>setenv bootargs console=ttyAMA1,115200 earlycon=pl011,0x28001000 root=/dev/sda2 rootdelay=5 rw initrd=0x93000000,85M
=>usb start
=>fatload usb 0:1 0x90100000 d2000-devboard-dsk.dtb
=>fatload usb 0:1 0x90200000 Image
=>fatload usb 0:1 0x93000000 initrd
=>booti 0x90200000 - 0x90100000
```
### UEFI启动系统
安装系统后,需要在主机端配置存储设备的EFI分区中的/EFI/BOOT/grub.cfg文件,确保菜单条目中内核命令行参数root的值为根分区(这里是第二个分区)。
(1)通过分区UUID
获取第二个分区的UUID:
`$ sudo blkid -s PARTUUID -o value /dev/sdb2`
将grub.cfg中root的值设置为"root=PARTUUID=xxx",xxx为分区UUID的值。
(2)通过设备名
将grub.cfg中root的值设置为"root=/dev/sda2"。
然后将存储设备接到开发板,启动开发板电源,自动启动系统。
# ubuntu系统安装桌面
`phytium_e2000_ubuntu_desktop_defconfig`和`phytium_d2000_ubuntu_desktop_defconfig`默认安装了xfce桌面,配置并编译它就可以获得带
xfce桌面的ubuntu系统。如果需要在开发板上安装其他桌面,重新配置并编译`phytium_e2000_ubuntu_defconfig`或`phytium_d2000_ubuntu_defconfig`,
然后在开发板启动这个不带桌面的ubuntu系统。
## 登录
ubuntu系统包含了超级用户root,和一个普通用户user,密码和用户名相同。
## 动态获取 IP 地址
```
$ sudo dhclient
$ ping www.baidu.com
```
## 安装桌面
### 安装GNOME桌面
```
$ sudo apt update
$ sudo apt -y install ubuntu-gnome-desktop
```
### 安装KDE桌面
```
$ sudo apt update
$ sudo apt -y install kubuntu-desktop
```
### 安装XFCE桌面
```
$ sudo apt update
$ sudo apt -y install xfce4 xfce4-terminal
在安装过程中,它会要求你选择显示管理器是gdm3还是lightdm,这里选择的是lightdm。
安装完成后重启系统,在图形登录界面点击用户名右边的ubuntu logo按钮,选择桌面环境为“Xfce Session”,输入密码登录。
```
ubuntu和debian系统包含了超级用户root,和一个普通用户user,密码和用户名相同,busybox最小系统只需要输入用户名root。
# ubuntu及debian系统支持linux-headers
linux-headers包含构建内核外部模块所需的头文件,编译ubuntu和debian的defconfig会生成linux-headers。
关于如何编译内核外部模块,可参考https://www.kernel.org/doc/html/latest/kbuild/modules.html
## 开发板上编译内核模块
buildroot将linux-headers-version安装在根文件系统的`/usr/src`目录下,
并为它创建了一个软链接`/lib/modules/version/build`。
在开发板上编译内核外部模块的命令为:
`make -C /lib/modules/5.10.153-phytium-embeded/build M=$PWD modules`
## 交叉编译内核模块
编译ubuntu和debian的defconfig,会在`output/target/usr/src`目录中安装linux-headers-version。
编译ubuntu和debian的defconfig,会在`output/target/usr/src`目录中安装linux-headers-version。
注意,目前linux-headers-version默认支持在开发板上编译内核模块,如果用于交叉编译内核模块,需要在编译ubuntu和debian的defconfig之前,
将`board/phytium/common/post-build.sh`中的如下两行注释掉,再执行编译。
`cp -r board/phytium/common/linux-5.10/scripts $destdir`
`cp -r board/phytium/common/linux-4.19/scripts $destdir`
使用buildroot的工具链来交叉编译内核模块,buildroot工具链位于`output/host/bin`,工具链的sysroot为
`output/host/aarch64-buildroot-linux-gnu/sysroot`
交叉编译内核外部模块的命令为:
```
$ make ARCH=arm64 \
@ -489,21 +391,6 @@ M=$PWD \
modules
```
## 开发板上编译内核模块
buildroot将linux-headers-version安装在根文件系统的`/usr/src`目录下,
并为它创建了一个软链接`/lib/modules/version/build`。
注意,由于linux-headers是在x86-64主机交叉编译生成的,在开发板上直接使用它编译内核模块会报错:
`/bin/sh: 1: scripts/basic/fixdep: Exec format error`
因此,需要将x86-64格式的fixdep等文件替换为ARM aarch64格式的(以linux 5.10内核为例):
(1)`scp -r username@host:/home/xxx/phytium-linux-buildroot/board/phytium/common/linux-5.10/scripts /usr/src/linux-headers-5.10.153-phytium-embeded`
(2)或者在编译ubuntu和debian的defconfig之前,将board/phytium/common/post-custom-skeleton-ubuntu-base-20.04.sh和
board/phytium/common/post-custom-skeleton-debian-base-11.sh中的如下两行取消注释,再执行编译。
`# cp -r board/phytium/common/linux-5.10/scripts $destdir`
`# cp -r board/phytium/common/linux-4.19/scripts $destdir`
在开发板上编译内核外部模块的命令为:
`make -C /lib/modules/5.10.153-phytium-embeded/build M=$PWD modules`
# buildroot编译新的应用软件
本节简单介绍如何通过buildroot交叉编译能运行在开发板上的应用软件,完整的教程请参考buildroot用户手册manual.pdf。
## buildroot软件包介绍
@ -540,21 +427,7 @@ $ make
```
# FAQ
1. Ubuntu文件系统桌面无法登陆问题?
```
文件系统启动后控制台下apt install kubuntu-desktop
检查/home/user权限是否为user
chown -R user:user /home/user
重新启动开发板子
```
2. 播放音频没有声音?
```
将user用户加入audio组,可解决user用户下没声音的问题
gpasswd -a user audio
```
3. 下载ubuntu及debian太慢或报错?
1. 下载ubuntu及debian太慢或报错?
目前下载ubuntu及debian的源为清华大学镜像,如果遇到下载很慢,或者下载报错:
`E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?`
从而导致编译的phytium_e2000_debian_desktop_defconfig或phytium_e2000_ubuntu_desktop_defconfig没有桌面问题,
@ -567,16 +440,8 @@ board/phytium/common/debian-package-installer
```
中的`mirrors.tuna.tsinghua.edu.cn`改为`mirrors.ustc.edu.cn`
4. 编译内核时报错`Can't find default configuration "arch/arm64/configs/phytium_defconfig"!`
需要删除dl目录中的内核源码,再重新编译:
```
rm -rf dl/linux/
make linux-dirclean
make
```
5. 关于E2000 vpu的包请咨询飞腾技术支持或FAE。
2. 关于E2000 vpu的包请咨询飞腾技术支持或FAE。
6. 在ubuntu或debian上安装完cpufreq-utils,CPU调频模式不再是performance。
3. 在ubuntu或debian上安装完cpufreq-utils,CPU调频模式不再是performance。
安装了cpufreq-utils以后,会同时安装一个/etc/init.d/cpufrequtils脚本,这个脚本在启动后会将cpufreq的模式设置为ondemand动态调频。
可以把这个脚本改一下:将ENABLE改为false,便不会修改cpufreq策略,或者将GOVERNOR=“performance”。

2
board/phytium/common/debian-package-installer

@ -54,6 +54,8 @@ do_distrorfs_second_stage() {
DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install $pkg || exit 1
done
dpkg -l | grep linux-headers | cut -d ' ' -f3 | xargs dpkg --purge
dpkg -l | grep linux-kbuild | cut -d ' ' -f3 | xargs dpkg --purge
echo installed additional packages.
if [ $6 = desktop ]; then

BIN
board/phytium/common/linux-4.19/scripts/genksyms/genksyms

Binary file not shown.

13
board/phytium/common/post-build.sh

@ -37,9 +37,12 @@ deploy_kernel_headers_510 () {
# copy .config manually to be where it's expected to be
cp .config $destdir/.config
# used to build dma
cp drivers/dma/dmaengine.h $1/usr/include
cp drivers/dma/virt-dma.h $1/usr/include
find $destdir -name "*.o" -type f -exec rm -rf {} \;
cd $topdir
# cp -r board/phytium/common/linux-5.10/scripts $destdir
cp -r board/phytium/common/linux-5.10/scripts $destdir
rm -rf $srctree
rm -rf $objtree
@ -73,9 +76,11 @@ deploy_kernel_headers_419 () {
(cd $objtree; cp .config $destdir/.config) # copy .config manually to be where it's expected to be
(cd $srctree; cp --parents tools/include/tools/be_byteshift.h $destdir)
(cd $srctree; cp --parents tools/include/tools/le_byteshift.h $destdir)
(cd $srctree; cp drivers/dma/dmaengine.h $1/usr/include) # used to build dma
(cd $srctree; cp drivers/dma/virt-dma.h $1/usr/include)
find $destdir -name "*.o" -type f -exec rm -rf {} \;
cd $topdir
# cp -r board/phytium/common/linux-4.19/scripts $destdir
cp -r board/phytium/common/linux-4.19/scripts $destdir
rm -rf "$objtree/debian"
rm -rf $srctree
@ -93,12 +98,12 @@ main()
KERNELVERSION=`ls $1/lib/modules`
if grep -Eq "^BR2_ROOTFS_LINUX_HEADERS=y$" ${BR2_CONFIG} && [ -L $1/lib/modules/${KERNELVERSION}/source ]; then
if [[ ${KERNELVERSION} = 5.10* ]];then
if [[ ${KERNELVERSION} = 5.10* || ${KERNELVERSION} = 5.15* ]];then
deploy_kernel_headers_510 $1 ${KERNELVERSION}
elif [[ ${KERNELVERSION} = 4.19* ]];then
deploy_kernel_headers_419 $1 ${KERNELVERSION}
else
echo "error: linux kernel version is neither 4.19 nor 5.10."
echo "error: linux kernel version is not 4.19, 5.10, or 5.15."
fi
fi

2
board/phytium/common/ubuntu-additional_packages_list

@ -3,4 +3,4 @@ additional_full_packages_list=" "
# for Lite userland gathered from main repo
additional_base_packages_list="net-tools iputils-ping gcc g++ vim make autoconf automake libtool pkg-config bison bc flex libssl-dev openssh-server python-is-python3 \
libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-pulseaudio "
libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-pulseaudio dkms initramfs-tools debhelper"

2
board/phytium/common/ubuntu-package-installer

@ -53,6 +53,8 @@ do_distrorfs_second_stage() {
DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install $pkg || exit 1
done
dpkg -l | grep linux-headers | cut -d ' ' -f3 | xargs dpkg --purge
test -f /proc/uptime || mount -t proc proc /proc
test -f /dev/pts/ptmx || mount -t devpts devpts /dev/pts

6
board/phytium/genimage-e2000.cfg → board/phytium/genimage-4.19.cfg

@ -7,6 +7,7 @@ image efi-part.vfat {
image = "Image"
}
files = {
"e2000d-chillipi-edu-board.dtb",
"e2000d-demo-board.dtb",
"e2000d-miniitx-board.dtb",
"e2000d-power-board.dtb",
@ -16,7 +17,8 @@ image efi-part.vfat {
"e2000q-hanwei-board.dtb",
"e2000q-miniitx-board.dtb",
"e2000q-vpx-board.dtb",
"e2000s-demo-board.dtb"
"e2000s-demo-board.dtb",
"phytiumpi_firefly.dtb"
}
}
@ -40,6 +42,6 @@ image disk.img {
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
partition-uuid = "0a52c129-7e0f-43ad-989f-d96b07ccdbb2"
image = "rootfs.ext2"
size = 6G
size = 11G
}
}

6
board/phytium/genimage-efi.cfg → board/phytium/genimage-5.10.cfg

@ -7,6 +7,7 @@ image efi-part.vfat {
image = "Image"
}
files = {
"e2000d-chillipi-edu-board.dtb",
"e2000d-demo-board.dtb",
"e2000d-miniitx-board.dtb",
"e2000d-power-board.dtb",
@ -16,7 +17,8 @@ image efi-part.vfat {
"e2000q-hanwei-board.dtb",
"e2000q-miniitx-board.dtb",
"e2000q-vpx-board.dtb",
"e2000s-demo-board.dtb"
"e2000s-demo-board.dtb",
"phytiumpi_firefly.dtb"
}
}
@ -40,6 +42,6 @@ image disk.img {
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
partition-uuid = "0a52c129-7e0f-43ad-989f-d96b07ccdbb2"
image = "rootfs.ext2"
size = 6G
size = 11G
}
}

1
configs/desktop.config

@ -0,0 +1 @@
BR2_PACKAGE_ROOTFS_DESKTOP=y

4
configs/phytium_e2000_optee.config → configs/e2000_optee.config

@ -4,5 +4,5 @@ BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/phytium_
BR2_PACKAGE_PHYTIUM_OPTEE=y
BR2_PACKAGE_PHYTIUM_OPTEE_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/phytium-optee.git"
BR2_PACKAGE_PHYTIUM_OPTEE_CUSTOM_REPO_VERSION="v2.3"
BR2_PACKAGE_PHYTIUM_OPTEE_BOARD="e2000ddemo"
BR2_PACKAGE_PHYTIUM_OPTEE_CUSTOM_REPO_VERSION="v3.0"
BR2_PACKAGE_PHYTIUM_OPTEE_BOARD="e2000qdemo"

0
configs/phytium_e2000_ethercat.config → configs/ethercat.config

4
configs/phytium_d2000_jailhouse.config → configs/jailhouse.config

@ -5,5 +5,5 @@ BR2_PACKAGE_JAILHOUSE=y
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS=y
# kernel patch for d2000 and ft2004
BR2_LINUX_KERNEL_PATCH="$(LINUX_PKGDIR)/kernel-patches/jailhouse/0001-modify-the-dts-of-d2000-and-ft2004-linux-kernel-to-r.patch"
# kernel patch for e2000, kernel version of 4.19 and 5.10
BR2_LINUX_KERNEL_PATCH="$(LINUX_PKGDIR)/kernel-patches/jailhouse/0001-modify-the-dts-of-e2000-linux-kernel-to-reserve-memo.patch"

5
configs/linux_4.19.config

@ -0,0 +1,5 @@
# Filesystem
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-4.19.cfg"
# kernel 4.19
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel-4.19_v2.0"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/e2000d-chillipi-edu-board phytium/e2000d-demo-board phytium/e2000d-miniitx-board phytium/e2000d-power-board phytium/e2000q-come-board phytium/e2000q-demo-board phytium/e2000q-edu-board phytium/e2000q-hanwei-board phytium/e2000q-miniitx-board phytium/e2000q-vpx-board phytium/e2000s-demo-board phytium/phytiumpi_firefly"

6
configs/linux_4.19_rt.config

@ -0,0 +1,6 @@
# Filesystem
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-4.19.cfg"
# kernel 4.19_rt
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel-4.19-rt_v2.0"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/e2000d-chillipi-edu-board phytium/e2000d-demo-board phytium/e2000d-miniitx-board phytium/e2000d-power-board phytium/e2000q-come-board phytium/e2000q-demo-board phytium/e2000q-edu-board phytium/e2000q-hanwei-board phytium/e2000q-miniitx-board phytium/e2000q-vpx-board phytium/e2000s-demo-board phytium/phytiumpi_firefly"

3
configs/linux_5.10_rt.config

@ -0,0 +1,3 @@
# kernel 5.10_rt
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel-5.10-rt_v2.0"

64
configs/phytium_d2000_debian_defconfig

@ -1,64 +0,0 @@
# Architecture
BR2_aarch64=y
BR2_cortex_a53=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="5G"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh"
# custom skeleton
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_DEBIAN=y
BR2_ROOTFS_POST_CUSTOM_SKELETON_SCRIPT="board/phytium/common/post-custom-skeleton-debian-11.sh"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/phytium/common/post-build.sh"
BR2_INIT_NONE=y
BR2_ENABLE_LOCALE_PURGE=n
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="D2000"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium Buildroot"
# toolchain
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_GLIBC=y
# Linux headers same as kernel
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="file://$(TOPDIR)/files/linux-4.19.tar.gz"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/sdk.config"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/d2000-devboard-dsk phytium/ft2004-devboard-d4-dsk"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_ROOTFS_LINUX_HEADERS=y
# Bootloader
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_ARM64_EFI=y
# Serial port config
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
# required tools to create the microSD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_XORG_ROGUE_UMLIBS=y
BR2_PACKAGE_BUSYBOX=n
# Vpu-lib
BR2_PACKAGE_VPU_LIB=y
BR2_PACKAGE_VPU_LIB_CPU_MODEL="d2000"

69
configs/phytium_d2000_debian_desktop_defconfig

@ -1,69 +0,0 @@
# Architecture
BR2_aarch64=y
BR2_cortex_a53=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="5G"
BR2_ROOTFS_CHOWN=y
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh"
# custom skeleton
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_DEBIAN=y
BR2_ROOTFS_POST_CUSTOM_SKELETON_SCRIPT="board/phytium/common/post-custom-skeleton-debian-11.sh"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/phytium/common/post-build.sh"
BR2_INIT_NONE=y
BR2_ENABLE_LOCALE_PURGE=n
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="D2000"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium Buildroot"
# toolchain
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_GLIBC=y
# Linux headers same as kernel
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="file://$(TOPDIR)/files/linux-4.19.tar.gz"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/sdk.config"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/d2000-devboard-dsk phytium/ft2004-devboard-d4-dsk"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_ROOTFS_LINUX_HEADERS=y
# Bootloader
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_ARM64_EFI=y
# Serial port config
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
# required tools to create the microSD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_ROOTFS_DESKTOP=y
BR2_PACKAGE_XORG_ROGUE_UMLIBS=y
BR2_PACKAGE_BUSYBOX=n
# Vpu-lib
BR2_PACKAGE_VPU_LIB=y
BR2_PACKAGE_VPU_LIB_CPU_MODEL="d2000"
# FFmpeg
BR2_PACKAGE_FFMPEG=y

134
configs/phytium_d2000_defconfig

@ -1,134 +0,0 @@
# Architecture
BR2_aarch64=y
BR2_cortex_a53=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="1G"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh"
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="D2000"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium Buildroot"
# toolchain
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_GLIBC=y
# Linux headers same as kernel
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="file://$(TOPDIR)/files/linux-4.19.tar.gz"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/sdk.config"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/d2000-devboard-dsk phytium/ft2004-devboard-d4-dsk"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
# Bootloader
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_ARM64_EFI=y
# Serial port config
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
# required tools to create the microSD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
# busybox setting
#eudev support
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_OVERLAY="board/phytium/common/busybox_init_overlay"
# basic packages and tools
BR2_PACKAGE_MTD=y
BR2_PACKAGE_MTD_MTD_DEBUG=y
BR2_PACKAGE_SYSSTAT=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_RT_TESTS=y
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_OPENSSL=y
BR2_PACKAGE_WGET=y
BR2_PACKAGE_WIRELESS_REGDB=y
# ca-certs packages
BR2_PACKAGE_CA_CERTIFICATES=y
# dhcpd package
BR2_PACKAGE_DHCPCD=y
# resize2fs package
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
# Text editors
BR2_PACKAGE_NANO=y
# IGH ETHERCAT
#BR2_PACKAGE_IGH_ETHERCAT=y
#iproute2
BR2_PACKAGE_IPROUTE2=y
#netperf
BR2_PACKAGE_NETPERF=y
BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_COLLECTD_CURL=y
BR2_PACKAGE_COLLECTD_CURL_JSON=y
BR2_PACKAGE_COLLECTD_CURL_XML=y
BR2_PACKAGE_LIBCURL=y
BR2_PACKAGE_LIBCURL_CURL=y
BR2_PACKAGE_LIBCURL_VERBOSE=y
BR2_PACKAGE_FLICKCURL=y
BR2_PACKAGE_FLICKCURL_UTILS=y
BR2_PACKAGE_BASH=y
BR2_SYSTEM_BIN_SH_BASH=y
BR2_SYSTEM_BIN_SH="bash"
# haveged
BR2_PACKAGE_HAVEGED=y
#avahi
BR2_PACKAGE_AVAHI=y
BR2_PACKAGE_AVAHI_AUTOIPD=y
BR2_PACKAGE_AVAHI_DAEMON=y
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
BR2_PACKAGE_NSS_MDNS=y
# i2c-tools
BR2_PACKAGE_I2C_TOOLS=y
BR2_USE_MMU=y
BR2_USE_WCHAR=y
BR2_PACKAGE_VIM=y
BR2_INSTALL_LIBSTDCPP=y
BR2_PACKAGE_IPERF=y
BR2_TOOLCHAIN_HAS_THREADS=y
BR2_PACKAGE_IPERF3=y
BR2_PACKAGE_TCPDUMP=y
# OPC UA tools
BR2_PACKAGE_LIBOPEN62541=y
BR2_PACKAGE_LIBOPEN62541_BUILD_EXAMPLES=y
BR2_PACKAGE_XORG_ROGUE_UMLIBS=y
# Vpu-lib
BR2_PACKAGE_VPU_LIB=y
BR2_PACKAGE_VPU_LIB_CPU_MODEL="d2000"

2
configs/phytium_d2000_linux_4.19_rt.config

@ -1,2 +0,0 @@
# 4.19_rt
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="file://$(TOPDIR)/files/linux-4.19_rt.tar.gz"

9
configs/phytium_d2000_linux_5.10.config

@ -1,9 +0,0 @@
# kernel_5.10
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=n
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="file://$(TOPDIR)/files/linux-5.10.tar.gz"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES=""
BR2_LINUX_KERNEL_USE_DEFCONFIG=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/pd2008-devboard-dsk phytium/pd1904-devboard-d4-dsk phytium/pd1904c-devboard-d4-dsk"
BR2_LINUX_KERNEL_DEFCONFIG="phytium"

9
configs/phytium_d2000_linux_5.10_rt.config

@ -1,9 +0,0 @@
# 5.10_rt
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=n
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="file://$(TOPDIR)/files/linux-5.10_rt.tar.gz"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES=""
BR2_LINUX_KERNEL_USE_DEFCONFIG=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/pd2008-devboard-dsk phytium/pd1904-devboard-d4-dsk phytium/pd1904c-devboard-d4-dsk"
BR2_LINUX_KERNEL_DEFCONFIG="phytium"

64
configs/phytium_d2000_ubuntu_defconfig

@ -1,64 +0,0 @@
# Architecture
BR2_aarch64=y
BR2_cortex_a53=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="5G"
BR2_ROOTFS_CHOWN=y
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh"
# custom skeleton
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_UBUNTU=y
BR2_ROOTFS_POST_CUSTOM_SKELETON_SCRIPT="board/phytium/common/post-custom-skeleton-ubuntu-20.04.sh"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/phytium/common/post-build.sh"
BR2_INIT_NONE=y
BR2_ENABLE_LOCALE_PURGE=n
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="D2000"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium Buildroot"
# toolchain
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_GLIBC=y
# Linux headers same as kernel
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="file://$(TOPDIR)/files/linux-4.19.tar.gz"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/sdk.config"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/d2000-devboard-dsk phytium/ft2004-devboard-d4-dsk"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_ROOTFS_LINUX_HEADERS=y
# Bootloader
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_ARM64_EFI=y
# Serial port config
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
# required tools to create the microSD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_XORG_ROGUE_UMLIBS=y
BR2_PACKAGE_BUSYBOX=n
# Vpu-lib
BR2_PACKAGE_VPU_LIB=y
BR2_PACKAGE_VPU_LIB_CPU_MODEL="d2000"

68
configs/phytium_d2000_ubuntu_desktop_defconfig

@ -1,68 +0,0 @@
# Architecture
BR2_aarch64=y
BR2_cortex_a53=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="5G"
BR2_ROOTFS_CHOWN=y
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh"
# custom skeleton
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_UBUNTU=y
BR2_ROOTFS_POST_CUSTOM_SKELETON_SCRIPT="board/phytium/common/post-custom-skeleton-ubuntu-20.04.sh"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/phytium/common/post-build.sh"
BR2_INIT_NONE=y
BR2_ENABLE_LOCALE_PURGE=n
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="D2000"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium Buildroot"
# toolchain
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_GLIBC=y
# Linux headers same as kernel
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="file://$(TOPDIR)/files/linux-4.19.tar.gz"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/sdk.config"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/d2000-devboard-dsk phytium/ft2004-devboard-d4-dsk"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_ROOTFS_LINUX_HEADERS=y
# Bootloader
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_ARM64_EFI=y
# Serial port config
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
# required tools to create the microSD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_ROOTFS_DESKTOP=y
BR2_PACKAGE_XORG_ROGUE_UMLIBS=y
BR2_PACKAGE_BUSYBOX=n
# Vpu-lib
BR2_PACKAGE_VPU_LIB=y
BR2_PACKAGE_VPU_LIB_CPU_MODEL="d2000"
# FFmpeg
BR2_PACKAGE_FFMPEG=y

72
configs/phytium_d2000_ubuntu_qt5_defconfig

@ -1,72 +0,0 @@
# Architecture
BR2_aarch64=y
BR2_cortex_a53=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="5G"
BR2_ROOTFS_CHOWN=y
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh"
# custom skeleton
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_UBUNTU=y
BR2_ROOTFS_POST_CUSTOM_SKELETON_SCRIPT="board/phytium/common/post-custom-skeleton-ubuntu-20.04.sh"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/phytium/common/post-build.sh"
BR2_INIT_NONE=y
BR2_ENABLE_LOCALE_PURGE=n
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="D2000"
# toolchain
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_GLIBC=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="file://$(TOPDIR)/files/linux-4.19.tar.gz"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/sdk.config"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/d2000-devboard-dsk phytium/ft2004-devboard-d4-dsk"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_ROOTFS_LINUX_HEADERS=y
# Bootloader
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_ARM64_EFI=y
# required tools to create the microSD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_BUSYBOX=n
# X100
BR2_PACKAGE_XORG_ROGUE_UMLIBS=y
# Vpu-lib
BR2_PACKAGE_VPU_LIB=y
BR2_PACKAGE_VPU_LIB_CPU_MODEL="d2000"
# FFmpeg
BR2_PACKAGE_FFMPEG=y
# Qt5
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5BASE_EXAMPLES=y
BR2_PACKAGE_QT5BASE_GUI=y
BR2_PACKAGE_QT5BASE_EGLFS=y
BR2_PACKAGE_QT5BASE_DEFAULT_QPA="eglfs"
BR2_PACKAGE_QT5BASE_OPENGL=y
BR2_PACKAGE_QT5BASE_OPENGL_ES2=y
BR2_PACKAGE_QT53D=y
BR2_PACKAGE_LIBDRM=y

16
configs/phytium_e2000_debian_desktop_defconfig → configs/phytium_debian_defconfig

@ -5,9 +5,9 @@ BR2_cortex_a53=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="5G"
BR2_TARGET_ROOTFS_EXT2_SIZE="10G"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-e2000.cfg"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-5.10.cfg"
# custom skeleton
BR2_ROOTFS_SKELETON_CUSTOM=y
@ -19,7 +19,7 @@ BR2_ENABLE_LOCALE_PURGE=n
BR2_ROOTFS_CHOWN=y
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="E2000"
BR2_TARGET_GENERIC_HOSTNAME="Phytium"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium Buildroot"
# toolchain
@ -36,8 +36,8 @@ BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/phytium-linux-kernel.git"
# kernel 5.10
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_5.10-v1.1"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/e2000d-demo-board phytium/e2000d-miniitx-board phytium/e2000d-power-board phytium/e2000q-come-board phytium/e2000q-demo-board phytium/e2000q-edu-board phytium/e2000q-hanwei-board phytium/e2000q-miniitx-board phytium/e2000q-vpx-board phytium/e2000s-demo-board"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel-5.10_v2.0"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/e2000d-chillipi-edu-board phytium/e2000d-demo-board phytium/e2000d-miniitx-board phytium/e2000d-power-board phytium/e2000q-come-board phytium/e2000q-demo-board phytium/e2000q-edu-board phytium/e2000q-hanwei-board phytium/e2000q-miniitx-board phytium/e2000q-vpx-board phytium/e2000s-demo-board phytium/phytiumpi_firefly"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_DEFCONFIG="phytium"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
@ -49,7 +49,6 @@ BR2_ROOTFS_LINUX_HEADERS=y
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_ARM64_EFI=y
# Serial port config
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
@ -59,5 +58,8 @@ BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_ROOTFS_DESKTOP=y
BR2_PACKAGE_BUSYBOX=n
# util-linux
BR2_PACKAGE_UTIL_LINUX=y
BR2_PACKAGE_UTIL_LINUX_BINARIES=y

13
configs/phytium_e2000_defconfig → configs/phytium_defconfig

@ -5,7 +5,7 @@ BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="E2000"
BR2_TARGET_GENERIC_HOSTNAME="Phytium"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium Buildroot"
# system configuration
@ -18,9 +18,11 @@ BR2_ROOTFS_OVERLAY="board/phytium/common/busybox_init_overlay"
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_CPIO_GZIP=y
BR2_TARGET_ROOTFS_EXT2_SIZE="2G"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-e2000.cfg"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-5.10.cfg"
# Bootloader
@ -36,12 +38,12 @@ BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/phytium-linux-kernel.git"
# kernel 5.10
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_5.10-v1.1"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel-5.10_v2.0"
BR2_LINUX_KERNEL_DEFCONFIG="phytium"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/e2000d-demo-board phytium/e2000d-miniitx-board phytium/e2000d-power-board phytium/e2000q-come-board phytium/e2000q-demo-board phytium/e2000q-edu-board phytium/e2000q-hanwei-board phytium/e2000q-miniitx-board phytium/e2000q-vpx-board phytium/e2000s-demo-board"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/e2000d-chillipi-edu-board phytium/e2000d-demo-board phytium/e2000d-miniitx-board phytium/e2000d-power-board phytium/e2000q-come-board phytium/e2000q-demo-board phytium/e2000q-edu-board phytium/e2000q-hanwei-board phytium/e2000q-miniitx-board phytium/e2000q-vpx-board phytium/e2000s-demo-board phytium/phytiumpi_firefly"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
# Target packages
@ -79,3 +81,6 @@ BR2_PACKAGE_WIRELESS_REGDB=y
BR2_PACKAGE_PROCPS_NG=y
BR2_PACKAGE_NANO=y
BR2_PACKAGE_VIM=y
# util-linux
BR2_PACKAGE_UTIL_LINUX=y
BR2_PACKAGE_UTIL_LINUX_BINARIES=y

62
configs/phytium_e2000_debian_defconfig

@ -1,62 +0,0 @@
# Architecture
BR2_aarch64=y
BR2_cortex_a53=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="5G"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-e2000.cfg"
# custom skeleton
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_DEBIAN=y
BR2_ROOTFS_POST_CUSTOM_SKELETON_SCRIPT="board/phytium/common/post-custom-skeleton-debian-11.sh"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/phytium/common/post-build.sh"
BR2_INIT_NONE=y
BR2_ENABLE_LOCALE_PURGE=n
BR2_ROOTFS_CHOWN=y
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="E2000"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium Buildroot"
# toolchain
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_GLIBC=y
# Linux headers same as kernel
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/phytium-linux-kernel.git"
# kernel 5.10
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_5.10-v1.1"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/e2000d-demo-board phytium/e2000d-miniitx-board phytium/e2000d-power-board phytium/e2000q-come-board phytium/e2000q-demo-board phytium/e2000q-edu-board phytium/e2000q-hanwei-board phytium/e2000q-miniitx-board phytium/e2000q-vpx-board phytium/e2000s-demo-board"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_DEFCONFIG="phytium"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_ROOTFS_LINUX_HEADERS=y
# Bootloader
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_ARM64_EFI=y
# Serial port config
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
# required tools to create the microSD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_BUSYBOX=n

12
configs/phytium_e2000_jailhouse_4.19.config

@ -1,12 +0,0 @@
# jailhouse
BR2_PACKAGE_JAILHOUSE=y
# jailhouse helper scripts
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS=y
# kernel 4.19
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_4.19-v1.1"
# kernel patch for e2000 linux-4.19
BR2_LINUX_KERNEL_PATCH="$(LINUX_PKGDIR)/kernel-patches/jailhouse/0001-modify-the-dts-of-e2000-linux-4.19-kernel-to-reserve.patch"

9
configs/phytium_e2000_jailhouse_5.10.config

@ -1,9 +0,0 @@
# jailhouse
BR2_PACKAGE_JAILHOUSE=y
# jailhouse helper scripts
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS=y
# kernel patch for e2000 linux-5.10
BR2_LINUX_KERNEL_PATCH="$(LINUX_PKGDIR)/kernel-patches/jailhouse/0001-modify-the-dts-of-e2000-linux-5.10-kernel-to-reserve.patch"

2
configs/phytium_e2000_linux_4.19.config

@ -1,2 +0,0 @@
# kernel 4.19
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_4.19-v1.1"

2
configs/phytium_e2000_linux_4.19_rt.config

@ -1,2 +0,0 @@
# kernel 4.19-rt
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_4.19-rt-v1.1"

2
configs/phytium_e2000_linux_5.10_rt.config

@ -1,2 +0,0 @@
# kernel 5.10-rt
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_5.10-rt-v1.1"

62
configs/phytium_e2000_ubuntu_defconfig

@ -1,62 +0,0 @@
# Architecture
BR2_aarch64=y
BR2_cortex_a53=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="5G"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-e2000.cfg"
# custom skeleton
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_UBUNTU=y
BR2_ROOTFS_POST_CUSTOM_SKELETON_SCRIPT="board/phytium/common/post-custom-skeleton-ubuntu-20.04.sh"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/phytium/common/post-build.sh"
BR2_INIT_NONE=y
BR2_ENABLE_LOCALE_PURGE=n
BR2_ROOTFS_CHOWN=y
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="E2000"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium Buildroot"
# toolchain
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_GLIBC=y
# Linux headers same as kernel
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/phytium-linux-kernel.git"
# kernel 5.10
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_5.10-v1.1"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/e2000d-demo-board phytium/e2000d-miniitx-board phytium/e2000d-power-board phytium/e2000q-come-board phytium/e2000q-demo-board phytium/e2000q-edu-board phytium/e2000q-hanwei-board phytium/e2000q-miniitx-board phytium/e2000q-vpx-board phytium/e2000s-demo-board"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_DEFCONFIG="phytium"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_ROOTFS_LINUX_HEADERS=y
# Bootloader
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_ARM64_EFI=y
# Serial port config
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
# required tools to create the microSD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_BUSYBOX=n

64
configs/phytium_e2000_ubuntu_desktop_defconfig

@ -1,64 +0,0 @@
# Architecture
BR2_aarch64=y
BR2_cortex_a53=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="5G"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-e2000.cfg"
# custom skeleton
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_UBUNTU=y
BR2_ROOTFS_POST_CUSTOM_SKELETON_SCRIPT="board/phytium/common/post-custom-skeleton-ubuntu-20.04.sh"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/phytium/common/post-build.sh"
BR2_INIT_NONE=y
BR2_ENABLE_LOCALE_PURGE=n
BR2_ROOTFS_CHOWN=y
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="E2000"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium Buildroot"
# toolchain
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_GLIBC=y
# Linux headers same as kernel
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/phytium-linux-kernel.git"
# kernel 5.10
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_5.10-v1.1"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/e2000d-demo-board phytium/e2000d-miniitx-board phytium/e2000d-power-board phytium/e2000q-come-board phytium/e2000q-demo-board phytium/e2000q-edu-board phytium/e2000q-hanwei-board phytium/e2000q-miniitx-board phytium/e2000q-vpx-board phytium/e2000s-demo-board"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_DEFCONFIG="phytium"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_ROOTFS_LINUX_HEADERS=y
# Bootloader
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_ARM64_EFI=y
# Serial port config
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
# required tools to create the microSD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_ROOTFS_DESKTOP=y
BR2_PACKAGE_BUSYBOX=n

14
configs/phytium_e2000_xenomai_cobalt_4.19.config

@ -1,14 +0,0 @@
# cobalt kernel 4.19.209-cip59
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/linux-kernel-xenomai.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_4.19.209-cip59_v1.1"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/cobalt.config"
# xenomai libraries and tools
BR2_PACKAGE_XENOMAI=y
BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL=y
BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL_URL="https://source.denx.de/Xenomai/xenomai/-/archive/v3.1.3/xenomai-v3.1.3.tar.gz"
BR2_PACKAGE_XENOMAI_COBALT=y
BR2_PACKAGE_XENOMAI_ENABLE_SMP=y
BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS="--enable-pshared"
BR2_PACKAGE_XENOMAI_TESTSUITE=y
BR2_PACKAGE_XENOMAI_RTCAN=y
BR2_PACKAGE_XENOMAI_ANALOGY=y

12
configs/phytium_e2000_xenomai_mercury_4.19.config

@ -1,12 +0,0 @@
# kernel 4.19-rt
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_4.19-rt-v1.1"
# xenomai libraries and tools
BR2_PACKAGE_XENOMAI=y
BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL=y
BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL_URL="https://source.denx.de/Xenomai/xenomai/-/archive/v3.1.3/xenomai-v3.1.3.tar.gz"
BR2_PACKAGE_XENOMAI_MERCURY=y
BR2_PACKAGE_XENOMAI_ENABLE_SMP=y
BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS="--enable-pshared"
BR2_PACKAGE_XENOMAI_TESTSUITE=y
BR2_PACKAGE_XENOMAI_RTCAN=y
BR2_PACKAGE_XENOMAI_ANALOGY=y

4
configs/phytium_initrd_defconfig

@ -15,7 +15,3 @@ BR2_TOOLCHAIN_EXTERNAL=y
#eudev support
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_ROOTFS_OVERLAY="board/phytium/common/busybox_initrd_overlay"
# xorg-rogue-umlibs firmware
BR2_PACKAGE_XORG_ROGUE_UMLIBS=y
BR2_PACKAGE_XORG_ROGUE_UMLIBS_FIRMWARE=y

17
configs/phytium_ubuntu_desktop_defconfig → configs/phytium_ubuntu_defconfig

@ -5,10 +5,9 @@ BR2_cortex_a53=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="5G"
BR2_TARGET_ROOTFS_EXT2_SIZE="10G"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-e2000.cfg"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-5.10.cfg"
# custom skeleton
BR2_ROOTFS_SKELETON_CUSTOM=y
@ -21,7 +20,7 @@ BR2_ROOTFS_CHOWN=y
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="Phytium"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium Buildroot"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium"
# toolchain
BR2_TOOLCHAIN_EXTERNAL=y
@ -37,8 +36,8 @@ BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/phytium-linux-kernel.git"
# kernel 5.10
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_5.10-v1.1"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/e2000d-demo-board phytium/e2000d-miniitx-board phytium/e2000d-power-board phytium/e2000q-come-board phytium/e2000q-demo-board phytium/e2000q-edu-board phytium/e2000q-hanwei-board phytium/e2000q-miniitx-board phytium/e2000q-vpx-board phytium/e2000s-demo-board"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel-5.10_v2.0"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/e2000d-chillipi-edu-board phytium/e2000d-demo-board phytium/e2000d-miniitx-board phytium/e2000d-power-board phytium/e2000q-come-board phytium/e2000q-demo-board phytium/e2000q-edu-board phytium/e2000q-hanwei-board phytium/e2000q-miniitx-board phytium/e2000q-vpx-board phytium/e2000s-demo-board phytium/phytiumpi_firefly"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_DEFCONFIG="phytium"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
@ -50,7 +49,6 @@ BR2_ROOTFS_LINUX_HEADERS=y
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_ARM64_EFI=y
# Serial port config
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
@ -60,5 +58,8 @@ BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_ROOTFS_DESKTOP=y
BR2_PACKAGE_BUSYBOX=n
# util-linux
BR2_PACKAGE_UTIL_LINUX=y
BR2_PACKAGE_UTIL_LINUX_BINARIES=y

14
configs/phytium_xenomai_cobalt_5.10.config

@ -1,14 +0,0 @@
# cobalt kernel 5.10.153-dovetail3
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/linux-kernel-xenomai.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="087481d1b92af5be516b1b04938738d9ba82cbcd"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/cobalt.config"
# xenomai libraries and tools
BR2_PACKAGE_XENOMAI=y
BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL=y
BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL_URL="https://source.denx.de/Xenomai/xenomai/-/archive/v3.2.2/xenomai-v3.2.2.tar.gz"
BR2_PACKAGE_XENOMAI_COBALT=y
BR2_PACKAGE_XENOMAI_ENABLE_SMP=y
BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS="--enable-pshared"
BR2_PACKAGE_XENOMAI_TESTSUITE=y
BR2_PACKAGE_XENOMAI_RTCAN=y
BR2_PACKAGE_XENOMAI_ANALOGY=y

82
configs/phytiumpi_defconfig

@ -1,82 +0,0 @@
# Architecture
BR2_aarch64=y
# Toolchain
BR2_TOOLCHAIN_EXTERNAL=y
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="phytiumpi"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium PI"
# system configuration
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_SYSTEM_BIN_SH_BASH=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
BR2_ROOTFS_OVERLAY="board/phytium/common/busybox_init_overlay"
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="2G"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-sd.cfg"
# Bootloader
BR2_TARGET_GRUB2=y
BR2_PACKAGE_PHYUBOOT=y
BR2_PACKAGE_PHYUBOOT_RAMSIZE="4GB"
# required tools to create the microSD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/phytium-linux-kernel.git"
# kernel 5.10
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_5.10-v1.1"
BR2_LINUX_KERNEL_DEFCONFIG="phytiumpi_firefly"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/phytiumpi_firefly"
BR2_LINUX_KERNEL_IMAGEGZ=y
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
# Target packages
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_GZIP=y
BR2_PACKAGE_GDB=y
BR2_PACKAGE_NETPERF=y
BR2_PACKAGE_RT_TESTS=y
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_GREP=y
BR2_PACKAGE_CIFS_UTILS=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
BR2_PACKAGE_MTD=y
BR2_PACKAGE_I2C_TOOLS=y
BR2_PACKAGE_PCIUTILS=y
BR2_PACKAGE_SYSSTAT=y
BR2_PACKAGE_FLICKCURL=y
BR2_PACKAGE_FLICKCURL_UTILS=y
BR2_PACKAGE_LIBCURL_CURL=y
BR2_PACKAGE_LIBCURL_VERBOSE=y
BR2_PACKAGE_COLLECTD=y
BR2_PACKAGE_COLLECTD_CURL=y
BR2_PACKAGE_COLLECTD_CURL_JSON=y
BR2_PACKAGE_COLLECTD_CURL_XML=y
BR2_PACKAGE_DHCPCD=y
BR2_PACKAGE_ETHTOOL=y
BR2_PACKAGE_IPERF=y
BR2_PACKAGE_IPERF3=y
BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_TCPDUMP=y
BR2_PACKAGE_WGET=y
BR2_PACKAGE_WIRELESS_REGDB=y
BR2_PACKAGE_PROCPS_NG=y
BR2_PACKAGE_NANO=y
BR2_PACKAGE_VIM=y

15
configs/phytiumpi_sdcard.config

@ -0,0 +1,15 @@
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-sd.cfg"
BR2_LINUX_KERNEL_IMAGEGZ=y
BR2_PACKAGE_PHYUBOOT=y
BR2_PACKAGE_PHYUBOOT_RAMSIZE="4GB"
# Serial port config
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
# Bluetooth config tools
BR2_PACKAGE_PHYTIUM_TOOLS=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2_SIZE="15G"

66
configs/phytiumpi_ubuntu_desktop_defconfig

@ -1,66 +0,0 @@
# Architecture
BR2_aarch64=y
BR2_cortex_a53=y
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="15G"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/phytium/post-image.sh support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-sd.cfg"
# custom skeleton
BR2_ROOTFS_SKELETON_CUSTOM=y
BR2_ROOTFS_SKELETON_UBUNTU=y
BR2_ROOTFS_POST_CUSTOM_SKELETON_SCRIPT="board/phytium/common/post-custom-skeleton-ubuntu-20.04.sh"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/phytium/common/post-build.sh"
BR2_INIT_NONE=y
BR2_ENABLE_LOCALE_PURGE=n
BR2_ROOTFS_CHOWN=y
# Hostname and issue
BR2_TARGET_GENERIC_HOSTNAME="phytiumpi"
BR2_TARGET_GENERIC_ISSUE="Welcome to Phytium PI"
# toolchain
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_ARM_AARCH64=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_GLIBC=y
# Linux headers same as kernel
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/phytium-linux-kernel.git"
# kernel 5.10
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_5.10-v1.1"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/phytiumpi_firefly"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_DEFCONFIG="phytiumpi_firefly"
BR2_LINUX_KERNEL_IMAGEGZ=y
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_ROOTFS_LINUX_HEADERS=y
# Bootloader
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_ARM64_EFI=y
BR2_PACKAGE_PHYUBOOT=y
BR2_PACKAGE_PHYUBOOT_RAMSIZE="4GB"
# Serial port config
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
# required tools to create the microSD image
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_ROOTFS_DESKTOP=y
BR2_PACKAGE_BUSYBOX=n
# Bluetooth config tools
BR2_PACKAGE_PHYTIUM_TOOLS=y

2
configs/x100.config

@ -0,0 +1,2 @@
# kernel patch for E2000+X100
BR2_LINUX_KERNEL_PATCH="$(LINUX_PKGDIR)/kernel-patches/x100/0001-disable-dc.patch $(LINUX_PKGDIR)/kernel-patches/0001-disable-smmu-in-dts.patch"

17
configs/xenomai_cobalt_4.19.config

@ -0,0 +1,17 @@
# Filesystem
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-4.19.cfg"
# cobalt kernel 4.19.209-cip59
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/linux-kernel-xenomai.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel-4.19.209-cip59_v2.0"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/cobalt.config"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/e2000d-chillipi-edu-board phytium/e2000d-demo-board phytium/e2000d-miniitx-board phytium/e2000d-power-board phytium/e2000q-come-board phytium/e2000q-demo-board-xenomai-uart2 phytium/e2000q-demo-board phytium/e2000q-edu-board phytium/e2000q-hanwei-board phytium/e2000q-miniitx-board phytium/e2000q-vpx-board phytium/e2000s-demo-board phytium/phytiumpi_firefly"
# xenomai libraries and tools
BR2_PACKAGE_XENOMAI=y
BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL=y
BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL_URL="https://source.denx.de/Xenomai/xenomai/-/archive/v3.1.3/xenomai-v3.1.3.tar.gz"
BR2_PACKAGE_XENOMAI_COBALT=y
BR2_PACKAGE_XENOMAI_ENABLE_SMP=y
BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS="--enable-pshared --enable-dlopen-libs"
BR2_PACKAGE_XENOMAI_TESTSUITE=y
BR2_PACKAGE_XENOMAI_RTCAN=y
BR2_PACKAGE_XENOMAI_ANALOGY=y

4
configs/phytium_e2000_xenomai_cobalt_5.10.config → configs/xenomai_cobalt_5.10.config

@ -1,6 +1,6 @@
# cobalt kernel 5.10.153-dovetail3
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://gitee.com/phytium_embedded/linux-kernel-xenomai.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_5.10.153-dovetail3_v1.1"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel-5.10.153-dovetail3_v2.0"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm64/configs/cobalt.config"
# xenomai libraries and tools
BR2_PACKAGE_XENOMAI=y
@ -8,7 +8,7 @@ BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL=y
BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL_URL="https://source.denx.de/Xenomai/xenomai/-/archive/v3.2.2/xenomai-v3.2.2.tar.gz"
BR2_PACKAGE_XENOMAI_COBALT=y
BR2_PACKAGE_XENOMAI_ENABLE_SMP=y
BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS="--enable-pshared"
BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS="--enable-pshared --enable-dlopen-libs"
BR2_PACKAGE_XENOMAI_TESTSUITE=y
BR2_PACKAGE_XENOMAI_RTCAN=y
BR2_PACKAGE_XENOMAI_ANALOGY=y

15
configs/xenomai_mercury_4.19.config

@ -0,0 +1,15 @@
# Filesystem
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytium/genimage-4.19.cfg"
# kernel 4.19_rt
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel-4.19-rt_v2.0"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="phytium/e2000d-chillipi-edu-board phytium/e2000d-demo-board phytium/e2000d-miniitx-board phytium/e2000d-power-board phytium/e2000q-come-board phytium/e2000q-demo-board phytium/e2000q-edu-board phytium/e2000q-hanwei-board phytium/e2000q-miniitx-board phytium/e2000q-vpx-board phytium/e2000s-demo-board phytium/phytiumpi_firefly"
# xenomai libraries and tools
BR2_PACKAGE_XENOMAI=y
BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL=y
BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL_URL="https://source.denx.de/Xenomai/xenomai/-/archive/v3.1.3/xenomai-v3.1.3.tar.gz"
BR2_PACKAGE_XENOMAI_MERCURY=y
BR2_PACKAGE_XENOMAI_ENABLE_SMP=y
BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS="--enable-pshared --enable-dlopen-libs"
BR2_PACKAGE_XENOMAI_TESTSUITE=y
BR2_PACKAGE_XENOMAI_RTCAN=y
BR2_PACKAGE_XENOMAI_ANALOGY=y

4
configs/phytium_e2000_xenomai_mercury_5.10.config → configs/xenomai_mercury_5.10.config

@ -1,12 +1,12 @@
# kernel 5.10-rt
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel_5.10-rt-v1.1"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="kernel-5.10-rt_v2.0"
# xenomai libraries and tools
BR2_PACKAGE_XENOMAI=y
BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL=y
BR2_PACKAGE_XENOMAI_CUSTOM_TARBALL_URL="https://source.denx.de/Xenomai/xenomai/-/archive/v3.2.2/xenomai-v3.2.2.tar.gz"
BR2_PACKAGE_XENOMAI_MERCURY=y
BR2_PACKAGE_XENOMAI_ENABLE_SMP=y
BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS="--enable-pshared"
BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS="--enable-pshared --enable-dlopen-libs"
BR2_PACKAGE_XENOMAI_TESTSUITE=y
BR2_PACKAGE_XENOMAI_RTCAN=y
BR2_PACKAGE_XENOMAI_ANALOGY=y

34
linux/kernel-patches/0001-disable-smmu-in-dts.patch

@ -0,0 +1,34 @@
From 3e75cd0d84d86f395d945c244c43bb0d3f5e7bbd Mon Sep 17 00:00:00 2001
From: weishanshan1084 <weishanshan1084@phytium.com.cn>
Date: Tue, 2 Jan 2024 10:56:39 +0800
Subject: [PATCH] disable smmu in dts
Signed-off-by: weishanshan1084 <weishanshan1084@phytium.com.cn>
---
arch/arm64/boot/dts/phytium/pe220x.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/phytium/pe220x.dtsi b/arch/arm64/boot/dts/phytium/pe220x.dtsi
index ef2dc3190..874b6fc8e 100644
--- a/arch/arm64/boot/dts/phytium/pe220x.dtsi
+++ b/arch/arm64/boot/dts/phytium/pe220x.dtsi
@@ -173,6 +173,7 @@ smmu: iommu@30000000 {
interrupt-names = "eventq", "priq", "cmdq-sync", "gerror";
dma-coherent;
#iommu-cells = <1>;
+ status = "disabled";
};
soc: soc {
@@ -1001,7 +1002,7 @@ pcie: pcie@40000000 {
ranges = <0x01000000 0x00 0x00000000 0x0 0x50000000 0x0 0x00f00000>,
<0x02000000 0x00 0x58000000 0x0 0x58000000 0x0 0x28000000>,
<0x03000000 0x10 0x00000000 0x10 0x00000000 0x10 0x00000000>;
- iommu-map = <0x0 &smmu 0x0 0x10000>;
+ //iommu-map = <0x0 &smmu 0x0 0x10000>;
status = "disabled";
};
--
2.25.1

57
linux/kernel-patches/jailhouse/0001-modify-the-dts-of-d2000-and-ft2004-linux-kernel-to-r.patch

@ -1,57 +0,0 @@
From 1a1a209d5c3722f54dd8daf5d971c74ecd9250ac Mon Sep 17 00:00:00 2001
From: weishanshan1084 <weishanshan1084@phytium.com.cn>
Date: Mon, 17 Jul 2023 15:37:55 +0800
Subject: [PATCH] modify the dts of d2000 and ft2004 linux kernel to reserve
memory for jailhouse.
Signed-off-by: weishanshan1084 <weishanshan1084@phytium.com.cn>
---
.../arm64/boot/dts/phytium/d2000-generic-psci-soc.dtsi | 10 ++++++++++
.../boot/dts/phytium/ft2004-generic-psci-soc.dtsi | 10 ++++++++++
2 files changed, 20 insertions(+)
diff --git a/arch/arm64/boot/dts/phytium/d2000-generic-psci-soc.dtsi b/arch/arm64/boot/dts/phytium/d2000-generic-psci-soc.dtsi
index 69d42a220..10adea18c 100644
--- a/arch/arm64/boot/dts/phytium/d2000-generic-psci-soc.dtsi
+++ b/arch/arm64/boot/dts/phytium/d2000-generic-psci-soc.dtsi
@@ -13,6 +13,16 @@
#address-cells = <2>;
#size-cells = <2>;
+ reserved-memory {
+ #address-cells = <0x00000002>;
+ #size-cells = <0x00000002>;
+ ranges;
+ reserved@b0000000 {
+ reg = <0x00000000 0xb0000000 0x00000000 0x10000000>;
+ no-map;
+ };
+ };
+
aliases {
ethernet0 = &gmac0;
ethernet1 = &gmac1;
diff --git a/arch/arm64/boot/dts/phytium/ft2004-generic-psci-soc.dtsi b/arch/arm64/boot/dts/phytium/ft2004-generic-psci-soc.dtsi
index 3f2eb7406..d6c317694 100644
--- a/arch/arm64/boot/dts/phytium/ft2004-generic-psci-soc.dtsi
+++ b/arch/arm64/boot/dts/phytium/ft2004-generic-psci-soc.dtsi
@@ -13,6 +13,16 @@
#address-cells = <2>;
#size-cells = <2>;
+ reserved-memory {
+ #address-cells = <0x00000002>;
+ #size-cells = <0x00000002>;
+ ranges;
+ reserved@b0000000 {
+ reg = <0x00000000 0xb0000000 0x00000000 0x10000000>;
+ no-map;
+ };
+ };
+
aliases {
ethernet0 = &gmac0;
ethernet1 = &gmac1;
--
2.25.1

36
linux/kernel-patches/jailhouse/0001-modify-the-dts-of-e2000-linux-4.19-kernel-to-reserve.patch

@ -1,36 +0,0 @@
From d1c4b2bc42d41ea065ac7ac9bde967ec4eefb217 Mon Sep 17 00:00:00 2001
From: weishanshan1084 <weishanshan1084@phytium.com.cn>
Date: Wed, 25 Oct 2023 17:03:22 +0800
Subject: [PATCH] modify the dts of e2000 linux-4.19 kernel to reserve memory
for jailhouse.
Signed-off-by: weishanshan1084 <weishanshan1084@phytium.com.cn>
---
arch/arm64/boot/dts/phytium/pe2204.dtsi | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/phytium/pe2204.dtsi b/arch/arm64/boot/dts/phytium/pe2204.dtsi
index 3a6c8bd19..ab5bb8ad4 100644
--- a/arch/arm64/boot/dts/phytium/pe2204.dtsi
+++ b/arch/arm64/boot/dts/phytium/pe2204.dtsi
@@ -15,10 +15,15 @@
#size-cells = <0x2>;
ranges;
- rproc: rproc@b0100000 {
+ rproc: rproc@0x2110100000 {
no-map;
- reg = <0x0 0xb0100000 0x0 0x19900000>;
+ reg = <0x21 0x10100000 0x0 0x19900000>;
};
+
+ jailhouse@b0000000 {
+ reg = <0x00000000 0xb0000000 0x00000000 0x10000000>;
+ no-map;
+ };
};
remoteproc: remoteproc@0 {
--
2.25.1

15
linux/kernel-patches/jailhouse/0001-modify-the-dts-of-e2000-linux-5.10-kernel-to-reserve.patch → linux/kernel-patches/jailhouse/0001-modify-the-dts-of-e2000-linux-kernel-to-reserve-memo.patch

@ -1,16 +1,15 @@
From ec7f731688b27c812d7c9d210f705ff10c55ab0d Mon Sep 17 00:00:00 2001
From: weishanshan1084 <weishanshan1084@phytium.com.cn>
Date: Wed, 19 Jul 2023 14:43:34 +0800
Subject: [PATCH] modify the dts of e2000 linux-5.10 kernel to reserve memory
for jailhouse.
From 01bcd5347ace6a71bad5e71cf8ab8d165e34eec0 Mon Sep 17 00:00:00 2001
From: lindongping <lindongping2027@phytium.com.cn>
Date: Fri, 1 Dec 2023 16:37:18 +0800
Subject: [PATCH] modify the dts of e2000 linux kernel to reserve memory for
jailhouse.
Signed-off-by: weishanshan1084 <weishanshan1084@phytium.com.cn>
---
arch/arm64/boot/dts/phytium/pe2204.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/phytium/pe2204.dtsi b/arch/arm64/boot/dts/phytium/pe2204.dtsi
index 2cd699de4..9344ad756 100644
index 201a01e75..54cd6f0a4 100644
--- a/arch/arm64/boot/dts/phytium/pe2204.dtsi
+++ b/arch/arm64/boot/dts/phytium/pe2204.dtsi
@@ -10,6 +10,16 @@
@ -31,5 +30,5 @@ index 2cd699de4..9344ad756 100644
ethernet0 = &macb0;
ethernet1 = &macb1;
--
2.25.1
2.34.1

138
linux/kernel-patches/x100/0001-disable-dc.patch

@ -0,0 +1,138 @@
From 84e6cbf229bf9fb67f0f7b5bf96ac247c8e4872e Mon Sep 17 00:00:00 2001
From: weishanshan1084 <weishanshan1084@phytium.com.cn>
Date: Thu, 28 Dec 2023 11:42:27 +0800
Subject: [PATCH] disable dc
Signed-off-by: weishanshan1084 <weishanshan1084@phytium.com.cn>
---
arch/arm64/boot/dts/phytium/e2000d-chillipi-edu-board.dts | 2 +-
arch/arm64/boot/dts/phytium/e2000d-demo-board.dts | 2 +-
arch/arm64/boot/dts/phytium/e2000d-miniitx-board.dts | 2 +-
arch/arm64/boot/dts/phytium/e2000d-power-board.dts | 2 +-
arch/arm64/boot/dts/phytium/e2000q-come-board.dts | 2 +-
arch/arm64/boot/dts/phytium/e2000q-demo-board.dts | 2 +-
arch/arm64/boot/dts/phytium/e2000q-edu-board.dts | 2 +-
arch/arm64/boot/dts/phytium/e2000q-miniitx-board.dts | 2 +-
arch/arm64/boot/dts/phytium/e2000q-vpx-board.dts | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/arm64/boot/dts/phytium/e2000d-chillipi-edu-board.dts b/arch/arm64/boot/dts/phytium/e2000d-chillipi-edu-board.dts
index 28a1f0d47..d4283b24a 100644
--- a/arch/arm64/boot/dts/phytium/e2000d-chillipi-edu-board.dts
+++ b/arch/arm64/boot/dts/phytium/e2000d-chillipi-edu-board.dts
@@ -311,7 +311,7 @@ &i2s0 {
&dc0 {
pipe_mask = /bits/ 8 <0x2>;
edp_mask = /bits/ 8 <0x0>;
- status = "okay";
+ status = "disabled";
};
&i2s_dp1 {
diff --git a/arch/arm64/boot/dts/phytium/e2000d-demo-board.dts b/arch/arm64/boot/dts/phytium/e2000d-demo-board.dts
index 63f54c4cd..6eabc2bed 100644
--- a/arch/arm64/boot/dts/phytium/e2000d-demo-board.dts
+++ b/arch/arm64/boot/dts/phytium/e2000d-demo-board.dts
@@ -251,7 +251,7 @@ &i2s0 {
&dc0 {
pipe_mask = /bits/ 8 <0x2>;
edp_mask = /bits/ 8 <0x0>;
- status = "okay";
+ status = "disabled";
};
&i2s_dp1 {
diff --git a/arch/arm64/boot/dts/phytium/e2000d-miniitx-board.dts b/arch/arm64/boot/dts/phytium/e2000d-miniitx-board.dts
index e85d27a82..1637daa93 100644
--- a/arch/arm64/boot/dts/phytium/e2000d-miniitx-board.dts
+++ b/arch/arm64/boot/dts/phytium/e2000d-miniitx-board.dts
@@ -279,7 +279,7 @@ &sata1 {
};
&dc0 {
- status = "okay";
+ status = "disabled";
pipe_mask = [02];
edp_mask = [00];
};
diff --git a/arch/arm64/boot/dts/phytium/e2000d-power-board.dts b/arch/arm64/boot/dts/phytium/e2000d-power-board.dts
index afefcc7e7..c65a0da69 100755
--- a/arch/arm64/boot/dts/phytium/e2000d-power-board.dts
+++ b/arch/arm64/boot/dts/phytium/e2000d-power-board.dts
@@ -162,7 +162,7 @@ &macb3 {
&dc0 {
pipe_mask = [02];
edp_mask = [00];
- status = "okay";
+ status = "disabled";
};
&can0 {
diff --git a/arch/arm64/boot/dts/phytium/e2000q-come-board.dts b/arch/arm64/boot/dts/phytium/e2000q-come-board.dts
index 804146468..99896e6c6 100755
--- a/arch/arm64/boot/dts/phytium/e2000q-come-board.dts
+++ b/arch/arm64/boot/dts/phytium/e2000q-come-board.dts
@@ -229,7 +229,7 @@ &hda0 {
};
&dc0 {
- status = "okay";
+ status = "disabled";
pipe_mask = [03];
edp_mask = [00];
};
diff --git a/arch/arm64/boot/dts/phytium/e2000q-demo-board.dts b/arch/arm64/boot/dts/phytium/e2000q-demo-board.dts
index a9d892fbb..4e413ad32 100644
--- a/arch/arm64/boot/dts/phytium/e2000q-demo-board.dts
+++ b/arch/arm64/boot/dts/phytium/e2000q-demo-board.dts
@@ -251,7 +251,7 @@ &i2s0 {
&dc0 {
pipe_mask = /bits/ 8 <0x3>;
edp_mask = /bits/ 8 <0x0>;
- status = "okay";
+ status = "disabled";
};
&i2s_dp0 {
diff --git a/arch/arm64/boot/dts/phytium/e2000q-edu-board.dts b/arch/arm64/boot/dts/phytium/e2000q-edu-board.dts
index 5e9dd98c0..14982ca93 100755
--- a/arch/arm64/boot/dts/phytium/e2000q-edu-board.dts
+++ b/arch/arm64/boot/dts/phytium/e2000q-edu-board.dts
@@ -264,7 +264,7 @@ &sata1 {
};
&dc0 {
- status = "okay";
+ status = "disabled";
pipe_mask = [01];
edp_mask = [00];
};
diff --git a/arch/arm64/boot/dts/phytium/e2000q-miniitx-board.dts b/arch/arm64/boot/dts/phytium/e2000q-miniitx-board.dts
index e2adaa4d5..d362d2517 100644
--- a/arch/arm64/boot/dts/phytium/e2000q-miniitx-board.dts
+++ b/arch/arm64/boot/dts/phytium/e2000q-miniitx-board.dts
@@ -223,7 +223,7 @@ &dc0 {
<0x0 0xf4000000 0x0 0x4000000>; // (optional)
pipe_mask = [03];
edp_mask = [00];
- status = "okay";
+ status = "disabled";
};
&i2s0 {
diff --git a/arch/arm64/boot/dts/phytium/e2000q-vpx-board.dts b/arch/arm64/boot/dts/phytium/e2000q-vpx-board.dts
index ce2bc39bc..1f965cf82 100755
--- a/arch/arm64/boot/dts/phytium/e2000q-vpx-board.dts
+++ b/arch/arm64/boot/dts/phytium/e2000q-vpx-board.dts
@@ -231,7 +231,7 @@ &macb3 {
&dc0 {
pipe_mask = [03];
edp_mask = [00];
- status = "okay";
+ status = "disabled";
};
&i2s0 {
--
2.25.1

15
package/igh-ethercat/igh-ethercat.mk

@ -11,10 +11,22 @@ IGH_ETHERCAT_AUTORECONF = YES
IGH_ETHERCAT_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_XENOMAI_COBALT),y)
IGH_ETHERCAT_DEPENDENCIES += xenomai
IGH_ETHERCAT_CONF_OPTS = \
--with-linux-dir=$(LINUX_DIR) \
--enable-generic \
--enable-cadence
--enable-cadence \
--enable-rtdm \
--disable-rt-syslog \
--with-xenomai-dir=$(STAGING_DIR)/usr/xenomai
else
IGH_ETHERCAT_CONF_OPTS = \
--with-linux-dir=$(LINUX_DIR) \
--enable-generic \
--enable-cadence \
--disable-rt-syslog
endif
IGH_ETHERCAT_CONF_OPTS += $(if $(BR2_PACKAGE_IGH_ETHERCAT_8139TOO),--enable-8139too,--disable-8139too)
IGH_ETHERCAT_CONF_OPTS += $(if $(BR2_PACKAGE_IGH_ETHERCAT_E100),--enable-e100,--disable-e100)
@ -25,6 +37,7 @@ IGH_ETHERCAT_CONF_OPTS += $(if $(BR2_PACKAGE_IGH_ETHERCAT_R8169),--enable-r8169,
define IGH_ETHERCAT_CREATE_CHANGELOG
touch $(@D)/ChangeLog
mkdir -p $(@D)/m4
$(if $(BR2_PACKAGE_XENOMAI_COBALT),sed -i '3 i DESTDIR=$(STAGING_DIR)' $(STAGING_DIR)/usr/xenomai/bin/xeno-config)
endef
IGH_ETHERCAT_POST_PATCH_HOOKS += IGH_ETHERCAT_CREATE_CHANGELOG

2
package/jailhouse/jailhouse.mk

@ -4,7 +4,7 @@
#
################################################################################
JAILHOUSE_VERSION = phytium-jailhouse-v1.1
JAILHOUSE_VERSION = jailhouse_v2.0
JAILHOUSE_SITE = https://gitee.com/phytium_embedded/phytium-jailhouse.git
JAILHOUSE_SITE_METHOD = git
JAILHOUSE_LICENSE = GPL-2.0

7
package/util-linux/util-linux.mk

@ -279,6 +279,13 @@ else
UTIL_LINUX_CONF_OPTS += --without-libmagic
endif
# Only reinstall lscpu for custom skeleton
ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
define UTIL_LINUX_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/lscpu $(TARGET_DIR)/usr/bin
endef
endif
# Install PAM configuration files
ifeq ($(BR2_PACKAGE_UTIL_LINUX_SU)$(BR2_PACKAGE_LINUX_PAM),yy)
define UTIL_LINUX_INSTALL_PAMFILES

45
package/xenomai/xenomai.mk

@ -39,9 +39,6 @@ XENOMAI_INSTALL_STAGING = YES
XENOMAI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-user
XENOMAI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-user
XENOMAI_CONF_OPTS += \
--includedir=/usr/include/xenomai/
ifeq ($(BR2_PACKAGE_XENOMAI_MERCURY),y)
XENOMAI_CONF_OPTS += --with-core=mercury
else
@ -68,31 +65,47 @@ endif
XENOMAI_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS))
XENOMAI_PREFIX = /usr/xenomai
define XENOMAI_CONFIGURE_CMDS
(cd $(@D) && rm -rf config.cache && \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=$(XENOMAI_PREFIX) \
--exec-prefix=$(XENOMAI_PREFIX) \
--program-prefix="" \
$(XENOMAI_CONF_OPTS) \
)
endef
# Some of these files may be desired by some users -- at that point specific
# config options need to be added to keep a particular set.
define XENOMAI_REMOVE_UNNEEDED_FILES
for i in xeno xeno-config xeno-info wrap-link.sh ; do \
rm -f $(TARGET_DIR)/usr/bin/$$i ; \
rm -f $(TARGET_DIR)/$(XENOMAI_PREFIX)/bin/$$i ; \
done
for i in cobalt modechk ; do \
rm -f $(TARGET_DIR)/usr/lib/$$i.wrappers ; \
rm -f $(TARGET_DIR)/$(XENOMAI_PREFIX)/lib/$$i.wrappers ; \
done
for i in autotune corectl hdb rtnet nomaccfg rtcfg rtifconfig \
rtiwconfig rtping rtroute tdmacfg rtps slackspot version; do \
rm -f $(TARGET_DIR)/usr/sbin/$$i ; \
rm -f $(TARGET_DIR)/$(XENOMAI_PREFIX)/sbin/$$i ; \
done
endef
XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_UNNEEDED_FILES
# XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_UNNEEDED_FILES
ifeq ($(BR2_PACKAGE_XENOMAI_TESTSUITE),)
define XENOMAI_REMOVE_TESTSUITE
rm -rf $(TARGET_DIR)/usr/share/xenomai/
rm -rf $(TARGET_DIR)/$(XENOMAI_PREFIX)/share/xenomai/
for i in clocktest gpiotest latency smokey spitest switchtest \
xeno-test-run-wrapper dohell xeno-test-run xeno-test ; do \
rm -f $(TARGET_DIR)/usr/bin/$$i ; \
rm -f $(TARGET_DIR)/$(XENOMAI_PREFIX)/bin/$$i ; \
done
rm -rf $(TARGET_DIR)/usr/demo/
rm -rf $(TARGET_DIR)/$(XENOMAI_PREFIX)/demo/
endef
XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_TESTSUITE
@ -101,9 +114,9 @@ endif
ifeq ($(BR2_PACKAGE_XENOMAI_RTCAN),)
define XENOMAI_REMOVE_RTCAN_PROGS
for i in rtcanrecv rtcansend ; do \
rm -f $(TARGET_DIR)/usr/bin/$$i ; \
rm -f $(TARGET_DIR)/$(XENOMAI_PREFIX)/bin/$$i ; \
done
rm -f $(TARGET_DIR)/usr/sbin/rtcanconfig
rm -f $(TARGET_DIR)/$(XENOMAI_PREFIX)/sbin/rtcanconfig
endef
XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_RTCAN_PROGS
@ -113,12 +126,12 @@ ifeq ($(BR2_PACKAGE_XENOMAI_ANALOGY),)
define XENOMAI_REMOVE_ANALOGY
for i in cmd_read cmd_write cmd_bits insn_read insn_write insn_bits \
wf_generate ; do \
rm -f $(TARGET_DIR)/usr/bin/$$i ; \
rm -f $(TARGET_DIR)/$(XENOMAI_PREFIX)/bin/$$i ; \
done
for i in analogy_config analogy_calibrate ; do \
rm -f $(TARGET_DIR)/usr/sbin/$$i ; \
rm -f $(TARGET_DIR)/$(XENOMAI_PREFIX)/sbin/$$i ; \
done
rm -f $(TARGET_DIR)/usr/lib/libanalogy.*
rm -f $(TARGET_DIR)/$(XENOMAI_PREFIX)/lib/libanalogy.*
endef
XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_ANALOGY
@ -135,7 +148,7 @@ XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_VRTX_SKIN),,vrtx)
define XENOMAI_REMOVE_LIBS
for i in $(XENOMAI_REMOVE_LIBS_LIST) ; do \
rm -f $(TARGET_DIR)/usr/lib/lib$$i.* ; \
rm -f $(TARGET_DIR)/$(XENOMAI_PREFIX)/lib/lib$$i.* ; \
done
endef

77
utils/grant_sudo_perm.sh

@ -0,0 +1,77 @@
#!/bin/bash
SUDO_FILE=/etc/sudoers.d/buildroot_conf
permission_grant()
{
echo "User(${USER[@]}) is applying the sudo permission."
file=$(tempfile)
if [ "x$?" != "x0" ]
then
echo "Failed to creat a tempfile.";
return 1
fi
if [ -f ${SUDO_FILE} ]
then
${SUDO} rm -rf ${SUDO_FILE}
fi
echo "Host_Alias HOST = ${HOST}" >> ${file}
echo "User_Alias USER = "${USER[0]} >> ${file}
USER_RES=(${USER[@]})
unset USER_RES[0]
for u in "${USER_RES[@]}"
do
${SED} -i -e "/User_Alias/ s/$/,${u}/" ${file}
done
echo "Cmnd_Alias MOUNT = ${MOUNT},${UMOUNT}" >> ${file}
echo "Cmnd_Alias CHOWN = ${CHOWN}" >> ${file}
echo "Cmnd_Alias CHROOT1 = ${CHROOT1}" >> ${file}
echo "Cmnd_Alias CHMOD = ${CHMOD}" >> ${file}
echo "Cmnd_Alias FIND = ${FIND}" >> ${file}
echo "Cmnd_Alias CP = ${CP}" >> ${file}
echo "Cmnd_Alias MV = ${MV}" >> ${file}
echo "Cmnd_Alias DEBOOTSTRAP = ${DEBOOTSTRAP}" >> ${file}
echo "Cmnd_Alias MKDIR = ${MKDIR}" >> ${file}
echo "Cmnd_Alias TEE = ${TEE}" >> ${file}
echo "Cmnd_Alias RM = ${RM}" >> ${file}
echo "USER HOST=(root) NOPASSWD:MOUNT,CHMOD,CHROOT1,FIND,CP,MV,RM,MKDIR,TEE,CHOWN,DEBOOTSTRAP" >> ${file}
${SUDO} ${CHOWN} root:root ${file}
${SUDO} ${CHMOD} +r ${file}
${SUDO} ${MV} ${file} ${SUDO_FILE}
echo "Buildroot User(${USER[@]}) is granted"
return 0
}
HOST=ALL
SUDO=`which sudo`
MOUNT=`which mount`
UMOUNT=`which umount`
CHROOT1=`which chroot`
CHOWN=`which chown`
CHMOD=`which chmod`
FIND=`which find`
CP=`which cp`
MV=`which mv`
SED=`which sed`
MKDIR=`which mkdir`
TEE=`which tee`
RM=`which rm`
DEBOOTSTRAP=`which debootstrap`
if [ "x${DEBOOTSTRAP}" = "x" ]
then
echo "debootstrap not found. Try running \"install debootstrap\""
exit 1
fi
USER=()
confirmed=false
if [[ $# -eq 0 ]]
then
USER=($(whoami))
fi
if [[ ${#USER[@]} -eq 0 ]]
then
USER=($(whoami))
fi
permission_grant
Loading…
Cancel
Save