summaryrefslogtreecommitdiffstats
path: root/scripts/gen-dtb-s
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gen-dtb-s')
-rwxr-xr-xscripts/gen-dtb-s22
1 files changed, 14 insertions, 8 deletions
diff --git a/scripts/gen-dtb-s b/scripts/gen-dtb-s
index 1027db2804..d6fbdd5aaf 100755
--- a/scripts/gen-dtb-s
+++ b/scripts/gen-dtb-s
@@ -4,7 +4,9 @@ name=$1
dtb=$2
imd=$3
-echo "#include <asm-generic/barebox.lds.h>"
+echo "#include <asm/barebox.lds.h>"
+echo "#include <asm-generic/pointer.h>"
+echo ".section .note.GNU-stack,\"\",%progbits"
le32() {
printf ".byte 0x%02x, 0x%02x, 0x%02x, 0x%02x\n" \
@@ -49,16 +51,16 @@ echo "__dtb_${name}_start:"
echo ".incbin \"$dtb\""
echo "__dtb_${name}_end:"
echo ".global __dtb_${name}_end"
+if [ "$imd" = "y" ]; then
+ echo ".balign ASM_SZPTR"
+ echo "ASM_PTR __barebox_imd_OF_${name}"
+fi
echo ".balign STRUCT_ALIGNMENT"
-lzop -f -9 $dtb -o $dtb.lzo
-if [ $? != 0 ]; then
- exit 1
-fi
-compressed=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" $dtb.lzo)
+compressed=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" $dtb.z)
uncompressed=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" $dtb)
-echo "#ifdef CONFIG_USE_COMPRESSED_DTB"
+echo "#if defined(CONFIG_USE_COMPRESSED_DTB) && defined(__PBL__)"
echo ".section .dtbz.rodata.${name},\"a\""
echo ".balign STRUCT_ALIGNMENT"
echo ".global __dtb_z_${name}_start"
@@ -66,8 +68,12 @@ echo "__dtb_z_${name}_start:"
printf ".int 0x%08x\n" 0x7b66bcbd
printf ".int 0x%08x\n" $compressed
printf ".int 0x%08x\n" $uncompressed
-echo ".incbin \"$dtb.lzo\""
+echo ".incbin \"$dtb.z\""
echo "__dtb_z_${name}_end:"
echo ".global __dtb_z_${name}_end"
+if [ "$imd" = "y" ]; then
+ echo ".balign ASM_SZPTR"
+ echo "ASM_PTR __barebox_imd_OF_${name}"
+fi
echo ".balign STRUCT_ALIGNMENT"
echo "#endif"