Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] Add support for an RCW on sl28 boards
@ 2021-01-12 10:51 Michael Walle
  2021-01-12 10:51 ` [Buildroot] [PATCH 1/2] package/rcw-smarc-sal28: new package Michael Walle
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Walle @ 2021-01-12 10:51 UTC (permalink / raw)
  To: buildroot

Add a new package for the RCW and then use it on the sl28 board to
integrate it into the target image.

Michael Walle (2):
  package/rcw-smarc-sal28: new package
  configs/kontron_smarc_sal28: integrate RCW into rootfs image

 DEVELOPERS                                   |  1 +
 board/kontron/smarc-sal28/genimage.cfg       |  6 ++++
 configs/kontron_smarc_sal28_defconfig        |  1 +
 package/Config.in                            |  1 +
 package/rcw-smarc-sal28/Config.in            | 25 +++++++++++++
 package/rcw-smarc-sal28/rcw-smarc-sal28.hash |  3 ++
 package/rcw-smarc-sal28/rcw-smarc-sal28.mk   | 37 ++++++++++++++++++++
 7 files changed, 74 insertions(+)
 create mode 100644 package/rcw-smarc-sal28/Config.in
 create mode 100644 package/rcw-smarc-sal28/rcw-smarc-sal28.hash
 create mode 100644 package/rcw-smarc-sal28/rcw-smarc-sal28.mk

-- 
2.20.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/2] package/rcw-smarc-sal28: new package
  2021-01-12 10:51 [Buildroot] [PATCH 0/2] Add support for an RCW on sl28 boards Michael Walle
@ 2021-01-12 10:51 ` Michael Walle
  2021-01-12 10:51 ` [Buildroot] [PATCH 2/2] configs/kontron_smarc_sal28: integrate RCW into rootfs image Michael Walle
  2021-01-14 21:33 ` [Buildroot] [PATCH 0/2] Add support for an RCW on sl28 boards Yann E. MORIN
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Walle @ 2021-01-12 10:51 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Michael Walle <michael@walle.cc>
---
 DEVELOPERS                                   |  1 +
 package/Config.in                            |  1 +
 package/rcw-smarc-sal28/Config.in            | 25 +++++++++++++
 package/rcw-smarc-sal28/rcw-smarc-sal28.hash |  3 ++
 package/rcw-smarc-sal28/rcw-smarc-sal28.mk   | 37 ++++++++++++++++++++
 5 files changed, 67 insertions(+)
 create mode 100644 package/rcw-smarc-sal28/Config.in
 create mode 100644 package/rcw-smarc-sal28/rcw-smarc-sal28.hash
 create mode 100644 package/rcw-smarc-sal28/rcw-smarc-sal28.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 05b509c9c4..e4f1c13fb4 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -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/
