登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
轻量养虾,开箱即用!低 Token + 稳定算力,Gitee & 模力方舟联合出品的 PocketClaw 正式开售!点击了解详情~
代码拉取完成,页面将自动刷新
仓库状态说明
开源项目
>
其他开源
>
RISC-V 开发
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
57
Star
190
Fork
149
openEuler
/
RISC-V
关闭
代码
Issues
182
Pull Requests
0
Wiki
统计
流水线
服务
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
开发画像分析
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
[qemu启动镜像失败]qemu启动自制文件系统镜像失败
已完成
#I4YDH6
任务
jean9823
创建于
2022-03-17 23:25
参考脚本https://gitee.com/openeuler/RISC-V/blob/master/tools/mkfs-oe.sh 和 https://gitee.com/zxs-un/openEuler-port2riscv64/blob/master/doc/img-build-manual-force-riscv-uboot-extlinux.md ,制作文件系统镜像,执行步骤如下: ##### 1. 创建空文件系统镜像 ```` $ truncate -s 10G oe-rv.raw ```` ##### 2. 将空镜像映射到qemu中 ```` $ qemu-system-riscv64 \ -nographic -machine virt \ -smp 8 -m 2G \ -kernel fw_payload_oe.elf \ -drive file=openEuler-preview.riscv64.qcow2,format=qcow2,id=hd0 \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-device,rng=rng0 \ -device virtio-blk-device,drive=hd0 \ -device virtio-net-device,netdev=usernet \ -drive file=oe-rv.raw,format=raw,id=hd1 \ -device virtio-blk-device,drive=hd1 \ -netdev user,id=usernet,hostfwd=tcp::12055-:22 \ -append 'root=/dev/vda1 rw console=ttyS0 systemd.default_timeout_start_sec=600 selinux=0 highres=off mem=4096M earlycon' \ -bios none ```` ##### 3. 对已映射的空镜像进行分区 ``` $ fdisk /dev/vdb ``` ```` $ fdisk -l Disk /dev/vda: 10 GiB, 10737418240 bytes, 20971520 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xcd5292f1 Device Boot Start End Sectors Size Id Type /dev/vda1 2048 20971519 20969472 10G 83 Linux Disk /dev/vdb: 10 GiB, 10737418240 bytes, 20971520 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xd65f9978 Device Boot Start End Sectors Size Id Type /dev/vdb1 2048 4196351 4194304 2G 83 Linux /dev/vdb2 4196352 20971519 16775168 8G 83 Linux ```` 格式化分区 ```` mkfs.ext2 /dev/vdb1 mkfs.ext4 /dev/vdb2 ```` ##### 4. 挂载分区创建文件系统目录 ```` $ mkdir rootfs $ mount -t ext4 /dev/vdb2 rootfs $ mkdir -p rootfs/boot $ mount -t ext2 /dev/vdb1 rootfs/boot $ mkdir -p rootfs/{root,home,etc,bin,sbin,lib,lib64,mnt,media,srv,usr,run,var,opt,tmp} $ mkdir -p rootfs/{dev,proc,sys} $ mkdir -p rootfs/dev/pts $ mount -t proc proc rootfs/proc $ mount -t sysfs sysfs rootfs/sys $ mount -t devpts pts rootfs/dev/pts $ mount -o bind /dev rootfs/dev ```` ##### 4. 更新yum源并安装软件包 ```` $ rpm --root rootfs --initdb ```` 修改yum源配置文件/etc/yum.repos.d/oe-rv.repo, 将其配置为obs mainline工程下的standard_riscv64仓库地址,选择这个仓库的原因是里面有构建成功的kernel ```` [obs_standard] name=obs_standard baseurl=http://119.3.219.20:82/openEuler:/Mainline:/RISC-V/standard_riscv64/ enabled=1 gpgcheck=0 ```` 将修改的yum源配置文件复制到文件系统中 ```` $ cp -r /etc/yum.repos.d rootfs/etc/yum.repos.d ```` 安装软件包到文件系统 ```` $ CORE_RPMS="systemd vim coreutils net-tools systemd-udev libssh openssh passwd NetworkManager dnf wget procps-ng dnf-plugins-core kernel" $ BUILD_TOOLS="rpm-build autoconf make gdb dnf-utils git texinfo gcc gcc-c++ hostname" $ INSTALL_RPMS="$CORE_RPMS $BUILD_TOOLS" $ yum install -y --installroot $(pwd)/rootfs $INSTALL_RPMS ```` 提示找不到一些包 ```` [root@openEuler-RISCV-rare ~]# yum install -y --installroot $(pwd)/rootfs $INSTALL_RPMS Unable to detect release version (use '--releasever' to specify release version) obs_standard 2.0 MB/s | 15 MB 00:07 Last metadata expiration check: 0:00:54 ago on Thu Mar 17 03:54:43 2022. No match for argument: systemd No match for argument: systemd-udev No match for argument: NetworkManager Error: Unable to find a match: systemd systemd-udev NetworkManager ```` 还有一些因为依赖包找不到导致无法安装的 ```` [root@openEuler-RISCV-rare ~]# [root@openEuler-RISCV-rare ~]# yum install -y --installroot $(pwd)/rootfs $INSTALL_RPMS --skip-broken --nobest Unable to detect release version (use '--releasever' to specify release version) Last metadata expiration check: 0:37:19 ago on Thu Mar 17 03:54:43 2022. No match for argument: systemd No match for argument: systemd-udev No match for argument: NetworkManager Dependencies resolved. Problem 1: conflicting requests - nothing provides rtld(GNU_HASH) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libpthread.so.0()(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libm.so.6()(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libpthread.so.0(GLIBC_2.27)(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libm.so.6(GLIBC_2.27)(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.28)(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 Problem 2: conflicting requests - nothing provides rtld(GNU_HASH) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides libpthread.so.0()(64bit) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides libpthread.so.0(GLIBC_2.27)(64bit) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides librt.so.1()(64bit) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.28)(64bit) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides librt.so.1(GLIBC_2.27)(64bit) needed by coreutils-9.0-3.oe1.riscv64 Problem 3: conflicting requests - nothing provides rtld(GNU_HASH) needed by net-tools-2.0-0.55.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by net-tools-2.0-0.55.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by net-tools-2.0-0.55.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by net-tools-2.0-0.55.oe1.riscv64 - nothing provides systemd needed by net-tools-2.0-0.55.oe1.riscv64 Problem 4: conflicting requests - nothing provides rtld(GNU_HASH) needed by libssh-0.9.5-1.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by libssh-0.9.5-1.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by libssh-0.9.5-1.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by libssh-0.9.5-1.oe1.riscv64 - nothing provides librt.so.1()(64bit) needed by libssh-0.9.5-1.oe1.riscv64 Problem 5: conflicting requests - nothing provides rtld(GNU_HASH) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides libutil.so.1()(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides libresolv.so.2()(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides libresolv.so.2(GLIBC_2.27)(64bit) needed by openssh-8.2p1-10.oe1.riscv64 Problem 6: conflicting requests - nothing provides rtld(GNU_HASH) needed by passwd-0.80-7.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by passwd-0.80-7.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by passwd-0.80-7.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by passwd-0.80-7.oe1.riscv64 - nothing provides libpthread.so.0()(64bit) needed by passwd-0.80-7.oe1.riscv64 - nothing provides libpthread.so.0(GLIBC_2.27)(64bit) needed by passwd-0.80-7.oe1.riscv64 Problem 7: conflicting requests - nothing provides rtld(GNU_HASH) needed by wget-1.20.3-4.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by wget-1.20.3-4.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by wget-1.20.3-4.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by wget-1.20.3-4.oe1.riscv64 Problem 8: conflicting requests - nothing provides rtld(GNU_HASH) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides libsystemd.so.0()(64bit) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides - nothing provides libm.so.6()(64bit) needed by rpm-build-4.15.1-25.oe1.riscv64 - nothing provides libpthread.so.0(GLIBC_2.27)(64bit) needed by rpm-build-4.15.1-25.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by rpm-build-4.15.1-25.oe1.riscv64 - nothing provides perl needed by rpm-build-4.15.1-25.oe1.riscv64 - nothing provides libdb-5.3.so()(64bit) needed by rpm-build-4.15.1-25.oe1.riscv64 - nothing provides glibc needed by rpm-build-4.15.1-25.oe1.riscv64 Problem 11: conflicting requests - nothing provides perl(strict) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(warnings) needed by autoconf-2.71-1.oe1.noarch - nothing provides /usr/bin/perl needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(File::Basename) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(POSIX) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(IO::File) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(File::Copy) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(File::Find) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(Errno) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(File::stat) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(Class::Struct) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(:VERSION) >= 5.6.0 needed by autoconf-2.71-1.oe1.noarch Problem 12: conflicting requests - nothing provides rtld(GNU_HASH) needed by make-1:4.3-2.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by make-1:4.3-2.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by make-1:4.3-2.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by make-1:4.3-2.riscv64 - nothing provides libdl.so.2()(64bit) needed by make-1:4.3-2.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by make-1:4.3-2.riscv64 Problem 13: conflicting requests - nothing provides rtld(GNU_HASH) needed by git-2.33.0-1.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides libpthread.so.0()(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides libpthread.so.0(GLIBC_2.27)(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides perl(strict) needed by git-2.33.0-1.oe1.riscv64 - nothing provides /usr/bin/python3 needed by git-2.33.0-1.oe1.riscv64 - nothing provides librt.so.1()(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.28)(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides /usr/bin/perl needed by git-2.33.0-1.oe1.riscv64 - nothing provides perl(File::Basename) needed by git-2.33.0-1.oe1.riscv64 - nothing provides perl(lib) needed by git-2.33.0-1.oe1.riscv64 - nothing provides perl(Getopt::Std) needed by git-2.33.0-1.oe1.riscv64 - nothing provides libsecret-1.so.0()(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides perl(IPC::Open2) needed by git-2.33.0-1.oe1.riscv64 - nothing provides perl(:VERSION) >= 5.8.0 needed by git-2.33.0-1.oe1.riscv64 Problem 14: conflicting requests - nothing provides perl(strict) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(warnings) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(vars) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(Config) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides /usr/bin/perl needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(File::Basename) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(DynaLoader) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(File::Copy) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(bytes) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(if) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(:VERSION) >= 5.6.0 needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(:VERSION) >= 5.0.0 needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(:VERSION) >= 5.4.50 needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(:VERSION) >= 5.7.0 needed by texinfo-6.7-2.oe1.riscv64 Problem 15: conflicting requests - nothing provides glibc-devel >= 2.17 needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides rtld(GNU_HASH) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides libm.so.6()(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides libm.so.6(GLIBC_2.27)(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 Problem 16: conflicting requests - nothing provides rtld(GNU_HASH) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides libm.so.6()(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides libm.so.6(GLIBC_2.27)(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 Problem 17: conflicting requests - nothing provides rtld(GNU_HASH) needed by hostname-3.21-2.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by hostname-3.21-2.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by hostname-3.21-2.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by hostname-3.21-2.oe1.riscv64 Problem 18: package dnf-4.10.0-1.oe1.noarch requires python3-dnf = 4.10.0-1.oe1, but none of the providers can be installed - conflicting requests - nothing provides /usr/bin/python3 needed by python3-dnf-4.10.0-1.oe1.noarch - nothing provides python(abi) = 3.7 needed by python3-dnf-4.10.0-1.oe1.noarch Problem 19: package gdb-11.1-2.oe1.riscv64 requires gdb-headless = 11.1-2.oe1, but none of the providers can be installed - conflicting requests - nothing provides rtld(GNU_HASH) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libpthread.so.0()(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libm.so.6()(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libpthread.so.0(GLIBC_2.27)(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libm.so.6(GLIBC_2.27)(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libpython3.7m.so.1.0()(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libutil.so.1()(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: kernel riscv64 5.10-3.oe1 obs_standard 10 M Skipping packages with broken dependencies: autoconf noarch 2.71-1.oe1 obs_standard 658 k coreutils riscv64 9.0-3.oe1 obs_standard 2.7 M dnf noarch 4.10.0-1.oe1 obs_standard 24 k dnf-plugins-core noarch 4.0.24-3.oe1 obs_standard 13 k gcc riscv64 10.3.1-20220105.6.oe1 obs_standard 24 M gcc-c++ riscv64 10.3.1-20220105.6.oe1 obs_standard 8.6 M gdb riscv64 11.1-2.oe1 obs_standard 125 k gdb-headless riscv64 11.1-2.oe1 obs_standard 3.2 M git riscv64 2.33.0-1.oe1 obs_standard 6.0 M hostname riscv64 3.21-2.oe1 obs_standard 25 k libssh riscv64 0.9.5-1.oe1 obs_standard 275 k make riscv64 1:4.3-2 obs_standard 343 k net-tools riscv64 2.0-0.55.oe1 obs_standard 197 k openssh riscv64 8.2p1-10.oe1 obs_standard 258 k passwd riscv64 0.80-7.oe1 obs_standard 96 k procps-ng riscv64 3.3.16-15.oe1 obs_standard 203 k python3-dnf noarch 4.10.0-1.oe1 obs_standard 426 k rpm-build riscv64 4.15.1-25.oe1 obs_standard 93 k texinfo riscv64 6.7-2.oe1 obs_standard 739 k vim-enhanced riscv64 2:8.2-7.oe1 obs_standard 1.3 M wget riscv64 1.20.3-4.oe1 obs_standard 643 k Transaction Summary ================================================================================ Install 1 Package Skip 21 Packages Total download size: 10 M Installed size: 22 M Downloading Packages: kernel-5.10-3.oe1.riscv64.rpm 872 kB/s | 10 MB 00:11 -------------------------------------------------------------------------------- Total 867 kB/s | 10 MB 00:12 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : kernel-5.10-3.oe1.riscv64 1/1 Verifying : kernel-5.10-3.oe1.riscv64 1/1 Installed: kernel-5.10-3.oe1.riscv64 Skipped: autoconf-2.71-1.oe1.noarch coreutils-9.0-3.oe1.riscv64 dnf-4.10.0-1.oe1.noarch dnf-plugins-core-4.0.24-3.oe1.noarch gcc-10.3.1-20220105.6.oe1.riscv64 gcc-c++-10.3.1-20220105.6.oe1.riscv64 gdb-11.1-2.oe1.riscv64 gdb-headless-11.1-2.oe1.riscv64 git-2.33.0-1.oe1.riscv64 hostname-3.21-2.oe1.riscv64 libssh-0.9.5-1.oe1.riscv64 make-1:4.3-2.riscv64 net-tools-2.0-0.55.oe1.riscv64 openssh-8.2p1-10.oe1.riscv64 passwd-0.80-7.oe1.riscv64 procps-ng-3.3.16-15.oe1.riscv64 python3-dnf-4.10.0-1.oe1.noarch rpm-build-4.15.1-25.oe1.riscv64 texinfo-6.7-2.oe1.riscv64 vim-enhanced-2:8.2-7.oe1.riscv64 wget-1.20.3-4.oe1.riscv64 Complete! ```` 在rootfs/boot目录下可以看到kernel安装成功 ```` [root@openEuler-RISCV-rare ~]# ls rootfs/boot Image Image.gz config-5.10-3.oe1.riscv64 lost+found ```` 从obs 其他个人仓库里下载构建成功的systemd, systemd-udev, passwd的rpm包, 执行rpm命令强制安装,安装失败 ```` [root@openEuler-RISCV-rare download]# rpm -ivh --root=/root/rootfs systemd-248-16.oe1.riscv64.rpm --force --nodeps warning: systemd-248-16.oe1.riscv64.rpm: Header V3 RSA/SHA1 Signature, key ID 0ff13748: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(systemd-248-16.oe1.riscv64) scriptlet failed, exit status 127 error: systemd-248-16.oe1.riscv64: install failed [root@openEuler-RISCV-rare download]# rpm -ivh --root=/root/rootfs systemd-udev-248-16.oe1.riscv64.rpm --force --nodeps warning: systemd-udev-248-16.oe1.riscv64.rpm: Header V3 RSA/SHA1 Signature, key ID 0ff13748: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(systemd-udev-248-16.oe1.riscv64) scriptlet failed, exit status 127 error: systemd-udev-248-16.oe1.riscv64: install failed [root@openEuler-RISCV-rare download]# rpm -ivh --root=/root/rootfs passwd-0.80-8.oe1.riscv64.rpm --force --nodeps warning: passwd-0.80-8.oe1.riscv64.rpm: Header V3 RSA/SHA1 Signature, key ID 0ff13748: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(passwd-0.80-8.oe1.riscv64) scriptlet failed, exit status 127 error: passwd-0.80-8.oe1.riscv64: install failed ```` 配置文件系统的用户和主机名称 ```` [root@openEuler-RISCV-rare ~]# echo "root:openEuler12#$" | chpasswd -R $(pwd)/rootfs/ chpasswd: /var/run/passwd.1194: No such file or directory chpasswd: cannot lock /etc/passwd; try again later. [root@openEuler-RISCV-rare ~]# echo openEuler-riscv64 > $(pwd)/rootfs/etc/hostname [root@openEuler-RISCV-rare ~]# ```` ##### 5. extlinux启动引导配置 ``` $ mkdir -p /mnt/boot/extlinux cat > /mnt/boot/extlinux/extlinux.conf << "EOF" default openEuler-riscv label openEuler-riscv kernel /Image append ro root=/dev/vda2 selinux=0 highres=off earlycon EOF ``` ##### 6. 制作openSBI + uboot 启动引导 构建uboot ```` $ git clone https://gitlab.denx.de/u-boot/u-boot.git $ cd u-boot $ make CROSS_COMPILE=riscv64-unknown-linux-gnu- qemu-riscv64_smode_defconfig $ make CROSS_COMPILE=riscv64-unknown-linux-gnu- -j $(nproc) ```` 构建openSBI + uboot 启动引导 ```` $ git clone https://github.com/riscv/opensbi.git $ cd opensbi $ make PLATFORM=generic CROSS_COMPILE=riscv64-unknown-linux-gnu- FW_PAYLOAD_PATH=../u-boot/u-boot.bin ```` ##### 7. qemu启动新镜像 执行qemu命令启动新镜像,其中fw_payload_uboot.elf是步骤6生成的启动固件 ```` qemu-system-riscv64 \ -nographic -machine virt \ -smp 8 -m 2G \ -bios fw_payload_uboot.elf \ -drive file=oe-rv.raw,format=raw,id=hd0 \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-device,rng=rng0 \ -device virtio-blk-device,drive=hd0 \ -device virtio-net-device,netdev=usernet \ -netdev user,id=usernet,hostfwd=tcp::22222-:22 ```` 启动后,提示TFTP error ```` Device 0: QEMU VirtIO Block Device Type: Hard Disk Capacity: 10240.0 MB = 10.0 GB (20971520 x 512) ... is now current device Scanning virtio 0:1... libfdt fdt_check_header(): FDT_ERR_BADMAGIC Scanning disk virtio-blk#1... Found 3 disks No EFI system partition BootOrder not defined EFI boot manager: Cannot load any image scanning bus for devices... Device 0: unknown device BOOTP broadcast 1 DHCP client bound to address 10.0.2.15 (5 ms) Using virtio-net#2 device TFTP from server 10.0.2.2; our IP address is 10.0.2.15 Filename 'boot.scr.uimg'. Load address: 0x88100000 Loading: * TFTP error: 'Access violation' (2) Not retrying... BOOTP broadcast 1 DHCP client bound to address 10.0.2.15 (1 ms) Using virtio-net#2 device TFTP from server 10.0.2.2; our IP address is 10.0.2.15 Filename 'boot.scr.uimg'. Load address: 0x84000000 Loading: * TFTP error: 'Access violation' (2) Not retrying... => ```` ##### 8. yum源恢复为原来qemu环境中的yum源,安装软件包,并重新启动镜像 将步骤4中的yum源恢复为原qemu环境中的yum源 ```` [base] name=base baseurl=https://isrc.iscas.ac.cn/mirror/openeuler-sig-riscv/oe-RISCV-repo/ enabled=1 gpgcheck=0 ```` 安装软件包到文件系统 执行yum install -y --installroot $(pwd)/rootfs $INSTALL_RPMS 提示如下包安装失败 ```` Failed: NetworkManager-1:1.16.0-7.riscv64 at-spi2-core-2.34.0-1.riscv64 babeltrace-1.5.6-4.riscv64 ca-certificates-2020.2.40-1.noarch cronie-1.5.4-5.riscv64 dbus-daemon-1:1.12.16-13.riscv64 filesystem-3.9-3.riscv64 findutils-2:4.7.0-4.riscv64 fipscheck-1.5.0-7.riscv64 fribidi-1.0.5-4.riscv64 gamin-0.1.10-37.riscv64 gawk-5.0.1-2.riscv64 gdb-8.2.50.20181114-8.0.riscv64.oe1.riscv64 glib-networking-2.58.0-7.riscv64 glib2-2.62.1-1.riscv64 glibc-headers-2.29.9000-8oe1.riscv64 graphite2-1.3.13-2.riscv64 grep-3.4-0.riscv64 groff-1.22.4-4.riscv64 grubby-8.40-24.riscv64 gtk2-2.24.32-7.riscv64 gtk3-3.24.1-3.riscv64 kmod-25-6.riscv64 libXcursor-1.1.15-5.riscv64 libXfixes-5.0.3-11.riscv64 libcap-2.27-1.riscv64 libidn2-2.0.5-8.riscv64 libksba-1.3.5-12.riscv64 libmpc-1.1.0-3.riscv64 libpsl-0.20.2-9.riscv64 libseccomp-2.4.3-2.riscv64 libsepol-2.9-1.riscv64 libutempter-1.1.6-16.riscv64 logrotate-3.15.1-2.riscv64 lua-5.3.5-4.riscv64 man-db-2.8.7-5.riscv64 net-tools-2.0-0.54.riscv64 newt-0.52.21-3.riscv64 openssh-7.8p1-8.riscv64 openssl-libs-1:1.1.1d-9.riscv64 openssl-pkcs11-0.4.10-1.riscv64 passwd-0.80-7.riscv64 perl-CPAN-Meta-2.150010-419.noarch perl-CPAN-Meta-Requirements-2.140-419.noarch perl-CPAN-Meta-YAML-0.018-420.noarch perl-Config-Perl-V-0.30-5.noarch perl-Data-Dumper-2.172-3.riscv64 perl-Getopt-Long-2.50-419.noarch perl-JSON-PP-1:4.04-2.noarch perl-Locale-Codes-3.58-2.noarch perl-Locale-Maketext-1:1.28-1.noarch perl-MIME-Base64-3.15-418.riscv64 perl-Math-BigInt-1:1.9998.13-5.noarch perl-Math-BigInt-FastCalc-0.500.700-4.riscv64 perl-Math-BigRat-0.2614-2.noarch perl-Scalar-List-Utils-3:1.52-2.riscv64 perl-Socket-4:2.029-2.riscv64 perl-Storable-1:3.15-2.riscv64 perl-Sys-Syslog-0.35-420.riscv64 perl-Time-HiRes-1.9760-2.riscv64 perl-Unicode-Collate-1.25-4.riscv64 perl-Unicode-Normalize-1.26-419.riscv64 perl-bignum-0.50-4.noarch perl-constant-1.33-421.noarch popt-1.16-17.riscv64 publicsuffix-list-20180723-3.noarch systemd-243-18.riscv64 systemd-udev-243-18.riscv64 tar-2:1.30-11.riscv64 tcl-1:8.6.8-8.riscv64 trousers-0.3.14-3.riscv64 unbound-libs-1.7.3-14.riscv64 Error: Transaction failed ```` 执行yum install -y --installroot $(pwd)/rootfs $INSTALL_RPMS --skip-broken --nobest ```` [root@openEuler-RISCV-rare ~]# yum install -y --installroot $(pwd)/rootfs $INSTALL_RPMS --skip-broken --nobest Last metadata expiration check: 0:27:20 ago on Thu Mar 17 07:12:44 2022. Package vim-enhanced-2:8.1.450-8.riscv64 is already installed. Package coreutils-8.31-4.riscv64 is already installed. Package libssh-0.8.3-7.riscv64 is already installed. Package dnf-4.2.15-8.noarch is already installed. Package wget-1.20.3-1.riscv64 is already installed. Package procps-ng-3.3.16-11.riscv64 is already installed. Package dnf-plugins-core-4.0.11-5.noarch is already installed. Package kernel-5.5.19-1.riscv64 is already installed. Package rpm-build-4.15.1-13.riscv64 is already installed. Package autoconf-2.69-30.noarch is already installed. Package make-1:4.2.1-15.riscv64 is already installed. Package dnf-plugins-core-4.0.11-5.noarch is already installed. Package git-2.23.0-12.riscv64 is already installed. Package texinfo-6.6-2.riscv64 is already installed. Package gcc-9.1.1-5.0.riscv64.oe1.riscv64 is already installed. Package gcc-c++-9.1.1-5.0.riscv64.oe1.riscv64 is already installed. Package hostname-3.20-7.riscv64 is already installed. Dependencies resolved. ================================================================================ Package Arch Version Repo Size ================================================================================ Installing: NetworkManager riscv64 1:1.16.0-7 base 1.7 M gdb riscv64 8.2.50.20181114-8.0.riscv64.oe1 base 122 k net-tools riscv64 2.0-0.54 base 201 k openssh riscv64 7.8p1-8 base 825 k passwd riscv64 0.80-7 base 95 k systemd riscv64 243-18 base 3.2 M systemd-udev riscv64 243-18 base 1.2 M Installing dependencies: ca-certificates noarch 2020.2.40-1 base 383 k fipscheck riscv64 1.5.0-7 base 21 k gamin riscv64 0.1.10-37 base 62 k glib2 riscv64 2.62.1-1 base 2.5 M grep riscv64 3.4-0 base 250 k gtk2 riscv64 2.24.32-7 base 3.3 M gtk3 riscv64 3.24.1-3 base 4.2 M kmod riscv64 25-6 base 76 k libXcursor riscv64 1.1.15-5 base 25 k libXfixes riscv64 5.0.3-11 base 16 k libcap riscv64 2.27-1 base 40 k libidn2 riscv64 2.0.5-8 base 97 k libseccomp riscv64 2.4.3-2 base 54 k newt riscv64 0.52.21-3 base 93 k openssl-libs riscv64 1:1.1.1d-9 base 1.1 M popt riscv64 1.16-17 base 48 k Installing weak dependencies: openssl-pkcs11 riscv64 0.4.10-1 base 56 k Transaction Summary ================================================================================ Install 24 Packages Total download size: 19 M Installed size: 75 M Downloading Packages: (1/24): fipscheck-1.5.0-7.riscv64.rpm 11 kB/s | 21 kB 00:01 (2/24): gamin-0.1.10-37.riscv64.rpm 94 kB/s | 62 kB 00:00 (3/24): gdb-8.2.50.20181114-8.0.riscv64.oe1.ris 178 kB/s | 122 kB 00:00 (4/24): ca-certificates-2020.2.40-1.noarch.rpm 108 kB/s | 383 kB 00:03 (5/24): grep-3.4-0.riscv64.rpm 230 kB/s | 250 kB 00:01 (6/24): NetworkManager-1.16.0-7.riscv64.rpm 228 kB/s | 1.7 MB 00:07 (7/24): glib2-2.62.1-1.riscv64.rpm 332 kB/s | 2.5 MB 00:07 (8/24): kmod-25-6.riscv64.rpm 86 kB/s | 76 kB 00:00 (9/24): libXcursor-1.1.15-5.riscv64.rpm 73 kB/s | 25 kB 00:00 (10/24): libXfixes-5.0.3-11.riscv64.rpm 49 kB/s | 16 kB 00:00 (11/24): libcap-2.27-1.riscv64.rpm 97 kB/s | 40 kB 00:00 (12/24): libidn2-2.0.5-8.riscv64.rpm 165 kB/s | 97 kB 00:00 (13/24): gtk2-2.24.32-7.riscv64.rpm 348 kB/s | 3.3 MB 00:09 (14/24): libseccomp-2.4.3-2.riscv64.rpm 80 kB/s | 54 kB 00:00 (15/24): newt-0.52.21-3.riscv64.rpm 208 kB/s | 93 kB 00:00 (16/24): net-tools-2.0-0.54.riscv64.rpm 154 kB/s | 201 kB 00:01 (17/24): openssh-7.8p1-8.riscv64.rpm 334 kB/s | 825 kB 00:02 (18/24): openssl-pkcs11-0.4.10-1.riscv64.rpm 137 kB/s | 56 kB 00:00 (19/24): passwd-0.80-7.riscv64.rpm 149 kB/s | 95 kB 00:00 (20/24): openssl-libs-1.1.1d-9.riscv64.rpm 321 kB/s | 1.1 MB 00:03 (21/24): popt-1.16-17.riscv64.rpm 91 kB/s | 48 kB 00:00 (22/24): gtk3-3.24.1-3.riscv64.rpm 338 kB/s | 4.2 MB 00:12 (23/24): systemd-udev-243-18.riscv64.rpm 352 kB/s | 1.2 MB 00:03 (24/24): systemd-243-18.riscv64.rpm 562 kB/s | 3.2 MB 00:05 -------------------------------------------------------------------------------- Total 793 kB/s | 19 MB 00:25 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : libXfixes-5.0.3-11.riscv64 1/24 Running scriptlet: grep-3.4-0.riscv64 2/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(grep-3.4-0.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package grep Installing : libXcursor-1.1.15-5.riscv64 3/24 error: grep-3.4-0.riscv64: install failed Running scriptlet: popt-1.16-17.riscv64 4/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(popt-1.16-17.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package popt Installing : newt-0.52.21-3.riscv64 5/24 error: popt-1.16-17.riscv64: install failed Running scriptlet: ca-certificates-2020.2.40-1.noarch 6/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(ca-certificates-2020.2.40-1.noarch) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package ca-certificates Running scriptlet: openssl-pkcs11-0.4.10-1.riscv64 7/24 error: ca-certificates-2020.2.40-1.noarch: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(openssl-pkcs11-0.4.10-1.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package openssl-pkcs11 Installing : openssl-libs-1:1.1.1d-9.riscv64 8/24 error: openssl-pkcs11-0.4.10-1.riscv64: install failed Error unpacking rpm package openssl-libs-1:1.1.1d-9.riscv64 Running scriptlet: fipscheck-1.5.0-7.riscv64 9/24 error: unpacking of archive failed on file /etc/pki/tls/ct_log_list.cnf;6232e5f9: cpio: open error: openssl-libs-1:1.1.1d-9.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(fipscheck-1.5.0-7.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package fipscheck Installing : glib2-2.62.1-1.riscv64 10/24 error: fipscheck-1.5.0-7.riscv64: install failed Running scriptlet: gamin-0.1.10-37.riscv64 11/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(gamin-0.1.10-37.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package gamin Running scriptlet: gtk3-3.24.1-3.riscv64 12/24 error: gamin-0.1.10-37.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(gtk3-3.24.1-3.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package gtk3 Running scriptlet: gtk2-2.24.32-7.riscv64 13/24 error: gtk3-3.24.1-3.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(gtk2-2.24.32-7.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package gtk2 Running scriptlet: libseccomp-2.4.3-2.riscv64 14/24 error: gtk2-2.24.32-7.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(libseccomp-2.4.3-2.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package libseccomp Running scriptlet: libidn2-2.0.5-8.riscv64 15/24 error: libseccomp-2.4.3-2.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(libidn2-2.0.5-8.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package libidn2 Running scriptlet: libcap-2.27-1.riscv64 16/24 error: libidn2-2.0.5-8.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(libcap-2.27-1.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package libcap Running scriptlet: systemd-243-18.riscv64 17/24 error: libcap-2.27-1.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(systemd-243-18.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package systemd Installing : kmod-25-6.riscv64 18/24 error: systemd-243-18.riscv64: install failed Running scriptlet: kmod-25-6.riscv64 18/24 Running scriptlet: systemd-udev-243-18.riscv64 19/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(systemd-udev-243-18.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package systemd-udev Running scriptlet: NetworkManager-1:1.16.0-7.riscv64 20/24 error: systemd-udev-243-18.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(NetworkManager-1:1.16.0-7.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package NetworkManager Installing : net-tools-2.0-0.54.riscv64 21/24 error: NetworkManager-1:1.16.0-7.riscv64: install failed Running scriptlet: net-tools-2.0-0.54.riscv64 21/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory warning: %post(net-tools-2.0-0.54.riscv64) scriptlet failed, exit status 127 Error in POSTIN scriptlet in rpm package net-tools Running scriptlet: openssh-7.8p1-8.riscv64 22/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(openssh-7.8p1-8.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package openssh Running scriptlet: passwd-0.80-7.riscv64 23/24 error: openssh-7.8p1-8.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(passwd-0.80-7.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package passwd Running scriptlet: gdb-8.2.50.20181114-8.0.riscv64.oe1.riscv64 24/24 error: passwd-0.80-7.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(gdb-8.2.50.20181114-8.0.riscv64.oe1.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package gdb error: gdb-8.2.50.20181114-8.0.riscv64.oe1.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory warning: %triggerin(glibc-common-2.29.9000-8oe1.riscv64) scriptlet failed, exit status 127 Error in <unknown> scriptlet in rpm package gdb Running scriptlet: glib2-2.62.1-1.riscv64 24/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory warning: %triggerin(glib2-2.62.1-1.riscv64) scriptlet failed, exit status 127 Error in <unknown> scriptlet in rpm package glib2 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory warning: %triggerin(glib2-2.62.1-1.riscv64) scriptlet failed, exit status 127 Error in <unknown> scriptlet in rpm package glib2 Verifying : NetworkManager-1:1.16.0-7.riscv64 1/24 Verifying : ca-certificates-2020.2.40-1.noarch 2/24 Verifying : fipscheck-1.5.0-7.riscv64 3/24 Verifying : gamin-0.1.10-37.riscv64 4/24 Verifying : gdb-8.2.50.20181114-8.0.riscv64.oe1.riscv64 5/24 Verifying : glib2-2.62.1-1.riscv64 6/24 Verifying : grep-3.4-0.riscv64 7/24 Verifying : gtk2-2.24.32-7.riscv64 8/24 Verifying : gtk3-3.24.1-3.riscv64 9/24 Verifying : kmod-25-6.riscv64 10/24 Verifying : libXcursor-1.1.15-5.riscv64 11/24 Verifying : libXfixes-5.0.3-11.riscv64 12/24 Verifying : libcap-2.27-1.riscv64 13/24 Verifying : libidn2-2.0.5-8.riscv64 14/24 Verifying : libseccomp-2.4.3-2.riscv64 15/24 Verifying : net-tools-2.0-0.54.riscv64 16/24 Verifying : newt-0.52.21-3.riscv64 17/24 Verifying : openssh-7.8p1-8.riscv64 18/24 Verifying : openssl-libs-1:1.1.1d-9.riscv64 19/24 Verifying : openssl-pkcs11-0.4.10-1.riscv64 20/24 Verifying : passwd-0.80-7.riscv64 21/24 Verifying : popt-1.16-17.riscv64 22/24 Verifying : systemd-243-18.riscv64 23/24 Verifying : systemd-udev-243-18.riscv64 24/24 Installed: net-tools-2.0-0.54.riscv64 glib2-2.62.1-1.riscv64 kmod-25-6.riscv64 libXcursor-1.1.15-5.riscv64 libXfixes-5.0.3-11.riscv64 newt-0.52.21-3.riscv64 Failed: NetworkManager-1:1.16.0-7.riscv64 ca-certificates-2020.2.40-1.noarch fipscheck-1.5.0-7.riscv64 gamin-0.1.10-37.riscv64 gdb-8.2.50.20181114-8.0.riscv64.oe1.riscv64 grep-3.4-0.riscv64 gtk2-2.24.32-7.riscv64 gtk3-3.24.1-3.riscv64 libcap-2.27-1.riscv64 libidn2-2.0.5-8.riscv64 libseccomp-2.4.3-2.riscv64 openssh-7.8p1-8.riscv64 openssl-libs-1:1.1.1d-9.riscv64 openssl-pkcs11-0.4.10-1.riscv64 passwd-0.80-7.riscv64 popt-1.16-17.riscv64 systemd-243-18.riscv64 systemd-udev-243-18.riscv64 Error: Transaction failed ```` 查看kernel已安装成功 ```` [root@openEuler-RISCV-rare ~]# ls rootfs/boot Image config-5.5.19 lost+found ```` 配置文件系统的用户和主机名称,可以配置成功 ``` [root@openEuler-RISCV-rare ~]# echo "root:openEuler12#$" | chpasswd -R $(pwd)/rootfs/ [root@openEuler-RISCV-rare ~]# echo openEuler-riscv64 > $(pwd)/rootfs/etc/hostname [root@openEuler-RISCV-rare ~]# ``` 配置extlinux ```` $ mkdir -p rootfs/boot/extlinux $ cat > rootfs/boot/extlinux/extlinux.conf << "EOF" default openEuler-riscv label openEuler-riscv kernel /Image append ro root=/dev/vda2 selinux=0 highres=off earlycon EOF ```` 再次用qemu启动新镜像,提示kernel初始化失败 ```` [ 9.391092] usbcore: registered new interface driver usbhid [ 9.400099] usbhid: USB HID core driver [ 9.414859] NET: Registered protocol family 10 [ 9.464842] Segment Routing with IPv6 [ 9.465873] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 9.471917] NET: Registered protocol family 17 [ 9.478526] 9pnet: Installing 9P2000 support [ 9.487495] Key type dns_resolver registered [ 9.593917] EXT4-fs (vda2): INFO: recovery required on readonly filesystem [ 9.599204] EXT4-fs (vda2): write access will be enabled during recovery [ 10.172734] EXT4-fs (vda2): recovery complete [ 10.200150] EXT4-fs (vda2): mounted filesystem with ordered data mode. Opts: (null) [ 10.201292] VFS: Mounted root (ext4 filesystem) readonly on device 254:2. [ 10.205564] devtmpfs: mounted [ 10.311279] Freeing unused kernel memory: 228K [ 10.311819] This architecture does not have kernel memory protection. [ 10.312474] Run /sbin/init as init process [ 10.314585] Run /etc/init as init process [ 10.315319] Run /bin/init as init process [ 10.328255] Run /bin/sh as init process [ 10.328867] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. [ 10.330230] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.5.19 #1 [ 10.330799] Call Trace: [ 10.331265] [<ffffffe00003be5e>] walk_stackframe+0x0/0xaa [ 10.331803] [<ffffffe00003c04a>] show_stack+0x2a/0x34 [ 10.332254] [<ffffffe000633198>] dump_stack+0x6e/0x88 [ 10.332721] [<ffffffe000040c76>] panic+0xe6/0x258 [ 10.342178] [<ffffffe000646eb8>] kernel_init+0xe4/0xf0 [ 10.345073] [<ffffffe00003ac22>] ret_from_exception+0x0/0xc [ 10.346249] ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]--- ````
参考脚本https://gitee.com/openeuler/RISC-V/blob/master/tools/mkfs-oe.sh 和 https://gitee.com/zxs-un/openEuler-port2riscv64/blob/master/doc/img-build-manual-force-riscv-uboot-extlinux.md ,制作文件系统镜像,执行步骤如下: ##### 1. 创建空文件系统镜像 ```` $ truncate -s 10G oe-rv.raw ```` ##### 2. 将空镜像映射到qemu中 ```` $ qemu-system-riscv64 \ -nographic -machine virt \ -smp 8 -m 2G \ -kernel fw_payload_oe.elf \ -drive file=openEuler-preview.riscv64.qcow2,format=qcow2,id=hd0 \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-device,rng=rng0 \ -device virtio-blk-device,drive=hd0 \ -device virtio-net-device,netdev=usernet \ -drive file=oe-rv.raw,format=raw,id=hd1 \ -device virtio-blk-device,drive=hd1 \ -netdev user,id=usernet,hostfwd=tcp::12055-:22 \ -append 'root=/dev/vda1 rw console=ttyS0 systemd.default_timeout_start_sec=600 selinux=0 highres=off mem=4096M earlycon' \ -bios none ```` ##### 3. 对已映射的空镜像进行分区 ``` $ fdisk /dev/vdb ``` ```` $ fdisk -l Disk /dev/vda: 10 GiB, 10737418240 bytes, 20971520 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xcd5292f1 Device Boot Start End Sectors Size Id Type /dev/vda1 2048 20971519 20969472 10G 83 Linux Disk /dev/vdb: 10 GiB, 10737418240 bytes, 20971520 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xd65f9978 Device Boot Start End Sectors Size Id Type /dev/vdb1 2048 4196351 4194304 2G 83 Linux /dev/vdb2 4196352 20971519 16775168 8G 83 Linux ```` 格式化分区 ```` mkfs.ext2 /dev/vdb1 mkfs.ext4 /dev/vdb2 ```` ##### 4. 挂载分区创建文件系统目录 ```` $ mkdir rootfs $ mount -t ext4 /dev/vdb2 rootfs $ mkdir -p rootfs/boot $ mount -t ext2 /dev/vdb1 rootfs/boot $ mkdir -p rootfs/{root,home,etc,bin,sbin,lib,lib64,mnt,media,srv,usr,run,var,opt,tmp} $ mkdir -p rootfs/{dev,proc,sys} $ mkdir -p rootfs/dev/pts $ mount -t proc proc rootfs/proc $ mount -t sysfs sysfs rootfs/sys $ mount -t devpts pts rootfs/dev/pts $ mount -o bind /dev rootfs/dev ```` ##### 4. 更新yum源并安装软件包 ```` $ rpm --root rootfs --initdb ```` 修改yum源配置文件/etc/yum.repos.d/oe-rv.repo, 将其配置为obs mainline工程下的standard_riscv64仓库地址,选择这个仓库的原因是里面有构建成功的kernel ```` [obs_standard] name=obs_standard baseurl=http://119.3.219.20:82/openEuler:/Mainline:/RISC-V/standard_riscv64/ enabled=1 gpgcheck=0 ```` 将修改的yum源配置文件复制到文件系统中 ```` $ cp -r /etc/yum.repos.d rootfs/etc/yum.repos.d ```` 安装软件包到文件系统 ```` $ CORE_RPMS="systemd vim coreutils net-tools systemd-udev libssh openssh passwd NetworkManager dnf wget procps-ng dnf-plugins-core kernel" $ BUILD_TOOLS="rpm-build autoconf make gdb dnf-utils git texinfo gcc gcc-c++ hostname" $ INSTALL_RPMS="$CORE_RPMS $BUILD_TOOLS" $ yum install -y --installroot $(pwd)/rootfs $INSTALL_RPMS ```` 提示找不到一些包 ```` [root@openEuler-RISCV-rare ~]# yum install -y --installroot $(pwd)/rootfs $INSTALL_RPMS Unable to detect release version (use '--releasever' to specify release version) obs_standard 2.0 MB/s | 15 MB 00:07 Last metadata expiration check: 0:00:54 ago on Thu Mar 17 03:54:43 2022. No match for argument: systemd No match for argument: systemd-udev No match for argument: NetworkManager Error: Unable to find a match: systemd systemd-udev NetworkManager ```` 还有一些因为依赖包找不到导致无法安装的 ```` [root@openEuler-RISCV-rare ~]# [root@openEuler-RISCV-rare ~]# yum install -y --installroot $(pwd)/rootfs $INSTALL_RPMS --skip-broken --nobest Unable to detect release version (use '--releasever' to specify release version) Last metadata expiration check: 0:37:19 ago on Thu Mar 17 03:54:43 2022. No match for argument: systemd No match for argument: systemd-udev No match for argument: NetworkManager Dependencies resolved. Problem 1: conflicting requests - nothing provides rtld(GNU_HASH) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libpthread.so.0()(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libm.so.6()(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libpthread.so.0(GLIBC_2.27)(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libm.so.6(GLIBC_2.27)(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.28)(64bit) needed by vim-enhanced-2:8.2-7.oe1.riscv64 Problem 2: conflicting requests - nothing provides rtld(GNU_HASH) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides libpthread.so.0()(64bit) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides libpthread.so.0(GLIBC_2.27)(64bit) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides librt.so.1()(64bit) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.28)(64bit) needed by coreutils-9.0-3.oe1.riscv64 - nothing provides librt.so.1(GLIBC_2.27)(64bit) needed by coreutils-9.0-3.oe1.riscv64 Problem 3: conflicting requests - nothing provides rtld(GNU_HASH) needed by net-tools-2.0-0.55.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by net-tools-2.0-0.55.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by net-tools-2.0-0.55.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by net-tools-2.0-0.55.oe1.riscv64 - nothing provides systemd needed by net-tools-2.0-0.55.oe1.riscv64 Problem 4: conflicting requests - nothing provides rtld(GNU_HASH) needed by libssh-0.9.5-1.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by libssh-0.9.5-1.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by libssh-0.9.5-1.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by libssh-0.9.5-1.oe1.riscv64 - nothing provides librt.so.1()(64bit) needed by libssh-0.9.5-1.oe1.riscv64 Problem 5: conflicting requests - nothing provides rtld(GNU_HASH) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides libutil.so.1()(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides libresolv.so.2()(64bit) needed by openssh-8.2p1-10.oe1.riscv64 - nothing provides libresolv.so.2(GLIBC_2.27)(64bit) needed by openssh-8.2p1-10.oe1.riscv64 Problem 6: conflicting requests - nothing provides rtld(GNU_HASH) needed by passwd-0.80-7.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by passwd-0.80-7.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by passwd-0.80-7.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by passwd-0.80-7.oe1.riscv64 - nothing provides libpthread.so.0()(64bit) needed by passwd-0.80-7.oe1.riscv64 - nothing provides libpthread.so.0(GLIBC_2.27)(64bit) needed by passwd-0.80-7.oe1.riscv64 Problem 7: conflicting requests - nothing provides rtld(GNU_HASH) needed by wget-1.20.3-4.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by wget-1.20.3-4.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by wget-1.20.3-4.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by wget-1.20.3-4.oe1.riscv64 Problem 8: conflicting requests - nothing provides rtld(GNU_HASH) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides libsystemd.so.0()(64bit) needed by procps-ng-3.3.16-15.oe1.riscv64 - nothing provides - nothing provides libm.so.6()(64bit) needed by rpm-build-4.15.1-25.oe1.riscv64 - nothing provides libpthread.so.0(GLIBC_2.27)(64bit) needed by rpm-build-4.15.1-25.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by rpm-build-4.15.1-25.oe1.riscv64 - nothing provides perl needed by rpm-build-4.15.1-25.oe1.riscv64 - nothing provides libdb-5.3.so()(64bit) needed by rpm-build-4.15.1-25.oe1.riscv64 - nothing provides glibc needed by rpm-build-4.15.1-25.oe1.riscv64 Problem 11: conflicting requests - nothing provides perl(strict) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(warnings) needed by autoconf-2.71-1.oe1.noarch - nothing provides /usr/bin/perl needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(File::Basename) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(POSIX) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(IO::File) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(File::Copy) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(File::Find) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(Errno) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(File::stat) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(Class::Struct) needed by autoconf-2.71-1.oe1.noarch - nothing provides perl(:VERSION) >= 5.6.0 needed by autoconf-2.71-1.oe1.noarch Problem 12: conflicting requests - nothing provides rtld(GNU_HASH) needed by make-1:4.3-2.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by make-1:4.3-2.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by make-1:4.3-2.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by make-1:4.3-2.riscv64 - nothing provides libdl.so.2()(64bit) needed by make-1:4.3-2.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by make-1:4.3-2.riscv64 Problem 13: conflicting requests - nothing provides rtld(GNU_HASH) needed by git-2.33.0-1.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides libpthread.so.0()(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides libpthread.so.0(GLIBC_2.27)(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides perl(strict) needed by git-2.33.0-1.oe1.riscv64 - nothing provides /usr/bin/python3 needed by git-2.33.0-1.oe1.riscv64 - nothing provides librt.so.1()(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.28)(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides /usr/bin/perl needed by git-2.33.0-1.oe1.riscv64 - nothing provides perl(File::Basename) needed by git-2.33.0-1.oe1.riscv64 - nothing provides perl(lib) needed by git-2.33.0-1.oe1.riscv64 - nothing provides perl(Getopt::Std) needed by git-2.33.0-1.oe1.riscv64 - nothing provides libsecret-1.so.0()(64bit) needed by git-2.33.0-1.oe1.riscv64 - nothing provides perl(IPC::Open2) needed by git-2.33.0-1.oe1.riscv64 - nothing provides perl(:VERSION) >= 5.8.0 needed by git-2.33.0-1.oe1.riscv64 Problem 14: conflicting requests - nothing provides perl(strict) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(warnings) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(vars) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(Config) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides /usr/bin/perl needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(File::Basename) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(DynaLoader) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(File::Copy) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(bytes) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(if) needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(:VERSION) >= 5.6.0 needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(:VERSION) >= 5.0.0 needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(:VERSION) >= 5.4.50 needed by texinfo-6.7-2.oe1.riscv64 - nothing provides perl(:VERSION) >= 5.7.0 needed by texinfo-6.7-2.oe1.riscv64 Problem 15: conflicting requests - nothing provides glibc-devel >= 2.17 needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides rtld(GNU_HASH) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides libm.so.6()(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides libm.so.6(GLIBC_2.27)(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by gcc-10.3.1-20220105.6.oe1.riscv64 Problem 16: conflicting requests - nothing provides rtld(GNU_HASH) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides libm.so.6()(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides libm.so.6(GLIBC_2.27)(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by gcc-c++-10.3.1-20220105.6.oe1.riscv64 Problem 17: conflicting requests - nothing provides rtld(GNU_HASH) needed by hostname-3.21-2.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by hostname-3.21-2.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by hostname-3.21-2.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by hostname-3.21-2.oe1.riscv64 Problem 18: package dnf-4.10.0-1.oe1.noarch requires python3-dnf = 4.10.0-1.oe1, but none of the providers can be installed - conflicting requests - nothing provides /usr/bin/python3 needed by python3-dnf-4.10.0-1.oe1.noarch - nothing provides python(abi) = 3.7 needed by python3-dnf-4.10.0-1.oe1.noarch Problem 19: package gdb-11.1-2.oe1.riscv64 requires gdb-headless = 11.1-2.oe1, but none of the providers can be installed - conflicting requests - nothing provides rtld(GNU_HASH) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1()(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libc.so.6(GLIBC_2.27)(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libpthread.so.0()(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libm.so.6()(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libpthread.so.0(GLIBC_2.27)(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libm.so.6(GLIBC_2.27)(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libdl.so.2()(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libdl.so.2(GLIBC_2.27)(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libpython3.7m.so.1.0()(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 - nothing provides libutil.so.1()(64bit) needed by gdb-headless-11.1-2.oe1.riscv64 ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: kernel riscv64 5.10-3.oe1 obs_standard 10 M Skipping packages with broken dependencies: autoconf noarch 2.71-1.oe1 obs_standard 658 k coreutils riscv64 9.0-3.oe1 obs_standard 2.7 M dnf noarch 4.10.0-1.oe1 obs_standard 24 k dnf-plugins-core noarch 4.0.24-3.oe1 obs_standard 13 k gcc riscv64 10.3.1-20220105.6.oe1 obs_standard 24 M gcc-c++ riscv64 10.3.1-20220105.6.oe1 obs_standard 8.6 M gdb riscv64 11.1-2.oe1 obs_standard 125 k gdb-headless riscv64 11.1-2.oe1 obs_standard 3.2 M git riscv64 2.33.0-1.oe1 obs_standard 6.0 M hostname riscv64 3.21-2.oe1 obs_standard 25 k libssh riscv64 0.9.5-1.oe1 obs_standard 275 k make riscv64 1:4.3-2 obs_standard 343 k net-tools riscv64 2.0-0.55.oe1 obs_standard 197 k openssh riscv64 8.2p1-10.oe1 obs_standard 258 k passwd riscv64 0.80-7.oe1 obs_standard 96 k procps-ng riscv64 3.3.16-15.oe1 obs_standard 203 k python3-dnf noarch 4.10.0-1.oe1 obs_standard 426 k rpm-build riscv64 4.15.1-25.oe1 obs_standard 93 k texinfo riscv64 6.7-2.oe1 obs_standard 739 k vim-enhanced riscv64 2:8.2-7.oe1 obs_standard 1.3 M wget riscv64 1.20.3-4.oe1 obs_standard 643 k Transaction Summary ================================================================================ Install 1 Package Skip 21 Packages Total download size: 10 M Installed size: 22 M Downloading Packages: kernel-5.10-3.oe1.riscv64.rpm 872 kB/s | 10 MB 00:11 -------------------------------------------------------------------------------- Total 867 kB/s | 10 MB 00:12 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : kernel-5.10-3.oe1.riscv64 1/1 Verifying : kernel-5.10-3.oe1.riscv64 1/1 Installed: kernel-5.10-3.oe1.riscv64 Skipped: autoconf-2.71-1.oe1.noarch coreutils-9.0-3.oe1.riscv64 dnf-4.10.0-1.oe1.noarch dnf-plugins-core-4.0.24-3.oe1.noarch gcc-10.3.1-20220105.6.oe1.riscv64 gcc-c++-10.3.1-20220105.6.oe1.riscv64 gdb-11.1-2.oe1.riscv64 gdb-headless-11.1-2.oe1.riscv64 git-2.33.0-1.oe1.riscv64 hostname-3.21-2.oe1.riscv64 libssh-0.9.5-1.oe1.riscv64 make-1:4.3-2.riscv64 net-tools-2.0-0.55.oe1.riscv64 openssh-8.2p1-10.oe1.riscv64 passwd-0.80-7.oe1.riscv64 procps-ng-3.3.16-15.oe1.riscv64 python3-dnf-4.10.0-1.oe1.noarch rpm-build-4.15.1-25.oe1.riscv64 texinfo-6.7-2.oe1.riscv64 vim-enhanced-2:8.2-7.oe1.riscv64 wget-1.20.3-4.oe1.riscv64 Complete! ```` 在rootfs/boot目录下可以看到kernel安装成功 ```` [root@openEuler-RISCV-rare ~]# ls rootfs/boot Image Image.gz config-5.10-3.oe1.riscv64 lost+found ```` 从obs 其他个人仓库里下载构建成功的systemd, systemd-udev, passwd的rpm包, 执行rpm命令强制安装,安装失败 ```` [root@openEuler-RISCV-rare download]# rpm -ivh --root=/root/rootfs systemd-248-16.oe1.riscv64.rpm --force --nodeps warning: systemd-248-16.oe1.riscv64.rpm: Header V3 RSA/SHA1 Signature, key ID 0ff13748: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(systemd-248-16.oe1.riscv64) scriptlet failed, exit status 127 error: systemd-248-16.oe1.riscv64: install failed [root@openEuler-RISCV-rare download]# rpm -ivh --root=/root/rootfs systemd-udev-248-16.oe1.riscv64.rpm --force --nodeps warning: systemd-udev-248-16.oe1.riscv64.rpm: Header V3 RSA/SHA1 Signature, key ID 0ff13748: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(systemd-udev-248-16.oe1.riscv64) scriptlet failed, exit status 127 error: systemd-udev-248-16.oe1.riscv64: install failed [root@openEuler-RISCV-rare download]# rpm -ivh --root=/root/rootfs passwd-0.80-8.oe1.riscv64.rpm --force --nodeps warning: passwd-0.80-8.oe1.riscv64.rpm: Header V3 RSA/SHA1 Signature, key ID 0ff13748: NOKEY Verifying... ################################# [100%] Preparing... ################################# [100%] error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(passwd-0.80-8.oe1.riscv64) scriptlet failed, exit status 127 error: passwd-0.80-8.oe1.riscv64: install failed ```` 配置文件系统的用户和主机名称 ```` [root@openEuler-RISCV-rare ~]# echo "root:openEuler12#$" | chpasswd -R $(pwd)/rootfs/ chpasswd: /var/run/passwd.1194: No such file or directory chpasswd: cannot lock /etc/passwd; try again later. [root@openEuler-RISCV-rare ~]# echo openEuler-riscv64 > $(pwd)/rootfs/etc/hostname [root@openEuler-RISCV-rare ~]# ```` ##### 5. extlinux启动引导配置 ``` $ mkdir -p /mnt/boot/extlinux cat > /mnt/boot/extlinux/extlinux.conf << "EOF" default openEuler-riscv label openEuler-riscv kernel /Image append ro root=/dev/vda2 selinux=0 highres=off earlycon EOF ``` ##### 6. 制作openSBI + uboot 启动引导 构建uboot ```` $ git clone https://gitlab.denx.de/u-boot/u-boot.git $ cd u-boot $ make CROSS_COMPILE=riscv64-unknown-linux-gnu- qemu-riscv64_smode_defconfig $ make CROSS_COMPILE=riscv64-unknown-linux-gnu- -j $(nproc) ```` 构建openSBI + uboot 启动引导 ```` $ git clone https://github.com/riscv/opensbi.git $ cd opensbi $ make PLATFORM=generic CROSS_COMPILE=riscv64-unknown-linux-gnu- FW_PAYLOAD_PATH=../u-boot/u-boot.bin ```` ##### 7. qemu启动新镜像 执行qemu命令启动新镜像,其中fw_payload_uboot.elf是步骤6生成的启动固件 ```` qemu-system-riscv64 \ -nographic -machine virt \ -smp 8 -m 2G \ -bios fw_payload_uboot.elf \ -drive file=oe-rv.raw,format=raw,id=hd0 \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-device,rng=rng0 \ -device virtio-blk-device,drive=hd0 \ -device virtio-net-device,netdev=usernet \ -netdev user,id=usernet,hostfwd=tcp::22222-:22 ```` 启动后,提示TFTP error ```` Device 0: QEMU VirtIO Block Device Type: Hard Disk Capacity: 10240.0 MB = 10.0 GB (20971520 x 512) ... is now current device Scanning virtio 0:1... libfdt fdt_check_header(): FDT_ERR_BADMAGIC Scanning disk virtio-blk#1... Found 3 disks No EFI system partition BootOrder not defined EFI boot manager: Cannot load any image scanning bus for devices... Device 0: unknown device BOOTP broadcast 1 DHCP client bound to address 10.0.2.15 (5 ms) Using virtio-net#2 device TFTP from server 10.0.2.2; our IP address is 10.0.2.15 Filename 'boot.scr.uimg'. Load address: 0x88100000 Loading: * TFTP error: 'Access violation' (2) Not retrying... BOOTP broadcast 1 DHCP client bound to address 10.0.2.15 (1 ms) Using virtio-net#2 device TFTP from server 10.0.2.2; our IP address is 10.0.2.15 Filename 'boot.scr.uimg'. Load address: 0x84000000 Loading: * TFTP error: 'Access violation' (2) Not retrying... => ```` ##### 8. yum源恢复为原来qemu环境中的yum源,安装软件包,并重新启动镜像 将步骤4中的yum源恢复为原qemu环境中的yum源 ```` [base] name=base baseurl=https://isrc.iscas.ac.cn/mirror/openeuler-sig-riscv/oe-RISCV-repo/ enabled=1 gpgcheck=0 ```` 安装软件包到文件系统 执行yum install -y --installroot $(pwd)/rootfs $INSTALL_RPMS 提示如下包安装失败 ```` Failed: NetworkManager-1:1.16.0-7.riscv64 at-spi2-core-2.34.0-1.riscv64 babeltrace-1.5.6-4.riscv64 ca-certificates-2020.2.40-1.noarch cronie-1.5.4-5.riscv64 dbus-daemon-1:1.12.16-13.riscv64 filesystem-3.9-3.riscv64 findutils-2:4.7.0-4.riscv64 fipscheck-1.5.0-7.riscv64 fribidi-1.0.5-4.riscv64 gamin-0.1.10-37.riscv64 gawk-5.0.1-2.riscv64 gdb-8.2.50.20181114-8.0.riscv64.oe1.riscv64 glib-networking-2.58.0-7.riscv64 glib2-2.62.1-1.riscv64 glibc-headers-2.29.9000-8oe1.riscv64 graphite2-1.3.13-2.riscv64 grep-3.4-0.riscv64 groff-1.22.4-4.riscv64 grubby-8.40-24.riscv64 gtk2-2.24.32-7.riscv64 gtk3-3.24.1-3.riscv64 kmod-25-6.riscv64 libXcursor-1.1.15-5.riscv64 libXfixes-5.0.3-11.riscv64 libcap-2.27-1.riscv64 libidn2-2.0.5-8.riscv64 libksba-1.3.5-12.riscv64 libmpc-1.1.0-3.riscv64 libpsl-0.20.2-9.riscv64 libseccomp-2.4.3-2.riscv64 libsepol-2.9-1.riscv64 libutempter-1.1.6-16.riscv64 logrotate-3.15.1-2.riscv64 lua-5.3.5-4.riscv64 man-db-2.8.7-5.riscv64 net-tools-2.0-0.54.riscv64 newt-0.52.21-3.riscv64 openssh-7.8p1-8.riscv64 openssl-libs-1:1.1.1d-9.riscv64 openssl-pkcs11-0.4.10-1.riscv64 passwd-0.80-7.riscv64 perl-CPAN-Meta-2.150010-419.noarch perl-CPAN-Meta-Requirements-2.140-419.noarch perl-CPAN-Meta-YAML-0.018-420.noarch perl-Config-Perl-V-0.30-5.noarch perl-Data-Dumper-2.172-3.riscv64 perl-Getopt-Long-2.50-419.noarch perl-JSON-PP-1:4.04-2.noarch perl-Locale-Codes-3.58-2.noarch perl-Locale-Maketext-1:1.28-1.noarch perl-MIME-Base64-3.15-418.riscv64 perl-Math-BigInt-1:1.9998.13-5.noarch perl-Math-BigInt-FastCalc-0.500.700-4.riscv64 perl-Math-BigRat-0.2614-2.noarch perl-Scalar-List-Utils-3:1.52-2.riscv64 perl-Socket-4:2.029-2.riscv64 perl-Storable-1:3.15-2.riscv64 perl-Sys-Syslog-0.35-420.riscv64 perl-Time-HiRes-1.9760-2.riscv64 perl-Unicode-Collate-1.25-4.riscv64 perl-Unicode-Normalize-1.26-419.riscv64 perl-bignum-0.50-4.noarch perl-constant-1.33-421.noarch popt-1.16-17.riscv64 publicsuffix-list-20180723-3.noarch systemd-243-18.riscv64 systemd-udev-243-18.riscv64 tar-2:1.30-11.riscv64 tcl-1:8.6.8-8.riscv64 trousers-0.3.14-3.riscv64 unbound-libs-1.7.3-14.riscv64 Error: Transaction failed ```` 执行yum install -y --installroot $(pwd)/rootfs $INSTALL_RPMS --skip-broken --nobest ```` [root@openEuler-RISCV-rare ~]# yum install -y --installroot $(pwd)/rootfs $INSTALL_RPMS --skip-broken --nobest Last metadata expiration check: 0:27:20 ago on Thu Mar 17 07:12:44 2022. Package vim-enhanced-2:8.1.450-8.riscv64 is already installed. Package coreutils-8.31-4.riscv64 is already installed. Package libssh-0.8.3-7.riscv64 is already installed. Package dnf-4.2.15-8.noarch is already installed. Package wget-1.20.3-1.riscv64 is already installed. Package procps-ng-3.3.16-11.riscv64 is already installed. Package dnf-plugins-core-4.0.11-5.noarch is already installed. Package kernel-5.5.19-1.riscv64 is already installed. Package rpm-build-4.15.1-13.riscv64 is already installed. Package autoconf-2.69-30.noarch is already installed. Package make-1:4.2.1-15.riscv64 is already installed. Package dnf-plugins-core-4.0.11-5.noarch is already installed. Package git-2.23.0-12.riscv64 is already installed. Package texinfo-6.6-2.riscv64 is already installed. Package gcc-9.1.1-5.0.riscv64.oe1.riscv64 is already installed. Package gcc-c++-9.1.1-5.0.riscv64.oe1.riscv64 is already installed. Package hostname-3.20-7.riscv64 is already installed. Dependencies resolved. ================================================================================ Package Arch Version Repo Size ================================================================================ Installing: NetworkManager riscv64 1:1.16.0-7 base 1.7 M gdb riscv64 8.2.50.20181114-8.0.riscv64.oe1 base 122 k net-tools riscv64 2.0-0.54 base 201 k openssh riscv64 7.8p1-8 base 825 k passwd riscv64 0.80-7 base 95 k systemd riscv64 243-18 base 3.2 M systemd-udev riscv64 243-18 base 1.2 M Installing dependencies: ca-certificates noarch 2020.2.40-1 base 383 k fipscheck riscv64 1.5.0-7 base 21 k gamin riscv64 0.1.10-37 base 62 k glib2 riscv64 2.62.1-1 base 2.5 M grep riscv64 3.4-0 base 250 k gtk2 riscv64 2.24.32-7 base 3.3 M gtk3 riscv64 3.24.1-3 base 4.2 M kmod riscv64 25-6 base 76 k libXcursor riscv64 1.1.15-5 base 25 k libXfixes riscv64 5.0.3-11 base 16 k libcap riscv64 2.27-1 base 40 k libidn2 riscv64 2.0.5-8 base 97 k libseccomp riscv64 2.4.3-2 base 54 k newt riscv64 0.52.21-3 base 93 k openssl-libs riscv64 1:1.1.1d-9 base 1.1 M popt riscv64 1.16-17 base 48 k Installing weak dependencies: openssl-pkcs11 riscv64 0.4.10-1 base 56 k Transaction Summary ================================================================================ Install 24 Packages Total download size: 19 M Installed size: 75 M Downloading Packages: (1/24): fipscheck-1.5.0-7.riscv64.rpm 11 kB/s | 21 kB 00:01 (2/24): gamin-0.1.10-37.riscv64.rpm 94 kB/s | 62 kB 00:00 (3/24): gdb-8.2.50.20181114-8.0.riscv64.oe1.ris 178 kB/s | 122 kB 00:00 (4/24): ca-certificates-2020.2.40-1.noarch.rpm 108 kB/s | 383 kB 00:03 (5/24): grep-3.4-0.riscv64.rpm 230 kB/s | 250 kB 00:01 (6/24): NetworkManager-1.16.0-7.riscv64.rpm 228 kB/s | 1.7 MB 00:07 (7/24): glib2-2.62.1-1.riscv64.rpm 332 kB/s | 2.5 MB 00:07 (8/24): kmod-25-6.riscv64.rpm 86 kB/s | 76 kB 00:00 (9/24): libXcursor-1.1.15-5.riscv64.rpm 73 kB/s | 25 kB 00:00 (10/24): libXfixes-5.0.3-11.riscv64.rpm 49 kB/s | 16 kB 00:00 (11/24): libcap-2.27-1.riscv64.rpm 97 kB/s | 40 kB 00:00 (12/24): libidn2-2.0.5-8.riscv64.rpm 165 kB/s | 97 kB 00:00 (13/24): gtk2-2.24.32-7.riscv64.rpm 348 kB/s | 3.3 MB 00:09 (14/24): libseccomp-2.4.3-2.riscv64.rpm 80 kB/s | 54 kB 00:00 (15/24): newt-0.52.21-3.riscv64.rpm 208 kB/s | 93 kB 00:00 (16/24): net-tools-2.0-0.54.riscv64.rpm 154 kB/s | 201 kB 00:01 (17/24): openssh-7.8p1-8.riscv64.rpm 334 kB/s | 825 kB 00:02 (18/24): openssl-pkcs11-0.4.10-1.riscv64.rpm 137 kB/s | 56 kB 00:00 (19/24): passwd-0.80-7.riscv64.rpm 149 kB/s | 95 kB 00:00 (20/24): openssl-libs-1.1.1d-9.riscv64.rpm 321 kB/s | 1.1 MB 00:03 (21/24): popt-1.16-17.riscv64.rpm 91 kB/s | 48 kB 00:00 (22/24): gtk3-3.24.1-3.riscv64.rpm 338 kB/s | 4.2 MB 00:12 (23/24): systemd-udev-243-18.riscv64.rpm 352 kB/s | 1.2 MB 00:03 (24/24): systemd-243-18.riscv64.rpm 562 kB/s | 3.2 MB 00:05 -------------------------------------------------------------------------------- Total 793 kB/s | 19 MB 00:25 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : libXfixes-5.0.3-11.riscv64 1/24 Running scriptlet: grep-3.4-0.riscv64 2/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(grep-3.4-0.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package grep Installing : libXcursor-1.1.15-5.riscv64 3/24 error: grep-3.4-0.riscv64: install failed Running scriptlet: popt-1.16-17.riscv64 4/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(popt-1.16-17.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package popt Installing : newt-0.52.21-3.riscv64 5/24 error: popt-1.16-17.riscv64: install failed Running scriptlet: ca-certificates-2020.2.40-1.noarch 6/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(ca-certificates-2020.2.40-1.noarch) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package ca-certificates Running scriptlet: openssl-pkcs11-0.4.10-1.riscv64 7/24 error: ca-certificates-2020.2.40-1.noarch: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(openssl-pkcs11-0.4.10-1.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package openssl-pkcs11 Installing : openssl-libs-1:1.1.1d-9.riscv64 8/24 error: openssl-pkcs11-0.4.10-1.riscv64: install failed Error unpacking rpm package openssl-libs-1:1.1.1d-9.riscv64 Running scriptlet: fipscheck-1.5.0-7.riscv64 9/24 error: unpacking of archive failed on file /etc/pki/tls/ct_log_list.cnf;6232e5f9: cpio: open error: openssl-libs-1:1.1.1d-9.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(fipscheck-1.5.0-7.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package fipscheck Installing : glib2-2.62.1-1.riscv64 10/24 error: fipscheck-1.5.0-7.riscv64: install failed Running scriptlet: gamin-0.1.10-37.riscv64 11/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(gamin-0.1.10-37.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package gamin Running scriptlet: gtk3-3.24.1-3.riscv64 12/24 error: gamin-0.1.10-37.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(gtk3-3.24.1-3.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package gtk3 Running scriptlet: gtk2-2.24.32-7.riscv64 13/24 error: gtk3-3.24.1-3.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(gtk2-2.24.32-7.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package gtk2 Running scriptlet: libseccomp-2.4.3-2.riscv64 14/24 error: gtk2-2.24.32-7.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(libseccomp-2.4.3-2.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package libseccomp Running scriptlet: libidn2-2.0.5-8.riscv64 15/24 error: libseccomp-2.4.3-2.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(libidn2-2.0.5-8.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package libidn2 Running scriptlet: libcap-2.27-1.riscv64 16/24 error: libidn2-2.0.5-8.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(libcap-2.27-1.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package libcap Running scriptlet: systemd-243-18.riscv64 17/24 error: libcap-2.27-1.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(systemd-243-18.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package systemd Installing : kmod-25-6.riscv64 18/24 error: systemd-243-18.riscv64: install failed Running scriptlet: kmod-25-6.riscv64 18/24 Running scriptlet: systemd-udev-243-18.riscv64 19/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(systemd-udev-243-18.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package systemd-udev Running scriptlet: NetworkManager-1:1.16.0-7.riscv64 20/24 error: systemd-udev-243-18.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(NetworkManager-1:1.16.0-7.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package NetworkManager Installing : net-tools-2.0-0.54.riscv64 21/24 error: NetworkManager-1:1.16.0-7.riscv64: install failed Running scriptlet: net-tools-2.0-0.54.riscv64 21/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory warning: %post(net-tools-2.0-0.54.riscv64) scriptlet failed, exit status 127 Error in POSTIN scriptlet in rpm package net-tools Running scriptlet: openssh-7.8p1-8.riscv64 22/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(openssh-7.8p1-8.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package openssh Running scriptlet: passwd-0.80-7.riscv64 23/24 error: openssh-7.8p1-8.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(passwd-0.80-7.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package passwd Running scriptlet: gdb-8.2.50.20181114-8.0.riscv64.oe1.riscv64 24/24 error: passwd-0.80-7.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory error: %prein(gdb-8.2.50.20181114-8.0.riscv64.oe1.riscv64) scriptlet failed, exit status 127 Error in PREIN scriptlet in rpm package gdb error: gdb-8.2.50.20181114-8.0.riscv64.oe1.riscv64: install failed error: failed to exec scriptlet interpreter /bin/sh: No such file or directory warning: %triggerin(glibc-common-2.29.9000-8oe1.riscv64) scriptlet failed, exit status 127 Error in <unknown> scriptlet in rpm package gdb Running scriptlet: glib2-2.62.1-1.riscv64 24/24 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory warning: %triggerin(glib2-2.62.1-1.riscv64) scriptlet failed, exit status 127 Error in <unknown> scriptlet in rpm package glib2 error: failed to exec scriptlet interpreter /bin/sh: No such file or directory warning: %triggerin(glib2-2.62.1-1.riscv64) scriptlet failed, exit status 127 Error in <unknown> scriptlet in rpm package glib2 Verifying : NetworkManager-1:1.16.0-7.riscv64 1/24 Verifying : ca-certificates-2020.2.40-1.noarch 2/24 Verifying : fipscheck-1.5.0-7.riscv64 3/24 Verifying : gamin-0.1.10-37.riscv64 4/24 Verifying : gdb-8.2.50.20181114-8.0.riscv64.oe1.riscv64 5/24 Verifying : glib2-2.62.1-1.riscv64 6/24 Verifying : grep-3.4-0.riscv64 7/24 Verifying : gtk2-2.24.32-7.riscv64 8/24 Verifying : gtk3-3.24.1-3.riscv64 9/24 Verifying : kmod-25-6.riscv64 10/24 Verifying : libXcursor-1.1.15-5.riscv64 11/24 Verifying : libXfixes-5.0.3-11.riscv64 12/24 Verifying : libcap-2.27-1.riscv64 13/24 Verifying : libidn2-2.0.5-8.riscv64 14/24 Verifying : libseccomp-2.4.3-2.riscv64 15/24 Verifying : net-tools-2.0-0.54.riscv64 16/24 Verifying : newt-0.52.21-3.riscv64 17/24 Verifying : openssh-7.8p1-8.riscv64 18/24 Verifying : openssl-libs-1:1.1.1d-9.riscv64 19/24 Verifying : openssl-pkcs11-0.4.10-1.riscv64 20/24 Verifying : passwd-0.80-7.riscv64 21/24 Verifying : popt-1.16-17.riscv64 22/24 Verifying : systemd-243-18.riscv64 23/24 Verifying : systemd-udev-243-18.riscv64 24/24 Installed: net-tools-2.0-0.54.riscv64 glib2-2.62.1-1.riscv64 kmod-25-6.riscv64 libXcursor-1.1.15-5.riscv64 libXfixes-5.0.3-11.riscv64 newt-0.52.21-3.riscv64 Failed: NetworkManager-1:1.16.0-7.riscv64 ca-certificates-2020.2.40-1.noarch fipscheck-1.5.0-7.riscv64 gamin-0.1.10-37.riscv64 gdb-8.2.50.20181114-8.0.riscv64.oe1.riscv64 grep-3.4-0.riscv64 gtk2-2.24.32-7.riscv64 gtk3-3.24.1-3.riscv64 libcap-2.27-1.riscv64 libidn2-2.0.5-8.riscv64 libseccomp-2.4.3-2.riscv64 openssh-7.8p1-8.riscv64 openssl-libs-1:1.1.1d-9.riscv64 openssl-pkcs11-0.4.10-1.riscv64 passwd-0.80-7.riscv64 popt-1.16-17.riscv64 systemd-243-18.riscv64 systemd-udev-243-18.riscv64 Error: Transaction failed ```` 查看kernel已安装成功 ```` [root@openEuler-RISCV-rare ~]# ls rootfs/boot Image config-5.5.19 lost+found ```` 配置文件系统的用户和主机名称,可以配置成功 ``` [root@openEuler-RISCV-rare ~]# echo "root:openEuler12#$" | chpasswd -R $(pwd)/rootfs/ [root@openEuler-RISCV-rare ~]# echo openEuler-riscv64 > $(pwd)/rootfs/etc/hostname [root@openEuler-RISCV-rare ~]# ``` 配置extlinux ```` $ mkdir -p rootfs/boot/extlinux $ cat > rootfs/boot/extlinux/extlinux.conf << "EOF" default openEuler-riscv label openEuler-riscv kernel /Image append ro root=/dev/vda2 selinux=0 highres=off earlycon EOF ```` 再次用qemu启动新镜像,提示kernel初始化失败 ```` [ 9.391092] usbcore: registered new interface driver usbhid [ 9.400099] usbhid: USB HID core driver [ 9.414859] NET: Registered protocol family 10 [ 9.464842] Segment Routing with IPv6 [ 9.465873] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 9.471917] NET: Registered protocol family 17 [ 9.478526] 9pnet: Installing 9P2000 support [ 9.487495] Key type dns_resolver registered [ 9.593917] EXT4-fs (vda2): INFO: recovery required on readonly filesystem [ 9.599204] EXT4-fs (vda2): write access will be enabled during recovery [ 10.172734] EXT4-fs (vda2): recovery complete [ 10.200150] EXT4-fs (vda2): mounted filesystem with ordered data mode. Opts: (null) [ 10.201292] VFS: Mounted root (ext4 filesystem) readonly on device 254:2. [ 10.205564] devtmpfs: mounted [ 10.311279] Freeing unused kernel memory: 228K [ 10.311819] This architecture does not have kernel memory protection. [ 10.312474] Run /sbin/init as init process [ 10.314585] Run /etc/init as init process [ 10.315319] Run /bin/init as init process [ 10.328255] Run /bin/sh as init process [ 10.328867] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. [ 10.330230] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.5.19 #1 [ 10.330799] Call Trace: [ 10.331265] [<ffffffe00003be5e>] walk_stackframe+0x0/0xaa [ 10.331803] [<ffffffe00003c04a>] show_stack+0x2a/0x34 [ 10.332254] [<ffffffe000633198>] dump_stack+0x6e/0x88 [ 10.332721] [<ffffffe000040c76>] panic+0xe6/0x258 [ 10.342178] [<ffffffe000646eb8>] kernel_init+0xe4/0xf0 [ 10.345073] [<ffffffe00003ac22>] ret_from_exception+0x0/0xc [ 10.346249] ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]--- ````
评论 (
4
)
登录
后才可以发表评论
状态
已完成
待办的
进行中
已完成
已拒绝
负责人
未设置
标签
sig/sig-RISC-V
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (
-
)
标签 (
-
)
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(3)
Shell
1
https://gitee.com/openeuler/RISC-V.git
git@gitee.com:openeuler/RISC-V.git
openeuler
RISC-V
RISC-V
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册