From 69008eeebe92aaf078860980aefc0f77d1577bff Mon Sep 17 00:00:00 2001 From: Fabio Belavenuto Date: Wed, 6 Jul 2022 17:33:39 -0300 Subject: [PATCH] Adding buildroot external tree Adding r8125 and r8168 driver for loader --- .github/workflows/main.yml | 4 ++-- VERSION | 2 +- external/Config.in | 2 ++ external/external.desc | 2 ++ external/external.mk | 1 + external/r8125/Config.in | 10 ++++++++++ external/r8125/r8125.hash | 2 ++ external/r8125/r8125.mk | 13 +++++++++++++ external/r8168/Config.in | 10 ++++++++++ external/r8168/r8168.hash | 2 ++ external/r8168/r8168.mk | 12 ++++++++++++ .../board/arpl/overlayfs/opt/arpl/include/consts.sh | 2 +- files/configs/arpl_defconfig | 2 ++ img-gen.sh | 3 ++- 14 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 external/Config.in create mode 100644 external/external.desc create mode 100644 external/external.mk create mode 100644 external/r8125/Config.in create mode 100644 external/r8125/r8125.hash create mode 100644 external/r8125/r8125.mk create mode 100644 external/r8168/Config.in create mode 100644 external/r8168/r8168.hash create mode 100644 external/r8168/r8168.mk diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d979639d..d8521a9d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,7 +48,7 @@ jobs: echo "Generating default config" make arpl_defconfig echo "First make" - make + make BR2_EXTERNAL=../external # Build incremental from cache - name: Build image @@ -90,7 +90,7 @@ jobs: make arpl_defconfig echo "Version: ${VERSION}" echo "Building..." - make + make BR2_EXTERNAL=../external cd - # Zip image diff --git a/VERSION b/VERSION index 19400993..28fe640f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1-alpha5 +0.1-alpha6 diff --git a/external/Config.in b/external/Config.in new file mode 100644 index 00000000..d88505af --- /dev/null +++ b/external/Config.in @@ -0,0 +1,2 @@ +source "$BR2_EXTERNAL_ARPL_PATH/r8125/Config.in" +source "$BR2_EXTERNAL_ARPL_PATH/r8168/Config.in" diff --git a/external/external.desc b/external/external.desc new file mode 100644 index 00000000..9ba7cb0e --- /dev/null +++ b/external/external.desc @@ -0,0 +1,2 @@ +name: ARPL +desc: ARPL external packages diff --git a/external/external.mk b/external/external.mk new file mode 100644 index 00000000..c9315040 --- /dev/null +++ b/external/external.mk @@ -0,0 +1 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_ARPL_PATH)/*/*.mk)) diff --git a/external/r8125/Config.in b/external/r8125/Config.in new file mode 100644 index 00000000..cb86c537 --- /dev/null +++ b/external/r8125/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_R8125 + bool "r8125" + depends on BR2_LINUX_KERNEL + help + A standalone driver for the RTL8125 Ethernet adapter. + + https://github.com/fbelavenuto/r8125 + +comment "r8125 needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL diff --git a/external/r8125/r8125.hash b/external/r8125/r8125.hash new file mode 100644 index 00000000..9e5d0a02 --- /dev/null +++ b/external/r8125/r8125.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 fe2420e69ae653e989e8ae754d4e3b5740d62b6e19911d88553106aaeaac97b4 r8125-99cd3bc868e4ba82a473d8efaedad04fedb0c0f7.tar.gz diff --git a/external/r8125/r8125.mk b/external/r8125/r8125.mk new file mode 100644 index 00000000..2b588442 --- /dev/null +++ b/external/r8125/r8125.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# r8125 +# +################################################################################ + +R8125_VERSION = 99cd3bc868e4ba82a473d8efaedad04fedb0c0f7 +R8125_SITE = $(call github,fbelavenuto,r8125,$(R8125_VERSION)) +R8125_LICENSE = GPL-2.0 + +$(eval $(kernel-module)) +$(eval $(generic-package)) + diff --git a/external/r8168/Config.in b/external/r8168/Config.in new file mode 100644 index 00000000..a3f48e7d --- /dev/null +++ b/external/r8168/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_R8168 + bool "r8168" + depends on BR2_LINUX_KERNEL + help + A standalone driver for the RTL8168 Ethernet adapter. + + https://github.com/fbelavenuto/r8168 + +comment "r8168 needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL diff --git a/external/r8168/r8168.hash b/external/r8168/r8168.hash new file mode 100644 index 00000000..403c550f --- /dev/null +++ b/external/r8168/r8168.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 36c4ba7779259c0eee8d496ba600e5935dc8ce7b978e1dc023e1ee7de713d97e r8168-52c98bd764e6dd22ff17876afa655e9e11237cc9.tar.gz diff --git a/external/r8168/r8168.mk b/external/r8168/r8168.mk new file mode 100644 index 00000000..bb5898bb --- /dev/null +++ b/external/r8168/r8168.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# r8168 +# +################################################################################ + +R8168_VERSION = 52c98bd764e6dd22ff17876afa655e9e11237cc9 +R8168_SITE = $(call github,fbelavenuto,r8168,$(R8168_VERSION)) +R8168_LICENSE = GPL-2.0 + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/files/board/arpl/overlayfs/opt/arpl/include/consts.sh b/files/board/arpl/overlayfs/opt/arpl/include/consts.sh index a6bdd197..078c63a8 100644 --- a/files/board/arpl/overlayfs/opt/arpl/include/consts.sh +++ b/files/board/arpl/overlayfs/opt/arpl/include/consts.sh @@ -1,5 +1,5 @@ -ARPL_VERSION="0.1-alpha5" +ARPL_VERSION="0.1-alpha6" # Define paths TMP_PATH="/tmp" diff --git a/files/configs/arpl_defconfig b/files/configs/arpl_defconfig index aa0b0a29..801fcea9 100644 --- a/files/configs/arpl_defconfig +++ b/files/configs/arpl_defconfig @@ -60,3 +60,5 @@ BR2_TARGET_ROOTFS_CPIO_XZ=y # BR2_TARGET_ROOTFS_TAR is not set BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_R8125=y +BR2_PACKAGE_R8168=y diff --git a/img-gen.sh b/img-gen.sh index 6ab27bf4..2054c277 100755 --- a/img-gen.sh +++ b/img-gen.sh @@ -50,7 +50,8 @@ echo "Generating default config" make arpl_defconfig echo "Version: ${VERSION}" echo "Building... Drink a coffee and wait!" -make +make BR2_EXTERNAL=../external cd - rm -f *.zip zip -9 "arpl-${VERSION}.img.zip" arpl.img +[ -x test.sh ] && ./test.sh