-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathpackage.mk
43 lines (38 loc) · 1.9 KB
/
package.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue ([email protected])
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="bcm2835-bootloader"
PKG_VERSION="b543406ce066d3fcaa03078511bc47e62ad0bbec"
PKG_SHA256="0e696f4b8a78ca8826c5fea3ffafd9189d32308d964bc45f890371db526f094e"
PKG_ARCH="arm aarch64"
PKG_LICENSE="nonfree"
PKG_SITE="http://www.broadcom.com"
PKG_URL="${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain linux bcmstat"
PKG_LONGDESC="bcm2835-bootloader: Tool to create a bootable kernel for RaspberryPi"
PKG_TOOLCHAIN="manual"
makeinstall_target() {
mkdir -p ${INSTALL}/usr/share/bootloader
cp -PRv LICENCE* ${INSTALL}/usr/share/bootloader
case "${DEVICE}" in
RPi4)
cp -PRv fixup4x.dat ${INSTALL}/usr/share/bootloader/fixup.dat
cp -PRv start4x.elf ${INSTALL}/usr/share/bootloader/start.elf
;;
RPi5) ;;
*)
cp -PRv bootcode.bin ${INSTALL}/usr/share/bootloader
cp -PRv fixup_x.dat ${INSTALL}/usr/share/bootloader/fixup.dat
cp -PRv start_x.elf ${INSTALL}/usr/share/bootloader/start.elf
;;
esac
find_file_path bootloader/update.sh ${PKG_DIR}/files/update.sh && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/share/bootloader
if find_file_path bootloader/canupdate.sh; then
cp -PRv ${FOUND_PATH} ${INSTALL}/usr/share/bootloader
sed -e "s/@PROJECT@/${DEVICE:-${PROJECT}}/g" \
-i ${INSTALL}/usr/share/bootloader/canupdate.sh
fi
find_file_path config/distroconfig.txt ${PKG_DIR}/files/distroconfig.txt && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/share/bootloader
find_file_path config/distroconfig-composite.txt ${PKG_DIR}/files/distroconfig-composite.txt && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/share/bootloader
find_file_path config/config.txt ${PKG_DIR}/files/config.txt && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/share/bootloader
}