Skip to content

Commit 9b7423e

Browse files
authored
Merge pull request raspberrypi#64 from sched-ext/README
Update README, and improve build usability
2 parents 52911e1 + 3f4b885 commit 9b7423e

File tree

6 files changed

+254
-83
lines changed

6 files changed

+254
-83
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,12 @@ ifneq ($(wildcard $(resolve_btfids_O)),)
13411341
$(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(resolve_btfids_O) clean
13421342
endif
13431343

1344+
tools-clean-targets := sched_ext
1345+
PHONY += $(tools-clean-targets)
1346+
$(tools-clean-targets):
1347+
$(Q)$(MAKE) -sC tools $@_clean
1348+
tools_clean: $(tools-clean-targets)
1349+
13441350
# Clear a bunch of variables before executing the submake
13451351
ifeq ($(quiet),silent_)
13461352
tools_silent=s
@@ -1510,7 +1516,7 @@ PHONY += $(mrproper-dirs) mrproper
15101516
$(mrproper-dirs):
15111517
$(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)
15121518

1513-
mrproper: clean $(mrproper-dirs)
1519+
mrproper: clean $(mrproper-dirs) tools_clean
15141520
$(call cmd,rmfiles)
15151521
@find . $(RCS_FIND_IGNORE) \
15161522
\( -name '*.rmeta' \) \

tools/Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ help:
2929
@echo ' pci - PCI tools'
3030
@echo ' perf - Linux performance measurement and analysis tool'
3131
@echo ' selftests - various kernel selftests'
32+
@echo ' sched_ext - sched_ext example schedulers'
3233
@echo ' bootconfig - boot config tool'
3334
@echo ' spi - spi tools'
3435
@echo ' tmon - thermal monitoring and tuning tool'
@@ -92,6 +93,9 @@ perf: FORCE
9293
$(Q)mkdir -p $(PERF_O) .
9394
$(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir=
9495

96+
sched_ext: FORCE
97+
$(call descend,sched_ext)
98+
9599
selftests: FORCE
96100
$(call descend,testing/$@)
97101

@@ -185,6 +189,9 @@ perf_clean:
185189
$(Q)mkdir -p $(PERF_O) .
186190
$(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= clean
187191

192+
sched_ext_clean:
193+
$(call descend,sched_ext,clean)
194+
188195
selftests_clean:
189196
$(call descend,testing/$(@:_clean=),clean)
190197

@@ -214,6 +221,7 @@ clean: acpi_clean cgroup_clean counter_clean cpupower_clean hv_clean firewire_cl
214221
mm_clean bpf_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
215222
freefall_clean build_clean libbpf_clean libsubcmd_clean \
216223
gpio_clean objtool_clean leds_clean wmi_clean pci_clean firmware_clean debugging_clean \
217-
intel-speed-select_clean tracing_clean thermal_clean thermometer_clean thermal-engine_clean
224+
intel-speed-select_clean tracing_clean thermal_clean thermometer_clean thermal-engine_clean \
225+
sched_ext_clean
218226

219227
.PHONY: FORCE

tools/sched_ext/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ scx_userland
77
*.skel.h
88
*.subskel.h
99
/tools/
10+
build/

tools/sched_ext/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CONFIG_BPF=y
2+
CONFIG_SCHED_CLASS_EXT=y
3+
CONFIG_BPF_SYSCALL=y
4+
CONFIG_BPF_JIT=y
5+
CONFIG_DEBUG_INFO_BTF=y
6+
CONFIG_BPF_JIT_ALWAYS_ON=y
7+
CONFIG_BPF_JIT_DEFAULT_ON=y
8+
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
9+
CONFIG_PAHOLE_HAS_BTF_TAG=y

tools/sched_ext/Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ clean:
228228
rm -f *.o *.bpf.o *.skel.h *.subskel.h
229229
rm -f scx_simple scx_qmap scx_central scx_pair scx_flatcg scx_userland
230230

231+
fullclean: clean
232+
$(Q)$(MAKE) -sC ../../ clean
233+
231234
help:
232235
@echo 'Building targets:'
233236
@echo ' all - Compile all schedulers'
@@ -282,8 +285,12 @@ help:
282285
@echo 'Cleaning targets:'
283286
@echo ' clean - Remove all generated files, including intermediate'
284287
@echo ' rust files for rust schedulers.'
288+
@echo ''
289+
@echo ' fullclean - Remove all generated files, including intermediate'
290+
@echo ' rust files for rust schedulers, and also trigger a'
291+
@echo ' clean of the kernel at the root of the whole repository.'
285292

286-
.PHONY: all scx_rusty clean help
293+
.PHONY: all scx_rusty clean fullclean help
287294

288295
# delete failed targets
289296
.DELETE_ON_ERROR:

0 commit comments

Comments
 (0)