layerscape: add SD card boot support
[openwrt/openwrt.git] / package / firmware / layerscape / ls-rcw / Makefile
1 #
2 # Copyright (C) 2016 Jiang Yutang <jiangyutang1978@gmail.com>
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ls-rcw
11 PKG_VERSION:=lsdk-1806
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/rcw
16 PKG_SOURCE_VERSION:=1f43bef4b4475d8e81c9b3b8c5bdd6c1ce8cfa6c
17 PKG_MIRROR_HASH:=a3b455bcc1f070c8e51f520e32b62cec5b05d772d7ae4a876d88fd5f278a7b1c
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/layerscape-rcw/Config
22 define Package/layerscape-rcw-$(1)
23 SECTION:=firmware
24 CATEGORY:=Firmware
25 TITLE:=$(2)
26 DEPENDS:=@TARGET_layerscape
27 CONFIG:=$(3)
28 endef
29 endef
30
31 define Package/layerscape-rcw/ls1012ardb
32 TITLE:=NXP LS1012ARDB RCW binary
33 CONFIG:=ls1012ardb/R_SPNH_3508/rcw_1000_default.bin.swapped
34 endef
35
36 define Package/layerscape-rcw/ls1012afrdm
37 TITLE:=NXP LS1012AFRDM RCW binary
38 CONFIG:=ls1012afrdm/N_SSNP_3305/rcw_800.bin.swapped
39 endef
40
41 define Package/layerscape-rcw/ls1043ardb
42 TITLE:=NXP LS1043ARDB RCW binary
43 CONFIG:=ls1043ardb/RR_FQPP_1455/rcw_1600.bin
44 endef
45
46 define Package/layerscape-rcw/ls1046ardb
47 TITLE:=NXP LS1046ARDB RCW binary
48 CONFIG:=ls1046ardb/RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot.bin.swapped
49 endef
50
51 define Package/layerscape-rcw/ls1088ardb
52 TITLE:=NXP LS1088ARDB RCW binary
53 CONFIG:=ls1088ardb/FCQQQQQQQQ_PPP_H_0x1d_0x0d/rcw_1600_qspi.bin
54 endef
55
56 define Package/layerscape-rcw/ls1088ardb-sdboot
57 TITLE:=NXP LS1088ARDB SD card boot RCW binary
58 CONFIG:=ls1088ardb/FCQQQQQQQQ_PPP_H_0x1d_0x0d/rcw_1600_sd.bin
59 endef
60
61 define Package/layerscape-rcw/ls2088ardb
62 TITLE:=NXP LS2088ARDB RCW binary
63 CONFIG:=ls2088ardb/FFFFFFFF_PP_HH_0x2a_0x41/rcw_1800.bin
64 endef
65
66 define Package/layerscape-rcw/ls1021atwr
67 TITLE:=NXP LS1021ATWR RCW binary
68 CONFIG:=ls1021atwr/SSR_PNS_30/rcw_1200.bin
69 endef
70
71 define Package/layerscape-rcw/Install
72 define Package/layerscape-rcw-$(1)/install
73 $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
74 $(CP) $(PKG_BUILD_DIR)/$(CONFIG) $(STAGING_DIR_IMAGE)/$(1)-rcw.bin
75 endef
76 endef
77
78 RCWS := \
79 ls1012ardb \
80 ls1012afrdm \
81 ls1043ardb \
82 ls1046ardb \
83 ls1088ardb \
84 ls1088ardb-sdboot \
85 ls2088ardb \
86 ls1021atwr
87
88 $(foreach rcw,$(RCWS), \
89 $(eval $(Package/layerscape-rcw/$(rcw))) \
90 $(eval $(call Package/layerscape-rcw/Config,$(rcw),$(TITLE),$(CONFIG))) \
91 $(eval $(call Package/layerscape-rcw/Install,$(rcw))) \
92 $(eval $(call BuildPackage,layerscape-rcw-$(rcw))) \
93 )