forked from MrChromebox/coreboot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-legacy.sh
More file actions
executable file
·59 lines (53 loc) · 2.23 KB
/
build-legacy.sh
File metadata and controls
executable file
·59 lines (53 loc) · 2.23 KB
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
#!/bin/bash
#
set -e
hsw=("falco" "leon" "mccloud" "monroe" "panther" "peppy" "tricky" "wolf" "zako");
bdw=("auron_paine" "auron_yuna" "gandof" "guado" "lulu" "rikku" "samus" "tidus");
byt=("banjo" "candy" "clapper" "enguarde" "glimmer" "gnawty" "heli" \
"kip" "ninja" "orco" "quawks" "squawks" "sumo" "swanky" "winky");
snb_ivb=("link" "parrot_ivb" "parrot_snb" "stumpy");
if [ -z "$1" ]; then
build_targets=($(printf "%s " "${hsw[@]}" "${bdw[@]}" "${byt[@]}" "${snb_ivb[@]}"));
else
build_targets=($@);
fi
for device in ${build_targets[@]}
do
filename="coreboot_seabios-${device}-mrchromebox_`date +"%Y%m%d"`.rom"
rm -f ~/dev/firmware/${filename}*
rm -rf ./build
cp configs/.config.${device}.legacy .config
make
cp ./build/coreboot.rom ./${filename}
if [[ "${hsw[@]}" =~ "$device" || "${bdw[@]}" =~ "$device" ]]; then
cbfstool ${filename} add -f ./cbfs/bootorder.ssd -n bootorder -t raw
cbfstool ${filename} add -f ./cbfs/links.hswbdw -n links -t raw
elif [[ "${byt[@]}" =~ "$device" ]]; then
cbfstool ${filename} add -f ./cbfs/bootorder.emmc -n bootorder -t raw
cbfstool ${filename} add-int -i 0xd071f000 -n etc/sdcard0
cbfstool ${filename} add-int -i 0xd071c000 -n etc/sdcard1
cbfstool ${filename} add-int -i 0xd081f000 -n etc/sdcard2
cbfstool ${filename} add-int -i 0xd081c000 -n etc/sdcard3
elif [[ "${snb_ivb[@]}" =~ "$device" ]]; then
cbfstool ${filename} add -f ./cbfs/bootorder.ssd -n bootorder -t raw
cbfstool ${filename} add -f ./cbfs/links.sbib -n links -t raw
fi
cbfstool ${filename} add-int -i 3000 -n etc/boot-menu-wait
cbfstool ${filename} print
sha1sum ${filename} > ${filename}.sha1
mv ${filename}* ~/dev/firmware/
#special case peppy trackpad type
if [ "${device}" == "peppy" ]; then
filename="coreboot_seabios-peppy_elan-mrchromebox_`date +"%Y%m%d"`.rom"
rm -rf ./build
sed -i 's/# CONFIG_ELAN_TRACKPAD_ACPI is not set/CONFIG_ELAN_TRACKPAD_ACPI=y/' .config
make
cp ./build/coreboot.rom ./${filename}
cbfstool ${filename} add -f ./cbfs/bootorder.ssd -n bootorder -t raw
cbfstool ${filename} add -f ./cbfs/links.hswbdw -n links -t raw
cbfstool ${filename} add-int -i 3000 -n etc/boot-menu-wait
cbfstool ${filename} print
sha1sum ${filename} > ${filename}.sha1
mv ${filename}* ~/dev/firmware/
fi
done