Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ec84213

Browse files
Improve macOS support
macOS support is still not great, but this patch at least fixes some import Makefile subtargets.
1 parent 2e72a84 commit ec84213

File tree

36 files changed

+185
-98
lines changed

36 files changed

+185
-98
lines changed

‎.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7
1+
3.0.2

‎01_wait_forever/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
##
33
## Copyright (c) 2018-2022 Andre Richter <andre.o.richter@gmail.com>
44

5-
include ../common/format.mk
65
include ../common/docker.mk
6+
include ../common/format.mk
7+
include ../common/operating_system.mk
78

89
##--------------------------------------------------------------------------------------------------
910
## Optional, user-provided configuration values
@@ -130,7 +131,7 @@ $(KERNEL_BIN): $(KERNEL_ELF)
130131
$(call color_progress_prefix, "Name")
131132
@echo $(KERNEL_BIN)
132133
$(call color_progress_prefix, "Size")
133-
@printf '%s KiB\n'`du -k $(KERNEL_BIN)| cut -f1`
134+
$(call disk_usage_KiB, $(KERNEL_BIN))
134135

135136
##------------------------------------------------------------------------------
136137
## Generate the documentation

‎02_runtime_init/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
##
33
## Copyright (c) 2018-2022 Andre Richter <andre.o.richter@gmail.com>
44

5-
include ../common/format.mk
65
include ../common/docker.mk
6+
include ../common/format.mk
7+
include ../common/operating_system.mk
78

89
##--------------------------------------------------------------------------------------------------
910
## Optional, user-provided configuration values
@@ -130,7 +131,7 @@ $(KERNEL_BIN): $(KERNEL_ELF)
130131
$(call color_progress_prefix, "Name")
131132
@echo $(KERNEL_BIN)
132133
$(call color_progress_prefix, "Size")
133-
@printf '%s KiB\n'`du -k $(KERNEL_BIN)| cut -f1`
134+
$(call disk_usage_KiB, $(KERNEL_BIN))
134135

135136
##------------------------------------------------------------------------------
136137
## Generate the documentation

‎02_runtime_init/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ diff -uNr 01_wait_forever/Cargo.toml 02_runtime_init/Cargo.toml
5252
diff -uNr 01_wait_forever/Makefile 02_runtime_init/Makefile
5353
--- 01_wait_forever/Makefile
5454
+++ 02_runtime_init/Makefile
55-
@@ -180,6 +180,7 @@
55+
@@ -181,6 +181,7 @@
5656
$(call color_header, "Launching objdump")
5757
@$(DOCKER_TOOLS) $(OBJDUMP_BINARY) --disassemble --demangle \
5858
--section .text \

‎03_hacky_hello_world/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
##
33
## Copyright (c) 2018-2022 Andre Richter <andre.o.richter@gmail.com>
44

5-
include ../common/format.mk
65
include ../common/docker.mk
6+
include ../common/format.mk
7+
include ../common/operating_system.mk
78

89
##--------------------------------------------------------------------------------------------------
910
## Optional, user-provided configuration values
@@ -133,7 +134,7 @@ $(KERNEL_BIN): $(KERNEL_ELF)
133134
$(call color_progress_prefix, "Name")
134135
@echo $(KERNEL_BIN)
135136
$(call color_progress_prefix, "Size")
136-
@printf '%s KiB\n'`du -k $(KERNEL_BIN)| cut -f1`
137+
$(call disk_usage_KiB, $(KERNEL_BIN))
137138

138139
##------------------------------------------------------------------------------
139140
## Generate the documentation

‎03_hacky_hello_world/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ diff -uNr 02_runtime_init/Cargo.toml 03_hacky_hello_world/Cargo.toml
5353
diff -uNr 02_runtime_init/Makefile 03_hacky_hello_world/Makefile
5454
--- 02_runtime_init/Makefile
5555
+++ 03_hacky_hello_world/Makefile
56-
@@ -24,7 +24,7 @@
56+
@@ -25,7 +25,7 @@
5757
KERNEL_BIN = kernel8.img
5858
QEMU_BINARY = qemu-system-aarch64
5959
QEMU_MACHINE_TYPE = raspi3
@@ -62,7 +62,7 @@ diff -uNr 02_runtime_init/Makefile 03_hacky_hello_world/Makefile
6262
OBJDUMP_BINARY = aarch64-none-elf-objdump
6363
NM_BINARY = aarch64-none-elf-nm
6464
READELF_BINARY = aarch64-none-elf-readelf
65-
@@ -35,7 +35,7 @@
65+
@@ -36,7 +36,7 @@
6666
KERNEL_BIN = kernel8.img
6767
QEMU_BINARY = qemu-system-aarch64
6868
QEMU_MACHINE_TYPE =
@@ -71,7 +71,7 @@ diff -uNr 02_runtime_init/Makefile 03_hacky_hello_world/Makefile
7171
OBJDUMP_BINARY = aarch64-none-elf-objdump
7272
NM_BINARY = aarch64-none-elf-nm
7373
READELF_BINARY = aarch64-none-elf-readelf
74-
@@ -85,17 +85,20 @@
74+
@@ -86,17 +86,20 @@
7575
--strip-all \
7676
-O binary
7777

