曹州牡丹甲天下 发表于 2023-3-8 19:30:14

centos8-x86_64安装kylinv10-arrch64

1. vmware esxi安装centos8,开启内核虚拟化
2. 安装qemu-system-arrch64
操作:
wget https://download.qemu.org/qemu-2.11.0.tar.xz
tar xvJf qemu-2.11.0.tar.xz
cd qemu-2.11.0
./configure –-target-list=aarch64-softmmu
make
make install报错1:Python not found. Use --python=/path/to/python
#./configure --target-list=aarch64-softmmu

ERROR: Python not found. Use --python=/path/to/python

#解决1,指定python路径,提示当前python版本过高:
# ./configure --target-list=aarch64-softmmu --python=/usr/bin/python3.6

ERROR: Cannot use '/usr/bin/python3.6', Python 2.6 or later is required.
       Note that Python 3 or later is not yet supported.
       Use --python=/path/to/python to specify a supported Python.
#解决2,下载python2,再次尝试遇到新的报错
# ./configure --target-list=aarch64-softmmu --python=/usr/bin/python2

ERROR: "cc" either does not exist or does not work报错2:ERROR: "cc" either does not exist or does not work
下载gcc解决该报错,然后提示依然是缺包
# ./configure --target-list=aarch64-softmmu --python=/usr/bin/python2

ERROR: zlib check failed
       Make sure to have the zlib libs and headers installed.报错3:ERROR: zlib check failed  Make sure to have the zlib libs and headers installed.
下载zlib zlib-devel,然后再次提示缺包
# ./configure --target-list=aarch64-softmmu --python=/usr/bin/python2

ERROR: glib-2.22 gthread-2.0 is required to compile QEMU下载glib2 glib2-devel,提示还是缺包
下载pixman pixman-devel
./config成功
make告警:缺少命令:flex bison
下载flex,bison
然后还是失败:
util/memfd.c:40:12: error: static declaration of ‘memfd_create’ follows non-static declaration
static int memfd_create(const char *name, unsigned int flags)
            ^~~~~~~~~~~~
In file included from /usr/include/bits/mman-linux.h:117,
               from /usr/include/bits/mman.h:49,
               from /usr/include/sys/mman.h:41,
               from /root/qemu-2.11.0/include/sysemu/os-posix.h:29,
               from /root/qemu-2.11.0/include/qemu/osdep.h:104,
               from util/memfd.c:28:
/usr/include/bits/mman-shared.h:46:5: note: previous declaration of ‘memfd_create’ was here
int memfd_create (const char *__name, unsigned int __flags) __THROW;
   ^~~~~~~~~~~~
make: *** Error 1 
看百度上各种解决办法,懒得去一个一个验证,直接换最新的包
wget https://download.qemu.org/qemu-7.2.0.tar.xz<br>查看README文件,根据提示操作
mkdir build
cd build
../configure
make提示缺包ninjia
yum --enablerepo=powertools install ninja-build这次提示python版本过低
Found ninja-1.8.2 at /usr/bin/ninja
Running postconf script '/usr/bin/python3 /root/qemu-7.2.0/scripts/symlink-install-tree.py'
NOTICE: You are using Python 3.6 which is EOL. Starting with v0.62.0, Meson will require Python 3.7 or newer安装一个python3.9 然后把/usr/bin/python3指向python3.9
然后再次执行
mkdir build
cd build
../configure --target-list=aarch64-softmmu
make无报错
make install缺包就装包:perl
然后make install成功
# which qemu-system-aarch64
/usr/local/bin/qemu-system-aarch64为了支持UEFI启动,下载UEFI固件
wget https://www.kraxel.org/repos/firmware.repo

yum install edk2.git-aarch64 编辑/etc/libvirt/qemu.conf最后一行添加
nvram = [
   "/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw"
]
 
 
 
 
 
参考链接:https://wiki.ubuntu.com/UEFI/virt-install
https://www.txisfine.cn/archives/a0d5fa12
https://www.cnblogs.com/linuxxl/p/11658387.html
https://zhuanlan.zhihu.com/p/353547345

来源:https://www.cnblogs.com/santia-god/p/17192366.html
免责声明:由于采集信息均来自互联网,如果侵犯了您的权益,请联系我们【E-Mail:cb@itdo.tech】 我们会及时删除侵权内容,谢谢合作!
页: [1]
查看完整版本: centos8-x86_64安装kylinv10-arrch64