From 089ef059e196f50c85ed623ae1ed6247001327f9 Mon Sep 17 00:00:00 2001 From: superconvert Date: Wed, 26 Oct 2022 22:21:38 +0800 Subject: [PATCH] update llvm compile --- 02_build_img.sh | 6 +++--- mk_xfce.sh | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/02_build_img.sh b/02_build_img.sh index 03c2981..7352f7a 100755 --- a/02_build_img.sh +++ b/02_build_img.sh @@ -347,12 +347,12 @@ fi # 编译网卡驱动 ( 目前版本内核已集成 e1000 ) # cd ${build_dir}/linux-5.8.6 && make M=drivers/net/ethernet/intel/e1000/ && cd ../.. -# 生成 grub.cfg 文件, 增加 console=ttyS0 就会让 qemu 输出日志到 qemu.log +# 生成 grub.cfg 文件, 增加 console=ttyS0 就会让 qemu 输出日志到 qemu.log, quiet 屏蔽内核过多的信息输出 cat - > ${diskfs}/boot/grub/grub.cfg << EOF set timeout=3 menuentry "smart-os" { root=(hd0,msdos1) - linux /boot/bzImage console=tty0 + linux /boot/bzImage console=tty0 quiet initrd /boot/initrd } EOF @@ -463,6 +463,6 @@ losetup -d ${loop_dev} # 需要二次转换 vmkfstools -i 11.vmdk esxi-compatible.vmdk # #--------------------------------------------------------------- -qemu-img convert disk.img -f raw -O vmdk disk_ide.vmdk +qemu-img convert disk.img -f raw -O vmdk disk_sata.vmdk echo "Run the next script: 03_run_qemu.sh or 04_run_docker.sh" diff --git a/mk_xfce.sh b/mk_xfce.sh index 3d296aa..12f2b21 100755 --- a/mk_xfce.sh +++ b/mk_xfce.sh @@ -5,7 +5,8 @@ # 预装工具 if [ -f "/usr/bin/apt" ]; then - apt install autoconf autoconf-archive automake libtool make nasm cmake m4 pkg-config llvm-10 clang-10 intltool -y || exit + # 暂且屏蔽掉 llvm-10 clang-10 + apt install autoconf autoconf-archive automake libtool make nasm cmake m4 pkg-config intltool -y || exit apt install check bison flex python3-pip libpython-dev gperf gtk-doc-tools xsltproc -y || exit apt install libssl-dev libcurl4-openssl-dev libsqlite3-dev libmicrohttpd-dev libarchive-dev libgirepository1.0-dev -y || exit # 需要安装, 安装主题, 显卡驱动, 安装字库否则不能正常显示, gsettings-desktop-schemas 保证 xfdesktop-settings 能运行 @@ -647,7 +648,7 @@ llvm_build() { shift if [ ! -f .${name} ]; then echo "${CYAN}build ${name} begin${NC}" && cd ${srcdir} && mkdir -pv build && cd build - cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -G "Unix Makefiles" + cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON -G "Unix Makefiles" if [ -f ./configure ]; then ./configure ${cfg_opt} "$@" ${xwin_opt} fi @@ -806,13 +807,11 @@ llvm_build() { meson_build pango ${PANGO_SRC_DIR} # 编译基础库 ( 这些都是系统库,新系统需要集成 ) if [ "${with_xfce}" = true ] && [ "$1" = "img" ]; then - # 编译 llvm ( swrast 依赖此库,可以加大 swap 分区,编译时对内存要求极高 ) - llvm_build llvm ${LLVM_SRC_DIR} # 编译 expat common_build expat ${EXPAT_SRC_DIR} # 编译 ncurses ( libtinfo.so.5 ) common_build ncurses ${NCURSES_SRC_DIR} --with-shared --with-termlib - # 编译 libedit + # 编译 libedit ( 系统需要此库,llvm 的编译也需要此库 ) common_build libedit ${LIBEDIT_SRC_DIR} # 编译 libudev ( xkbcli interactive-evdev 可以测试键盘输入,xorg 就是不加载成功 ) common_build libudev ${LIBUDEV_SRC_DIR} --enable-hwdb --enable-rule-generator --enable-mtd_probe @@ -820,6 +819,8 @@ llvm_build() { common_build libpcre ${LIBPCRE_SRC_DIR} # 编译 libnettle common_build libnettle ${LIBNETTLE_SRC_DIR} + # 编译 llvm ( swrast 依赖此库,可以加大 swap 分区,编译时对内存要求极高,依赖: libedit ) + llvm_build llvm ${LLVM_SRC_DIR} # 编译 dbus-1( 我们的系统需要编译,如果在当前系统上运行 xfce4,需要注释掉,否则就会和系统自带的 dbus-1 冲突 ) common_build dbus-1 ${DBUS1_SRC_DIR} --disable-tests # 编译 ( libsensors4 )