Skip to content

Commit a8fe35c

Browse files
committed
linux: Add a linux on QEMU tutorial
1 parent 74ebd74 commit a8fe35c

3 files changed

Lines changed: 577 additions & 7 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ developing software and SoC's using the OpenRISC cpu architecture.
1010
We are currently in progress working on a new structure
1111
and the intended outline is:
1212

13-
- Intro - OK
13+
- [Intro](https://openrisc.io/tutorials/) - OK
1414
- Programmers Guide - Link to architecture spec, etc.
1515
- Getting EDA tools, quartus, vivado
1616

@@ -49,12 +49,12 @@ and the intended outline is:
4949
- Tutorials
5050
- [linux on or1ksim](https://openrisc.io/tutorials/docs/linux-on-or1ksim.html) - OK
5151
- defconfig + busybox
52-
- Linux on QEMU *TODO*
52+
- [linux on QEMU](https://openrisc.io/tutorials/docs/linux-on-qemu.html) - OK
5353
- virt_defconfig + buildroot
54-
- Running linux on Litex SoC *TOD*
54+
- Running linux on Litex SoC *TODO*
5555
- SIM + litex_defconfig + buildroot
5656
- arty + litex_defconfig + buildroot
57-
- Running Linux on fusesoc SoC *TODP*
57+
- Running Linux on fusesoc SoC *TODO*
5858
- SIM + defconfig + busybox
5959
- de0_nano + defconfig + busybox
6060
- de0_nano-multicore + smp_defconfig + busybox

docs/linux-on-or1ksim.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ requires rebuilding the kernel.
109109
To start Linux on `or1ksim` we run `or1k-elf-sim` passing the kernel as an argument.
110110
This will:
111111

112-
# Initialize the OpenRISC simulator
113-
# Load the kernel image, including the embedded rootfs, into RAM memory
114-
# Reset the simulator CPU to PC 0x100 kicking off the kernel boot process
112+
1. Initialize the OpenRISC simulator
113+
2. Load the kernel image, including the embedded rootfs, into RAM memory
114+
3. Reset the simulator CPU to PC 0x100 kicking off the kernel boot process
115115

116116
The `or1ksim` starts a console on port `10084` which we can connect to to access
117117
the system.
@@ -141,6 +141,8 @@ To add your own programs to the rootfs you can use the [musl](https://musl.libc.
141141
toolchain to build executables as follows:
142142

143143
```
144+
curl -L -O https://openrisc.io/tutorials/sw/hello/hello.c
145+
144146
or1k-none-linux-musl-gcc hello.c -o busybox-small-rootfs-20250708/initramfs/hello
145147
```
146148

0 commit comments

Comments
 (0)