Skip to content

Commit 06f5a8a

Browse files
committed
docker: improve description
1 parent c82f3cc commit 06f5a8a

File tree

2 files changed

+35
-13
lines changed

2 files changed

+35
-13
lines changed

README.adoc

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
:toclevels: 6
1010
:toc-title:
1111

12-
Dozens of minimal operating systems to learn x86 system programming. Tested on Ubuntu 17.10 host in QEMU 2.10 and <<test-hardware,real hardware>>. Userland cheat at: https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly ARM baremetal setup at: https://github.com/cirosantilli/linux-kernel-module-cheat#baremetal-setup
12+
Dozens of minimal operating systems to learn x86 system programming. Tested on Ubuntu 18.04 host in QEMU 2.11 and <<test-hardware,real hardware>>. Userland cheat at: https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly ARM baremetal setup at: https://github.com/cirosantilli/linux-kernel-module-cheat#baremetal-setup
1313

1414
:logo: logo.jpg
1515
link:{logo}[image:{logo}[]]
@@ -125,27 +125,41 @@ TODO: boot sectors that load STAGE2 are not working with the big image chainload
125125

126126
=== Getting started with Docker
127127

128-
If you don't have an Ubuntu box, this is an easy alternative:
128+
If you don't have an Ubuntu box, this is an easy alternative, for the first run:
129129

130130
....
131-
sudo docker run -it --net=host ubuntu:14.04 bash
131+
sudo docker run --interactive --tty --name xbme --net=host ubuntu:18.04 bash
132+
....
133+
134+
and the following runs:
135+
136+
....
137+
sudo docker start xbme
138+
sudo docker exec --interactive --tty xbme bash
139+
sudo docker stop xbme
140+
....
141+
142+
and to nuke the container later on:
143+
144+
....
145+
# sudo docker rm xbme
132146
....
133147

134148
Then proceed normally in the guest: install packages, and build:
135149

136150
....
137-
apt-get update
138-
apt-get install git
139-
git clone https://github.com/cirosantilli/x86-bare-metal-examples
140-
cd x86-bare-metal-examples
141-
./configure
151+
apt-get update && \
152+
apt-get install -y git && \
153+
git clone https://github.com/cirosantilli/x86-bare-metal-examples && \
154+
cd x86-bare-metal-examples && \
155+
./configure -y && \
142156
make
143157
....
144158

145159
To overcome the lack of GUI, we can use QEMU's VNC implementation instead of the default SDL, which is visible on the host due to `--net=host`:
146160

147161
....
148-
qemu-system-i386 -hda main.img -vnc :0
162+
qemu-system-i386 -hda bios_hello_world.img -vnc :0
149163
....
150164

151165
and then on host:

configure

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
#!/usr/bin/env bash
2-
#
2+
33
# grub-pc-bin: without it, grub-mkrescue just fails, and you have no idea why!
44
# We love you, GRUB.
55
# https://superuser.com/questions/603051/grub-mkrescue-not-producing-bootable-image/973021#973021
66
# https://github.com/cirosantilli/x86-bare-metal-examples/issues/5#issuecomment-377948357
77
# https://wiki.osdev.org/Bare_Bones
8-
#
9-
sudo apt-get install \
8+
9+
if [ $# -eq 1 ]; then
10+
sudo=
11+
y=-y
12+
else
13+
sudo=sudo
14+
y=
15+
fi
16+
$sudo apt-get install $y \
1017
bochs \
1118
bochs-sdl \
1219
build-essential \
20+
gcc \
1321
gcc-multilib \
1422
gdb \
1523
gnu-efi \
16-
grub \
1724
grub-pc-bin \
25+
make \
1826
nasm \
1927
qemu \
2028
xorriso\

0 commit comments

Comments
 (0)