diff --git a/Dockerfile b/Dockerfile index 3acd3e7..f4cbac8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,9 +32,9 @@ RUN printf "Types: deb\nURIs: http://archive.ubuntu.com/ubuntu/\nSuites: noble n apt-get install -y cmake libyaml-dev && \ curl "https://android.googlesource.com/platform/system/tools/mkbootimg/+/refs/heads/android12-release/mkbootimg.py?format=TEXT" | base64 --decode > /usr/bin/mkbootimg && \ chmod +x /usr/bin/mkbootimg && \ - chmod +x /usr/bin/generate_boot_bins.sh && \ - chmod +x /usr/bin/build.sh && \ - chmod +x /usr/bin/make_fitimage.sh && \ + chmod 755 /usr/bin/generate_boot_bins.sh && \ + chmod 755 /usr/bin/build.sh && \ + chmod 755 /usr/bin/make_fitimage.sh && \ dpkg --add-architecture arm64 && \ apt-get install -y libssl-dev:arm64 && \ rm -rf /var/lib/apt/lists/* diff --git a/build.sh b/build.sh index 841d2d3..472d788 100644 --- a/build.sh +++ b/build.sh @@ -53,10 +53,10 @@ show_help() { # Default values DTB_FILENAME="${1:-}" -KERNEL_BUILD_ARTIFACTS="$(realpath ../kobj)" -SYSTEMD_BOOT_DIR="$(realpath ../artifacts/systemd/usr/lib/systemd/boot/efi)" -RAMDISK="$(realpath ../artifacts/ramdisk.gz)" -IMAGES_OUTPUT="$(realpath ../images)" +KERNEL_BUILD_ARTIFACTS="../kobj" +SYSTEMD_BOOT_DIR="../artifacts/systemd/usr/lib/systemd/boot/efi" +RAMDISK="../artifacts/ramdisk.gz" +IMAGES_OUTPUT="../images" KERNEL_CMDLINE="console=ttyMSM0,115200n8 earlycon qcom_geni_serial.con_enabled=1 qcom_scm.download_mode=1 reboot=panic_warm panic=-1 mitigations=auto" NO_DEBUG=false @@ -86,6 +86,12 @@ if [[ -z "$DTB_FILENAME" ]]; then exit 1 fi +# Resolve to absolute paths +KERNEL_BUILD_ARTIFACTS="$(realpath "$KERNEL_BUILD_ARTIFACTS")" +SYSTEMD_BOOT_DIR="$(realpath "$SYSTEMD_BOOT_DIR")" +RAMDISK="$(realpath "$RAMDISK")" +IMAGES_OUTPUT="$(realpath "$IMAGES_OUTPUT")" + # Check ramdisk if [[ ! -f "$RAMDISK" ]]; then echo "[ERROR] Ramdisk file not found at $RAMDISK"