forked from smart-tool/smart
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move source/bin to bin/ with -DBINDIR
for better cross-compilation. add aarch64 docker files, and cross-compilation support.
- Loading branch information
Showing
22 changed files
with
143 additions
and
1,262 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
results/ | ||
.git/ | ||
bin/ |
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 |
---|---|---|
|
@@ -15,4 +15,4 @@ source/algorithms.lst | |
/data/rand64/rand64.txt | ||
/data/rand8/rand8.txt | ||
/results/ | ||
|
||
/bin/ |
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,20 @@ | ||
# -*- Dockerfile -*- | ||
# podman/docker build -t smart-aarch64 . -f Dockerfile.cross-aarch64 | ||
|
||
FROM docker.io/library/debian:11-slim as aarch64 | ||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV DEBCONF_NONINTERACTIVE_SEEN true | ||
ENV TZ=UTC | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends build-essential git \ | ||
qemu-system-aarch64 binfmt-support qemu-user qemu-user-binfmt \ | ||
gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu libc6-dev-arm64-cross | ||
WORKDIR /app | ||
COPY . . | ||
RUN aarch64-linux-gnu-gcc --version | ||
RUN make CC=aarch64-linux-gnu-gcc | ||
RUN ln -s /usr/aarch64-linux-gnu/sys-root/usr/bin/ld.so /lib/ld-linux-aarch64.so.1 | ||
ENV LD_LIBRARY_PATH=LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/sys-root/lib64 | ||
RUN make CC=aarch64-linux-gnu-gcc check | ||
CMD [ "bash --login -i" ] |
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,32 @@ | ||
# -*- Dockerfile -*- | ||
# podman/docker build -t smart-fc-aarch64 . -f Dockerfile.fedora-aarch64 | ||
ARG BASE_IMAGE=fedora | ||
#FROM ${BASE_IMAGE} | ||
FROM fedora:39-aarch64 | ||
|
||
# Test with non-root user. | ||
ENV TEST_USER tester | ||
ENV WORK_DIR "/work" | ||
|
||
#RUN uname -a | ||
#RUN echo -e "deltarpm=0\ninstall_weak_deps=0\ntsflags=nodocs" >> /etc/dnf/dnf.conf | ||
# Disable modular repositories to save a running time of "dnf update" | ||
#RUN ls /etc/yum.repos.d/*.repo | ||
#RUN sed -i '/^enabled=1$/ s/1/0/' /etc/yum.repos.d/*-modular.repo || true | ||
#RUN dnf -y update | ||
RUN dnf -y --allowerasing --repo fedora install \ | ||
file gcc make redhat-rpm-config sudo | ||
#RUN dnf -y --repo fedora install m4 libtool perl-Text-Diff pkgconf-pkg-config strace gdb | ||
#RUN dnf -y --repo fedora install strace gdb | ||
|
||
# Create test user and the environment | ||
RUN useradd "${TEST_USER}" | ||
WORKDIR "${WORK_DIR}" | ||
COPY . . | ||
RUN chown -R "${TEST_USER}:${TEST_USER}" "${WORK_DIR}" | ||
|
||
# Enable sudo without password for convenience. | ||
RUN echo "${TEST_USER} ALL = NOPASSWD: ALL" >> /etc/sudoers | ||
#RUN ln -s /usr/aarch64-linux-gnu/sys-root/usr/bin/ld.so /lib/ld-linux-aarch64.so.1 | ||
|
||
USER "${TEST_USER}" |
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
File renamed without changes.
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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.