forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from alexandrasandulescu/2-uart
Assignment setup for 2-uart
- Loading branch information
Showing
7 changed files
with
722 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CFLAGS = -Wall -g -static -m32 | ||
|
||
.PHONY: all run clean | ||
|
||
all: test solution.ko | ||
|
||
test: _test/test.o | ||
$(CC) $(CFLAGS) -o $@ $^ | ||
|
||
solution.ko: _test/solution.ko | ||
ln -s $< $@ | ||
|
||
clean: | ||
-rm -f *~ test _test/test.o solution.ko |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
= UART16550 TEST SUITE == | ||
|
||
Test suite for UART16550 | ||
|
||
== FILES == | ||
|
||
README | ||
* this file | ||
|
||
Makefile.checker | ||
* Makefile for automating the build process | ||
|
||
_checker | ||
* script to run all tests defined in _test/test.c | ||
|
||
_test/test.c | ||
* test suite for UART16550 | ||
|
||
_test/solution.ko | ||
* kernel module implementing UART16550, | ||
used to transmit/receive data to/from your kernel module | ||
|
||
== BUILDING == | ||
|
||
Use the Makefile to properly build the test executable: | ||
|
||
make -f Makefile.checker | ||
|
||
== RUNNING == | ||
|
||
Copy your uart16550.ko module and _checker, test and solution.ko | ||
to fsimg/root directory on your QEMU/KVM virtual machine. | ||
|
||
In order to run the test suite you can use the _checker script. | ||
|
||
The _checker script runs all tests and computes assignment grade: | ||
|
||
./_checker | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
insmod uart16550.ko; cat /proc/modules > /dev/kmsg; rmmod uart16550 | ||
./test |
Oops, something went wrong.