Skip to content

Commit

Permalink
use unsquashfs instead of binwalk (which tries to use sasquatch)
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowrt committed May 11, 2022
1 parent 5b9b1fd commit ae739b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v2

- name: Install libfdt-dev and cmake
run: sudo apt install libfdt-dev cmake binwalk squashfs-tools
run: sudo apt install libfdt-dev cmake squashfs-tools

- name: Run builder script
run: mkdir -m 0700 $HOME/.gnupg ; bash build_installer.sh
Expand Down
10 changes: 4 additions & 6 deletions build_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,10 @@ linksys_e8450_installer() {
wget -c -O "${INSTALLERDIR}/dl/vendor.bin" "${VENDOR_FW}"
vendorhash="$(sha256sum "${INSTALLERDIR}/dl/vendor.bin" | cut -d' ' -f1)"
if [ "$vendorhash" = "$VENDOR_FW_HASH" ]; then
binwalk -C "${WORKDIR}" -e "${INSTALLERDIR}/dl/vendor.bin"
gpg --no-default-keyring --keyring "${INSTALLERDIR}/vendor-keyring" --import < "${WORKDIR}/_vendor.bin.extracted/squashfs-root/root/.gnupg/pubring.gpg"
gpg --no-default-keyring --keyring "${INSTALLERDIR}/vendor-keyring" --import < "${WORKDIR}/_vendor.bin.extracted/squashfs-root/root/.gnupg/secring.gpg"
echo y | gpg --no-default-keyring --keyring "${INSTALLERDIR}/vendor-keyring" --lsign 16EBADDEF5B6755C
gpg --no-default-keyring --keyring "${INSTALLERDIR}/vendor-keyring" --default-key 762AE637CDF0596EBA79444D99DAC426DCF76BA1 -r [email protected] -s -e --batch --output "${WORKDIR}/${FILEBASE}-installer_signed.itb" "${WORKDIR}/${FILEBASE}-installer.itb"
gpg --no-default-keyring --keyring "${INSTALLERDIR}/vendor-keyring" --default-key 762AE637CDF0596EBA79444D99DAC426DCF76BA1 -r [email protected] -s -e --batch --output "${DESTDIR}/${FILEBASE}_signed.itb" "${DESTDIR}/${FILEBASE}.itb"
unsquashfs -o 2621440 -d "${WORKDIR}/rootfs" "${INSTALLERDIR}/dl/vendor.bin" "/root/.gnupg/secring.gpg"
gpg --no-default-keyring --keyring "${INSTALLERDIR}/vendor-keyring" --import < "${WORKDIR}/rootfs/root/.gnupg/secring.gpg"
gpg --no-default-keyring --keyring "${INSTALLERDIR}/vendor-keyring" --default-key 762AE637CDF0596EBA79444D99DAC426DCF76BA1 --trusted-key 16EBADDEF5B6755C -r [email protected] -s -e --batch --output "${WORKDIR}/${FILEBASE}-installer_signed.itb" "${WORKDIR}/${FILEBASE}-installer.itb"
gpg --no-default-keyring --keyring "${INSTALLERDIR}/vendor-keyring" --default-key 762AE637CDF0596EBA79444D99DAC426DCF76BA1 --trusted-key 16EBADDEF5B6755C -r [email protected] -s -e --batch --output "${DESTDIR}/${FILEBASE}_signed.itb" "${DESTDIR}/${FILEBASE}.itb"
else
rm "${INSTALLERDIR}/dl/vendor.bin"
fi
Expand Down

0 comments on commit ae739b9

Please sign in to comment.