-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build-uboot.sh
executable file
·53 lines (43 loc) · 1.23 KB
/
build-uboot.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
#!/bin/sh
#
# Copyright (c) 2015-2019 Krzysztof Kozlowski
# Author: Krzysztof Kozlowski <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0
#
die() {
echo "Fail: $1"
exit 1
}
usage() {
echo "$(basename $0) <board>"
echo " board - arndale, arndale-octa, odroid-u3, odroid-xu3, all"
exit 1
}
build() {
local config="$1"
echo "#########################################################"
echo "Building config: $config"
make ${config}_config
make -j`getconf _NPROCESSORS_ONLN`
}
set -e -E
BOARD="$1"
test -n "$BOARD" || usage
if [ "$BOARD" = "all" ]; then
CONFIG="arndale odroid odroid-xu3 origen peach-pi peach-pit s5pc210_universal s5p_goni smdk5250 smdk5420 smdkc100 smdkv310 snow trats trats2"
# TODO: espresso7420
else
CONFIG="$BOARD"
fi
export CROSS_COMPILE="${CROSS_COMPILE:=arm-linux-gnueabi-}" ARCH="${ARCH:=arm}"
make clean
for config in $CONFIG; do
build $config
done
echo "U-boot fusing for SD:"
echo "dd iflag=dsync oflag=dsync if=u-boot-dtb.bin of=/dev/mmcblk0 seek=63"
echo "U-boot fusing for eMMC (cannot be done through adapter):"
echo "echo 0 > /sys/block/mmcblk1boot0/force_ro"
echo "dd iflag=dsync oflag=dsync if=u-boot-dtb.bin of=/dev/mmcblk1boot0 seek=62"