Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleBuilding BL2 and FIP binaries in local machine (Ubuntu 22.04)
### 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

...