-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathMakefile
28 lines (24 loc) · 994 Bytes
/
Makefile
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
url_buildroot = https://buildroot.org/downloads/buildroot-2018.02.tar.gz
archive_buildroot = buildroot.tar.gz
dir_download = downloads
dir_configs = configs
dir_buildroot = buildroot
dir_publish = /srv/tftp/stm32f769/
bootstrap:
mkdir -p $(dir_download)
mkdir -p $(dir_buildroot)
wget -O $(dir_download)/$(archive_buildroot) $(url_buildroot)
tar zxvf $(dir_download)/$(archive_buildroot) -C $(dir_buildroot) --strip-components=1
cp $(dir_configs)/buildroot $(dir_buildroot)/.config
build:
make -j10 -C $(dir_buildroot)
cp $(dir_buildroot)/output/images/stm32f769-disco.dtb ${dir_publish}/
cp $(dir_buildroot)/output/images/zImage ${dir_publish}/
flash_bootloader:
cd $(dir_buildroot)/output/build/host-openocd-0.10.0/tcl && ../../../host/usr/bin/openocd \
-f board/stm32f7discovery.cfg \
-c "program ../../../images/u-boot-spl.bin 0x08000000" \
-c "program ../../../images/u-boot.bin 0x08008000" \
-c "reset run" -c shutdown
clean:
rm -rf $(dir_buildroot) $(dir_download)