2 ## This file is part of the coreboot project.
4 ## Copyright 2016 Rockchip Inc.
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; version 2 of the License.
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
16 ifeq ($(CONFIG_SOC_ROCKCHIP_RK3399),y)
18 IDBTOOL = util/rockchip/make_idb.py
20 bootblock-y += ../common/spi.c
21 ifeq ($(CONFIG_BOOTBLOCK_CONSOLE),y)
22 bootblock-$(CONFIG_DRIVERS_UART) += ../common/uart.c
24 bootblock-y += ../common/gpio.c
25 bootblock-y += bootblock.c
26 bootblock-y += clock.c
28 bootblock-y += mmu_operations.c
29 bootblock-y += timer.c
31 verstage-y += ../common/cbmem.c
33 verstage-y += ../common/spi.c
34 verstage-$(CONFIG_DRIVERS_UART) += ../common/uart.c
38 ################################################################################
40 romstage-y += ../common/cbmem.c
42 romstage-y += ../common/spi.c
43 romstage-$(CONFIG_DRIVERS_UART) += ../common/uart.c
45 romstage-y += mmu_operations.c
46 romstage-y += ../common/pwm.c
48 romstage-y += romstage.c
52 romstage-y += ../common/gpio.c
54 ################################################################################
56 ramstage-y += ../common/cbmem.c
58 ramstage-y += ../common/spi.c
59 ramstage-$(CONFIG_DRIVERS_UART) += ../common/uart.c
61 ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += display.c
62 ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += ../common/edp.c
64 ramstage-y += ../common/gpio.c
66 ramstage-y += ../common/i2c.c
67 ramstage-y += saradc.c
70 ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += ../common/vop.c
73 BL31_MAKEARGS += PLAT=rk3399
74 ################################################################################
76 CPPFLAGS_common += -Isrc/soc/rockchip/rk3399/include
77 CPPFLAGS_common += -Isrc/soc/rockchip/common/include
79 $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin
80 @printf "Generating: $(subst $(obj)/,,$(@))\n"
82 @$(IDBTOOL) --from=$< --to=$@ --enable-align --chip=RK33