Re: [ptxdist] Extra args to mkfs.ubifs with new image creation options

2019-12-12 Thread Alexander Dahl
Hello,

On Thu, Dec 12, 2019 at 07:23:10PM +0100, Guillermo Rodriguez Garcia wrote:
> I am trying to switch from the "legacy" ptxdist image creation options
> to the new system based on genimage. This is because I want to
> generate an ubi image out of three separate volumes, and the legacy
> approach does not support this very well.

Did you already find the genimage docs? Look for pengutronix at
GitHub. genimage works with config files, everything is set there.

> I am still trying to see how it all works; first issue I have found
> is, how to specify extra arguments to mkfs.ubifs? In particular I need
> to add --space-fixup; however I don't see any place where I could
> configure this with the new system.

ptxdist ships those genimage config files in folder 'config/images'
and you can "overwrite" those in your BSP as you would do with rules.

HTH & Greets
Alex

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN | speech censured, the first thought forbidden, the
 X  AGAINST  | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL| (Jean-Luc Picard, quoting Judge Aaron Satie)


signature.asc
Description: PGP signature
___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] Extra args to mkfs.ubifs with new image creation options

2019-12-12 Thread Guillermo Rodriguez Garcia
Hi all,

I am trying to switch from the "legacy" ptxdist image creation options
to the new system based on genimage. This is because I want to
generate an ubi image out of three separate volumes, and the legacy
approach does not support this very well.

I am still trying to see how it all works; first issue I have found
is, how to specify extra arguments to mkfs.ubifs? In particular I need
to add --space-fixup; however I don't see any place where I could
configure this with the new system.

Any hints?

Guillermo Rodriguez Garcia
guille.rodrig...@gmail.com

___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] u-boot: Add support for u-boot.stm32 binary

2019-12-12 Thread Guillermo Rodríguez
Adds support for copying u-boot.stm32 (u-boot with STM32 image header)
to the platform image directory. This is used by STM32MP1 SoCs.

Signed-off-by: Guillermo Rodriguez 
---
 platforms/u-boot.in | 7 +++
 rules/u-boot.make   | 5 -
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/platforms/u-boot.in b/platforms/u-boot.in
index aab9c57a3..1d682d1c3 100644
--- a/platforms/u-boot.in
+++ b/platforms/u-boot.in
@@ -220,5 +220,12 @@ config U_BOOT_INSTALL_U_BOOT_WITH_SPL_PBL
  Installing the U-Boot binary which contains as well the SPL and PBL.
  Say yes if you are building for Layerscape SoCs
 
+config U_BOOT_INSTALL_U_BOOT_STM32
+   prompt "install u-boot.stm32"
+   bool
+   help
+ Installing the U-Boot image with stm32 header (u-boot.stm32) into 
platform 
+ image directory. Say yes if you are building for STM32MP1 SOC.  
+
 endif
 
diff --git a/rules/u-boot.make b/rules/u-boot.make
index 04d801fc6..57d69e15f 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -167,6 +167,9 @@ ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_WITH_SPL_PBL
@install -v -D -m644 $(U_BOOT_BUILD_DIR)/u-boot-with-spl-pbl.bin \
$(IMAGEDIR)/u-boot-with-spl-pbl.bin
 endif
+ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_STM32
+   @install -v -D -m644 $(U_BOOT_BUILD_DIR)/u-boot.stm32 
$(IMAGEDIR)/u-boot.stm32
+endif
 ifndef PTXCONF_U_BOOT_ENV_IMAGE_NONE
@install -v -D -m644 $(U_BOOT_BUILD_DIR)/u-boot-env.img \
$(IMAGEDIR)/u-boot-env.img
@@ -197,7 +200,7 @@ $(STATEDIR)/u-boot.clean:
@rm -vf $(IMAGEDIR)/u-boot.img $(IMAGEDIR)/SPL $(IMAGEDIR)/MLO
@rm -vf $(IMAGEDIR)/u-boot.imx $(IMAGEDIR)/u-boot-dtb.imx
@rm -vf $(IMAGEDIR)/u-boot-env.img
-   @rm -vf $(IMAGEDIR)/u-boot-dtb.bin $(IMAGEDIR)/u-boot-with-spl-pbl.bin
+   @rm -vf $(IMAGEDIR)/u-boot-dtb.bin $(IMAGEDIR)/u-boot-with-spl-pbl.bin 
$(IMAGEDIR)/u-boot.stm32
 
 # 
 # oldconfig / menuconfig
-- 
2.21.0


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] weston: Add init script

2019-12-12 Thread Guillermo Rodríguez
Signed-off-by: Guillermo Rodriguez 
---
 projectroot/etc/init.d/weston-init | 29 +
 rules/weston.make  |  4 
 2 files changed, 33 insertions(+)
 create mode 100644 projectroot/etc/init.d/weston-init

diff --git a/projectroot/etc/init.d/weston-init 
b/projectroot/etc/init.d/weston-init
new file mode 100644
index 0..fa6b96b07
--- /dev/null
+++ b/projectroot/etc/init.d/weston-init
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+start() {
+   OPENVT_ARGS="-c 1 -s"
+   WESTON_ARGS="--log=/var/log/weston.log"
+
+   test -f /etc/default/weston-init && . /etc/default/weston-init
+
+   if [ -z "$XDG_RUNTIME_DIR" ]; then
+   export XDG_RUNTIME_DIR=/run/xdg
+   mkdir -p "$XDG_RUNTIME_DIR"
+   chmod 0700 "$XDG_RUNTIME_DIR"
+   fi
+
+   echo "Starting Weston"
+   exec openvt $OPENVT_ARGS -- weston $WESTON_ARGS
+}
+
+stop() {
+   echo "Stopping Weston"
+   killall -q weston
+}
+
+case $1 in
+   start|stop) $1 ;;
+   restart) stop ; sleep 1 ; start ;;
+
+   *) echo "Usage: $0 {start|stop|restart}"; exit 1 ;;
+esac
diff --git a/rules/weston.make b/rules/weston.make
index 4c38fd2d1..406b0fd48 100644
--- a/rules/weston.make
+++ b/rules/weston.make
@@ -170,6 +170,10 @@ endif
 ifdef PTXCONF_WESTON_SYSTEMD
@$(call install_lib, weston, 0, 0, 0644, weston/systemd-notify)
 endif
+ifdef PTXCONF_INITMETHOD_BBINIT
+   @$(call install_alternative, weston, 0, 0, 0755, 
/etc/init.d/weston-init)
+   @$(call install_link, weston, ../init.d/weston-init, 
/etc/rc.d/S92weston-init)
+endif
 
@$(call install_copy, weston, 0, 0, 0755, -, 
/usr/libexec/weston-simple-im)
@$(call install_copy, weston, 0, 0, 0755, -, 
/usr/libexec/weston-desktop-shell)
-- 
2.21.0


___
ptxdist mailing list
ptxdist@pengutronix.de