Skip to content

Commit 9af66e6

Browse files
committed
local build instructions
1 parent 7f76141 commit 9af66e6

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y \
1212
iproute2 \
1313
net-tools \
1414
procps \
15+
mtools dosfstools \
1516
&& rm -rf /var/lib/apt/lists/*
1617

1718
WORKDIR /workspace

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
| **system** | multitasking | ~ | |
2222

2323
## building
24-
24+
### locally
25+
```bash
26+
apt install build-essential nasm qemu-system-x86 gdb clang-format tcpdump dnsmasq bridge-utils iproute2 net-tools procps mtools dosfstools
27+
```
28+
### docker
2529
```bash
2630
# build the docker container
2731
docker build -t os-dev .

apps/forth.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
#define vm_in() vm->io.stdin()
1818

1919
#define vm_info(...) \
20-
{ vm->io.stderr(__VA_ARGS__); }
20+
{ \
21+
vm->io.stderr(__VA_ARGS__); \
22+
}
2123

2224
void push(forth_vm_t *vm, int value) {
2325
if (sp < FVM_STACK_SIZE - 1)

disk/make_disk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ SOURCE="root"
55
SIZE_MB=10
66

77
if ! command -v mcopy >/dev/null 2>&1 || ! command -v mkfs.vfat >/dev/null 2>&1; then
8-
echo "missing required tools: mtools dosfstools"
8+
echo "missing required tools: mkfs.vfat or mcopy they should be in mtools dosfstools"
99
exit 1
1010
fi
1111

libc/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
#include <stddef.h>
44
#include <stdint.h>
55

6-
#define low_16(address) (uint16_t)((address)&0xFFFF)
6+
#define low_16(address) (uint16_t)((address) & 0xFFFF)
77
#define high_16(address) (uint16_t)(((address) >> 16) & 0xFFFF)

net/network.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ typedef struct ethernet_frame {
1111
uint8_t src_mac_addr[6];
1212
uint16_t type;
1313
uint8_t data[];
14-
} __attribute__((packed))
15-
ethernet_frame_t; // just give this down to evey handle_fn
14+
} __attribute__((
15+
packed)) ethernet_frame_t; // just give this down to evey handle_fn
1616

1717
int ethernet_send_packet(uint8_t *dst_mac_addr, uint8_t *data, int len,
1818
uint16_t protocol);

0 commit comments

Comments
 (0)