<div dir="ltr">Hello Christopher,<div><br></div><div>is it possible that you can search in your collection the Android.mk file you created so that I can re-use and not spend time in re-inventing the wheel and one another minor question, the android you have tested was using a custom kernel build with "CONFIG_CHECKPOINT_RESTORE" enabled ?. Also a last question If my kernel is enabled with "CONFIG_CHECKPOINT_RESTORE", than can I use a statically linked binary as right when I am using statically compiled binary it gives the following error:</div><div><br></div><div><div>Error (sockets.c:128): Diag module missing (-2)</div><div>Error (sockets.c:128): Diag module missing (-2)</div><div>Error (sockets.c:128): Diag module missing (-2)</div><div>Error (kerndat.c:154): Can't stat self map_files 2: No such file or directory</div><div>Error (cr-dump.c:1578): Dumping FAILED.</div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font size="2">Best Regard -- <font color="#0b5394">ALLAH Hafiz</font>, <font color="#0b5394">May</font><font color="#0b5394"> Almighty ALLAH bless you</font></font></div>
        
<p style="font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:12px">
</p>
<table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-size:14px;font-family:proxima-nova-1,proxima-nova-2,Tahoma,Helvetica,Verdana,sans-serif;vertical-align:baseline;border-spacing:0px;color:rgb(51,51,51);line-height:18.2000007629395px"><tbody style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:auto;height:30px"> </td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:baseline;width:auto"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;line-height:0"><a href="https://about.me/yousafzaiabdullah?promo=email_sig" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;color:rgb(43,130,173);text-decoration:none;display:inline-block" target="_blank"><table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;border-spacing:0px"><tbody style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td align="left" valign="top" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:top;width:48px;line-height:1"><img alt="--" width="0" height="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block;width:0px;height:0px;overflow:hidden"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><img src="https://s.gravatar.com/avatar/fed5b9284cee3e24148b0240c5def1e1?s=80" alt="" width="48" height="48" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block"></div></td><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:8px"> </td><td align="left" valign="middle" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:middle;width:auto;height:48px;line-height:1"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:bold;font-style:inherit;font-size:18px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;color:rgb(51,51,51)">Abdullah Yousafzai</div><div style="margin:2px 0px 0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-size:12px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline"><img alt="https://" width="0" height="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;display:block;width:0px;height:0px;overflow:hidden">about.me/yousafzaiabdullah</div></td></tr></tbody></table></a>                                 </div></td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;width:auto;height:20px"><img src="https://about.me/t/sig?u=yousafzaiabdullah" width="1" height="1" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;overflow:hidden"></td></tr></tbody></table>
<p style="font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:12px">
</p>
<p style="font-family:Helvetica,Arial,sans-serif;font-size:9px;line-height:12px"></p></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Jan 27, 2016 at 11:47 PM, Christopher Covington <span dir="ltr"><<a href="mailto:cov@codeaurora.org" target="_blank">cov@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 01/25/2016 09:39 PM, Abdullah Yousafzai wrote:<br>
> Hello Everybody,<br>
><br>
> Thank you for your interest now it seems I can sort out this problem<br>
> with the help of you peoples.<br>
><br>
> Christopher, does your version of CRIU on Android was statically linked<br>
> or dynamically linked.<br>
<br>
</span>We've done both. My preference is for dynamic linking. Maybe building<br>
with bionic will just work the first time. But if it doesn't, I would<br>
guess that comparing against a working glibc based build would be the<br>
easiest way to debug.<br>
<br>
If you'd like to run CRIU that's dynamically linked against glibc, just<br>
make sure the following paths are valid for the expected GNU ld and libc<br>
components.<br>
<br>
aarch64-linux-gnu-readelf criu | grep -E '(interpreter|NEEDED)'<br>
<br>
If you get a mysterious not found error right at the beginning, it's<br>
probably because the linker/loader/interpreter path isn't valid.<br>
<br>
I've used the -Wl,-dynamic-linker=... and -Wl,-rpath=... build flags and<br>
the LD_LIBRARY_PATH=... environment variable at various times to help<br>
with paths.<br>
<br>
I don't know if I've reported this previously, but my recollection is<br>
that that <linker> <executable> style execution, such as `ld-linux.so<br>
criu`, doesn't work. Or maybe it was criu dump/restore of an<br>
`ld-linux.so loop` process, I don't remember exactly, sorry, just that<br>
it was a really obscure corner case.<br>
<br>
Hope that helps,<br>
Cov<br>
<span class="im HOEnZb"><br>
> Abdullah Yousafzai<br>
> <a href="https://about.me/yousafzaiabdullah" rel="noreferrer" target="_blank">https://about.me/yousafzaiabdullah</a><br>
><br>
> <<a href="https://about.me/yousafzaiabdullah?promo=email_sig" rel="noreferrer" target="_blank">https://about.me/yousafzaiabdullah?promo=email_sig</a>><br>
><br>
><br>
</span><span class="im HOEnZb">> On Mon, Jan 25, 2016 at 9:45 PM, Christopher Covington<br>
</span><div class="HOEnZb"><div class="h5">> <<a href="mailto:cov@codeaurora.org">cov@codeaurora.org</a> <mailto:<a href="mailto:cov@codeaurora.org">cov@codeaurora.org</a>>> wrote:<br>
><br>
> Hi Abdullah,<br>
><br>
> On 01/25/2016 04:41 AM, Cyrill Gorcunov wrote:<br>
> > On Mon, Jan 25, 2016 at 12:33:55PM +0300, Pavel Emelyanov wrote:<br>
> >> On 01/22/2016 05:52 AM, Abdullah Yousafzai wrote:<br>
> >>> Compiling CRIU for arm64 is straight and work as piece of cake<br>
> but I need it to compile it for<br>
> >>> android and specifically on ARM64. So for this reason I have to<br>
> rewrite the Makefiles to<br>
> >>> Android.mk in order to be understandable and in compliance with<br>
> the android build environment.<br>
> >>> I only need to checkpoint user apps and check the behavior on<br>
> Android any help on breaking down<br>
> >>> the existing Makefile and transforming it to Android.mk will be<br>
> appreciated.<br>
> >><br>
> >> I've CC-ed Christopher for help with ARM and Cyrill for help with<br>
> Makefiles.<br>
> ><br>
> > Sorry for not replying early, managed to miss the mail. I'm ready<br>
> to help but<br>
> > the problem is that I've no clue about Android specifics. I've<br>
> been playing with<br>
> > andoid apps but they were using ant tool for building applications<br>
> which is<br>
> > very different from traditional make.<br>
><br>
> My suggestion would be to start with a stub Android.mk that calls the<br>
> existing makefiles. I believe the Linux kernel Android.mk can be<br>
> referred to as an example of this. There are burdens and benefits to<br>
> writing and maintaining a parallel set of build instructions. I think a<br>
> stub Android.mk could deliver many of the benefits with little of the<br>
> burden. Once that's working, committed, and in use, I think it will be<br>
> clearer what larger-scale changes and additions would be most useful.<br>
><br>
> I've run CRIU on Android (both AArch32 and AArch64), but it was built<br>
> against the GNU C library, not the Android C library, Bionic. There have<br>
> been some other Android efforts in the past. You could search the<br>
> mailing list archives; I unfortunately don't remember the details. It's<br>
> possible some Bionic porting will be required, in addition to handling<br>
> Android-specific resources.<br>
><br>
> Regards,<br>
> Christopher Covington<br>
><br>
> --<br>
> Qualcomm Innovation Center, Inc.<br>
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,<br>
> a Linux Foundation Collaborative Project<br>
><br>
><br>
<br>
<br>
--<br>
Qualcomm Innovation Center, Inc.<br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,<br>
a Linux Foundation Collaborative Project<br>
</div></div></blockquote></div><br></div>