-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild
More file actions
executable file
·43 lines (35 loc) · 1.14 KB
/
build
File metadata and controls
executable file
·43 lines (35 loc) · 1.14 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
#!/bin/sh
set -e
if [ -z "${DTC}" ]
then
DTC=dtc
fi
dtc_me() {
pushd "$1" >/dev/null
TARGET_DIR="target/x86_64-unknown-none/release"
mkdir -p "${TARGET_DIR}"
FIXED_DTFS=fixed-dtfs.dtb
"${DTC}" -W no-unit_address_vs_reg fixed-dtfs.dts -O dtb -o "${TARGET_DIR}/${FIXED_DTFS}"
popd >/dev/null
}
if [ -z "${MAINBOARD}" ]
then
MAINBOARD="src/mainboard/amd/romecrb"
fi
# Docker takes very long to transfer ~1 GiB otherwise
for s in tools/layoutflash/target src/mainboard/emulation/qemu-q35/target src/mainboard/amd/romecrb/target src/mainboard/asrock/a300m-stx/target
do
if ! [ "$s" = "${MAINBOARD}/target" ]
then
rm -rf -- "$s"
fi
done
dtc_me "${PWD}/src/mainboard/amd/romecrb"
dtc_me "${PWD}/src/mainboard/emulation/qemu-q35"
dtc_me "${PWD}/src/mainboard/asrock/a300m-stx"
../in-rust-nightly -w "${MAINBOARD}" -r "${MAINBOARD}" as -c -o start.o start.S
../in-rust-nightly -w "${MAINBOARD}" -r "${MAINBOARD}" objcopy -O binary start.o start.bin
../in-rust-nightly make format
../in-rust-nightly make OBJCOPY=objcopy -C "${MAINBOARD}" "$@"
#exec "`dirname $0`/pack"
#exec ../in-rust-nightly make OBJCOPY=objcopy -C src/mainboard/emulation/qemu-q35 "$@"