#!/bin/sh

ctime=`date +%s`
output=lede-ar71xx-generic-ap147-010-squashfs-sysupgrade.bin
echo ${OUTPUT_DIR}
echo "${TOP_DIR}"
${TOP_DIR}/tools/mk2fs/mksquashfs4 ./kkdir/ ./kkdir.squashfs -nopad -noappend -root-owned -comp xz -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2  -b 256k -processors 1 -fixed-time ${ctime}

#mksquashfs ./konke/ ./konke.squashfs -nopad -noappend -root-owned -comp xz -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2  -b 256k -processors 1 -fixed-time ${ctime}

dd if=./kkdir.squashfs of=./$output bs=128k conv=sync

chmod 700 ./$output
