Skip to content

Commit

Permalink
kdeb: try to add kernels for bpi-boards to deb-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-w committed Mar 29, 2024
1 parent acb787f commit eb3e6aa
Showing 1 changed file with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions scripts/package/builddeb
Expand Up @@ -59,9 +59,46 @@ install_linux_image () {
parisc|mips|powerpc)
installed_image_path="boot/vmlinux-${KERNELRELEASE}";;
*)
installed_image_path="boot/vmlinuz-${KERNELRELEASE}";;
source_image_path="./$board.itb"
installed_image_path=boot/$board-${KERNELRELEASE}.itb
case $board in
bpi-r2)
mkdir -p "${pdir}/boot/bananapi/$board/linux/dtb"
DTBFILE=arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dtb
cp ${srctree}/uImage_nodt "${pdir}/boot/bananapi/$board/linux/uImage-${KERNELRELEASE}_nodt"
source_image_path="${srctree}/uImage"
installed_image_path="boot/bananapi/$board/linux/uImage-${KERNELRELEASE}"
;;
bpi-r64)
mkdir -p "${pdir}/boot/bananapi/$board/linux/dtb"
DTBFILE=arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dtb
cp ${srctree}/uImage_nodt "${pdir}/boot/bananapi/$board/linux/uImage-${KERNELRELEASE}_nodt"
;;
bpi-r2pro)
DTBFILE=arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dtb
mkdir -p ${pdir}/boot/extlinux/
cp arch/arm64/boot/Image.gz "${pdir}/boot/extlinux/Image-${KERNELRELEASE}.gz"
;;
bpi-r3|bpi-r4)
#R3/R4 only use FIT and no standalone kernel/dtbs
;;
*)
installed_image_path="boot/vmlinuz-${KERNELRELEASE}"
source_image_path="$($MAKE -s -f ${srctree}/Makefile image_name)"
;;
esac
;;
esac
cp "$(${MAKE} -s -f ${srctree}/Makefile image_name)" "${pdir}/${installed_image_path}"

if [ -n "$DTBFILE" ];then
if [ $board != "bpi-r2pro" ];then
cp $DTBFILE "${pdir}/boot/bananapi/$board/linux/dtb/$board-${KERNELRELEASE}.dtb"
else
cp $DTBFILE "${pdir}/boot/extlinux/$board-${KERNELRELEASE}.dtb"
fi
fi

cp "${source_image_path}" "${pdir}/${installed_image_path}"

# Install the maintainer scripts
# Note: hook scripts under /etc/kernel are also executed by official Debian
Expand Down

0 comments on commit eb3e6aa

Please sign in to comment.