build.sh: use mkbootimg instead abootimg
authorBigfootACA <bigfoot@classfun.cn>
星期二, 17 May 2022 05:00:03 +0000 (13:00 +0800)
committerBigfootACA <bigfoot@classfun.cn>
星期二, 17 May 2022 05:01:19 +0000 (13:01 +0800)
.github/workflows/main.yml
.github/workflows/release.yml
README.md
README.zh.md
build.sh

index cd5c431f035f00947576032bd4a5c65c64a8266a..410525886d513b4c9810977d49fd98ac371f674b 100644 (file)
@@ -54,7 +54,7 @@ jobs:
       - name: Install requires packages
         run: |
           sudo apt-get update
-          sudo apt-get -y install build-essential uuid-dev iasl nasm gcc-aarch64-linux-gnu abootimg python3-distutils python3-pil python3-git gettext
+          sudo apt-get -y install build-essential uuid-dev iasl nasm gcc-aarch64-linux-gnu mkbootimg python3-distutils python3-pil python3-git gettext
 
       - name: Build device ${{ matrix.device }}
         run: |
index f27a926d3352cffb8f1dca39345a16784175414b..d69daf30c8edde4b929247245824124f761cc969 100644 (file)
@@ -44,7 +44,7 @@ jobs:
       - name: Install requires packages
         run: |
           sudo apt-get update
-          sudo apt-get -y install build-essential uuid-dev iasl nasm gcc-aarch64-linux-gnu abootimg python3-distutils python3-pil python3-git gettext
+          sudo apt-get -y install build-essential uuid-dev iasl nasm gcc-aarch64-linux-gnu mkbootimg python3-distutils python3-pil python3-git gettext
 
       - name: Build device ${{ matrix.device }}
         run: |
index 44e0fd9615e19c8730290e0ae51cb4240bf7aecb..592d86c6f6969ad6ddfce4a10b8abb7b7e6fce1a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -52,7 +52,7 @@ For Ubuntu 20.04:
 ```bash
 sudo apt update
 sudo apt upgrade
-sudo apt install build-essential uuid-dev iasl git nasm gcc-aarch64-linux-gnu abootimg python3-distutils python3-pil python3-git gettext
+sudo apt install build-essential uuid-dev iasl git nasm gcc-aarch64-linux-gnu mkbootimg python3-distutils python3-pil python3-git gettext
 ```
 
 If you are using GCC 11+, modify `edk2/BaseTools/Source/C/Makefiles/header.makefile`
index 0e8b517c469edf1078c35c1a27cf75ff7684ad67..ed3ab51e53d673fa82c315d26b2c74a54df180b3 100644 (file)
@@ -57,7 +57,7 @@ Ubuntu 20.04:
 ```bash\r
 sudo apt update\r
 sudo apt upgrade\r
-sudo apt install build-essential uuid-dev iasl git nasm gcc-aarch64-linux-gnu abootimg python3-distutils python3-pil python3-git gettext\r
+sudo apt install build-essential uuid-dev iasl git nasm gcc-aarch64-linux-gnu mkbootimg python3-distutils python3-pil python3-git gettext\r
 ```\r
 \r
 如果你的编译器为 GCC 11+, 请手动修改 `edk2/BaseTools/Source/C/Makefiles/header.makefile`\r
index b51e995a73cd52bf93cfb5d0fe79c21b8b4b5109..3fc07a12bbd085aecffefde6c40f49fec569198c 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -87,10 +87,16 @@ function _build(){
                "device_specific/${DEVICE}.dtb" \
                > "workspace/uefi-${DEVICE}.img.gz-dtb" \
                ||return "$?"
-       abootimg \
-               --create "${OUTDIR}/boot-${DEVICE}.img" \
-               -k "workspace/uefi-${DEVICE}.img.gz-dtb" \
-               -r ramdisk \
+       mkbootimg \
+               --kernel "workspace/uefi-${DEVICE}.img.gz-dtb" \
+               --ramdisk ramdisk \
+               --kernel_offset 0x00000000 \
+               --ramdisk_offset 0x00000000 \
+               --tags_offset 0x00000000 \
+               --os_version 12.0.0 \
+               --os_patch_level 2022-04 \
+               --header_version 1 \
+               -o "${OUTDIR}/boot-${DEVICE}.img" \
                ||return "$?"
        echo "Build done: ${OUTDIR}/boot-${DEVICE}.img"
        set +x