Merge pull request 'gpio-keyboard-driver: Add driver' (#1) from feature/add-gpio-driver into main
Reviewed-on: http://git.home.arpa/arcade/bsp/pulls/1
This commit was merged in pull request #1.
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
menu "Arcade Machine Customizations"
|
||||||
|
|
||||||
|
source "$BR2_EXTERNAL_ARCADE_PATH/package/gpio-keyboard-driver/Config.in"
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|||||||
8
board/arcade.dts
Normal file
8
board/arcade.dts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#include "broadcom/bcm2711-rpi-4-b.dts"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
gpio-keyboard {
|
||||||
|
compatible = "arcade,gpio-keyboard";
|
||||||
|
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
4
board/skeleton-device-table.txt
Normal file
4
board/skeleton-device-table.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# <name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
|
||||||
|
/etc d 755 0 0 - - - - -
|
||||||
|
/etc/init.d d 755 0 0 - - - - -
|
||||||
|
/etc/init.d/S20driver-setup f 755 0 0 - - - - -
|
||||||
22
board/skeleton/etc/init.d/S20driver-setup
Normal file
22
board/skeleton/etc/init.d/S20driver-setup
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
start() {
|
||||||
|
modprobe gpio_keyboard_driver
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
rmmod gpio_keyboard_driver
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -6,7 +6,9 @@ BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
|
|||||||
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
|
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
|
||||||
BR2_GLOBAL_PATCH_DIR="board/raspberrypi/patches"
|
BR2_GLOBAL_PATCH_DIR="board/raspberrypi/patches"
|
||||||
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
|
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
|
||||||
|
BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt $(BR2_EXTERNAL_ARCADE_PATH)/board/skeleton-device-table.txt"
|
||||||
BR2_SYSTEM_DHCP="eth0"
|
BR2_SYSTEM_DHCP="eth0"
|
||||||
|
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_ARCADE_PATH)/board/skeleton/"
|
||||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4-64/post-build.sh"
|
BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4-64/post-build.sh"
|
||||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4-64/post-image.sh"
|
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4-64/post-image.sh"
|
||||||
BR2_LINUX_KERNEL=y
|
BR2_LINUX_KERNEL=y
|
||||||
@@ -14,7 +16,7 @@ BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
|||||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,ac69f097e1fba94502cbd36278db204120a37943)/linux-ac69f097e1fba94502cbd36278db204120a37943.tar.gz"
|
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,ac69f097e1fba94502cbd36278db204120a37943)/linux-ac69f097e1fba94502cbd36278db204120a37943.tar.gz"
|
||||||
BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
|
BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
|
||||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b broadcom/bcm2711-rpi-400 broadcom/bcm2711-rpi-cm4 broadcom/bcm2711-rpi-cm4s"
|
BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_ARCADE_PATH)/board/arcade.dts"
|
||||||
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
|
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
|
||||||
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
|
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
|
||||||
BR2_PACKAGE_XZ=y
|
BR2_PACKAGE_XZ=y
|
||||||
@@ -31,3 +33,4 @@ BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
|||||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
BR2_PACKAGE_HOST_GENIMAGE=y
|
||||||
BR2_PACKAGE_HOST_KMOD_XZ=y
|
BR2_PACKAGE_HOST_KMOD_XZ=y
|
||||||
BR2_PACKAGE_HOST_MTOOLS=y
|
BR2_PACKAGE_HOST_MTOOLS=y
|
||||||
|
BR2_PACKAGE_GPIO_KEYBOARD_DRIVER=y
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
name: arcade
|
name: ARCADE
|
||||||
desc: Project for building the operating system for an arcade machine
|
desc: Project for building the operating system for an arcade machine
|
||||||
url: https://github.com/nicholasmello/arcade
|
url: https://github.com/nicholasmello/arcade
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
$(info Including custom arcade packages)
|
||||||
|
include $(BR2_EXTERNAL_ARCADE_PATH)/package/*/*.mk
|
||||||
|
|||||||
9
package/gpio-keyboard-driver/Config.in
Normal file
9
package/gpio-keyboard-driver/Config.in
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
comment "gpio-keyboard-driver needs a Linux kernel to be built"
|
||||||
|
depends on !BR2_LINUX_KERNEL
|
||||||
|
|
||||||
|
config BR2_PACKAGE_GPIO_KEYBOARD_DRIVER
|
||||||
|
bool "gpio-keyboard-driver"
|
||||||
|
depends on BR2_LINUX_KERNEL
|
||||||
|
help
|
||||||
|
Driver for converting GPIO pins to keyboard actions with run time
|
||||||
|
configuration
|
||||||
12
package/gpio-keyboard-driver/gpio-keyboard-driver.mk
Normal file
12
package/gpio-keyboard-driver/gpio-keyboard-driver.mk
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# gpio-keyboard-driver
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
GPIO_KEYBOARD_DRIVER_VERSION = 7e57df0d3b39fb64fb278f433292a378e1fd0515
|
||||||
|
GPIO_KEYBOARD_DRIVER_SITE = gitea@ssh.git.home.arpa:arcade/gpio-keyboard-driver.git
|
||||||
|
GPIO_KEYBOARD_DRIVER_SITE_METHOD = git
|
||||||
|
|
||||||
|
$(eval $(kernel-module))
|
||||||
|
$(eval $(generic-package))
|
||||||
Reference in New Issue
Block a user