layerscape: add armv7 subtarget and ls1021atwr board support
[openwrt/openwrt.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-1806
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:=b3f98d438eefd1b355efdec0b50af5813ff8d0e1
17 PKG_MIRROR_HASH:=59e35957055658e7fdefb16b92f954356985a8191942d93f254861c75c47b32b
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/ls1012ardb
31 NAME:=NXP LS1012ARDB
32 UBOOT_CONFIG:=ls1012ardb_qspi
33 ENV_SIZE:=0x40000
34 endef
35
36 define U-Boot/ls1012afrdm
37 NAME:=NXP LS1012AFRDM
38 UBOOT_CONFIG:=ls1012afrdm_qspi
39 ENV_SIZE:=0x40000
40 endef
41
42 define U-Boot/ls1043ardb
43 NAME:=NXP LS1043ARDB
44 ENV_SIZE:=0x20000
45 endef
46
47 define U-Boot/ls1046ardb
48 NAME:=NXP LS1046ARDB
49 UBOOT_CONFIG:=ls1046ardb_qspi
50 endef
51
52 define U-Boot/ls1088ardb
53 NAME:=NXP LS1088ARDB
54 UBOOT_CONFIG:=ls1088ardb_qspi
55 endef
56
57 define U-Boot/ls2088ardb
58 NAME:=NXP LS2088ARDB
59 UBOOT_CONFIG:=ls2080ardb
60 endef
61
62 define U-Boot/ls1021atwr
63 NAME:=NXP LS1021ATWR
64 BUILD_SUBTARGET:=armv7
65 UBOOT_CONFIG:=ls1021atwr_nor
66 ENV_SIZE:=0x20000
67 endef
68
69 UBOOT_TARGETS := \
70 ls1012ardb \
71 ls1012afrdm \
72 ls1043ardb \
73 ls1046ardb \
74 ls1088ardb \
75 ls2088ardb \
76 ls1021atwr
77
78 define Build/InstallDev
79 $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
80 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) \
81 $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot.bin
82 $(PKG_BUILD_DIR)/tools/mkenvimage -s $(ENV_SIZE) \
83 -o $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot-env.bin \
84 files/$(BUILD_VARIANT)-uEnv.txt
85 endef
86
87 define Package/u-boot/install/default
88 endef
89
90 $(eval $(call BuildPackage/U-Boot))