Skip to content

Commit

Permalink
Add buildroot support
Browse files Browse the repository at this point in the history
Hopefully in a commit in the not-too-distant future, we can
remove most or all of build-rootfs.sh in favor of buildroot.

Signed-off-by: Brian Cain <[email protected]>
  • Loading branch information
androm3da committed Oct 19, 2024
1 parent b52b6bb commit ec43b10
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ ENV MUSL_SRC_URL https://github.com/quic/musl/archive/d125203fcb134febcde6ca3218
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 BUSYBOX_SRC_URL https://busybox.net/downloads/busybox-1.36.1.tar.bz2
ENV BUILDROOT_SRC_URL https://github.com/quic/buildroot/archive/hexagon-2024.10.18a.tar.gz

#ENV PYTHON_SRC_URL https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tar.xz
#ADD get-host-clang-cmake-python.sh /root/hexagon-toolchain/get-host-clang-cmake-python.sh
Expand All @@ -91,6 +92,9 @@ ENV IN_CONTAINER 1
ADD build-toolchain.sh /root/hexagon-toolchain/build-toolchain.sh
RUN cd /root/hexagon-toolchain && ./build-toolchain.sh ${ARTIFACT_TAG}

ADD build-buildroot.sh /root/hexagon-toolchain/build-buildroot.sh
RUN cd /root/hexagon-toolchain && ./build-buildroot.sh

ARG TEST_TOOLCHAIN=1

ADD build-rootfs.sh /root/hexagon-toolchain/build-rootfs.sh
Expand Down
22 changes: 22 additions & 0 deletions build-buildroot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause

set -euo pipefail

BASE=$(readlink -f ${PWD})

set -x
TOOLCHAIN_INSTALL_REL=${TOOLCHAIN_INSTALL}
TOOLCHAIN_INSTALL=$(readlink -f ${TOOLCHAIN_INSTALL})
TOOLCHAIN_BIN=${TOOLCHAIN_INSTALL}/x86_64-linux-gnu/bin
export PATH=${TOOLCHAIN_BIN}:${PATH}

# TODO: change build to use unprivileged user
export FORCE_UNSAFE_CONFIGURE=1

make -C buildroot/ O=../obj_buildroot/ qcom_dsp_qemu_defconfig
cd obj_buildroot
make -j
install -D ./images/* ${ARTIFACT_BASE}/${ARTIFACT_TAG}/
1 change: 1 addition & 0 deletions get-src-repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ git clone --depth=1 -q git://git.kernel.org/pub/scm/linux/kernel/git/stable/linu
git clone --depth=1 -q https://github.com/python/cpython &
git clone --depth=1 -q git://repo.or.cz/libc-test &
git clone -q https://git.busybox.net/busybox/ &
git clone -q https://github.com/quic/buildroot/ &


git clone -q --branch=hexagon https://github.com/quic/musl &
Expand Down
7 changes: 7 additions & 0 deletions get-src-tarballs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ get_src_tarballs() {
echo ${MUSL_SRC_URL} > ${MANIFEST_DIR}/musl.txt
cd -

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

wget --quiet ${LINUX_SRC_URL} -O linux.tar.xz
mkdir linux
cd linux
Expand Down

0 comments on commit ec43b10

Please sign in to comment.