Skip to contentSkip to conversation

Buildroot updates for ARC, LMBench

PATCH Superseded Vineet Gupta 2 participants 5 messages May 7, 2021 – May 10, 2021 Synopsys ARC architecture

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Buildroot updates for ARC, LMBench

Hi,

Please apply the assorted fixes.

patch 3/3 had a snafu with scripts/os update.

Thx,
-Vineet

Vineet Gupta (3):
ARC: config: explicit'ify -mcpu for cpu selection
lmbench: increase memsize delay for slow FPGAs
lmbench: emulate --prefix to avoid scattering binaries all over

 arch/Config.in.arc                            |  8 +++---
 ...c-to-prevent-memsize-from-timingout-.patch | 28 +++++++++++++++++++
 package/lmbench/lmbench.mk                    |  9 +++++-
 3 files changed, 40 insertions(+), 5 deletions(-)
 create mode 100644 package/lmbench/0003-TOO_LONG-100-usec-to-prevent-memsize-from-timingout-.patch
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/3 ARC: config: explicit'ify -mcpu for cpu selection

---
 arch/Config.in.arc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/Config.in.arc +4 -4
index f7a6d920b50d..f84dfab38ae9 100644
@@ -12,14 +12,14 @@ config BR2_arc770d
 	bool "ARC 770D"
 
 config BR2_archs38
-	bool "ARC HS38"
+	bool "ARC HS38 (-mcpu=archs)"
 	help
 	  Generic ARC HS capable of running Linux, i.e. with MMU,
 	  caches and 32-bit multiplier. Also it corresponds to the
 	  default configuration in older GNU toolchain versions.
 
 config BR2_archs38_64mpy
-	bool "ARC HS38 with 64-bit mpy"
+	bool "ARC HS38 with 64-bit mpy (-mcpu=hs38)"
 	help
 	  Fully featured ARC HS capable of running Linux, i.e. with
 	  MMU, caches and 64-bit multiplier.
@@ -28,7 +28,7 @@ config BR2_archs38_64mpy
 	  for use this one.
 
 config BR2_archs38_full
-	bool "ARC HS38 with Quad MAC & FPU"
+	bool "ARC HS38 with Quad MAC & FPU (-mcpu=hs38_linux)"
 	help
 	  Fully featured ARC HS with additional support for
 	   - Dual- and quad multiply and MC oprations
@@ -43,7 +43,7 @@ config BR2_archs4x_rel31
 	   Build for HS48 release 3.1
 
 config BR2_archs4x
-	bool "ARC HS48"
+	bool "ARC HS48 (-mcpu=hs4x)"
 	help
 	   Latest release of HS48 processor
 	   - Dual and Quad multiply and MAC operations
Signature · 1 line
2.25.1
#2 lore raw

PATCH v2 1/3 ARC: config: explicit'ify -mcpu for cpu selection

Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Vineet" == Vineet Gupta via buildroot <[email protected]> writes:

---
 arch/Config.in.arc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/Config.in.arc +0 -0
index f7a6d920b50d..f84dfab38ae9 100644

arch/Config.in.arc config BR2_arc770d · line 15

Quoted 5 lines
arch/Config.in.arc +1 -1
@@ -12,14 +12,14 @@ config BR2_arc770d
 	bool "ARC 770D"
 
 config BR2_archs38
-	bool "ARC HS38"
+	bool "ARC HS38 (-mcpu=archs)"

I guess this could be handy for some users, but why are you not doing it for all variants?

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH v2 2/3 lmbench: increase memsize delay for slow FPGAs

In reply to Vineet Gupta
---
 ...c-to-prevent-memsize-from-timingout-.patch | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/lmbench/0003-TOO_LONG-100-usec-to-prevent-memsize-from-timingout-.patch
package/lmbench/0003-TOO_LONG-100-usec-to-prevent-memsize-from-timingout-.patch new file +28 -0
new file mode 100644
index 000000000000..6c3e7370e11b
@@ -0,0 +1,28 @@
+From d85b61666aa2728f68b69d02bfb162c432df709f Mon Sep 17 00:00:00 2001
+From: vgupta <vgupta@4eed8e25-bc12-0410-818a-f70ee6866280>
+Date: Sat, 3 Mar 2012 10:02:24 +0000
+Subject: [PATCH] TOO_LONG 100 usec to prevent memsize from timingout @80Mhz
+
+git-svn-id: http://sjvm-subversion02.internal.synopsys.com/svn/OSS/ARC_Linux/tests/lmbench-3.0-a9 at 157318 4eed8e25-bc12-0410-818a-f70ee6866280
+
+Signed-off-by: Vineet Gupta <[email protected]>
+---
+ src/memsize.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/memsize.c b/src/memsize.c
+index eb25a0924872..b333cf8cbd32 100644
+--- a/src/memsize.c
++++ b/src/memsize.c
+@@ -15,7 +15,7 @@ char	*id = "$Id$\n";
+ #define	CHK(x)	if ((x) == -1) { perror("x"); exit(1); }
+ 
+ #ifndef	TOO_LONG
+-#define	TOO_LONG	10	/* usecs */
++#define	TOO_LONG	100	/* usecs */
+ #endif
+ 
+ int	alarm_triggered = 0;
+-- 
+2.25.1
+
Signature · 1 line
2.25.1
#4 lore raw

PATCH v2 3/3 lmbench: emulate --prefix to avoid scattering binaries all over

In reply to Vineet Gupta

- moves all lmbench binaries to <target>/lmbench/bin/<ARCH>
- scripts copied to <target>/lmbench/scripts
- scripts/os overwritten to setup "OS" as expected by LMBench runtime scripts

---
 package/lmbench/lmbench.mk | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
package/lmbench/lmbench.mk +8 -1
index 2f3b19b5f820..ed075d20dafe 100644
@@ -36,7 +36,14 @@ define LMBENCH_BUILD_CMDS
 endef
 
 define LMBENCH_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) CFLAGS="$(TARGET_CFLAGS)" OS=$(ARCH) CC="$(TARGET_CC)" BASE=$(TARGET_DIR)/usr -C $(@D)/src install
+	mkdir -p $(TARGET_DIR)/lmbench/tmp
+	mkdir -p $(TARGET_DIR)/lmbench/scripts
+	$(TARGET_MAKE_ENV) $(MAKE) CFLAGS="$(TARGET_CFLAGS)" OS=$(ARCH) CC="$(TARGET_CC)" BASE=$(TARGET_DIR)/lmbench/tmp -C $(@D)/src install
+	mkdir -p $(TARGET_DIR)/lmbench/bin/$(ARCH)
+	mv $(TARGET_DIR)/lmbench/tmp/bin/* $(TARGET_DIR)/lmbench/bin/$(ARCH)
+	rm -rf $(TARGET_DIR)/lmbench/tmp/
+	cp -rfd $(@D)/scripts/ $(TARGET_DIR)/lmbench/.
+	echo "echo ${ARCH}" >  $(TARGET_DIR)/lmbench/scripts/os
 endef
 
 $(eval $(generic-package))
Signature · 1 line
2.25.1