Jason Lowe-Power has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/4883 )

Change subject: tests: Add Makefiles for hello
......................................................................

tests: Add Makefiles for hello

This adds Makefiles for hello for ARM and x86 by leveraging docker and
dockcross. See https://github.com/dockcross/dockcross for more
information.

These Makefiles also allow for automatic uploading to the correct location
for users to download when running the new tests.

Change-Id: I7085000393cd5283502a7af362c85befda749181
Signed-off-by: Jason Lowe-Power <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/4883
---
A tests/test-progs/hello/.gitignore
A tests/test-progs/hello/src/Makefile.arm
A tests/test-progs/hello/src/Makefile.x86
3 files changed, 67 insertions(+), 0 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved



diff --git a/tests/test-progs/hello/.gitignore b/tests/test-progs/hello/.gitignore
new file mode 100644
index 0000000..48c31c3
--- /dev/null
+++ b/tests/test-progs/hello/.gitignore
@@ -0,0 +1,10 @@
+bin/arm/linux/hello32-static
+bin/arm/linux/hello64-static
+
+bin/x86/linux/hello32-static
+bin/x86/linux/hello64-static
+bin/x86/linux/hello64-dynamic
+
+src/dockcross*
+src/*-dynamic
+src/*-static
diff --git a/tests/test-progs/hello/src/Makefile.arm b/tests/test-progs/hello/src/Makefile.arm
new file mode 100644
index 0000000..2aad6f5
--- /dev/null
+++ b/tests/test-progs/hello/src/Makefile.arm
@@ -0,0 +1,26 @@
+SERVER_USER=
+SERVER_PATH=/z/www/htdocs/dist/current/test-progs/hello/bin/arm/linux
+FETCH_PATH=http://gem5.org/dist/current/test-progs/hello/bin/arm/linux
+UPLOAD_LOCATION=$(SERVER_USER)daystrom.gem5.org:$(SERVER_PATH)
+
+all: hello64-static hello32-static
+
+upload: hello64-static hello32-static
+       scp hello64-static hello32-static $(UPLOAD_LOCATION)
+
+hello64-static: hello.c dockcross-arm64
+       ./dockcross-arm64 bash -c '$$CC hello.c -o hello64-static -static'
+
+hello32-static: hello.c dockcross-armv7
+       ./dockcross-armv7 bash -c '$$CC hello.c -o hello32-static -static'
+
+dockcross-arm64:
+       docker run --rm dockcross/linux-arm64 > ./dockcross-arm64
+       chmod +x ./dockcross-arm64
+
+dockcross-armv7:
+       docker run --rm dockcross/linux-armv7 > ./dockcross-armv7
+       chmod +x ./dockcross-armv7
+
+clean:
+       rm -f dockcross* hello64-static hello32-static
diff --git a/tests/test-progs/hello/src/Makefile.x86 b/tests/test-progs/hello/src/Makefile.x86
new file mode 100644
index 0000000..3eff291
--- /dev/null
+++ b/tests/test-progs/hello/src/Makefile.x86
@@ -0,0 +1,31 @@
+SERVER_USER=
+SERVER_PATH=/z/www/htdocs/dist/current/test-progs/hello/bin/x86/linux
+FETCH_PATH=http://gem5.org/dist/current/test-progs/hello/bin/x86/linux
+
+UPLOAD_LOCATION=$(SERVER_USER)daystrom.gem5.org:$(SERVER_PATH)
+
+all: hello64-static hello64-dynamic hello32-static
+
+
+upload: hello64-static hello64-dynamic hello32-static
+       scp hello64-static hello64-dynamic hello32-static $(UPLOAD_LOCATION)
+
+hello64-static: hello.c dockcross-x64
+       ./dockcross-x64 bash -c '$$CC hello.c -o hello64-static -static'
+
+hello64-dynamic: hello.c dockcross-x64
+       ./dockcross-x64 bash -c '$$CC hello.c -o hello64-dynamic'
+
+hello32-static: hello.c dockcross-x86
+       ./dockcross-x86 bash -c '$$CC hello.c -o hello32-static -static'
+
+dockcross-x64:
+       docker run --rm dockcross/linux-x64 > ./dockcross-x64
+       chmod +x ./dockcross-x64
+
+dockcross-x86:
+       docker run --rm dockcross/linux-x86 > ./dockcross-x86
+       chmod +x ./dockcross-x86
+
+clean:
+       rm -f dockcross-* hello64-static hello64-dynamic hello32-static

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/4883
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I7085000393cd5283502a7af362c85befda749181
Gerrit-Change-Number: 4883
Gerrit-PatchSet: 20
Gerrit-Owner: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Anthony Gutierrez <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Sean Wilson <[email protected]>
Gerrit-CC: Gabe Black <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to