1. 详细错误信息

  

[ 11%] Building C object CMakeFiles/fstools.dir/libfstools/overlay.c.o
/home/jello/openwrt/build_dir/target-aarch64_generic_glibc/fstools-2018-01-02-11efbf3b/libfstools/overlay.c: In function 'jffs2_switch':
/home/jello/openwrt/build_dir/target-aarch64_generic_glibc/fstools-2018-01-02-11efbf3b/libfstools/overlay.c:249:3: warning: ignoring return value of 'system', declared with attribute warn_unused_result [-Wunused-result]
system("cp -a /tmp/root/upper/* / 2>/dev/null");
^
/home/jello/build_dir/target-aarch64_generic_glibc/fstools-2018-01-02-11efbf3b/libfstools/overlay.c: At top level:
cc1: error: unrecognized command line option '-Wno-format-truncation' [-Werror]
cc1: all warnings being treated as errors
make[6]: *** [CMakeFiles/fstools.dir/libfstools/overlay.c.o] Error 1

2. 解决办法

>  libfstools/overlay.c | 4 ++++
> 1 file changed, 4 insertions(+)
>> diff --git a/libfstools/overlay.c b/libfstools/overlay.c
> index 7ada5ff..8423a57 100644
> --- a/libfstools/overlay.c
> +++ b/libfstools/overlay.c
> @@ -243,6 +243,10 @@ jffs2_switch(struct volume *v)
> ULOG_INFO("performing overlay whiteout\n");
> umount2("/tmp/root", MNT_DETACH);
> foreachdir("/overlay/", handle_whiteout);
> +
> + /* try hard to be in sync */
> + ULOG_INFO("syncronizing overlay\n");
> + system("cp -a /tmp/root/upper/* / 2>/dev/null");
> break;
>> case FS_EXT4:
> 删除build_dir/target-aarch64_generic_glibc/fstools-2018-01-02-11efbf3b/libfstools/overlay.c中的以下内容:
     /* try hard to be in sync */
ULOG_INFO("syncronizing overlay\n");
system("cp -a /tmp/root/upper/* / 2>/dev/null");

3. 参考资料

  补丁

04-30 12:44