-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatform.mk
37 lines (27 loc) · 1.21 KB
/
platform.mk
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
firmware_repo:=https://github.com/raspberrypi/firmware.git
firmware_version:=1.20210201
firmware_images:=$(curPath)/firmware-rpi
firmware_config:=$(imgPath)/config.txt
atf_src:=$(srcPath)/arm-trusted-firmware
atf_dest_image:=$(imgPath)/bl31.bin
atf_plat:=$(PLATFORM)
uboot_src:=$(srcPath)/u-boot
uboot_defconfig:=rpi_4_defconfig
uboot_dest_image:=$(imgPath)/u-boot.bin
atf $(atf_dest_image): $(atf_src)
$(MAKE) -C $(atf_src) bl31 PLAT=$(atf_plat)
cp $(atf_src)/build/$(atf_plat)/release/bl31.bin $(atf_dest_image)
u-boot $(uboot_dest_image): $(uboot_src)
$(MAKE) -C $(uboot_src) $(uboot_defconfig)
echo 'CONFIG_CMD_CACHE=y' >> $(uboot_src)/.config
$(MAKE) -C $(uboot_src) -j$(nproc)
cp $(uboot_src)/u-boot.bin $(uboot_dest_image)
$(firmware_images):
git clone --depth 1 --branch $(firmware_version) $(firmware_repo) $(firmware_images)
$(firmware_config):
cp $(confPath)/firmware_config_rpi4.txt $(firmware_config)
#instuctions:=$(bao_demos)/platforms/$(PLATFORM)/README.md
platform: $(uboot_dest_image) $(atf_dest_image) $(firmware_images) $(firmware_config)
# $(call print-instructions, $(instuctions), 1, false)
# $(call print-instructions, $(instuctions), 2, false)
# $(call print-instructions, $(instuctions), 3, true)