We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b9bf8e commit f22578cCopy full SHA for f22578c
1 file changed
buildimg.sh
@@ -82,6 +82,17 @@ if [[ $? -ne 0 ]];then echo "losetup ${LDEV} failed (${newimgfile%.*})"; exit 1;
82
echo "mounting loopdev..."
83
sudo partprobe ${LDEV}
84
if [[ $? -ne 0 ]];then echo "partprobe failed"; exit 1; fi
85
+
86
+#replacing bl2 (e.g. R4 8GB)
87
+if [[ -n "$replacebl2" ]] && [[ -n "$bl2file" ]] && [[ -e "$bl2file" ]];then
88
+ echo "replace BL2 with $bl2file";
89
+ if [[ "$board" =~ ^bpi-r4 ]];then
90
+ sudo dd if=$bl2file of=${LDEV}p1
91
+ else
92
+ echo "BL2 replacement for $board not supported"
93
+ fi
94
+fi
95
96
mkdir -p mnt/BPI-{B,R}OOT
97
sudo mount ${LDEV}p${mmcbootpart} mnt/BPI-BOOT
98
if [[ $? -ne 0 ]];then echo "mounting BPI-BOOT failed"; exit 1; fi
0 commit comments