Hi, thank xujie for the hint. I did not find the similar building logs as xuejie's, but found some other when I build firmware for tplink-tl-wdr3600/4300.
/home/xxx/openwrt/openwrt_12.09/openwrt/staging_dir/host/bin/lzma e /home/xxx/openwrt/openwrt_12.09/openwrt/build_dir/linux-ar71xx_generic/tmp/vmlinux-tl-wdr3600-v1 -lc1 -lp2 -pb2 /home/xxx/openwrt/openwrt_12.09/openwrt/build_dir/linux-ar71xx_generic/tmp/vmlinux-tl-wdr3600-v1.bin.lzma
/home/xxx/openwrt/openwrt_12.09/openwrt/staging_dir/host/bin/mktplinkfw -H 0x36000001 -W 1 -F 8Mlzma -N OpenWrt -V r39408 -k /home/xxx/openwrt/openwrt_12.09/openwrt/build_dir/linux-ar71xx_generic/tmp/vmlinux-tl-wdr3600-v1.bin.lzma -r /home/xxx/openwrt/openwrt_12.09/openwrt/build_dir/linux-ar71xx_generic/root.squashfs-raw -a 0x4 -j -o /home/xxx/openwrt/openwrt_12.09/openwrt/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-factory.bin
/home/xxx/openwrt/openwrt_12.09/openwrt/staging_dir/host/bin/mktplinkfw -H 0x36000001 -W 1 -F 8Mlzma -N OpenWrt -V r39408 -s -k /home/xxx/openwrt/openwrt_12.09/openwrt/build_dir/linux-ar71xx_generic/tmp/vmlinux-tl-wdr3600-v1.bin.lzma -r /home/xxx/openwrt/openwrt_12.09/openwrt/build_dir/linux-ar71xx_generic/root.squashfs-raw -a 0x4 -j -o /home/xxx/openwrt/openwrt_12.09/openwrt/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-sysupgrade.bin
I think the mktplinkfw does it for TP-LINK machine only. When I build fw for another board, it uses openwrt/staging_dir/host/bin/mkmylofw. I managed combine a rootfs and a kernel into a usable firmware.
If you just want to build the rootfs, I think squashfs-tools is used. But according to the log, it probably need to use the tool padjffs2 to pad the rootfs, after creating root.squashfs and before combining.
/home/xxx/openwrt/openwrt_12.09/openwrt/staging_dir/host/bin/mksquashfs4 /home/xxx/openwrt/openwrt_12.09/openwrt/build_dir/target-mips_r2_uClibc-0.9.33.2/root-ar71xx /home/xxx/openwrt/openwrt_12.09/openwrt/build_dir/linux-ar71xx_generic/root.squashfs -nopad -noappend -root-owned -comp xz -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2 -b 256k -processors 1
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on /home/xxx/openwrt/openwrt_12.09/openwrt/build_dir/linux-ar71xx_generic/root.squashfs, block size 262144.
However, I still want to know if there is a tool can do the reverse work, which detaches a firmware with kernel and rootfs.
(Last edited by stone8936 on 9 Jul 2015, 09:45)