在x86平台制作龙芯版debian 10系统(mips64el)
OS:?ubuntu 18.04
使用debootstrap制作根文件系統(tǒng)會(huì)分成兩個(gè)階段。第一階段是,使用debootstrap命令來(lái)下載軟件包。 第二階段是安裝軟件包。
安裝debootstap 等相關(guān)工具
$ sudo apt install ?binfmt-support qemu qemu-user-static debootstrap
使用debootstrap 下載軟件包
$ mkdir?debian10_mips64el
$ sudo debootstrap --arch mips64el --foreign buster debian10_mips64el ?http://mirrors.ustc.edu.cn/debian/
--arch:指定要制作文件系統(tǒng)的處理器體系結(jié)構(gòu),比如mipsel或者mips64el
buster:指定Debian的版本。buster是Debian10系統(tǒng)的代號(hào)。
debian10_mips64el:本地目錄,最后制作好的文件系統(tǒng)會(huì)在此目錄。
--foreign:只執(zhí)行引導(dǎo)的初始解包階段,僅僅下載和解壓。
http:/mirrors.ustc.edu.cn/debian/:國(guó)內(nèi)中科大鏡像源地址
因?yàn)橹鳈C(jī)跑在x86架構(gòu)上,而我們要制作的文件系統(tǒng)是跑在龍芯上,因此可以使用qemu-mips64el-static來(lái)模擬成mips64el的執(zhí)行環(huán)境。
$ cp /usr/bin/qemu-mips64el-static ?debian10_mips64el/usr/bin/
通過(guò)chroot 使用debootstrap命令進(jìn)行軟件包的安裝和配置。其中命令參數(shù)--second-stage表示執(zhí)行第二階段的安裝
$ sudo chroot debian10_mips64el/ ?debootstrap/debootstrap --second-stage
顯示"I:Base system installed successfully."這句話,說(shuō)明第二階段已經(jīng)完成。
通過(guò)chroot 進(jìn)入剛制作的根文件系統(tǒng)
$ sudo chroot debian10_mips64el/
設(shè)置密碼
# passwd root
配置網(wǎng)卡支持DHCP協(xié)議。修改/etc/network/interfaces文件,增加如下內(nèi)容。
auto lo?
iface lo inet loopback?
allow-hotplug eth0
iface eth0 inet dhcp
總結(jié)
以上是生活随笔為你收集整理的在x86平台制作龙芯版debian 10系统(mips64el)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 精益生产培训对企业有哪些作用?
- 下一篇: 软件著作权申请流程待发放多久就能到已发放