layerscape: define only one package for ls-mc
authorYangbo Lu <yangbo.lu@nxp.com>
Sat, 14 Mar 2020 06:25:33 +0000 (14:25 +0800)
committerPetr Štetiar <ynezz@true.cz>
Thu, 7 May 2020 10:53:06 +0000 (12:53 +0200)
We do not have to define package for each board, and
consider variant's installing.
It is easier to maintain ls-mc with only one package
installing all two images as intermediate files.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
package/firmware/layerscape/ls-mc/Makefile
target/linux/layerscape/image/armv8_64b.mk

index 657b3b33b76411e85b27abc07504288157f1959e..3f410350e76a2c9ebf87f7173b1c424e6893815a 100644 (file)
@@ -18,34 +18,22 @@ PKG_MIRROR_HASH:=17ecfd780b8d884b3843d2b8fbcaf29410fdacdc03ab3fe81ae7ade994d7fc0
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/layerscape-mc-ls1088ardb
+define Package/layerscape-mc
   SECTION:=firmware
   CATEGORY:=Firmware
-  TITLE:=NXP LS1088ARDB MC firmware
+  TITLE:=NXP MC firmware
   DEPENDS:=@TARGET_layerscape
-  CONFIG:=ls1088a/mc_10.14.3_ls1088a.itb
-endef
-
-define Package/layerscape-mc-ls2088ardb
-  SECTION:=firmware
-  CATEGORY:=Firmware
-  TITLE:=NXP LS2088ARDB MC firmware
-  DEPENDS:=@TARGET_layerscape
-  CONFIG:=ls2088a/mc_10.14.3_ls2088a.itb
 endef
 
 define Build/Compile
 endef
 
-define Package/layerscape-mc-ls1088ardb/install
-       $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
-       $(CP) $(PKG_BUILD_DIR)/$(CONFIG) $(STAGING_DIR_IMAGE)/ls1088ardb-mc.itb
-endef
-
-define Package/layerscape-mc-ls2088ardb/install
+define Build/InstallDev
        $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
-       $(CP) $(PKG_BUILD_DIR)/$(CONFIG) $(STAGING_DIR_IMAGE)/ls2088ardb-mc.itb
+       $(CP) $(PKG_BUILD_DIR)/ls1088a/mc_10.14.3_ls1088a.itb \
+               $(STAGING_DIR_IMAGE)/ls1088ardb-mc.itb
+       $(CP) $(PKG_BUILD_DIR)/ls2088a/mc_10.14.3_ls2088a.itb \
+               $(STAGING_DIR_IMAGE)/ls2088ardb-mc.itb
 endef
 
-$(eval $(call BuildPackage,layerscape-mc-ls1088ardb))
-$(eval $(call BuildPackage,layerscape-mc-ls2088ardb))
+$(eval $(call BuildPackage,layerscape-mc))
index a5458dc2097cc3d9f2fac5e6b46681319b7041b8..c981da356c74453cc54d961560b9ec34f119f2ed 100644 (file)
@@ -191,7 +191,7 @@ define Device/ls1088ardb
   DEVICE_MODEL := LS1088A-RDB
   DEVICE_VARIANT := Default
   DEVICE_PACKAGES += \
-    layerscape-mc-ls1088ardb \
+    layerscape-mc \
     layerscape-dpl-ls1088ardb \
     tfa-ls1088ardb \
     restool
@@ -218,7 +218,7 @@ define Device/ls1088ardb-sdboot
   DEVICE_MODEL := LS1088A-RDB
   DEVICE_VARIANT := SD Card Boot
   DEVICE_PACKAGES += \
-    layerscape-mc-ls1088ardb \
+    layerscape-mc \
     layerscape-dpl-ls1088ardb \
     tfa-ls1088ardb-sdboot \
     restool
@@ -244,7 +244,7 @@ define Device/ls2088ardb
   DEVICE_VENDOR := NXP
   DEVICE_MODEL := LS2088ARDB
   DEVICE_PACKAGES += \
-    layerscape-mc-ls2088ardb \
+    layerscape-mc \
     layerscape-dpl-ls2088ardb \
     tfa-ls2088ardb \
     restool