...
Build instruction to create bl2.img and fip.bin in local linux machine(Ubuntu 22.04).
#Kernel-5.4
| Code Block | ||||
|---|---|---|---|---|
| ||||
### Prerequisite packages $ sudo apt-get install gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu libc6-armhf-cross u-boot-tools make gcc swig python3-pyelftools flex ### Building u-boot binaries $ mkdir BL2 && cd BL2 $ git clone https://github.com/frank-w/u-boot.git -b 2024-04-bpi $ cd u-boot $ git apply bl2.patch ## See above - patch content is provided in above block. $ make mt7988a_bpir4_sd_defconfig $ export CROSS_COMPILE=aarch64-linux-gnu- $ ./build.sh ### Building FIP binary $ cd ../.. $ mkdir FIP && cd FIP $ git clone https://github.com/frank-w/u-boot.git -b mtk-atf $ cd u-boot $ git apply fip.patch ## See above - patch content is provided in above block. ### Copy all u-boot.* files for creating fip.bin $ cp ../../BL2/u-boot/u-boot.* . $ ./build.sh ### Both bl2.img and fip.bin are present folder ./build/mt7988/release $ cd ./build/mt7988/release $ ls bl2.img fip.bin ### Renaming binaries as per Yocto's wks file $ mv bl2.img bpi-r4_sdmmc_bl2.img $ mv fip.bin bpi-r4_sdmmc_fip.bin |
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
### Prerequisite packages
$ sudo apt-get install gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu libc6-armhf-cross u-boot-tools make gcc swig python3-pyelftools flex
### Building u-boot binaries
$ mkdir BL2 && cd BL2
$ git clone https://github.com/frank-w/u-boot.git -b 2024-04-bpi
$ cd u-boot
$ git apply bl2_B.patch ## See above - patch content is provided in above block.
$ make mt7988a_bpir4_sd_defconfig
$ export CROSS_COMPILE=aarch64-linux-gnu-
$ ./build.sh
### Building FIP binary
$ cd ../..
$ mkdir FIP && cd FIP
$ git clone https://github.com/frank-w/u-boot.git -b mtk-atf
$ cd u-boot
$ git apply fip.patch ## See above - patch content is provided in above block.
### Copy all u-boot.* files for creating fip.bin
$ cp ../../BL2/u-boot/u-boot.* .
$ ./build.sh
### Both bl2.img and fip.bin are present folder ./build/mt7988/release
$ cd ./build/mt7988/release
$ ls bl2.img fip.bin
### Renaming binaries as per Yocto's wks file
$ mv bl2.img bpi-r4_sdmmc_bl2_B.img
$ mv fip.bin bpi-r4_sdmmc_fip_B.bin |
#kernel- 6.6
| Code Block | ||||
|---|---|---|---|---|
| ||||
### Building u-boot binaries
$ mkdir BL2 && cd BL2
$ git clone https://github.com/frank-w/u-boot.git -b 2025-01-bpi
$ cd u-boot
$ git apply bl2.patch ## if patch set not applying, please do manually
$ make mt7988a_bpir4_sd_defconfig
$ export CROSS_COMPILE=aarch64-linux-gnu-
$ ./build.sh
### Building FIP binary
$ cd ../..
$ mkdir FIP && cd FIP
$ git clone https://github.com/frank-w/u-boot.git -b mtk-atf-2025
$ cd u-boot
$ git apply fip.patch ## if patch set not applying, please do manually
### Copy all u-boot.* files for creating fip.bin
$ cp ../../BL2/u-boot/u-boot.* .
$ ./build.sh
### Both bl2.img and fip.bin are present folder ./build/mt7988/release
$ cd ./build/mt7988/release
$ ls bl2.img fip.bin
### Renaming binaries as per Yocto's wks file
$ mv bl2.img bpi-r4_sdmmc_bl2.img
$ mv fip.bin bpi-r4_sdmmc_fip.bin |
Bring bpi-r4_sdmmc_bl2.img, bpi-r4_sdmmc_fip.bin, bpi-r4_sdmmc_bl2_B.img and bpi-r4_sdmmc_fip_B.bin files under meta-cmf-bananapi/meta-rdk-mtk-bpir4/recipes-bsp/trusted-firmware-a/files directory.
...