Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running busybear linux on recent qemu #18

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
449ed95
Update README
fpetrot Jul 24, 2020
fc1f22c
Updating reference to risck-pk
fpetrot Jul 24, 2020
dc4144a
Updating reference to riscv-pk again
fpetrot Oct 27, 2020
5888194
Q&D hack to avoid compilation issue in linux dtc
fpetrot Oct 27, 2020
b0da342
Submodule fixup
fpetrot Oct 27, 2020
f4b4dcd
Fixing the submodule fixup, hopefully
fpetrot Oct 27, 2020
c86dbbb
Updating sed command that was fairly erroneous
Oct 27, 2020
17f64db
Image building script with copies, but from hardwired locations
Oct 27, 2020
83ef019
Automatic addition of the parsec benchmark when they exist
Oct 28, 2020
f4144fd
Including the splash2x benchmarks
Oct 28, 2020
b375e7d
Adding a script to launch the 'small' simulations
Oct 28, 2020
5cfb259
Build image without root priviledges
fpetrot Oct 30, 2020
dccbc27
Removing verbose output when building image
fpetrot Oct 30, 2020
29e1492
Adding fsck to cleanup the image for faster boot
fpetrot Oct 30, 2020
2f94f62
Making the pk submodule accessible through https
Nov 9, 2020
1d1c322
Updating to new versions
Nov 10, 2020
98f5086
Lowering Linux timer rate to 100Hz
Nov 10, 2020
e4f076c
Adding some native inputs when generating image
MarieBadaroux Nov 16, 2020
40ac9fd
New bash script to run QEMU with or without pinning options
MarieBadaroux Jan 7, 2021
d6b69f2
Improvement of QEMU script to run with/without pinning
MarieBadaroux Jan 19, 2021
897ac7b
Update run.sh
MarieBadaroux Mar 31, 2021
fca7cfa
Update README.md
fpetrot Jul 6, 2021
4521a76
Updating to newer linux and busybox versions
Apr 3, 2022
d969b6b
Add support for 32-bit kernels also
Apr 3, 2022
ed3cf2b
Update README to remind to compile with our own toolchain
Apr 3, 2022
e14c884
Merge branch 'dev' of github.com:fpetrot/busybear-linux into dev
Apr 3, 2022
a551a05
Support 32 and 64 compilation
Apr 3, 2022
93d73cc
Merge pull request #1 from fpetrot/dev
fpetrot Apr 3, 2022
19c72d4
Update to linux 6.0.9
Nov 18, 2022
68a343b
Update README
Nov 18, 2022
a7219d1
Scripts update for new linux version
fpetrot Jan 25, 2023
18d0d6b
scripts : remove -j option to make and change way copies occur
fpetrot Aug 23, 2023
eb966c6
Updating linux and busybox to current versions
fpetrot Jul 9, 2024
1f3bcaf
A few hacks to facilitate life at the expense of clarity
fpetrot May 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
all: busybear.bin

clean:
rm -fr build busybear.bin
rm -fr build busybear-riscv64.bin busybear-riscv32.bin

distclean: clean
rm -fr archives
Expand Down
40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
# Short introduction note to this particular fork

Busybear Linux is the work of Michael J. Clark, this fork is used for
providing a simple linux set-up on risc-v for tearching or research
works in my group.
It was in particular used to check QEMU scalability with and without
pinning, and the disk may include a version of the parsec benchmarks.

We update to new versions of the kernel and busybox once on a while,
usually when we need to do new stuffs.

We also added the possibility to build a 32-bit kernel.
Default is to compile for riscv64, change comments in `config/busybear.config`
to compile for riscv32.
This allows to check that we do not break too many things when hacking in
QEMU.

Note that _this is meant to be compiled with a home made cross-dev
toolchain_, as there are sysroot dependencies that some distros do not
provide, TTBOMK.
The symptom is that boot fails while launching `/sbin/init`.

Also, you cannot compile the 32 and 64 bit versions at the same time, however
the generated files are in different directories or have different names at the
end, so you can have both systems sitting on your machine at the same time after
compilation.

Typical command-lines:
```
../qemu-vp/build-rtan/qemu-system-riscv32 -nographic -kernel build/linux-5.15.32-riscv32/arch/riscv/boot/Image -machine virt -append "root=/dev/vda ro console=ttyS0 debug" -drive file=busybear-riscv32.bin,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -accel tcg,thread=multi -smp 128
```
and
```
../qemu-vp/build-rtan/qemu-system-riscv64 -nographic -kernel build/linux-5.15.32-riscv64/arch/riscv/boot/Image -machine virt -append "root=/dev/vda ro console=ttyS0 debug" -drive file=busybear-riscv64.bin,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -accel tcg,thread=multi -smp 32
```

# busybear-linux

busybear-linux is a tiny RISC-V Linux root filesystem image that targets
Expand Down Expand Up @@ -80,7 +116,7 @@ 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
git clone --recursive https://github.com/fpetrot/busybear-linux.git
cd busybear-linux
make
```
Expand Down Expand Up @@ -137,7 +173,7 @@ The following command starts busybear-linux:
which runs executes this command:

```
sudo qemu-system-riscv64 -nographic -machine virt \
sudo qemu-system-riscv64 -nographic -machine virt -bios none \
-kernel bbl -append "root=/dev/vda ro console=ttyS0" \
-drive file=busybear.bin,format=raw,id=hd0 \
-device virtio-blk-device,drive=hd0 \
Expand Down
16 changes: 11 additions & 5 deletions conf/busybear.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
BUSYBOX_VERSION=1.30.1
DROPBEAR_VERSION=2018.76
LINUX_KERNEL_VERSION=5.0
BUSYBOX_VERSION=1.36.1
DROPBEAR_VERSION=2022.82
LINUX_KERNEL_VERSION=6.9.8

# Uncomment to build 64-bit version
ARCH=riscv64
ABI=lp64d
CROSS_COMPILE=riscv64-unknown-linux-gnu-

IMAGE_FILE=busybear.bin
IMAGE_SIZE=100
# Uncomment to build 32-bit version
# ARCH=riscv32
# ABI=ilp32d
# CROSS_COMPILE=riscv32-unknown-linux-gnu-

IMAGE_FILE=busybear-${ARCH}.bin
IMAGE_SIZE=1024
ROOT_PASSWORD=busybear
Loading