<div dir="ltr">Thanks Max!<div><br></div><div>I like your approach a lot; and yes, the same fix works in our /etc/profile.</div><div><br></div><div>-Brian</div><div>an Intel employee</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 5, 2016 at 1:58 AM, Max Krummenacher <span dir="ltr">&lt;<a href="mailto:max.oss.09@gmail.com" target="_blank">max.oss.09@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Brian<br>
<div><div class="h5"><br>
Am Donnerstag, den 04.08.2016, 19:49 -0700 schrieb Khem Raj:<br>
&gt;<br>
&gt; On 8/4/16 2:20 PM, Brian Avery wrote:<br>
&gt; &gt; The core issue:<br>
&gt; &gt; The busybox resize command breaks the eclipse ssh debug stream.<br>
&gt; &gt;  This is<br>
&gt; &gt; because the resize command for busybox sends a set of cursor<br>
&gt; &gt; control<br>
&gt; &gt; escape sequences to stderr. The resize cfg was added to Krogoth and<br>
&gt; &gt; is<br>
&gt; &gt; still in master.  The point of resize is to set the environment and<br>
&gt; &gt; terminal settings to the current xterm window size.<br>
&gt; &gt;<br>
&gt; &gt; Additional complexity:<br>
&gt; &gt; eclipse-debug is an IMAGE_FEATURE.  If it is turned on by a user in<br>
&gt; &gt; local.conf via EXTRA_IMAGE_FEATURES then I can conditionally turn<br>
&gt; &gt; off<br>
&gt; &gt; busybox/resize in the cfg file.  Unfortunately, if a user makes a<br>
&gt; &gt; new<br>
&gt; &gt; image with IMAGE_FEATURES += &quot; eclipse-debug &quot; in it, I do not see<br>
&gt; &gt; this<br>
&gt; &gt; from the scope of the busybox##.bb recipe.<br>
&gt; &gt;<br>
&gt; &gt; So, there are a couple of ways to solve this and I&#39;m not sure which<br>
&gt; &gt; is<br>
&gt; &gt; the best one.<br>
&gt; &gt;<br>
&gt; &gt; 1) conditionally turn off the resize.cfg if eclipse-debug is in<br>
&gt; &gt; extra-image-features.  Also, make a rm_resize.bbclass to rm the<br>
&gt; &gt; usr/bin/resize from the rootfs in a do_rootfs[postfuncs] which can<br>
&gt; &gt; be<br>
&gt; &gt; inherited by the various sdk images we build.<br>
&gt; &gt;<br>
&gt; &gt; This is problematic since if a user makes a new image recipe of<br>
&gt; &gt; their<br>
&gt; &gt; own and includes eclipse-debug but doesn&#39;t inherit the<br>
&gt; &gt; rm_resize.bbclass<br>
&gt; &gt; eclipse debug will fail.<br>
&gt; &gt;<br>
&gt; &gt; 2) elevate eclipse-debug to a distro feature which would make it<br>
&gt; &gt; visible<br>
&gt; &gt; to the busybox###.bb recipe.  Unfortunately, it is really an image<br>
&gt; &gt; specific set of packages to be included so elevating it doesn&#39;t<br>
&gt; &gt; seem<br>
&gt; &gt; reasonable.<br>
&gt; &gt;<br>
&gt; &gt; 3)   use the update-alternatives method (busybox is currently doing<br>
&gt; &gt; this<br>
&gt; &gt; for syslog) to make a separate busybox-resize package and make an<br>
&gt; &gt; eclipse friendly resize package that is empty and add the eclipse<br>
&gt; &gt; one to<br>
&gt; &gt; the eclipse-debug packagegroup.<br>
&gt; &gt;<br>
&gt; &gt; 4) Just turn off resize or patch it so it doesn&#39;t try to control<br>
&gt; &gt; the<br>
&gt; &gt; cursor via escape sequences sent to stderr but still sets up the<br>
&gt; &gt; environment.  It&#39;s worth noting that the ubuntu  resize doesn&#39;t<br>
&gt; &gt; send<br>
&gt; &gt; escape sequences to any of the streams.<br>
&gt;<br>
&gt; this seems to be best option.<br>
<br>
</div></div>We fixed this by only executing resize if logging in from a serial<br>
console:<br>
<br>
<a href="http://git.toradex.com/cgit/meta-toradex.git/commit/?h=V2.6-next&amp;id=9d1
32ea3cf75562ef5610dd6ff1c89d0cffa334d" rel="noreferrer" target="_blank">http://git.toradex.com/cgit/<wbr>meta-toradex.git/commit/?h=V2.<wbr>6-next&amp;id=9d1<br>
32ea3cf75562ef5610dd6ff1c89d0c<wbr>ffa334d</a><br>
<br>
I guess one could apply the same fix to here<br>
<a href="http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/b
ase-files/base-files/profile?h=krogoth" rel="noreferrer" target="_blank">http://cgit.openembedded.org/<wbr>openembedded-core/tree/meta/<wbr>recipes-core/b<br>
ase-files/base-files/profile?<wbr>h=krogoth</a><br>
<br>
Regards<br>
<span class="HOEnZb"><font color="#888888">Max<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
&gt; &gt;<br>
&gt; &gt; 5) Something else?<br>
&gt; &gt;<br>
&gt; &gt; Thanks,<br>
&gt; &gt; Brian<br>
&gt; &gt; an Intel employee<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
<br>
</div></div></blockquote></div><br></div>