From 1315186d816c49177e48f4be8d03f0a34ccde56e Mon Sep 17 00:00:00 2001 From: leeboby Date: Tue, 23 Apr 2024 11:34:44 +0800 Subject: [PATCH] Install bisheng compiler add mpich and delete clang package --- config/profile | 3 +++ config/rpmlist | 2 +- config/user.cfg | 1 + scripts/install_driver_package.sh | 2 +- scripts/make_rootfs.sh | 17 +++++++++++++++++ 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 config/profile diff --git a/config/profile b/config/profile new file mode 100644 index 0000000..fec6419 --- /dev/null +++ b/config/profile @@ -0,0 +1,3 @@ + +export PATH=/usr/local/BiShengCompiler-3.2.0-aarch64-linux-mini/bin:$PATH +export LD_LIBRARY_PATH=/usr/local/BiShengCompiler-3.2.0-aarch64-linux-mini/lib:$LD_LIBRARY_PATH diff --git a/config/rpmlist b/config/rpmlist index 8339dff..ec23ad7 100644 --- a/config/rpmlist +++ b/config/rpmlist @@ -13,7 +13,6 @@ binutils bison byacc cheese -clang clutter clutter-gst3 clutter-gtk @@ -151,6 +150,7 @@ libtool m4 make mm-common +mpich mutter nautilus ncurses-devel diff --git a/config/user.cfg b/config/user.cfg index d8d33c1..ed77146 100644 --- a/config/user.cfg +++ b/config/user.cfg @@ -8,3 +8,4 @@ DRIVER_DIR="KunPengDevBoard-Driver" DRIVER_URL="https://gitee.com/kunpeng_compute/KunPengDevBoard-Driver" DRIVER_PACKAGE="Ascend-hdk-310b-npu-driver-soc_23.0.0_linux-aarch64-opiaipro.run" IMAGE_NAME=Kunpeng-Develop-openEuler-22.03-LTS-SP3-$(date +"%Y%m%d").img +BISHENG_URL="https://mirrors.huaweicloud.com/kunpeng/archive/compiler/bisheng_compiler/BiShengCompiler-3.2.0-aarch64-linux-mini.tar.gz" diff --git a/scripts/install_driver_package.sh b/scripts/install_driver_package.sh index b55ae17..830397e 100755 --- a/scripts/install_driver_package.sh +++ b/scripts/install_driver_package.sh @@ -279,7 +279,7 @@ function install_driver_package() install_opi_test - #cat ${CONFIG_DIR}/profile >> ${ROOTFS}/etc/profile + cat ${CONFIG_DIR}/profile >> ${ROOTFS}/etc/profile display_alert "Pre install drvier finished" "" "info" diff --git a/scripts/make_rootfs.sh b/scripts/make_rootfs.sh index a9a987b..b506a63 100755 --- a/scripts/make_rootfs.sh +++ b/scripts/make_rootfs.sh @@ -48,6 +48,18 @@ function install_python_packages() rm ${ROOTFS}/usr/bin/qemu-aarch64-static } +function install_bisheng() +{ + local bisheng_name=$(basename "${BISHENG_URL}") + + if [[ ! -f ${DOWNLOAD_DIR}/$bisheng_name ]]; then + download_file ${BISHENG_URL} + fi + + mkdir -p ${ROOTFS}/opt/compiler + tar -zxf ${DOWNLOAD_DIR}/$bisheng_name -C ${ROOTFS}/opt/compiler/ +} + function make_rootfs() { display_alert "Make rootfs" "${YUM_CONF} begen ..." "info" @@ -55,6 +67,7 @@ function make_rootfs() install_list_rpms ${CONFIG_RPM_LIST} install_url_rpms ${CONFIG_RPM_URLS} #install_python_packages + install_bisheng #local cann_run=${ROOTFS}/usr/local/Ascend/Ascend-cann*.run #[[ -f $cann_run ]] && rm $cann_run @@ -134,6 +147,8 @@ function save_rootfs() function make_filesystem() { + trap unmount_on_exit INT TERM EXIT + if [[ ! -f "${OUTPUT}/${CACHE_ROOTFS_NAME}" ]]; then make_rootfs else @@ -152,4 +167,6 @@ function make_filesystem() rm ${ROOTFS}/etc/resolv.conf rm ${ROOTFS}/usr/bin/qemu-aarch64-static + + trap - INT TERM EXIT } -- Gitee