Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

Latest commit

 

History

History
30 lines (21 loc) · 711 Bytes

riscv64-build-environment-zh_CN.md

File metadata and controls

30 lines (21 loc) · 711 Bytes
  1. pbuilder + qemu

以下操作基于debian11环境,其他环境下需注意qemu版本是否在5.2版本以上

sudo apt install pbuilder qemu qemu-user-static pigz

配置 /etc/pbuilderrc

MIRRORSITE=https://mirrors.aliyun.com/debian-ports/
DEBOOTSTRAPOPTS=(
    '--variant=buildd'
    '--no-check-gpg'
    )
COMPRESSPROG="pigz"
DEBOOTSTRAP=qemu-debootstrap
PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-apt"

创建base环境

sudo dpkg --add-architecture riscv64 
sudo pbuilder create --debootstrapopts --arch --debootstrapopts riscv64 --mirror "https://mirrors.aliyun.com/debian-ports/" --distribution sid --basetgz buster-riscv64.tgz