mirror of
https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials.git
synced 2024-11-03 15:40:21 +00:00
Fix github actions tty error
This commit is contained in:
parent
cc9f7708c9
commit
83264efc19
@ -64,7 +64,8 @@ OBJCOPY_CMD = cargo objcopy \
|
||||
|
||||
CONTAINER_UTILS = rustembedded/osdev-utils
|
||||
|
||||
DOCKER_CMD = docker run -it --rm
|
||||
DOCKER_CMD_TEST = docker run -i --rm
|
||||
DOCKER_CMD_USER = $(DOCKER_CMD_TEST) -t
|
||||
DOCKER_ARG_CURDIR = -v $(shell pwd):/work -w /work
|
||||
DOCKER_ARG_TTY = --privileged -v /dev:/dev
|
||||
DOCKER_ARG_JTAG = -v $(shell pwd)/../X1_JTAG_boot:/jtag
|
||||
@ -98,7 +99,7 @@ test:
|
||||
@echo $(QEMU_MISSING_STRING)
|
||||
else
|
||||
qemu: all
|
||||
$(DOCKER_CMD) $(DOCKER_ARG_CURDIR) $(CONTAINER_UTILS) \
|
||||
$(DOCKER_CMD_USER) $(DOCKER_ARG_CURDIR) $(CONTAINER_UTILS) \
|
||||
$(DOCKER_EXEC_QEMU) $(QEMU_RELEASE_ARGS) \
|
||||
-kernel $(OUTPUT)
|
||||
|
||||
@ -107,7 +108,7 @@ define KERNEL_TEST_RUNNER
|
||||
|
||||
$(OBJCOPY_CMD) $$1 $$1.img
|
||||
TEST_BINARY=$$(echo $$1.img | sed -e 's/.*target/target/g')
|
||||
$(DOCKER_CMD) $(DOCKER_ARG_CURDIR) $(CONTAINER_UTILS) \
|
||||
$(DOCKER_CMD_TEST) $(DOCKER_ARG_CURDIR) $(CONTAINER_UTILS) \
|
||||
ruby tests/runner.rb $(DOCKER_EXEC_QEMU) $(QEMU_TEST_ARGS) -kernel $$TEST_BINARY
|
||||
endef
|
||||
|
||||
@ -120,23 +121,23 @@ test: $(SOURCES)
|
||||
endif
|
||||
|
||||
chainboot: all
|
||||
$(DOCKER_CMD) $(DOCKER_ARG_CURDIR) $(DOCKER_ARG_TTY) \
|
||||
$(DOCKER_CMD_USER) $(DOCKER_ARG_CURDIR) $(DOCKER_ARG_TTY) \
|
||||
$(CONTAINER_UTILS) $(DOCKER_EXEC_RASPBOOT) $(DOCKER_EXEC_RASPBOOT_DEV) \
|
||||
$(OUTPUT)
|
||||
|
||||
jtagboot:
|
||||
$(DOCKER_CMD) $(DOCKER_ARG_TTY) $(DOCKER_ARG_JTAG) $(CONTAINER_UTILS) \
|
||||
$(DOCKER_CMD_USER) $(DOCKER_ARG_TTY) $(DOCKER_ARG_JTAG) $(CONTAINER_UTILS) \
|
||||
$(DOCKER_EXEC_RASPBOOT) $(DOCKER_EXEC_RASPBOOT_DEV) \
|
||||
/jtag/$(JTAG_BOOT_IMAGE)
|
||||
|
||||
openocd:
|
||||
$(DOCKER_CMD) $(DOCKER_ARG_TTY) $(DOCKER_ARG_NET) $(CONTAINER_UTILS) \
|
||||
$(DOCKER_CMD_USER) $(DOCKER_ARG_TTY) $(DOCKER_ARG_NET) $(CONTAINER_UTILS) \
|
||||
openocd $(OPENOCD_ARG)
|
||||
|
||||
define gen_gdb
|
||||
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(XRUSTC_CMD) $1
|
||||
cp $(CARGO_OUTPUT) kernel_for_jtag
|
||||
$(DOCKER_CMD) $(DOCKER_ARG_CURDIR) $(DOCKER_ARG_NET) $(CONTAINER_UTILS) \
|
||||
$(DOCKER_CMD_USER) $(DOCKER_ARG_CURDIR) $(DOCKER_ARG_NET) $(CONTAINER_UTILS) \
|
||||
gdb-multiarch -q kernel_for_jtag
|
||||
endef
|
||||
|
||||
|
@ -346,7 +346,7 @@ define KERNEL_TEST_RUNNER
|
||||
|
||||
$(OBJCOPY_CMD) $$1 $$1.img
|
||||
TEST_BINARY=$$(echo $$1.img | sed -e 's/.*target/target/g')
|
||||
$(DOCKER_CMD) $(DOCKER_ARG_CURDIR) $(CONTAINER_UTILS) \
|
||||
$(DOCKER_CMD_TEST) $(DOCKER_ARG_CURDIR) $(CONTAINER_UTILS) \
|
||||
ruby tests/runner.rb $(DOCKER_EXEC_QEMU) $(QEMU_TEST_ARGS) -kernel $$TEST_BINARY
|
||||
endef
|
||||
|
||||
@ -869,7 +869,15 @@ diff -uNr 12_cpu_exceptions_part1/Makefile 13_integrated_testing/Makefile
|
||||
CARGO_OUTPUT = target/$(TARGET)/release/kernel
|
||||
|
||||
OBJCOPY_CMD = cargo objcopy \
|
||||
@@ -55,12 +70,12 @@
|
||||
@@ -49,18 +64,19 @@
|
||||
|
||||
CONTAINER_UTILS = rustembedded/osdev-utils
|
||||
|
||||
-DOCKER_CMD = docker run -it --rm
|
||||
+DOCKER_CMD_TEST = docker run -i --rm
|
||||
+DOCKER_CMD_USER = $(DOCKER_CMD_TEST) -t
|
||||
DOCKER_ARG_CURDIR = -v $(shell pwd):/work -w /work
|
||||
DOCKER_ARG_TTY = --privileged -v /dev:/dev
|
||||
DOCKER_ARG_JTAG = -v $(shell pwd)/../X1_JTAG_boot:/jtag
|
||||
DOCKER_ARG_NET = --network host
|
||||
|
||||
@ -884,7 +892,7 @@ diff -uNr 12_cpu_exceptions_part1/Makefile 13_integrated_testing/Makefile
|
||||
|
||||
all: clean $(OUTPUT)
|
||||
|
||||
@@ -73,15 +88,35 @@
|
||||
@@ -73,35 +89,55 @@
|
||||
|
||||
doc:
|
||||
cargo xdoc --target=$(TARGET) --features bsp_$(BSP) --document-private-items
|
||||
@ -900,8 +908,9 @@ diff -uNr 12_cpu_exceptions_part1/Makefile 13_integrated_testing/Makefile
|
||||
+ @echo $(QEMU_MISSING_STRING)
|
||||
else
|
||||
qemu: all
|
||||
$(DOCKER_CMD) $(DOCKER_ARG_CURDIR) $(CONTAINER_UTILS) \
|
||||
- $(DOCKER_CMD) $(DOCKER_ARG_CURDIR) $(CONTAINER_UTILS) \
|
||||
- $(DOCKER_EXEC_QEMU) $(OUTPUT)
|
||||
+ $(DOCKER_CMD_USER) $(DOCKER_ARG_CURDIR) $(CONTAINER_UTILS) \
|
||||
+ $(DOCKER_EXEC_QEMU) $(QEMU_RELEASE_ARGS) \
|
||||
+ -kernel $(OUTPUT)
|
||||
+
|
||||
@ -910,7 +919,7 @@ diff -uNr 12_cpu_exceptions_part1/Makefile 13_integrated_testing/Makefile
|
||||
+
|
||||
+ $(OBJCOPY_CMD) $$1 $$1.img
|
||||
+ TEST_BINARY=$$(echo $$1.img | sed -e 's/.*target/target/g')
|
||||
+ $(DOCKER_CMD) $(DOCKER_ARG_CURDIR) $(CONTAINER_UTILS) \
|
||||
+ $(DOCKER_CMD_TEST) $(DOCKER_ARG_CURDIR) $(CONTAINER_UTILS) \
|
||||
+ ruby tests/runner.rb $(DOCKER_EXEC_QEMU) $(QEMU_TEST_ARGS) -kernel $$TEST_BINARY
|
||||
+endef
|
||||
+
|
||||
@ -923,6 +932,30 @@ diff -uNr 12_cpu_exceptions_part1/Makefile 13_integrated_testing/Makefile
|
||||
endif
|
||||
|
||||
chainboot: all
|
||||
- $(DOCKER_CMD) $(DOCKER_ARG_CURDIR) $(DOCKER_ARG_TTY) \
|
||||
+ $(DOCKER_CMD_USER) $(DOCKER_ARG_CURDIR) $(DOCKER_ARG_TTY) \
|
||||
$(CONTAINER_UTILS) $(DOCKER_EXEC_RASPBOOT) $(DOCKER_EXEC_RASPBOOT_DEV) \
|
||||
$(OUTPUT)
|
||||
|
||||
jtagboot:
|
||||
- $(DOCKER_CMD) $(DOCKER_ARG_TTY) $(DOCKER_ARG_JTAG) $(CONTAINER_UTILS) \
|
||||
+ $(DOCKER_CMD_USER) $(DOCKER_ARG_TTY) $(DOCKER_ARG_JTAG) $(CONTAINER_UTILS) \
|
||||
$(DOCKER_EXEC_RASPBOOT) $(DOCKER_EXEC_RASPBOOT_DEV) \
|
||||
/jtag/$(JTAG_BOOT_IMAGE)
|
||||
|
||||
openocd:
|
||||
- $(DOCKER_CMD) $(DOCKER_ARG_TTY) $(DOCKER_ARG_NET) $(CONTAINER_UTILS) \
|
||||
+ $(DOCKER_CMD_USER) $(DOCKER_ARG_TTY) $(DOCKER_ARG_NET) $(CONTAINER_UTILS) \
|
||||
openocd $(OPENOCD_ARG)
|
||||
|
||||
define gen_gdb
|
||||
RUSTFLAGS="$(RUSTFLAGS_PEDANTIC)" $(XRUSTC_CMD) $1
|
||||
cp $(CARGO_OUTPUT) kernel_for_jtag
|
||||
- $(DOCKER_CMD) $(DOCKER_ARG_CURDIR) $(DOCKER_ARG_NET) $(CONTAINER_UTILS) \
|
||||
+ $(DOCKER_CMD_USER) $(DOCKER_ARG_CURDIR) $(DOCKER_ARG_NET) $(CONTAINER_UTILS) \
|
||||
gdb-multiarch -q kernel_for_jtag
|
||||
endef
|
||||
|
||||
|
||||
diff -uNr 12_cpu_exceptions_part1/patches/Cargo.toml 13_integrated_testing/patches/Cargo.toml
|
||||
--- 12_cpu_exceptions_part1/patches/Cargo.toml
|
||||
|
Loading…
Reference in New Issue
Block a user