summaryrefslogtreecommitdiffstats
path: root/common/Makefile
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-02-20 10:54:28 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-02-20 14:46:33 +0100
commit5d22cb385695dc17cb226ba63db3c2a253a56bc6 (patch)
tree6e4977757107f91efb21bf2dd7e77beba143c0b7 /common/Makefile
parent0a2a8f7059e6cb11e5d4eb882538b37f99d09ee3 (diff)
downloadbarebox-5d22cb385695dc17cb226ba63db3c2a253a56bc6.tar.gz
barebox-5d22cb385695dc17cb226ba63db3c2a253a56bc6.tar.xz
defaultenv: Align defaultenv array
The default environment buffer is an unsigned char array and thus may be unaligned. Some decompression algorithms expect the buffer to be sufficiently aligned for u32 accesses. We make this sure by copying the default env to a temporary buffer. Instead of doing this just add a __aligned(4) to the default environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/Makefile')
-rw-r--r--common/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/Makefile b/common/Makefile
index 3cfaae2e72..a52e96b40d 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -77,7 +77,7 @@ $(obj)/barebox_default_env: FORCE
$(call cmd,envs)
quiet_cmd_env_h = ENVH $@
-cmd_env_h = cat $< | (cd $(obj) && $(objtree)/scripts/bin2c default_environment) > $@; \
+cmd_env_h = cat $< | (cd $(obj) && $(objtree)/scripts/bin2c "__aligned(4) default_environment") > $@; \
echo "static const int default_environment_uncompress_size=`stat -c%s $(obj)/barebox_default_env`;" >> $@
$(obj)/barebox_default_env.h: $(obj)/barebox_default_env$(DEFAULT_COMPRESSION_SUFFIX) FORCE