Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kernel bin, minivm, Enable slirp for QEMU, update to 19.1.0 #31

Merged
merged 8 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ RUN apt update && \
software-properties-common \
bc \
ninja-build \
cpio \
unzip

RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
Expand All @@ -55,7 +56,7 @@ RUN apt update && \
# From env.sh
ARG QEMU_REPO QEMU_REF ARTIFACT_BASE ARTIFACT_TAG

ENV VER 18.1.2
ENV VER 19.1.0
ENV TOOLCHAIN_INSTALL /usr/local/clang+llvm-${VER}-cross-hexagon-unknown-linux-musl/
ENV ROOT_INSTALL /usr/local/hexagon-unknown-linux-musl-rootfs
ENV MAKE_TARBALLS 1
Expand All @@ -65,6 +66,7 @@ ENV MAKE_TARBALLS 1

ENV LLVM_SRC_URL https://github.com/llvm/llvm-project/archive/llvmorg-${VER}.tar.gz
ENV MUSL_SRC_URL https://github.com/quic/musl/archive/d125203fcb134febcde6ca32181554560b67c790.tar.gz
ENV HEXMVM_SRC_URL https://github.com/quic/hexagonMVM/archive/v0.1.1.tar.gz
ENV LINUX_SRC_URL https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.7.11.tar.xz

#ENV PYTHON_SRC_URL https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tar.xz
Expand Down
14 changes: 14 additions & 0 deletions build-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ build_dropbear() {
echo FIXME TODO
}

build_minivm() {
cd ${BASE}
mkdir -p obj_minivm
cd obj_minivm
make --directory=../hexagonMVM \
ARCH=hexagon-unknown-linux-musl- \
prefix=${ROOTFS}/boot \
bindir=${ROOTFS}/boot \
install
}

build_kernel() {
cd ${BASE}
mkdir -p obj_linux
Expand Down Expand Up @@ -142,7 +153,9 @@ build_kernel() {
LLVM_IAS=1 \
KBUILD_VERBOSE=1 \
vmlinux
hexagon-unknown-linux-musl-objcopy -O binary ../obj_linux/vmlinux ../obj_linux/vmlinux.bin
install -D ../obj_linux/vmlinux ${ROOTFS}/boot/vmlinux
install -D ../obj_linux/vmlinux.bin ${ROOTFS}/boot/vmlinux.bin
}

get_src_tarballs() {
Expand Down Expand Up @@ -174,6 +187,7 @@ cp -ra ${HEX_SYSROOT}/usr ${ROOTFS}/

get_src_tarballs

build_minivm
build_kernel
build_busybox

Expand Down
4 changes: 3 additions & 1 deletion build-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ build_qemu() {
cd obj_qemu
CC=$(which gcc) \
PATH=${TOOLCHAIN_BIN}:${PATH} \
../qemu/configure --disable-fdt --disable-capstone --disable-guest-agent \
../qemu/configure --enable-fdt --disable-capstone --disable-guest-agent \
--enable-slirp \
quic-mathbern marked this conversation as resolved.
Show resolved Hide resolved
--disable-containers \
--python=$(which python3.8) \
--target-list=hexagon-softmmu,hexagon-linux-user --prefix=${TOOLCHAIN_INSTALL}/x86_64-linux-gnu \
Expand Down Expand Up @@ -321,6 +322,7 @@ python3.8 --version
build_llvm_clang

CROSS_TRIPLES="aarch64-windows-gnu x86_64-windows-gnu x86_64-linux-musl aarch64-linux-gnu aarch64-macos"
CROSS_TRIPLES="aarch64-windows-gnu x86_64-windows-gnu x86_64-linux-musl aarch64-linux-gnu"
for t in ${CROSS_TRIPLES}
do
build_llvm_clang_cross ${t}
Expand Down
4 changes: 2 additions & 2 deletions cross-win/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ RUN cp /etc/apt/sources.list /etc/apt/sources.list~ && \

# Windows libs
RUN for url in https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-glib2-2.74.6-1-any.pkg.tar.zst \
https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-pixman-0.40.0-2-any.pkg.tar.zst \
https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-pixman-0.42.2-1-any.pkg.tar.zst \
https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-libpng-1.6.40-1-any.pkg.tar.zst \
https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gettext-0.21.1-2-any.pkg.tar.zst \
https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-pcre2-10.40-1-any.pkg.tar.zst \
https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-pcre2-10.41-1-any.pkg.tar.zst \
https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-libiconv-1.17-3-any.pkg.tar.zst; do \
wget $url && tar xvf $(basename $url) || exit 1; \
done && \
Expand Down
1 change: 1 addition & 0 deletions get-src-repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ git clone -q https://git.busybox.net/busybox/ &


git clone -q --branch=hexagon https://github.com/quic/musl &
git clone -q https://github.com/quic/hexagonMVM &
git clone -q https://github.com/qemu/qemu &

wait
Expand Down
8 changes: 8 additions & 0 deletions get-src-tarballs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ get_src_tarballs() {
git log -3 HEAD >> ${MANIFEST_DIR}/qemu.txt
cd -

wget --quiet ${HEXMVM_SRC_URL} -O hexagonMVM.tar.xz
mkdir hexagonMVM
cd hexagonMVM
tar xf ../hexagonMVM.tar.xz --strip-components=1
rm ../hexagonMVM.tar.xz
echo ${HEXMVM_SRC_URL} > ${MANIFEST_DIR}/hexagonMVM.txt
cd -

wget --quiet ${MUSL_SRC_URL} -O musl.tar.xz
mkdir musl
cd musl
Expand Down
Loading