-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from EffectiveRange/dev
enable operation from external battery
- Loading branch information
Showing
16 changed files
with
2,943 additions
and
22 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -52,10 +52,10 @@ jobs: | |
uses: devcontainers/[email protected] | ||
with: | ||
subFolder: "${{github.workspace}}" | ||
configFile: .devcontainer/amd64-container/devcontainer.json | ||
configFile: .devcontainer/armhf-container/devcontainer.json | ||
push: never | ||
runCmd: | | ||
make -C "/workspaces/${{steps.extract.outputs.proj}}/" all | ||
"/workspaces/${{steps.extract.outputs.proj}}/build.sh" | ||
- | ||
name: Release | ||
uses: softprops/action-gh-release@v1 | ||
|
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
build/* | ||
mrhat-rx8130/boot/* | ||
mrhat-rx8130/boot/* | ||
mrhat-rx8130/lib/* | ||
mrhat-rx8130/usr/* | ||
tools/build/* |
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,53 @@ | ||
|
||
VERSION = $(shell grep Version: mrhat-rx8130/DEBIAN/control | cut -d' ' -f2) | ||
# TODO: build module for all kernel versions | ||
KVER ?= 6.1.21+ | ||
TARGET ?= $(error TARGET not specified for deploy ) | ||
|
||
all: build/mrhat-rx8130_$(VERSION)-1_armhf.deb | ||
@true | ||
|
||
build/mrhat-rx8130_$(VERSION)-1_armhf.deb : driver tools mrhat-rx8130/DEBIAN/* build/mrhat-rx8130.dtbo | ||
mkdir -p build | ||
mkdir -p mrhat-rx8130/boot/overlays/ | ||
cp build/mrhat-rx8130.dtbo mrhat-rx8130/boot/overlays/ | ||
dpkg-deb --root-owner-group --build mrhat-rx8130 build/mrhat-rx8130_$(VERSION)-1_armhf.deb | ||
|
||
mrhat-rx8130/lib/modules/$(KVER)/rtc-rx8130.ko: driver/*.c driver/Makefile | ||
mkdir -p build/$(KVER) | ||
mkdir -p mrhat-rx8130/lib/modules/$(KVER) | ||
rsync --delete -r ./driver/ /tmp/drv-rx8130ce | ||
schroot -c buildroot -u root -d /tmp/drv-rx8130ce -- make KVER=$(KVER) | ||
cp /tmp/drv-rx8130ce/rtc-rx8130.ko mrhat-rx8130/lib/modules/$(KVER)/rtc-rx8130.ko | ||
|
||
driver: mrhat-rx8130/lib/modules/$(KVER)/rtc-rx8130.ko | ||
@true | ||
|
||
clean: | ||
rm -rf mrhat-rx8130/boot/ mrhat-rx8130/lib/ mrhat-rx8130/usr build/ tools/build | ||
|
||
build/mrhat-rx8130.dts.pre: mrhat-rx8130.dts | ||
mkdir -p build/ | ||
cpp -nostdinc -undef -x assembler-with-cpp -I/var/chroot/buildroot/usr/src/linux-headers-$(KVER)/include -o build/mrhat-rx8130.dts.pre mrhat-rx8130.dts | ||
|
||
build/mrhat-rx8130.dtbo: build/mrhat-rx8130.dts.pre | ||
mkdir -p build/ | ||
dtc -I dts -O dtb -o build/mrhat-rx8130.dtbo build/mrhat-rx8130.dts.pre | ||
|
||
deploy: all | ||
rsync -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -avhz --progress build/mrhat-rx8130_$(VERSION)-1_armhf.deb $(TARGET):/tmp/ | ||
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $(TARGET) -- sudo dpkg -r mrhat-rx8130 | ||
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $(TARGET) -- sudo dpkg -i /tmp/mrhat-rx8130_$(VERSION)-1_armhf.deb | ||
|
||
quickdeploy: driver | ||
scp mrhat-rx8130/lib/modules/$(KVER)/rtc-rx8130.ko $(TARGET):/tmp/ | ||
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $(TARGET) -- sudo cp /tmp/rtc-rx8130.ko /lib/modules/$(KVER)/ | ||
|
||
tools: | ||
mkdir -p tools/build | ||
mkdir -p mrhat-rx8130/usr/local/bin | ||
xcmake -S tools -B tools/build | ||
cmake --build tools/build | ||
cmake --install tools/build --prefix mrhat-rx8130/usr/local/ | ||
|
||
.PHONY: clean all deploy quickdeploy driver tools |
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,9 @@ | ||
#!/bin/bash | ||
pushd $(dirname $0) | ||
LAST_KVER="" | ||
for kver in $(ls -1 /var/chroot/buildroot/lib/modules); | ||
do | ||
LAST_KVER=$kver | ||
make driver KVER=$kver | ||
done | ||
make all KVER=$LAST_KVER |
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,12 @@ | ||
obj-m += rtc-rx8130.o | ||
|
||
KVER ?= $(shell uname -r) | ||
PWD := $(CURDIR) | ||
|
||
CFLAGS_rtc-rx8130.o := -O2 -Wall -Werror | ||
|
||
all: | ||
make -C /lib/modules/$(KVER)/build M=$(PWD) modules | ||
|
||
clean: | ||
make -C /lib/modules/$(KVER)/build M=$(PWD) clean |
Oops, something went wrong.