Skip to content

Commit

Permalink
Initial badgeros config and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
hpvb committed Dec 18, 2023
1 parent ad6bc91 commit 35b775d
Show file tree
Hide file tree
Showing 3 changed files with 3,512 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile.linux-builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM almalinux:8

RUN yum -y update && \
yum -y install make ncurses-devel which unzip perl cpio rsync fileutils bc bzip2 gzip sed git python3 file patch wget perl-Thread-Queue perl-Data-Dumper perl-ExtUtils-MakeMaker perl-IPC-Cmd gcc gcc-c++ && \
yum clean all

26 changes: 26 additions & 0 deletions build-sdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
set -e

if which podman &> /dev/null; then
container=podman
elif which docker &> /dev/null; then
container=docker
else
echo "Podman or docker have to be in \$PATH"
exit 1
fi

function build_linux_sdk() {

cp config-badgeros .config
toolchain_prefix=riscv32-badgeros-linux-gnu

${container} build -f Dockerfile.linux-builder -t badgeros-buildroot-builder-linux
${container} run -it --rm -v $(pwd):/tmp/buildroot:z -w /tmp/buildroot -e FORCE_UNSAFE_CONFIGURE=1 --userns=keep-id badgeros-buildroot-builder-linux bash -c "make clean; make syncconfig; make sdk"
}

build_linux_sdk

echo
echo "***************************************"
echo "Build succesful your toolchain is in output/images/${toolchain_prefix}_sdk-buildroot.tar.gz"
Loading

0 comments on commit 35b775d

Please sign in to comment.