Skip to content

Commit 00eb0f6

Browse files
committed
Rework main README.md
1 parent 3d93a3a commit 00eb0f6

File tree

1 file changed

+71
-19
lines changed

1 file changed

+71
-19
lines changed

README.md

+71-19
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ The main build artifact that can be built from the code in this
1111
repository is the kernel image, which contains the kernel proper as well
1212
as the user space loader. The kernel image conforms to the
1313
[Linux x86 boot protocol](https://www.kernel.org/doc/Documentation/x86/boot.rst),
14-
which means it can be loaded by a bootloader intended
15-
for the Linux kernel, such as GRUB.
14+
which means it can be loaded by a bootloader intended for the Linux
15+
kernel, such as GRUB.
1616

1717
During the boot process, the user space loader expects an initial RAM
1818
disk to have been loaded in memory by the bootloader. This would usually
@@ -27,19 +27,19 @@ that contains the kernel image and the initial RAM disk.
2727
Build Requirements
2828
------------------
2929

30-
To build the kernel image and test application, you will need a Linux
31-
machine with GNU make and a C compiler that can create 32-bit x86 ELF
32-
binaries. This software is known to build with GCC and clang.
30+
To build the kernel image and test application, you need a Linux machine
31+
with GNU make and a C compiler that can create 32-bit x86 ELF binaries.
32+
This software is known to build with GCC and clang.
3333

34-
You will also need the Netwide Assembler (NASM).
34+
You also need the Netwide Assembler (NASM).
3535

3636
If you wish to build the ISO image for use with QEMU, which is optional,
37-
you will need GRUB and GNU xorriso in addition to the above.
37+
you need GRUB and GNU xorriso in addition to the above.
3838

3939
Run Time Requirements
4040
---------------------
4141

42-
To boot the Jinue microkernel, you will need either:
42+
To run this software, you need either:
4343
* QEMU; or
4444
* A x86 PC on which you have sufficient privileges to configure the boot
4545
manager to load Jinue.
@@ -54,71 +54,122 @@ the `--recurse-submodules` option when you clone the repository.
5454
```
5555
git clone --recurse-submodules https://github.com/phaubertin/jinue.git
5656
```
57+
5758
Alternatively, if you already cloned the repository without passing this
58-
option, you can clone and initialize the submodules separately with the
59-
following command:
59+
option, you can initialize the submodules separately with the following
60+
command:
6061

6162
```
6263
git submodule update --init
6364
```
6465

6566
Then, configure the source code and its dependencies. You only need to
66-
do this oncen not each time you build.
67+
do this once, not each time you build.
68+
6769
```
6870
./configure
6971
```
7072

7173
To build the ISO image for use with QEMU, build the `qemu` target with
7274
make:
75+
7376
```
7477
make qemu
7578
```
79+
80+
This builds the kernel image and the test application, and then creates
81+
a bootable ISO image.
82+
7683
If you will not be using QEMU and only want to build the kernel image,
7784
this can be done with the default make target:
85+
7886
```
7987
make
8088
```
8189

90+
Similarly, the test application can be built separately with the
91+
`testapp` make target:
92+
93+
```
94+
make testapp
95+
```
96+
8297
How to Run in QEMU
8398
-------------------
8499
You can run the kernel and test application in QEMU using the `qemu-run`
85100
make target:
101+
86102
```
87103
make qemu-run
88104
```
105+
89106
Alternatively, if you don't want QEMU to show a window with the video
90107
output, or if you are on a machine without graphics capabilities, use
91108
the `qemu-run-no-display` target instead. The kernel logs to the serial
92109
port, which QEMU redirects to standard output.
110+
93111
```
94112
make qemu-run-no-display
95113
```
96114

115+
In either case, this generates a log file called `run-jinue.log` in
116+
`devel/qemu/` with the full kernel and test application output.
117+
118+
Finally, you can run the kernel and test application, and then run a
119+
script that performs checks on the log file by using the `qemu-check`
120+
make target:
121+
122+
```
123+
make qemu-check
124+
```
125+
97126
How to Install
98127
--------------
99128

100129
If you will not be using QEMU for testing, you can copy the kernel image
101130
to `/boot` by running the following:
131+
102132
```
103133
sudo make install
104134
```
105-
The file name and path of the installed kernel image file is
135+
136+
The full file path of the kernel image installed in this way is
106137
`/boot/jinue`.
107138

108139
Optionally, if you will not be providing your own initial RAM disk file,
109140
you can install the test application initial RAM disk to `/boot` as
110141
well.
142+
111143
```
112144
sudo make install-testapp
113145
```
114-
The file name and path of the installed RAM disk file is
146+
147+
The full file path of the installed RAM disk file is
115148
`/boot/jinue-testapp-initrd.tar.gz`.
116149

117150
Once this is done, you need to configure your boot loader/manager to
118-
load this kernel. Jinue uses the 16-bit Linux boot protocol, so you can
119-
configure your boot manager as if you were loading a Linux image with
120-
the 16-bit boot protocol
121-
([linux16 command](devel/virtualbox/grub.cfg#L29) if using GRUB).
151+
load the installed kernel. Jinue uses the (32-bit or 16-bit) Linux x86
152+
boot protocol, so you can configure your boot manager as if you were
153+
loading a Linux image. This is system dependent but, with GRUB, the
154+
configuration entry might look something like this:
155+
156+
```
157+
menuentry 'Jinue (32-bit boot protocol, test app)' {
158+
# Replace with the appropriate GRUB module for your filesystem.
159+
insmod ext2
160+
# Replace with the partition where you installed Jinue.
161+
set root='hd0,msdos7'
162+
set gfxpayload='text'
163+
echo 'Loading Jinue microkernel...'
164+
# See command line documentation for details on the command line options.
165+
linux /boot/jinue vga_enable=yes serial_enable=no DEBUG_DUMP_MEMORY_MAP=1 DEBUG_DUMP_SYSCALL_IMPLEMENTATION=1 DEBUG_DUMP_RAMDISK=1 RUN_TEST_IPC=1
166+
echo 'Loading test application initial RAM disk...'
167+
initrd /boot/jinue-testapp-initrd.tar.gz
168+
}
169+
```
170+
171+
For detail on the command line options, see the [command line
172+
documentation](doc/cmdline.md).
122173

123174
For detail on the Linux boot protocol, see
124175
[Documentation/x86/boot.rst](https://www.kernel.org/doc/Documentation/x86/boot.rst)
@@ -127,5 +178,6 @@ in the Linux source tree.
127178
Documentation
128179
-------------
129180

130-
There is some documentation in the [doc/ directory](doc/README.md). It
131-
is still very much a work in progress.
181+
There is some documentation in the `doc/` directory]. It is still a work
182+
in progress and some of it is not up to date. The [documentation file
183+
README](doc/README.md) links to the parts that are up to date.

0 commit comments

Comments
 (0)