layerscape: resurrect support for FRDM-LS1012A
[openwrt/staging/mkresin.git] / package / boot / uboot-layerscape / 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:=uboot-layerscape
11 PKG_VERSION:=lsdk-1903
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot
16 PKG_SOURCE_VERSION:=80b2d2bc4cab0a8363c9b7eba8064b1795f12670
17 PKG_MIRROR_HASH:=5c467af40b4479f0ea16697ab54602bed815a23212293184943dca8a3a406d5c
18
19 include $(INCLUDE_DIR)/u-boot.mk
20 include $(INCLUDE_DIR)/package.mk
21
22 define U-Boot/Default
23 BUILD_TARGET:=layerscape
24 BUILD_SUBTARGET:=armv8_64b
25 BUILD_DEVICES:=$(1)
26 UBOOT_IMAGE:=u-boot-dtb.bin
27 ENV_SIZE:=0x2000
28 endef
29
30 define U-Boot/ls1012afrdm
31 NAME:=NXP LS1012AFRDM
32 UBOOT_CONFIG:=ls1012afrdm_tfa
33 ENV_SIZE:=0x40000
34 endef
35
36 define U-Boot/ls1012ardb
37 NAME:=NXP LS1012ARDB
38 UBOOT_CONFIG:=ls1012ardb_tfa
39 ENV_SIZE:=0x40000
40 endef
41
42 define U-Boot/ls1012afrwy
43 NAME:=NXP LS1012AFRWY
44 UBOOT_CONFIG:=ls1012afrwy_tfa
45 ENV_SIZE:=0x10000
46 endef
47
48 define U-Boot/ls1043ardb
49 NAME:=NXP LS1043ARDB
50 UBOOT_CONFIG:=ls1043ardb_tfa
51 endef
52
53 define U-Boot/ls1043ardb-sdboot
54 NAME:=NXP LS1043ARDB SD Card Boot
55 UBOOT_CONFIG:=ls1043ardb_tfa
56 endef
57
58
59 define U-Boot/ls1046ardb
60 NAME:=NXP LS1046ARDB
61 UBOOT_CONFIG:=ls1046ardb_tfa
62 endef
63
64 define U-Boot/ls1046ardb-sdboot
65 NAME:=NXP LS1046ARDB SD Card Boot
66 UBOOT_CONFIG:=ls1046ardb_tfa
67 endef
68
69
70 define U-Boot/ls1088ardb
71 NAME:=NXP LS1088ARDB
72 UBOOT_CONFIG:=ls1088ardb_tfa
73 endef
74
75
76 define U-Boot/ls1088ardb-sdboot
77 NAME:=NXP LS1088ARDB SD Card Boot
78 UBOOT_CONFIG:=ls1088ardb_tfa
79 endef
80
81 define U-Boot/ls2088ardb
82 NAME:=NXP LS2088ARDB
83 UBOOT_CONFIG:=ls2088ardb_tfa
84 endef
85
86 define U-Boot/ls1021atwr
87 NAME:=NXP LS1021ATWR
88 BUILD_SUBTARGET:=armv7
89 UBOOT_CONFIG:=ls1021atwr_nor
90 ENV_SIZE:=0x20000
91 endef
92
93 define U-Boot/ls1021atwr-sdboot
94 NAME:=NXP LS1021ATWR SD Card Boot
95 BUILD_SUBTARGET:=armv7
96 UBOOT_CONFIG:=ls1021atwr_sdcard_ifc
97 UBOOT_IMAGE:=u-boot-with-spl-pbl.bin
98 ENV_SIZE:=0x20000
99 endef
100
101 define U-Boot/ls1021aiot-sdboot
102 NAME:=NXP LS1021AIOT SD Card Boot
103 BUILD_SUBTARGET:=armv7
104 UBOOT_CONFIG:=ls1021aiot_sdcard
105 UBOOT_IMAGE:=u-boot-with-spl-pbl.bin
106 ENV_SIZE:=0x2000
107 endef
108
109
110 UBOOT_TARGETS := \
111 ls1012afrdm \
112 ls1012ardb \
113 ls1012afrwy \
114 ls1043ardb \
115 ls1043ardb-sdboot \
116 ls1046ardb \
117 ls1046ardb-sdboot \
118 ls1088ardb \
119 ls1088ardb-sdboot \
120 ls2088ardb \
121 ls1021atwr \
122 ls1021atwr-sdboot \
123 ls1021aiot-sdboot
124
125 define Build/InstallDev
126 $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
127 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) \
128 $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot.bin
129 $(PKG_BUILD_DIR)/tools/mkenvimage -s $(ENV_SIZE) \
130 -o $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot-env.bin \
131 files/$(BUILD_VARIANT)-uEnv.txt
132 endef
133
134 define Package/u-boot/install/default
135 endef
136
137 $(eval $(call BuildPackage/U-Boot))