diff --git a/README.md b/README.md index e9b0c099..5792e4cf 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ 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 @@ -178,7 +180,7 @@ linux-loader.bin安装到/usr/local/libexec/jailhouse;jailhouse和ivshmem-demo python helper脚本安装到/usr/local/libexec/jailhouse;jailhouse-config-collect.tmpl和root-cell-config.c.tmpl 安装到/usr/local/share/jailhouse;jailhouse-completion.bash安装到/usr/share/bash-completion/completions/并改名为jailhouse; 另外,还将configs/*/*.cell安装到/etc/jailhouse;inmates/demos/*/*.bin安装到/usr/local/libexec/jailhouse/demos; -pyjailhouse安装到/usr/lib/python3.10/site-packages。 +pyjailhouse安装到/usr/local/lib/python3.8/dist-packages。 ``` 关于jailhouse的使用方法等更多信息,请参考`https://gitee.com/phytium_embedded/phytium-jailhouse/blob/master/Readme.md` @@ -220,6 +222,7 @@ $ make 其中`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 @@ -292,7 +295,8 @@ U盘: ### 使用U-Boot启动文件系统(使用e2000 img 镜像) (1)将e2000 img 镜像(disk.img)写入SATA盘或U盘: -`$ sudo dd if=xxx/phytium-linux-buildroot/output/images/disk.img of=/dev/sdb bs=1M` +`$ sudo dd if=xxx/phytium-linux-buildroot/output/images/disk.img of=/dev/sdb bs=1M` +`$ sync` (2)SATA盘或U盘接到开发板,启动开发板电源,串口输出U-Boot命令行,设置U-Boot环境变量,启动文件系统 SATA盘: @@ -355,30 +359,28 @@ U盘: ``` # ubuntu系统安装桌面 -## e2000 ubuntu系统安装桌面 -`phytium_e2000_ubuntu_desktop_defconfig`默认安装了xfce桌面,配置并编译它就可以获得带xfce桌面的 -ubuntu系统。如果需要在开发板上安装其他桌面,重新配置并编译`phytium_e2000_ubuntu_defconfig`, -然后在开发板启动这个不带桌面的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 地址 +## 动态获取 IP 地址 ``` $ sudo dhclient $ ping www.baidu.com ``` -### 安装桌面 -#### 安装GNOME桌面 +## 安装桌面 +### 安装GNOME桌面 ``` $ sudo apt update $ sudo apt -y install ubuntu-gnome-desktop ``` -#### 安装KDE桌面 +### 安装KDE桌面 ``` $ sudo apt update $ sudo apt -y install kubuntu-desktop ``` - -#### 安装XFCE桌面 +### 安装XFCE桌面 ``` $ sudo apt update $ sudo apt -y install xfce4 xfce4-terminal @@ -386,15 +388,6 @@ $ sudo apt -y install xfce4 xfce4-terminal 安装完成后重启系统,在图形登录界面点击用户名右边的ubuntu logo按钮,选择桌面环境为“Xfce Session”,输入密码登录。 ``` -## d2000 ubuntu系统安装桌面 -`phytium_d2000_ubuntu_defconfig`默认不安装桌面,如果需要安装桌面: -(1)编辑`phytium_d2000_ubuntu_defconfig`,将`#BR2_PACKAGE_ROOTFS_DESKTOP=y`取消注释 -(2)重新配置并编译`phytium_d2000_ubuntu_defconfig` -``` -$ make phytium_d2000_ubuntu_defconfig -$ make -``` - # ubuntu及debian系统支持linux-headers linux-headers包含构建内核外部模块所需的头文件,编译ubuntu和debian的defconfig会生成linux-headers。 关于如何编译内核外部模块,可参考https://www.kernel.org/doc/html/latest/kbuild/modules.html diff --git a/board/phytium/common/post-custom-skeleton-ubuntu-base-20.04.sh b/board/phytium/common/post-custom-skeleton-ubuntu-base-20.04.sh index 2bca1954..410c043a 100755 --- a/board/phytium/common/post-custom-skeleton-ubuntu-base-20.04.sh +++ b/board/phytium/common/post-custom-skeleton-ubuntu-base-20.04.sh @@ -346,11 +346,6 @@ main() make jailhouse-rebuild ${O:+O=$O} fi - if grep -Eq "^BR2_PACKAGE_PYTHON3=y$" ${BR2_CONFIG}; then - make libffi-rebuild ${O:+O=$O} - make python3-rebuild ${O:+O=$O} - fi - # change the priority order of the shared library directories sed -i '1 i /usr/local/lib' $1/etc/ld.so.conf sudo chroot $1 ldconfig diff --git a/board/phytium/common/ubuntu-additional_packages_list b/board/phytium/common/ubuntu-additional_packages_list index 22e00010..f0e24679 100644 --- a/board/phytium/common/ubuntu-additional_packages_list +++ b/board/phytium/common/ubuntu-additional_packages_list @@ -2,5 +2,5 @@ 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 \ +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 " diff --git a/configs/phytium_d2000_defconfig b/configs/phytium_d2000_defconfig index 1b8b58c9..5e56eeee 100644 --- a/configs/phytium_d2000_defconfig +++ b/configs/phytium_d2000_defconfig @@ -5,7 +5,7 @@ BR2_cortex_a53=y # Filesystem BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y -BR2_TARGET_ROOTFS_EXT2_SIZE="200M" +BR2_TARGET_ROOTFS_EXT2_SIZE="1G" # Hostname and issue BR2_TARGET_GENERIC_HOSTNAME="D2000" diff --git a/configs/phytium_d2000_jailhouse.config b/configs/phytium_d2000_jailhouse.config index 84f18c14..69c15fa1 100644 --- a/configs/phytium_d2000_jailhouse.config +++ b/configs/phytium_d2000_jailhouse.config @@ -3,7 +3,6 @@ BR2_PACKAGE_JAILHOUSE=y # jailhouse helper scripts BR2_PACKAGE_PYTHON3=y -BR2_PACKAGE_PYTHON3_ZLIB=y BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS=y # kernel patch for d2000 and ft2004 diff --git a/configs/phytium_d2000_ubuntu_defconfig b/configs/phytium_d2000_ubuntu_defconfig index 7715de6f..b501cb1d 100644 --- a/configs/phytium_d2000_ubuntu_defconfig +++ b/configs/phytium_d2000_ubuntu_defconfig @@ -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,13 +58,9 @@ 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 diff --git a/configs/phytium_d2000_ubuntu_desktop_defconfig b/configs/phytium_d2000_ubuntu_desktop_defconfig new file mode 100644 index 00000000..aba1220a --- /dev/null +++ b/configs/phytium_d2000_ubuntu_desktop_defconfig @@ -0,0 +1,70 @@ +# 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 + +# custom skeleton +BR2_ROOTFS_SKELETON_UBUNTU=y +BR2_ROOTFS_SKELETON_CUSTOM=y +BR2_ROOTFS_SKELETON_CUSTOM_SITE="http://cdimage.ubuntu.com/ubuntu-base/releases/20.04.4/release" +BR2_ROOTFS_SKELETON_CUSTOM_SOURCE="ubuntu-base-20.04.1-base-arm64.tar.gz" +BR2_ROOTFS_SKELETON_CUSTOM_SITE_METHOD="wget" +BR2_ROOTFS_SKELETON_CUSTOM_EXTRACT="tar zxvf" +BR2_ROOTFS_SKELETON_CUSTOM_EXTRACT_IGNORE_ERROR=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/phytium/common/post-custom-skeleton-ubuntu-base-20.04.sh" +BR2_INIT_NONE=y + +# 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 diff --git a/configs/phytium_e2000_jailhouse_4.19.config b/configs/phytium_e2000_jailhouse_4.19.config index daae1bc5..8bcf830b 100644 --- a/configs/phytium_e2000_jailhouse_4.19.config +++ b/configs/phytium_e2000_jailhouse_4.19.config @@ -3,7 +3,6 @@ BR2_PACKAGE_JAILHOUSE=y # jailhouse helper scripts BR2_PACKAGE_PYTHON3=y -BR2_PACKAGE_PYTHON3_ZLIB=y BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS=y # kernel 4.19 diff --git a/configs/phytium_e2000_jailhouse_5.10.config b/configs/phytium_e2000_jailhouse_5.10.config index a35f25be..8c5b7dca 100644 --- a/configs/phytium_e2000_jailhouse_5.10.config +++ b/configs/phytium_e2000_jailhouse_5.10.config @@ -3,7 +3,6 @@ BR2_PACKAGE_JAILHOUSE=y # jailhouse helper scripts BR2_PACKAGE_PYTHON3=y -BR2_PACKAGE_PYTHON3_ZLIB=y BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS=y # kernel patch for e2000 linux-5.10 diff --git a/package/jailhouse/jailhouse.mk b/package/jailhouse/jailhouse.mk index b6dc54b4..365c9724 100644 --- a/package/jailhouse/jailhouse.mk +++ b/package/jailhouse/jailhouse.mk @@ -51,7 +51,10 @@ define JAILHOUSE_INSTALL_TARGET_CMDS $(INSTALL) -D -m 0755 $(@D)/src/jailhouse/inmates/demos/*/*.bin $(TARGET_DIR)/usr/local/libexec/jailhouse/demos $(if $(BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS), \ - cd $(@D)/src/jailhouse && $(PKG_PYTHON_SETUPTOOLS_ENV) $(HOST_DIR)/bin/python setup.py install --no-compile $(PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS)) + cd $(@D)/src/jailhouse && $(PKG_PYTHON_SETUPTOOLS_ENV) $(HOST_DIR)/bin/python setup.py install --no-compile $(PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS) && \ + mkdir -p $(TARGET_DIR)/usr/local/lib/python3.8/dist-packages && \ + mv $(TARGET_DIR)/usr/lib/python3.10/site-packages/pyjailhouse $(TARGET_DIR)/usr/local/lib/python3.8/dist-packages && \ + mv $(TARGET_DIR)/usr/lib/python3.10/site-packages/pyjailhouse-0.12-py3.10.egg-info $(TARGET_DIR)/usr/local/lib/python3.8/dist-packages/pyjailhouse-0.12-py3.8.egg-info) endef $(eval $(generic-package))