You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/01/27 15:50:55 UTC

[incubator-nuttx] branch master updated: tools/mkromfsimg.sh: add attribute to set minimum 4 bytes aignment for romfs image data

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 7b5af90  tools/mkromfsimg.sh: add attribute to set minimum 4 bytes aignment for romfs image data
7b5af90 is described below

commit 7b5af9056598dda3b10028bf65f137d6deab1843
Author: Petro Karashchenko <pe...@gmail.com>
AuthorDate: Thu Jan 27 15:21:52 2022 +0200

    tools/mkromfsimg.sh: add attribute to set minimum 4 bytes aignment for romfs image data
    
    Signed-off-by: Petro Karashchenko <pe...@gmail.com>
---
 tools/mkromfsimg.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/mkromfsimg.sh b/tools/mkromfsimg.sh
index 143451a..94eb858 100755
--- a/tools/mkromfsimg.sh
+++ b/tools/mkromfsimg.sh
@@ -259,6 +259,7 @@ rm -rf $workingdir || { echo "Failed to remove the old $workingdir"; exit 1; }
 
 # And, finally, create the header file
 
-xxd -i ${romfsimg} | sed 's/unsigned/const unsigned/' >${headerfile} || \
+echo '#include <nuttx/compiler.h>' >${headerfile}
+xxd -i ${romfsimg} | sed 's/^unsigned char/const unsigned char aligned_data(4)/g' >>${headerfile} || \
   { echo "ERROR: xxd of $< failed" ; rm -f $romfsimg; exit 1 ; }
 rm -f $romfsimg