@@ -59,9 +59,46 @@ install_linux_image () {
59
59
parisc|mips|powerpc)
60
60
installed_image_path=" boot/vmlinux-${KERNELRELEASE} " ;;
61
61
* )
62
- installed_image_path=" boot/vmlinuz-${KERNELRELEASE} " ;;
62
+ source_image_path=" ./$board .itb"
63
+ installed_image_path=boot/$board -${KERNELRELEASE} .itb
64
+ case $board in
65
+ bpi-r2)
66
+ mkdir -p " ${pdir} /boot/bananapi/$board /linux/dtb"
67
+ DTBFILE=arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dtb
68
+ cp ${srctree} /uImage_nodt " ${pdir} /boot/bananapi/$board /linux/uImage-${KERNELRELEASE} _nodt"
69
+ source_image_path=" ${srctree} /uImage"
70
+ installed_image_path=" boot/bananapi/$board /linux/uImage-${KERNELRELEASE} "
71
+ ;;
72
+ bpi-r64)
73
+ mkdir -p " ${pdir} /boot/bananapi/$board /linux/dtb"
74
+ DTBFILE=arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dtb
75
+ cp ${srctree} /uImage_nodt " ${pdir} /boot/bananapi/$board /linux/uImage-${KERNELRELEASE} _nodt"
76
+ ;;
77
+ bpi-r2pro)
78
+ DTBFILE=arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dtb
79
+ mkdir -p ${pdir} /boot/extlinux/
80
+ cp arch/arm64/boot/Image.gz " ${pdir} /boot/extlinux/Image-${KERNELRELEASE} .gz"
81
+ ;;
82
+ bpi-r3|bpi-r4)
83
+ # R3/R4 only use FIT and no standalone kernel/dtbs
84
+ ;;
85
+ * )
86
+ installed_image_path=" boot/vmlinuz-${KERNELRELEASE} "
87
+ source_image_path=" $( $MAKE -s -f ${srctree} /Makefile image_name) "
88
+ ;;
89
+ esac
90
+ ;;
63
91
esac
64
- cp " $( ${MAKE} -s -f ${srctree} /Makefile image_name) " " ${pdir} /${installed_image_path} "
92
+
93
+ if [ -n " $DTBFILE " ]; then
94
+ if [ $board != " bpi-r2pro" ]; then
95
+ cp $DTBFILE " ${pdir} /boot/bananapi/$board /linux/dtb/$board -${KERNELRELEASE} .dtb"
96
+ else
97
+ cp $DTBFILE " ${pdir} /boot/extlinux/$board -${KERNELRELEASE} .dtb"
98
+ fi
99
+ fi
100
+
101
+ cp " ${source_image_path} " " ${pdir} /${installed_image_path} "
65
102
66
103
# Install the maintainer scripts
67
104
# Note: hook scripts under /etc/kernel are also executed by official Debian
0 commit comments