Files
bpfire/lfs/pcengines-apu-firmware
Peter Müller 9a7e4d8506 Switch checksums from MD5 to BLAKE2
Historically, the MD5 checksums in our LFS files serve as a protection
against broken downloads, or accidentally corrupted source files.

While the sources are nowadays downloaded via HTTPS, it make sense to
beef up integrity protection for them, since transparently intercepting
TLS is believed to be feasible for more powerful actors, and the state
of the public PKI ecosystem is clearly not helping.

Therefore, this patch switches from MD5 to BLAKE2, updating all LFS
files as well as make.sh to deal with this checksum algorithm. BLAKE2 is
notably faster (and more secure) than SHA2, so the performance penalty
introduced by this patch is negligible, if noticeable at all.

In preparation of this patch, the toolchain files currently used have
been supplied with BLAKE2 checksums as well on
https://source.ipfire.org/.

Cc: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Acked-by: Michael Tremer <michael.tremeripfire.org>
2022-04-02 14:19:25 +00:00

106 lines
4.4 KiB
Plaintext

###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2021 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
SUMMARY = Firmware files for PC Engines apu system boards
VER = 4.15.0.1
THISAPP = pcengines-apu-firmware-$(VER)
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = pcengines-apu-firmware
PAK_VER = 10
SUP_ARCH = x86_64
DEPS = firmware-update
SERVICES =
###############################################################################
# Top-level Rules
###############################################################################
objects = \
apu1_v$(VER).rom \
apu2_v$(VER).rom \
apu3_v$(VER).rom \
apu4_v$(VER).rom \
apu5_v$(VER).rom \
apu6_v$(VER).rom
apu1_v$(VER).rom = $(DL_FROM)/apu1_v$(VER).rom
apu2_v$(VER).rom = $(DL_FROM)/apu2_v$(VER).rom
apu3_v$(VER).rom = $(DL_FROM)/apu3_v$(VER).rom
apu4_v$(VER).rom = $(DL_FROM)/apu4_v$(VER).rom
apu5_v$(VER).rom = $(DL_FROM)/apu5_v$(VER).rom
apu6_v$(VER).rom = $(DL_FROM)/apu6_v$(VER).rom
apu1_v$(VER).rom_BLAKE2 = 317bf51d82c1c99514d3dc3d6324e8f6c6b4768f2052902673a21fbdb554f6602940dbd531a80074a00ca9777d72bd8772deac5be2e4df38c8675e1d67d426ee
apu2_v$(VER).rom_BLAKE2 = eaa5fa9bf1b0f1439b41cc2d48e0db24fb3e1096419ca728c98644d43a5bf0164380ab7173cbcbcf14b38052128c4b6c0bd8032e65f12c6f79262801fc534875
apu3_v$(VER).rom_BLAKE2 = 11af9de100d7da62edd585c1327325cdd661eafc1e540f9395728ee47e35acf427348b29e011f5269e86ab6d6923f7e2a47b59cdf7d5a982cbe4328abc10652c
apu4_v$(VER).rom_BLAKE2 = bf57beb63cd7581d6d3f24e2c6f51f15c540dc99036a2ccc22ecf9e3fbc8f37bf5bc46bb96fa9f854b952aa9a09130d7096f0a3c372b040cfcfc2abbf644c428
apu5_v$(VER).rom_BLAKE2 = e296e2e168be85220f22e00d7cd075c73660f18ffb28b26a16c01129f77e2ed50148b3c95405945bcacdebf9d6e4e76ef08ffcef362898c46a381453844d9606
apu6_v$(VER).rom_BLAKE2 = d6ce353299499be201af03ee678aa8bf3e33bdc2c9c952e91242b67febf9678bb85b6f6ed1b7d7b4278f5921cadb306451603d6c59bdf45d70793faf2c26312b
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
b2 : $(subst %,%_BLAKE2,$(objects))
dist:
@$(PAK)
###############################################################################
# Downloading, checking, b2sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_BLAKE2,$(objects)) :
@$(B2SUM)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
# Install firmware to /lib/firmware
mkdir -pv /lib/firmware/pcengines/apu
cd $(DIR_DL) && install -v -m 644 $(objects) \
/lib/firmware/pcengines/apu
@$(POSTBUILD)