-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_uboot_vim2
executable file
·72 lines (47 loc) · 1.14 KB
/
make_uboot_vim2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
## hyphop ##
#= build wrapper for mailline uboot
#/ menuconfig
# savedefconfig
# -j14
set -e
VIM=VIM2
P=$(dirname $0)
export PATH=$PWD/../../fenix/build/toolchains/gcc-linaro-aarch64-none-elf/bin:$PATH
export PATH=$PWD/../../fenix/build/toolchains/gcc-arm-none-eabi/bin:$PATH
export ARCH=arm64
export CROSS_COMPILE=aarch64-none-elf-
CMD(){
echo "[#] $@">&2
"$@"
}
for DIR in ../../u-boot-vim1; do
[ -d "$DIR" ] && break
done
[ -f $DIR/build/.config ] || {
CMD make -C "$DIR" kvim2_defconfig
}
CMD make -C "$DIR" "$@"
DIR="$(realpath $DIR)"
#exit 0
F=/tmp/uboot_vim2
[ -d $F ] && rm -rf $F
[ -d $F ] || mkdir $F
. $P/VIM2.inc
echo "[i] post process">&2
uboot_custom_postprocess "$(realpath $DIR)" "$(realpath ../../fip)" "$F"
cd $F
mv u-boot.bin u-boot.spi.bin
mv u-boot.bin.sd.bin u-boot.sd.bin
rm bl* a* *.tpl *.bl2
rm fip.bin *_new.bin *encrypt*
#for b in *.bin; do
# gzip -c $b > $b.gz
#done
echo "[i] output: $F">&2
ls -l1 $F
F2=/tmp/uboot_vims
[ -d $F2 ] || mkdir $F2
cp u-boot.sd.bin $F2/u-boot.$VIM.sd.bin
cp u-boot.spi.bin $F2/u-boot.$VIM.spi.bin
gzip -c $DIR/build/u-boot.bin > $F2/u-boot.$VIM.bin.gz