It appears to be a bug in the kernel makefiles, not mkdtimg itself.
Specifically here:

https://android.googlesource.com/kernel/msm/+/android-8.1.0_r0.31/scripts/Makefile.lib#327

`stat` takes different arguments on Mac and Linux.

The kernel builds are really only tested on Linux, so you may have better
luck reproducing them using a Linux VM if you're on a Mac.

- Dan

On Mon, Aug 27, 2018 at 9:09 AM 杨凡 <[email protected]> wrote:

> My code is :
> Kernel tag :android-8.1.0_r0.31
> AOSP tag :android-8.1.0_r15
>
> I build walleye Kernel on MacOS happen mkdtimg align 4096,
> it happen these error following:
>
> yangfan command = cfg_create   -------this print is that I comment in
> mkdtimg source code.
> create image file: arch/arm64/boot/dtbo.img...
> Total yangfan 18 entries.    -------this print is that I comment in
> mkdtimg source code.
> Total yangfan 0 output_img_with_config.  -------this print is that I
> comment in mkdtimg source code.
> stat: illegal option -- c
> usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
> stat: illegal option -- c
> usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
> /bin/sh: (+4096-1)/4096*4096-: syntax error: operand expected (error token
> is "-")
> make[1]: *** [arch/arm64/boot/dtbo.img] Error 127
> make: *** [dtbo.img] Error 2
> make: *** Waiting for unfinished jobs....
>
> And so, I modify these Makefile in the path  :/arch/arm64/boot/Makefile,
> delete the align dtbo.img to 4kB, it compile ok
> diff --git a/arch/arm64/boot/Makefile b/arch/arm64/boot/Makefile
> index 7d11ab13d49b..3cbbc9abb9ce 100644
> --- a/arch/arm64/boot/Makefile
> +++ b/arch/arm64/boot/Makefile
> @@ -53,7 +53,9 @@ $(obj)/Image.lz4-dtb: $(obj)/Image.lz4 $(DTB_OBJS) FORCE
>         $(call if_changed,cat)
>
>  $(obj)/dtbo.img: $(obj)/dts/dtboimg.cfg $(DTBO_OBJS) FORCE
> -       $(call if_changed,mkdtimg,4096) # align dtbo.img to 4kB
> +       $(call if_changed,mkdtimg) # align dtbo.img to 4kB
>
>
> So ,I wonder it is a bug in mkdtimg code???
>
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to