diff options
-rw-r--r-- | 2/.gitignore | 2 | ||||
-rw-r--r-- | 2/Containerfile | 13 | ||||
-rw-r--r-- | 2/makefile | 33 | ||||
-rw-r--r-- | 2/module/Makefile | 12 | ||||
l--------- | 2/module/config.h | 1 | ||||
l--------- | 2/module/fopdrv.c | 1 | ||||
l--------- | 2/module/fopdrv.h | 1 | ||||
l--------- | 2/module/main.c | 1 |
8 files changed, 63 insertions, 1 deletions
diff --git a/2/.gitignore b/2/.gitignore index c00df13..5b74d26 100644 --- a/2/.gitignore +++ b/2/.gitignore @@ -1 +1,3 @@ *.deb +*.tar.xz +headers diff --git a/2/Containerfile b/2/Containerfile new file mode 100644 index 0000000..cc368d8 --- /dev/null +++ b/2/Containerfile @@ -0,0 +1,13 @@ +from docker.io/library/debian:sid + +run apt-get update + +# packages (in separate steps to optimize caching) +run apt-get install -y gcc-arm-linux-gnueabi +run apt-get install -y gcc +run apt-get install -y make +run apt-get install -y git + +# container directory on which the working directory on host is mounted +workdir /workdir + @@ -1,5 +1,36 @@ -DEB_URL = https://repos.rcn-ee.com/debian/pool/main/l/linux-upstream/linux-headers-6.1.69-ti-rt-r22_1sid_armhf.deb +# see ./rice.sh +RELEASE = 6.6.15-ti-rt-arm32-r1 +DEB_URL = https://repos.rcn-ee.com/debian/pool/main/l/linux-upstream/linux-headers-$(RELEASE)_1sid_armhf.deb + +.PHONY: FORCE kernel-headers.deb: curl -sLo- $(DEB_URL) > $@ +data.tar.xz: kernel-headers.deb + ar x $< $@ + +headers: data.tar.xz + mkdir -p $@ + tar xf $< -C $@ --strip-components 4 ./usr/src/linux-headers-$(RELEASE) + +CTR := podman +# CTR := sudo podman # rootless not set up or unsupported +CTR_IMG_TAG := avans-drvo + +CTRIZE := $(CTR) run +CTRIZE += --rm +CTRIZE += --tty +CTRIZE += --volume /tmp:/tmp:rw +CTRIZE += --volume .:/workdir:rw +# CTRIZE += --env-file ./env +CTRIZE += --env MAKE* +CTRIZE += $(CTR_IMG_TAG) +export + +container: FORCE + $(CTR) build --tag $(CTR_IMG_TAG) . + +build_test: FORCE + $(CTRIZE) $(MAKE) -C module + diff --git a/2/module/Makefile b/2/module/Makefile new file mode 100644 index 0000000..01b2177 --- /dev/null +++ b/2/module/Makefile @@ -0,0 +1,12 @@ +RELEASE = 6.6.15-ti-rt-arm32-r1 +KERNEL := ../headers/ +ARCH := arm +CROSS_COMPILE := arm-linux-gnueabi- + +obj-m += lork.o +lork-y += main.o +lork-y += fopdrv.o + +all: + $(MAKE) -C $(KERNEL) M=$(PWD) modules + diff --git a/2/module/config.h b/2/module/config.h new file mode 120000 index 0000000..bad07c3 --- /dev/null +++ b/2/module/config.h @@ -0,0 +1 @@ +../../1/config.h
\ No newline at end of file diff --git a/2/module/fopdrv.c b/2/module/fopdrv.c new file mode 120000 index 0000000..cbe1e0f --- /dev/null +++ b/2/module/fopdrv.c @@ -0,0 +1 @@ +../../1/fopdrv.c
\ No newline at end of file diff --git a/2/module/fopdrv.h b/2/module/fopdrv.h new file mode 120000 index 0000000..f9b9e9f --- /dev/null +++ b/2/module/fopdrv.h @@ -0,0 +1 @@ +../../1/fopdrv.h
\ No newline at end of file diff --git a/2/module/main.c b/2/module/main.c new file mode 120000 index 0000000..6180bb4 --- /dev/null +++ b/2/module/main.c @@ -0,0 +1 @@ +../../1/main.c
\ No newline at end of file |