<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Cross-compiling 4.4 on ARM</title>
		<link>http://www.allegro.cc/forums/view/605565</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 16 Nov 2010 20:19:15 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi all,</p><p>I successfully compiled 4.4 n an ARM platform running linux, but I am unable to make it run.</p><p>Using the default (empty) allegro.cfg file, allegro_init() returns -1.<br />Changing the &quot;system=&quot; parameter, it only returns zero when system=NONE. But everything else I try after that returns errors.</p><p>The only video driver is fb and it is configured correctly.</p><p>Any hint on where shall I start looking for the problem?</p><p>Regards,<br />Luiz
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Luiz Cressoni)</author>
		<pubDate>Tue, 16 Nov 2010 15:18:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Try printing out the allegro_error variable (its a string). It should say what went wrong. Also, compile allegro in debug mode and look for a file called allegro.log.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Tue, 16 Nov 2010 15:45:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thomas:</p><p>I found out that I built allegro with WANT_LINUX_CONSOLE=no and WANT_MODULES=yes.<br />After flip both, allegro_init runs OK.</p><p>Now, it is set_gfx_mode that is crashing. I followed the code and found that it is unable to open a console. <br />On init_console() it comes to an &quot;Invalid argument&quot; error here:</p><p>/* Get the state of the console -- in particular, the free VT field */<br />      if (ioctl (console_fd, VT_GETSTATE, &amp;vts)) {<br />	 uszprintf (allegro_error, ALLEGRO_ERROR_SIZE, uconvert_ascii(&quot;VT_GETSTATE: %s&quot;, tmp), ustrerror (errno));<br />	 close (console_fd);<br />	 return 1;</p><p>I&#39;m trying to find out why. On the ARM board, I have /dev/tty1 up to /dev/tty63, and /dev/console also. <br />The graphics driver is fbcon on /dev/fb0. The board runs Qtopia over the framebuffer and I was able to run a small SDL demo also using fbcon (so I guess it is all OK).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Luiz Cressoni)</author>
		<pubDate>Tue, 16 Nov 2010 18:44:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you find out, please let us know. The linux console support is not well supported or tested these days.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Tue, 16 Nov 2010 19:40:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I was able to go a little deeper, and what I found out is that for some reason, /dev/console does not work on this board.</p><p>So, forcing the code to seek for a /dev/tty%d apparently worked, but the code is freezing on seteuid().</p><p>Commenting the command, if goes crazy while &#39;fork&#39;ing and detaching the processes.</p><p>I&#39;ll take a look on the linux kernel to see some details, since the console is not printing on the lcd screen (although I was able to send some graphics to the framebuffer). I guess that it doesn&#39;t open a default console or something like that.</p><p>I&#39;ll post the news when I get any.</p><p>Regards,</p><p>---------------------------------<br />Some news:</p><p>I had to &#39;hack&#39; some code, but I now can use graphics. The problem is due to some differences between a regular PC and an embedded board.<br />I had to bypass init_console() and also wait_for_display.<br />On the board, I had to call before running my program:</p><p>getty 38400 tty1 &amp;<br />echo 1 &gt; /sys/class/graphics/fb0/state<br />echo 0 &gt; /sys/class/graphics/fb0/blank</p><p>Now, I&#39;m trying to make the mouse works. It&#39;s a lcd touchscreen, found on /dev/event0</p><p>Calls to &quot;has_event(fd, EV_KEY, BTN_MOUSE)&quot; always returns false. Bypassing the check on open_mouse_device, the pointer works (some calibration neeeded, but ok) but there is no &#39;mouse click&#39;. </p><p>Seems that the events doesn&#39;t have the same code. BTN_MOUSE=0x110 and I tested all events and it starts on 0x800 up to 0xfee on this touchpanel.</p><p>Connecting an USB mouse, it opens a /dev/event1 and it works perfectly, however.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Luiz Cressoni)</author>
		<pubDate>Tue, 16 Nov 2010 20:19:15 +0000</pubDate>
	</item>
</rss>
