Skip to content

Commit

Permalink
more cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
andiradulescu committed Jul 18, 2024
1 parent 0a686ff commit 7957ecd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions build_kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ DEFCONFIG=tici_defconfig

# Get directories and make sure we're in the correct spot to start the build
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
TOOLS=$DIR/tools
TMP_DIR=/tmp/agnos-builder-tmp
OUTPUT_DIR=$DIR/output
BOOT_IMG=./boot.img
cd $DIR

if ! command -v docker &> /dev/null; then
Expand Down Expand Up @@ -38,11 +42,6 @@ fi

# Actual build_kernel steps
build_kernel() {
TOOLS=$DIR/tools
TMP_DIR=/tmp/agnos-builder-tmp
OUTPUT_DIR=$DIR/output
BOOT_IMG=./boot.img

# Build parameters
ARCH=$(uname -m)
if [ "$ARCH" != "arm64" ] && [ "$ARCH" != "aarch64" ]; then
Expand Down Expand Up @@ -105,4 +104,4 @@ USERNAME=$(whoami)
docker exec $CONTAINER_ID bash -c "useradd --uid $(id -u) -U -m $USERNAME"

# Run build_kernel in container
docker exec -u $USERNAME $CONTAINER_ID bash -c "export DEFCONFIG=$DEFCONFIG; export DIR=$DIR; $(declare -f build_kernel); build_kernel"
docker exec -u $USERNAME $CONTAINER_ID bash -c "export DEFCONFIG=$DEFCONFIG DIR=$DIR TOOLS=$TOOLS TMP_DIR=$TMP_DIR OUTPUT_DIR=$OUTPUT_DIR BOOT_IMG=$BOOT_IMG; $(declare -f build_kernel); build_kernel"

0 comments on commit 7957ecd

Please sign in to comment.