forked from Gateworks/linux-imx6
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgwventana_build.sh
executable file
·55 lines (45 loc) · 1.05 KB
/
gwventana_build.sh
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
#!/bin/bash
set -euxo pipefail
check_installed() {
needed=()
for pkg; do
if ! dpkg -s "${pkg}" &>/dev/null; then
needed+=("${pkg}")
fi
done
if (( ${#needed[@]} )); then
echo "Missing dependencies:"
echo " apt-get install -y ${needed[@]}"
return 1
fi
}
prereqs=(
bc
bison
build-essential
flex
gcc-arm-linux-gnueabihf
git
libssl-dev
liblzo2-dev
lzop
libncurses5-dev
u-boot-tools
)
check_installed "${prereqs[@]}"
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
export INSTALL_MOD_PATH=install
export INSTALL_HDR_PATH=install/usr
export LOADADDR=0x10008000
mkdir -p install/{boot,lib,usr}
make gwventana_defconfig
./scripts/config --enable BTRFS_FS
make -j$(nproc) uImage dtbs
make -j$(nproc) modules
make INSTALL_MOD_PATH=install modules_install \
INSTALL_HDR_PATH=install/usr headers_install
cp arch/arm/boot/uImage arch/arm/boot/dts/imx6*-gw*.dtb gwventana_bootscript \
install/boot/
mkimage -A arm -O linux -T script -n bootscript \
-d gwventana_bootscript install/boot/6x_bootscript-ventana