-
Notifications
You must be signed in to change notification settings - Fork 1
/
kernel_prepare
executable file
·90 lines (65 loc) · 1.47 KB
/
kernel_prepare
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/sh
## hyphop ##
. ./,config
[ -d $src ] || mkdir $src
[ -f $src/._PREPARED_ ] && {
echo "[i] prepared already!!!
NEXT:
./kernel_build_all
" 1>&2;
exit 0
}
[ -d logs ] || mkdir logs
arm-openwrt-linux-gcc --version 2>/dev/null 1>/dev/null || {
[ -s ../$tc_gcc_squash ] || {
cmd="wget $squash_tc_link -O ../$squash_tc_name"
echo $cmd
$cmd
#exit 0
}
[ -s ../$tc_gcc_squash ] && {
[ -d ../$tc_gcc_dir ] || mkdir ../$tc_gcc_dir
cmd="mount -o ro ../$tc_gcc_squash ../$tc_gcc_dir"
echo $cmd
$cmd
}
# [ -s $tc_gcc.tar.bz2 ] || wget $tc_src
# tar -xf $tc_gcc.tar.bz2
# ln -s $tc_gcc/$tc_gcc_dir $tc_gcc_dir
}
[ -s $src/Makefile ] || {
#toolchain-arm_cortex-a9.neon_gcc-5.3.0_musl-1.1.15_eabi.squashfs
[ -s $squash_src ] || {
wget -c $squash_src_link -O ../$squash_src_name
}
[ -s $squash_src ] && {
echo "mount squash & overlay"
./mount_overlay_squash
}
}
[ -s $src/Makefile ] || {
[ -s $pack_src ] && {
echo "unpack $pack_src"
tar -xf $pack_src
}
}
[ -s $src/Makefile ] || {
echo "get source from git"
#git clone --depth 1 -b v2017.01 https://github.com/RobertCNelson/u-boot $src
#rm -rd $src/.git
}
cd $bdir
#exit;
#ls -l1 $patches/
./kernel_config "$@" && {
echo 1 > $src/._PREPARED_
echo "[i] ok source is prepared $@
NEXT:
./kernel_build_all
" 1>&2
}
cd $src
cat ../$patches/*.patch | patch -p1 >> ../logs/patched.log
#cp -a ../$add/* .
cd ..
#make -C $kernel_path allyesconfig