File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,16 +46,34 @@ if [[ -z "$initrd" ]];then
4646 fi
4747fi
4848touch ./ubifs/uEnv.txt
49+
50+ if [[ -n " $variant " ]]; then
51+ case $variant in
52+ " bpi-r3-mini" )
53+ # r3mini is not selected via uEnv.txt...uboot is compiled with fixed bootconf
54+ ;;
55+ " bpi-r4-2g5" )
56+ echo " is2g5=1" > ./ubifs/uEnv.txt
57+ ;;
58+ " bpi-r4-pro" )
59+ echo " isR4Pro=1" > ./ubifs/uEnv.txt
60+ ;;
61+ " bpi-r4-lite" )
62+ echo " isr4lite=1" > ./ubifs/uEnv.txt
63+ ;;
64+ esac
65+ fi
4966if [[ -n " $initrd " ]]; then
5067 cp $initrd ./ubifs/
5168 if [[ $? -eq 0 ]]; then
52- echo " initrd=$initrd " > ./ubifs/uEnv.txt
69+ echo " initrd=$initrd " >> ./ubifs/uEnv.txt
5370 fi
54- ls -lh ./ubifs/
5571fi
72+ cat ./ubifs/uEnv.txt
5673# cp ${kernelfile} ./ubifs/
5774echo $kernelfile
5875tar -xzf ${kernelfile} --strip-components=1 -C ./ubifs/ --wildcards ' BPI-BOOT/*.itb'
76+ ls -lh ./ubifs/
5977
6078mkfs.ubifs -m 2048 -e 124KiB -c 800 -r ./ubifs/ rootfs.ubifs
6179
@@ -107,7 +125,12 @@ ubivol 3 rootfs rootfs.ubifs 1 50MiB
107125
108126peb_size=128
109127min_io_size=2048
110- ubinize -vv -o ${board} _nand.img -m ${min_io_size} -p ${peb_size} KiB ubi.conf
128+ if [[ -n " ${variant} " ]]; then
129+ imgname=${variant} _nand.img
130+ else
131+ imgname=${board} _nand.img
132+ fi
133+ ubinize -vv -o ${imgname} -m ${min_io_size} -p ${peb_size} KiB ubi.conf
111134if [[ $? -eq 0 ]]; then
112- echo " ${board} _nand.img created..."
135+ echo " ${imgname} created..."
113136fi
You can’t perform that action at this time.
0 commit comments