@@ -95,7 +95,7 @@ diff -uNr 02_runtime_init/Makefile 03_hacky_hello_world/Makefile
9595

9696

9797

98-
@@ -190,3 +193,27 @@
98+
@@ -191,3 +194,27 @@
9999
$(call color_header, "Launching nm")
100100
@$(DOCKER_TOOLS) $(NM_BINARY) --demangle --print-size $(KERNEL_ELF) | sort | rustfilt
101101

‎04_safe_globals/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
##
33
## Copyright (c) 2018-2022 Andre Richter <andre.o.richter@gmail.com>
44

5-
include ../common/format.mk
65
include ../common/docker.mk
6+
include ../common/format.mk
7+
include ../common/operating_system.mk
78

89
##--------------------------------------------------------------------------------------------------
910
## Optional, user-provided configuration values
@@ -133,7 +134,7 @@ $(KERNEL_BIN): $(KERNEL_ELF)
133134
$(call color_progress_prefix, "Name")
134135
@echo $(KERNEL_BIN)
135136
$(call color_progress_prefix, "Size")
136-
@printf '%s KiB\n'`du -k $(KERNEL_BIN)| cut -f1`
137+
$(call disk_usage_KiB, $(KERNEL_BIN))
137138

138139
##------------------------------------------------------------------------------
139140
## Generate the documentation

‎05_drivers_gpio_uart/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
##
33
## Copyright (c) 2018-2022 Andre Richter <andre.o.richter@gmail.com>
44

5-
include ../common/format.mk
65
include ../common/docker.mk
6+
include ../common/format.mk
7+
include ../common/operating_system.mk
78

89
##--------------------------------------------------------------------------------------------------
910
## Optional, user-provided configuration values
@@ -145,7 +146,7 @@ $(KERNEL_BIN): $(KERNEL_ELF)
145146
$(call color_progress_prefix, "Name")
146147
@echo $(KERNEL_BIN)
147148
$(call color_progress_prefix, "Size")
148-
@printf '%s KiB\n'`du -k $(KERNEL_BIN)| cut -f1`
149+
$(call disk_usage_KiB, $(KERNEL_BIN))
149150

150151
##------------------------------------------------------------------------------
151152
## Generate the documentation

‎05_drivers_gpio_uart/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ diff -uNr 04_safe_globals/Cargo.toml 05_drivers_gpio_uart/Cargo.toml
186186
diff -uNr 04_safe_globals/Makefile 05_drivers_gpio_uart/Makefile
187187
--- 04_safe_globals/Makefile
188188
+++ 05_drivers_gpio_uart/Makefile
189-
@@ -12,6 +12,9 @@
189+
@@ -13,6 +13,9 @@
190190
# Default to the RPi3.
191191
BSP ?= rpi3
192192

@@ -196,15 +196,15 @@ diff -uNr 04_safe_globals/Makefile 05_drivers_gpio_uart/Makefile
196196

197197

198198
##--------------------------------------------------------------------------------------------------
199-
@@ -87,6 +90,7 @@
199+
@@ -88,6 +91,7 @@
200200

201201
EXEC_QEMU = $(QEMU_BINARY) -M $(QEMU_MACHINE_TYPE)
202202
EXEC_TEST_DISPATCH = ruby ../common/tests/dispatch.rb
203203
+EXEC_MINITERM = ruby ../common/serial/miniterm.rb
204204

205205
##------------------------------------------------------------------------------
206206
## Dockerization
207-
@@ -94,18 +98,26 @@
207+
@@ -95,18 +99,26 @@
208208
DOCKER_CMD = docker run -t --rm -v $(shell pwd):/work/tutorial -w /work/tutorial
209209
DOCKER_CMD_INTERACT = $(DOCKER_CMD) -i
210210
DOCKER_ARG_DIR_COMMON = -v $(shell pwd)/../common:/work/common
@@ -232,7 +232,7 @@ diff -uNr 04_safe_globals/Makefile 05_drivers_gpio_uart/Makefile
232232

233233
all: $(KERNEL_BIN)
234234

235-
@@ -155,9 +167,16 @@
235+
@@ -156,9 +168,16 @@
236236
qemu: $(KERNEL_BIN)
237237
$(call color_header, "Launching QEMU")
238238
@$(DOCKER_QEMU) $(EXEC_QEMU) $(QEMU_RELEASE_ARGS) -kernel $(KERNEL_BIN)

‎06_uart_chainloader/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
##
33
## Copyright (c) 2018-2022 Andre Richter <andre.o.richter@gmail.com>
44

5-
include ../common/format.mk
65
include ../common/docker.mk
6+
include ../common/format.mk
7+
include ../common/operating_system.mk
78

89
##--------------------------------------------------------------------------------------------------
910
## Optional, user-provided configuration values
@@ -147,7 +148,7 @@ $(KERNEL_BIN): $(KERNEL_ELF)
147148
$(call color_progress_prefix, "Name")
148149
@echo $(KERNEL_BIN)
149150
$(call color_progress_prefix, "Size")
150-
@printf '%s KiB\n'`du -k $(KERNEL_BIN)| cut -f1`
151+
$(call disk_usage_KiB, $(KERNEL_BIN))
151152

152153
##------------------------------------------------------------------------------
153154
## Generate the documentation

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /