busybear-linux is a tiny RISC-V Linux root filesystem image that targets
the virt machine in riscv-qemu. As the name suggests, busybear-linux is
a riscv-linux root image comprised of busybox and dropbear.
The root image is intended to demonstrate virtio-net and virtio-block in
riscv-qemu and features a dropbear ssh server which allows out-of-the-box
ssh access to a RISC-V virtual machine.
See the releases
for pre-built kernel and filesystem images.
Copyright and License
The busybear build system has been written by and is
copyright (C) 2017 by Michael J. Clark [email protected].
Enhancements to the build system have been contributed by and
are copyright (C) 2017 by Karsten Merker [email protected].
The busybear build system is provided under the following license
("MIT license"):
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
etc/ntp.conf (server 0.pool.ntp.org, server 1.pool.ntp.org)
etc/passwd, etc/shadow, etc/group and etc/hosts
The default config assumes bridged networking with 192.168.100.1
on the host and 192.168.100.2 in the guest.
Build
The build process downloads busybox and dropbear, compiles them and prepares
a root filesystem image to the file busybear.bin. The build script needs
to be run in Linux, even if preparing a root filesystem image for macOS.
busybear-linux
git clone --recursive https://github.com/michaeljclark/busybear-linux.git
cd busybear-linux
make
QEMU
git clone https://github.com/riscv/riscv-qemu.git
cd riscv-qemu
./configure --target-list=riscv64-softmmu,riscv32-softmmu
make
riscv-linux
Note: busybear-linux builds linux kernel automatically
git clone https://github.com/riscv/riscv-linux.git
cd riscv-linux
git checkout riscv-linux-4.14
cp ../busybear-linux/conf/linux.config .config
make ARCH=riscv olddefconfig
make ARCH=riscv vmlinux
bbl
Note: busybear-linux builds bbl automatically
git clone https://github.com/riscv/riscv-pk.git
cd riscv-pk
mkdir build
cd build
../configure \
--enable-logo \
--host=riscv64-unknown-elf \
--with-payload=../../riscv-linux/vmlinux
make
Running
busybear requires the riscv-qemu virt board with virtio-block
and virtio-net devices.
请发表评论