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