package/rcw-smarc-sal28: new package
authorMichael Walle <michael@walle.cc>
Tue, 12 Jan 2021 10:51:53 +0000 (11:51 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Thu, 14 Jan 2021 21:30:46 +0000 (22:30 +0100)
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
DEVELOPERS
package/Config.in
package/rcw-smarc-sal28/Config.in [new file with mode: 0644]
package/rcw-smarc-sal28/rcw-smarc-sal28.hash [new file with mode: 0644]
package/rcw-smarc-sal28/rcw-smarc-sal28.mk [new file with mode: 0644]

index 05b509c9c430d7de0223038055f69b361c0ce8b1..e4f1c13fb4a8b8f1c14efc233e76bb8b7fedf329 100644 (file)
@@ -1873,6 +1873,7 @@ N:        Michael Walle <michael@walle.cc>
 F:     board/kontron/smarc-sal28/
 F:     configs/kontron_smarc_sal28_defconfig
 F:     package/libavl/
+F:     package/rcw-smarc-sal28/
 
 N:     Michał Łyszczek <michal.lyszczek@bofc.pl>
 F:     board/altera/socrates_cyclone5/
index 5a16814ca8372ce8f9bf329d989a497f94a71d56..81ad4979a1cb0f86d4f75a14c208d110846f48b7 100644 (file)
@@ -409,6 +409,7 @@ menu "Firmware"
        source "package/murata-cyw-fw/Config.in"
        source "package/odroidc2-firmware/Config.in"
        source "package/qcom-db410c-firmware/Config.in"
+       source "package/rcw-smarc-sal28/Config.in"
        source "package/rpi-bt-firmware/Config.in"
        source "package/rpi-firmware/Config.in"
        source "package/rpi-wifi-firmware/Config.in"
diff --git a/package/rcw-smarc-sal28/Config.in b/package/rcw-smarc-sal28/Config.in
new file mode 100644 (file)
index 0000000..2a46c9f
--- /dev/null
@@ -0,0 +1,25 @@
+config BR2_PACKAGE_RCW_SMARC_SAL28
+       bool "rcw-smarc-sal28"
+       help
+         The reset configuration word for the SMARC-sAL28 board. All
+         available RCWs are copied into the images output directory.
+         Additionally, you have to choose one default RCW which is
+         used for booting the board.
+
+if BR2_PACKAGE_RCW_SMARC_SAL28
+config BR2_PACKAGE_RCW_SMARC_SAL28_BUILD_UPDATE_SCRIPT
+       bool "Build RCW u-boot update script"
+       select BR2_PACKAGE_HOST_UBOOT_TOOLS
+       help
+         Build the RCW updater script which can be used in the
+         bootloader to change the installed RCW during runtime. The
+         update script is called update-rcw.img and will be copied
+         to the output directory.
+
+config BR2_PACKAGE_RCW_SMARC_SAL28_BOOT_VARIANT
+       string "RCW variant for booting"
+       default "3-11_q"
+       help
+         The suffix of the RCW filename without the ".bin" part.
+         E.g.  setting this to "3-11_q" will use "sl28-3-11_q.bin".
+endif
diff --git a/package/rcw-smarc-sal28/rcw-smarc-sal28.hash b/package/rcw-smarc-sal28/rcw-smarc-sal28.hash
new file mode 100644 (file)
index 0000000..1f9b42c
--- /dev/null
@@ -0,0 +1,3 @@
+# locally computed
+sha256 8e53dfceeb7f15d9e890dd4f69db505727276185f7438a5034616d392ff8f223  rcw-smarc-sal28-10.tar.gz
+sha256 803c65088eed36a6697ca9f03f4379bbad24e276dc8da7fef5eb4dc4008415a1  COPYING
diff --git a/package/rcw-smarc-sal28/rcw-smarc-sal28.mk b/package/rcw-smarc-sal28/rcw-smarc-sal28.mk
new file mode 100644 (file)
index 0000000..0dce543
--- /dev/null
@@ -0,0 +1,37 @@
+################################################################################
+#
+# rcw-smarc-sal28
+#
+################################################################################
+
+RCW_SMARC_SAL28_VERSION = 10
+RCW_SMARC_SAL28_SITE = $(call github,kontron,rcw-smarc-sal28,v$(RCW_SMARC_SAL28_VERSION))
+RCW_SMARC_SAL28_LICENSE = BSD-2-Clause
+RCW_SMARC_SAL28_LICENSE_FILES = COPYING
+RCW_SMARC_SAL28_INSTALL_TARGET = NO
+RCW_SMARC_SAL28_INSTALL_IMAGES = YES
+
+RCW_SMARC_SAL28_BOOT_VARIANT = $(call qstrip,$(BR2_PACKAGE_RCW_SMARC_SAL28_BOOT_VARIANT))
+
+ifeq ($(BR2_PACKAGE_RCW_SMARC_SAL28_BUILD_UPDATE_SCRIPT),y)
+RCW_SMARC_SAL28_DEPENDENCIES = host-uboot-tools
+define RCW_SMARC_SAL28_UPDATE_SCRIPT_BUILD_CMDS
+       MKIMAGE=$(HOST_DIR)/bin/mkimage $(MAKE) -C $(@D)/contrib all
+endef
+define RCW_SMARC_SAL28_UPDATE_SCRIPT_INSTALL_CMDS
+       $(INSTALL) -D -m 0644 $(@D)/contrib/update-rcw.img $(BINARIES_DIR)/
+endef
+endif
+
+define RCW_SMARC_SAL28_BUILD_CMDS
+       $(RCW_SMARC_SAL28_UPDATE_SCRIPT_BUILD_CMDS)
+endef
+
+define RCW_SMARC_SAL28_INSTALL_IMAGES_CMDS
+       $(INSTALL) -d $(BINARIES_DIR)/rcw
+       $(INSTALL) -D -m 0644 $(@D)/sl28-*.bin $(BINARIES_DIR)/rcw/
+       ln -sf rcw/sl28-$(RCW_SMARC_SAL28_BOOT_VARIANT).bin $(BINARIES_DIR)/rcw.bin
+       $(RCW_SMARC_SAL28_UPDATE_SCRIPT_INSTALL_CMDS)
+endef
+
+$(eval $(generic-package))