Skip to contentSkip to conversation

post-image: Do not hardcode the genimage.cfg path

PATCH New Fabio Estevam 2 participants 2 messages May 13, 2016 Arm i.MX and Layerscape

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 post-image: Do not hardcode the genimage.cfg path

Instead of hardcoding the genimage.cfg path, let's add a BOARD_DIR variable to improve readability.

---
 board/freescale/imx6ulevk/post-image.sh | 3 ++-
 board/via/imx6_vab820/post-image.sh     | 3 ++-
 board/wandboard/post-image.sh           | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
board/freescale/imx6ulevk/post-image.sh +2 -1
index cb75a47..8757355 100755
@@ -1,6 +1,7 @@
 #!/usr/bin/env bash
 
-GENIMAGE_CFG="board/freescale/imx6ulevk/genimage.cfg"
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
 GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
 
 rm -rf "${GENIMAGE_TMP}"
board/via/imx6_vab820/post-image.sh +2 -1
index 8d502a5..00de33b 100755
@@ -1,6 +1,7 @@
 #!/bin/bash
 
-GENIMAGE_CFG="board/via/imx6_vab820/genimage.cfg"
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
 GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
 
 rm -rf "${GENIMAGE_TMP}"
board/wandboard/post-image.sh +2 -1
index 95cbfa4..11f58db 100755
@@ -1,6 +1,7 @@
 #!/usr/bin/env bash
 
-GENIMAGE_CFG="board/wandboard/genimage.cfg"
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
 GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
 
 rm -rf "${GENIMAGE_TMP}"
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 post-image: Do not hardcode the genimage.cfg path

Hello,

Quoted 9 lines · Fabio Estevam

Instead of hardcoding the genimage.cfg path, let's add a BOARD_DIR variable to improve readability.

---
 board/freescale/imx6ulevk/post-image.sh | 3 ++-
 board/via/imx6_vab820/post-image.sh     | 3 ++-
 board/wandboard/post-image.sh           | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

Applied to next, thanks.

(Retrospectively, I should have changed the title of your commit. Something like:

configs: don't hardcode board directory path in Freescale post-image scripts

or something along those lines. But now that I've pushed it, too late.)

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com