Skip to content

Commit

Permalink
build and provide bl2-for-mtk_uartboot.bin
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowrt committed Mar 1, 2024
1 parent ecdfc9c commit c0807f0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install libfdt-dev and cmake
run: sudo apt install libfdt-dev cmake squashfs-tools
run: sudo apt install libfdt-dev cmake squashfs-tools gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu

- name: Run builder script
run: |
Expand All @@ -35,7 +35,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: images
path: "*.itb"
path: "*.itb *.bin"

release:
if: inputs.no_release == '0'
Expand Down
16 changes: 14 additions & 2 deletions build_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ DTC=
FILEBASE=
WORKDIR=
ITSFILE=

TFA_PLAT=
TFA_MAKEARGS=

prepare_openwrt_ib() {
GNUPGHOME="$(mktemp -d)"
Expand Down Expand Up @@ -252,7 +253,16 @@ bundle_initrd() {
esac
}


build_bl2_for_uartboot()
{
git clone https://github.com/mtk-openwrt/arm-trusted-firmware.git "${WORKDIR}/arm-trusted-firmware"
make -C "${WORKDIR}/arm-trusted-firmware" CROSS_COMPILE=aarch64-linux-gnu- PLAT=$TFA_PLAT RAM_BOOT_UART_DL=1 BOOT_DEVICE=ram $TFA_MAKEARGS bl2
cp "${WORKDIR}/arm-trusted-firmware/build/mt7622/release/bl2.bin" "${DESTDIR}/bl2-for-mtk_uartboot.bin"
}

linksys_e8450_installer() {
TFA_PLAT=mt7622
# OPENWRT_RELEASE="23.05.0"
OPENWRT_TARGET="https://downloads.openwrt.org/snapshots/targets/mediatek/mt7622"
# OPENWRT_TARGET="https://downloads.openwrt.org/releases/${OPENWRT_RELEASE}/targets/mediatek/mt7622"
Expand Down Expand Up @@ -299,8 +309,10 @@ linksys_e8450_installer() {
rm "${INSTALLERDIR}/dl/vendor.bin"
fi

build_bl2_for_uartboot

mv "${WORKDIR}/${FILEBASE}-installer"* "${DESTDIR}"
rm -r "${WORKDIR}"
rm -rf "${WORKDIR}"
}

linksys_e8450_installer

0 comments on commit c0807f0

Please sign in to comment.