-
Notifications
You must be signed in to change notification settings - Fork 67
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 #3 from pulp-platform/linux
Add linux support
- Loading branch information
Showing
14 changed files
with
1,508 additions
and
15 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
install | ||
install | ||
bbl* | ||
vmlinux | ||
build | ||
|
||
riscv-gnu-toolchain/build | ||
riscv-fesvr/build | ||
riscv-isa-sim/build | ||
riscv-pk/build | ||
riscv-tests/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
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
Submodule buildroot
added at
d6fa6a
34 changes: 34 additions & 0 deletions
34
configs/0001-Add-RISC-V-architecture-to-Xilinx-ethernet-Kconfig.patch
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,34 @@ | ||
From c07d9ee579c8a2240ba3d403c6827afb1f5608ea Mon Sep 17 00:00:00 2001 | ||
From: Florian Zaruba <[email protected]> | ||
Date: Tue, 20 Nov 2018 16:17:44 +0100 | ||
Subject: [PATCH] Add RISC-V architecture to Xilinx ethernet Kconfig | ||
|
||
--- | ||
drivers/net/ethernet/xilinx/Kconfig | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/drivers/net/ethernet/xilinx/Kconfig b/drivers/net/ethernet/xilinx/Kconfig | ||
index da4ec575ccf9..0699b54ee759 100644 | ||
--- a/drivers/net/ethernet/xilinx/Kconfig | ||
+++ b/drivers/net/ethernet/xilinx/Kconfig | ||
@@ -5,7 +5,7 @@ | ||
config NET_VENDOR_XILINX | ||
bool "Xilinx devices" | ||
default y | ||
- depends on PPC || PPC32 || MICROBLAZE || ARCH_ZYNQ || MIPS | ||
+ depends on PPC || PPC32 || MICROBLAZE || ARCH_ZYNQ || MIPS || RISCV | ||
---help--- | ||
If you have a network (Ethernet) card belonging to this class, say Y. | ||
|
||
@@ -18,7 +18,7 @@ if NET_VENDOR_XILINX | ||
|
||
config XILINX_EMACLITE | ||
tristate "Xilinx 10/100 Ethernet Lite support" | ||
- depends on PPC32 || MICROBLAZE || ARCH_ZYNQ || MIPS | ||
+ depends on PPC32 || MICROBLAZE || ARCH_ZYNQ || MIPS || RISCV | ||
select PHYLIB | ||
---help--- | ||
This driver supports the 10/100 Ethernet Lite from Xilinx. | ||
-- | ||
2.14.3 | ||
|
43 changes: 43 additions & 0 deletions
43
configs/0002-emaclite-Align-buffer-and-iomem-on-64-bits.patch
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,43 @@ | ||
From 50dbaec9e56e5063036724e673529fc53f85a25e Mon Sep 17 00:00:00 2001 | ||
From: Florian Zaruba <[email protected]> | ||
Date: Sun, 25 Nov 2018 00:19:03 +0100 | ||
Subject: [PATCH] [emaclite] Align buffer and iomem on 64 bits | ||
|
||
--- | ||
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 6 +++--- | ||
1 file changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c | ||
index 639e3e9..5f9441c 100644 | ||
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c | ||
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c | ||
@@ -99,7 +99,7 @@ | ||
#define ALIGNMENT 4 | ||
|
||
/* BUFFER_ALIGN(adr) calculates the number of bytes to the next alignment. */ | ||
-#define BUFFER_ALIGN(adr) ((ALIGNMENT - ((u32)adr)) % ALIGNMENT) | ||
+#define BUFFER_ALIGN(adr) ((ALIGNMENT - ((u64)adr)) % ALIGNMENT) | ||
|
||
#ifdef __BIG_ENDIAN | ||
#define xemaclite_readl ioread32be | ||
@@ -340,7 +340,7 @@ static int xemaclite_send_data(struct net_local *drvdata, u8 *data, | ||
* if it is configured in HW | ||
*/ | ||
|
||
- addr = (void __iomem __force *)((u32 __force)addr ^ | ||
+ addr = (void __iomem __force *)((u64 __force)addr ^ | ||
XEL_BUFFER_OFFSET); | ||
reg_data = xemaclite_readl(addr + XEL_TSR_OFFSET); | ||
|
||
@@ -401,7 +401,7 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data, int maxlen) | ||
* will correct on subsequent calls | ||
*/ | ||
if (drvdata->rx_ping_pong != 0) | ||
- addr = (void __iomem __force *)((u32 __force)addr ^ | ||
+ addr = (void __iomem __force *)((u64 __force)addr ^ | ||
XEL_BUFFER_OFFSET); | ||
else | ||
return 0; /* No data was available */ | ||
-- | ||
2.4.8 | ||
|
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,33 @@ | ||
BR2_riscv=y | ||
BR2_riscv_custom=y | ||
BR2_RISCV_ISA_CUSTOM_RVM=y | ||
BR2_RISCV_ISA_CUSTOM_RVC=y | ||
BR2_CCACHE=y | ||
BR2_TOOLCHAIN_EXTERNAL=y | ||
BR2_TOOLCHAIN_EXTERNAL_PATH="$(RISCV)" | ||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="$(ARCH)-unknown-linux-gnu" | ||
BR2_TOOLCHAIN_EXTERNAL_GCC_8=y | ||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_13=y | ||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y | ||
BR2_TOOLCHAIN_EXTERNAL_CXX=y | ||
BR2_ROOTFS_OVERLAY="../rootfs" | ||
BR2_LINUX_KERNEL=y | ||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y | ||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.20-rc2" | ||
BR2_LINUX_KERNEL_PATCH="../configs/0001-Add-RISC-V-architecture-to-Xilinx-ethernet-Kconfig.patch ../configs/0002-emaclite-Align-buffer-and-iomem-on-64-bits.patch" | ||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | ||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="../configs/linux_defconfig" | ||
BR2_PACKAGE_BUSYBOX_CONFIG="../configs/busybox.config" | ||
BR2_PACKAGE_DHRYSTONE=y | ||
BR2_PACKAGE_MEMSTAT=y | ||
BR2_PACKAGE_RAMSPEED=y | ||
BR2_PACKAGE_STRACE=y | ||
BR2_PACKAGE_STRESS=y | ||
BR2_PACKAGE_STRESS_NG=y | ||
BR2_PACKAGE_TRACE_CMD=y | ||
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set | ||
BR2_PACKAGE_HTOP=y | ||
BR2_PACKAGE_NANO=y | ||
BR2_TARGET_ROOTFS_CPIO_GZIP=y | ||
BR2_TARGET_ROOTFS_INITRAMFS=y | ||
# BR2_TARGET_ROOTFS_TAR is not set |
Oops, something went wrong.