diff --git a/package/Config.in b/package/Config.in
index 07e923bde1..fca4ef81fe 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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
index 0000000000..2a46c9f84c
--- /dev/null
+++ b/package/rcw-smarc-sal28/Config.in
@@ -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
index 0000000000..1f9b42c0ba
--- /dev/null
+++ b/package/rcw-smarc-sal28/rcw-smarc-sal28.hash
@@ -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
index 0000000000..0dce543811
--- /dev/null
+++ b/package/rcw-smarc-sal28/rcw-smarc-sal28.mk
@@ -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))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 2/2] configs/kontron_smarc_sal28: integrate RCW into rootfs image
  2021-01-12 10:51 [Buildroot] [PATCH 0/2] Add support for an RCW on sl28 boards Michael Walle
  2021-01-12 10:51 ` [Buildroot] [PATCH 1/2] package/rcw-smarc-sal28: new package Michael Walle
@ 2021-01-12 10:51 ` Michael Walle
  2021-01-14 21:33 ` [Buildroot] [PATCH 0/2] Add support for an RCW on sl28 boards Yann E. MORIN
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Walle @ 2021-01-12 10:51 UTC (permalink / raw)
  To: buildroot

Integrate the RCW into the storage device image, so the image can also
be used a boot source. The SoC expects the RCW at offset 4096 of the SD
card or eMMC.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 board/kontron/smarc-sal28/genimage.cfg | 6 ++++++
 configs/kontron_smarc_sal28_defconfig  | 1 +
 2 files changed, 7 insertions(+)

diff --git a/board/kontron/smarc-sal28/genimage.cfg b/board/kontron/smarc-sal28/genimage.cfg
index d75234d997..f3fb77e00a 100644
--- a/board/kontron/smarc-sal28/genimage.cfg
+++ b/board/kontron/smarc-sal28/genimage.cfg
@@ -3,6 +3,12 @@ image sdcard-emmc.img {
 		gpt = true
 	}
 
+	partition rcw {
+		offset = 4k
+		in-partition-table = "no"
+		image = "rcw.bin"
+	}
+
 	partition u-boot {
 		offset = 1M
 		in-partition-table = "no"
diff --git a/configs/kontron_smarc_sal28_defconfig b/configs/kontron_smarc_sal28_defconfig
index 767858f601..ddc7022886 100644
--- a/configs/kontron_smarc_sal28_defconfig
+++ b/configs/kontron_smarc_sal28_defconfig
@@ -16,6 +16,7 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/fsl-ls1028a-kontron-sl28 freescale/f
 BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME=y
 BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_PACKAGE_RCW_SMARC_SAL28=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="128M"
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 0/2] Add support for an RCW on sl28 boards
  2021-01-12 10:51 [Buildroot] [PATCH 0/2] Add support for an RCW on sl28 boards Michael Walle
  2021-01-12 10:51 ` [Buildroot] [PATCH 1/2] package/rcw-smarc-sal28: new package Michael Walle
  2021-01-12 10:51 ` [Buildroot] [PATCH 2/2] configs/kontron_smarc_sal28: integrate RCW into rootfs image Michael Walle
@ 2021-01-14 21:33 ` Yann E. MORIN
  2 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2021-01-14 21:33 UTC (permalink / raw)
  To: buildroot

Michael, All,

On 2021-01-12 11:51 +0100, Michael Walle spake thusly:
> Add a new package for the RCW and then use it on the sl28 board to
> integrate it into the target image.
> 
> Michael Walle (2):
>   package/rcw-smarc-sal28: new package
>   configs/kontron_smarc_sal28: integrate RCW into rootfs image

Both applied to master, thanks.

Regards,
Yann E. MORIN.

>  DEVELOPERS                                   |  1 +
>  board/kontron/smarc-sal28/genimage.cfg       |  6 ++++
>  configs/kontron_smarc_sal28_defconfig        |  1 +
>  package/Config.in                            |  1 +
>  package/rcw-smarc-sal28/Config.in            | 25 +++++++++++++
>  package/rcw-smarc-sal28/rcw-smarc-sal28.hash |  3 ++
>  package/rcw-smarc-sal28/rcw-smarc-sal28.mk   | 37 ++++++++++++++++++++
>  7 files changed, 74 insertions(+)
>  create mode 100644 package/rcw-smarc-sal28/Config.in
>  create mode 100644 package/rcw-smarc-sal28/rcw-smarc-sal28.hash
>  create mode 100644 package/rcw-smarc-sal28/rcw-smarc-sal28.mk
> 
> -- 
> 2.20.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-14 21:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-12 10:51 [Buildroot] [PATCH 0/2] Add support for an RCW on sl28 boards Michael Walle
2021-01-12 10:51 ` [Buildroot] [PATCH 1/2] package/rcw-smarc-sal28: new package Michael Walle
2021-01-12 10:51 ` [Buildroot] [PATCH 2/2] configs/kontron_smarc_sal28: integrate RCW into rootfs image Michael Walle
2021-01-14 21:33 ` [Buildroot] [PATCH 0/2] Add support for an RCW on sl28 boards Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox