<div dir="ltr">Hello Stefan, <div><br></div><div>I was looking for alternate methods of running the program loaded at address 10001000. That was the only motive behind trying go. I kept using bootm till then. I wasn't exactly able to check where u-boot loaded its own memory sections. So instead, I set the load address for the kernel way above at 20000000 where I'm sure nothing else clashed. And loaded the uImage to 20800000. </div>

<div><br></div><div>While it's still stuck at  'Starting kernel...' , I'll take your previous advice seriously. To use a JTAG debugger or recheck the UART definitions. </div><div><br></div><div>I ran test-printf on linux and this is what I got:</div>
<div><div><br></div><div>spawn ./core</div><div>int main(): --- create local services ---</div><div>int main(): --- start init ---</div><div>int main(): transferred 17592186044415 MB to init</div><div>int main(): --- init created, waiting for exit condition ---</div>
<div>[init] Could not open file "<a href="http://ld.lib.so">ld.lib.so</a>"</div><div>Quota exceeded! amount=4096, size=4096, consumed=4096</div><div>[init] upgrading quota donation for SIGNAL session</div><div>[init -> test-printf] -1 = -1 = -1</div>
<div>Test succeeded</div></div><div><br></div><div>Am I supposed to get similar messages from core on my board?</div><div><br></div><div>Thanks in advance</div><div>Aditya</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Jan 6, 2014 at 3:28 PM, Stefan Kalkowski <span dir="ltr"><<a href="mailto:stefan.kalkowski@...1..." target="_blank">stefan.kalkowski@...1...</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Aditya,<br>
<div class="im"><br>
On 01/06/2014 09:18 AM, Aditya Kousik wrote:<br>
> Hello Stefan,<br>
><br>
> I added the print debug call inside extern "C" void kernel() function as<br>
> you'd suggested. Still no response from the processor.<br>
><br>
> I checked the address specifications in both Imx31_uart_base.h and also<br>
> base/include/platform/imx6/board_base.h in Nikolay's branch. They are<br>
> correct, to the dot. Even AIPS mapping in board.h in base-hw's core. The<br>
> definitions seem to be fine.<br>
><br>
> Ideally, what is expected to happen, i.e, the expected course of action? we<br>
> can't load the kernel by running 'bootm' since you say it uses a different<br>
> config. So what do we do with the uImage?<br>
<br>
</div>Well, I can't follow your conclusions to not using bootm? You've a<br>
complete scenario packed into an ELF image, which is built to be loaded<br>
at start address 0x10001000. This ELF image is used by u-boot's mkimage<br>
utility to form a uImage file. This uImage can be loaded to some address<br>
above 0x10300000 e.g. via TFTP like you did it.<br>
Assuming you've loaded the uImage to 0x10800000, you should boot the<br>
scenario with "bootm 0x10800000". After that u-boot will interpret the<br>
uImage header at that address, load the ELF image within the uImage to<br>
the appropriated memory sections, prepare the machine registers, and<br>
finally jump to 0x10001000.<br>
<div class="im"><br>
><br>
> 1. I loaded the uImage to 0x10800000 with TFTP as 'tftp 10800000'. It<br>
> succesfully loaded the kernel to that address. At this point, I had changed<br>
> the load address to 10002000 to check if the image was read properly. It<br>
> did.<br>
> 2. As a different approach, ran 'go 10002000'. This was what I got<br>
> "##Application<br>
> started at 0x10002000, Application terminated, rc = 0x100A4004"<br>
<br>
</div>Using the 'go XXX' command let u-boot simply load that address into the<br>
ip register. As you've loaded an uImage to the related address, the<br>
machine executes the u-boot image header information, which of course<br>
fails. Even if you load the ELF image by hand to the appropriated memory<br>
sections, it is not recommended to use the 'go' command, as u-boot<br>
doesn't prepare the machine as expected. For instance, the kernel gets<br>
executed with the MMU enabled using u-boot's page-table setup etc.<br>
<div class="im"><br>
><br>
> What is the sequence of events, the programs that are sequentially executed<br>
> to say that the kernel is 'running'?<br>
<br>
</div>In your case I assume:<br>
<br>
  tftp 0x10800000 <network path to uImage><br>
  bootm 0x10800000<br>
<br>
One further problem might be that u-boot's own memory sections (binary<br>
data, exception vector) clashes with the scenario ones. Unfortunately,<br>
mostly u-boot doesn't warn you if it fails to load the whole image due<br>
to memory clashes. Therefore, it would be good, if it's possible to you,<br>
to analyze the memory layout of the u-boot binary used on your platform,<br>
e.g.: "readelf -S <u-boot binary>"<br>
<br>
If there's a clash you can change the "LD_TEXT_ADDR" variable in<br>
"base-hw/mk/<a href="http://spec-hw_imx6.mk" target="_blank">spec-hw_imx6.mk</a>" to another non-clashing address.<br>
<div class="HOEnZb"><div class="h5"><br>
Regards<br>
Stefan<br>
<br>
><br>
> Thanks in advance<br>
> Aditya Kousik<br>
><br>
><br>
> On Thu, Jan 2, 2014 at 4:33 PM, Stefan Kalkowski <<br>
> <a href="mailto:stefan.kalkowski@...1...">stefan.kalkowski@...1...</a>> wrote:<br>
><br>
>> Hi,<br>
>><br>
>> On 01/02/2014 08:52 AM, Aditya Kousik wrote:<br>
>>> Hello all,<br>
>>><br>
>>> We've tried to run a basic test-printf script on a Freescale i.MX6<br>
>>> sabrelite board. Based on<br>
>>> this<<a href="http://sourceforge.net/p/genode/mailman/message/31760885/" target="_blank">http://sourceforge.net/p/genode/mailman/message/31760885/</a>>,<br>
>>> we implemented the necessary files. We had also come across an i.MX6<br>
>> branch<br>
>>> by Nikolay Golikov stating that he had a preliminary port of i.MX6 here:<br>
>>> <a href="https://github.com/decaprox/genode/tree/i.mx6" target="_blank">https://github.com/decaprox/genode/tree/i.mx6</a><br>
>>><br>
>>> We ran RUN_OPT="--target=uboot" make run/printf to see if it does print<br>
>> "-1<br>
>>> = -1 = -1" to the serial console (tested with gtkterm).<br>
>>><br>
>>> We ran the boot image uImage through TFTP at load address 0x10800000. It<br>
>>> loads the kernel (267.9 kB) but stops at "Loading kernel".<br>
>><br>
>> Assuming, your resulting kernel image is linked to 0x10001000, and ends<br>
>> at about 0x102cbc55, like the result I got when compiling Nikolay's<br>
>> branch, your load address for the u-boot uImage sounds reasonable.<br>
>> Unfortunately, I can't reproduce your experiments, because I don't have<br>
>> such a board available. The first thing that comes to my mind is, that<br>
>> Nikolay used another board containing the i.MX6 SoC than you with<br>
>> another memory layout of the related peripherals.<br>
>><br>
>>><br>
>>> How do we know if the kernel is indeed running, or are we checking the<br>
>>> right UART ports? (we checked UART1)<br>
>><br>
>> First at all, you should add a printf command like:<br>
>><br>
>>   PDBG("kernel started!")"<br>
>><br>
>> at the very beginning of the kernel's execution. In Nikolay's branch I<br>
>> would add it here:<br>
>><br>
>><br>
>><br>
>> <a href="https://github.com/decaprox/genode/blob/i.mx6/base-hw/src/core/kernel.cc#L1366" target="_blank">https://github.com/decaprox/genode/blob/i.mx6/base-hw/src/core/kernel.cc#L1366</a><br>
>><br>
>> If that message isn't printed, very likely your UART definitions aren't<br>
>> correct.<br>
>><br>
>>><br>
>>> I gave "console=ttymxc0, 115200" as bootargs in u-boot. Any suggestions<br>
>> on<br>
>>> how to proceed? Because we are literally stuck.<br>
>><br>
>> Forget about "bootargs" in u-boot. They are specific to booting the<br>
>> Linux kernel. U-boot puts them into the Linux/ARM specific ATAG<br>
>> structure. In Genode that structure isn't used. It's hard coded in the<br>
>> kernel, which UART is used for kernel/core debug messages. In Nikolay's<br>
>> branch, he uses the UART with memory mapped I/O located at 0x02020000,<br>
>> and with the following UART definition:<br>
>><br>
>><br>
>><br>
>> <a href="https://github.com/decaprox/genode/blob/i.mx6/base/include/drivers/uart/imx31_uart_base.h" target="_blank">https://github.com/decaprox/genode/blob/i.mx6/base/include/drivers/uart/imx31_uart_base.h</a><br>

>><br>
>> Please check whether this corresponds with your board's definitions.<br>
>><br>
>>><br>
>>> Also, is there a good debugging tool for testing the genode environment<br>
>> on<br>
>>> direct hardware?<br>
>><br>
>> Well, there is JTAG of course, which isn't related to Genode<br>
>> specifically. There are other debugging utils available on Genode, like<br>
>> GDB, but that wouldn't help on that low level you're currently working at.<br>
>><br>
>> Regards<br>
>> Stefan<br>
>><br>
>>><br>
>>> Thanks in advance<br>
>>> Aditya Kousik<br>
>>><br>
>>><br>
>>><br>
>>><br>
>> ------------------------------------------------------------------------------<br>
>>> Rapidly troubleshoot problems before they affect your business. Most IT<br>
>>> organizations don't have a clear picture of how application performance<br>
>>> affects their revenue. With AppDynamics, you get 100% visibility into<br>
>> your<br>
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of<br>
>> AppDynamics Pro!<br>
>>><br>
>> <a href="http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk</a><br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Genode-main mailing list<br>
>>> <a href="mailto:Genode-main@lists.sourceforge.net">Genode-main@lists.sourceforge.net</a><br>
>>> <a href="https://lists.sourceforge.net/lists/listinfo/genode-main" target="_blank">https://lists.sourceforge.net/lists/listinfo/genode-main</a><br>
>>><br>
>><br>
>> --<br>
>> Stefan Kalkowski<br>
>> Genode Labs<br>
>><br>
>> <a href="http://www.genode-labs.com/" target="_blank">http://www.genode-labs.com/</a> · <a href="http://genode.org/" target="_blank">http://genode.org/</a><br>
>><br>
>><br>
>> ------------------------------------------------------------------------------<br>
>> Rapidly troubleshoot problems before they affect your business. Most IT<br>
>> organizations don't have a clear picture of how application performance<br>
>> affects their revenue. With AppDynamics, you get 100% visibility into your<br>
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics<br>
>> Pro!<br>
>> <a href="http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk</a><br>
>> _______________________________________________<br>
>> Genode-main mailing list<br>
>> <a href="mailto:Genode-main@lists.sourceforge.net">Genode-main@...173...ists.sourceforge.net</a><br>
>> <a href="https://lists.sourceforge.net/lists/listinfo/genode-main" target="_blank">https://lists.sourceforge.net/lists/listinfo/genode-main</a><br>
>><br>
><br>
><br>
><br>
> ------------------------------------------------------------------------------<br>
> Rapidly troubleshoot problems before they affect your business. Most IT<br>
> organizations don't have a clear picture of how application performance<br>
> affects their revenue. With AppDynamics, you get 100% visibility into your<br>
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!<br>
> <a href="http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Genode-main mailing list<br>
> <a href="mailto:Genode-main@lists.sourceforge.net">Genode-main@...49....sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/genode-main" target="_blank">https://lists.sourceforge.net/lists/listinfo/genode-main</a><br>
><br>
<br>
--<br>
Stefan Kalkowski<br>
Genode Labs<br>
<br>
<a href="http://www.genode-labs.com/" target="_blank">http://www.genode-labs.com/</a> · <a href="http://genode.org/" target="_blank">http://genode.org/</a><br>
<br>
------------------------------------------------------------------------------<br>
Rapidly troubleshoot problems before they affect your business. Most IT<br>
organizations don't have a clear picture of how application performance<br>
affects their revenue. With AppDynamics, you get 100% visibility into your<br>
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!<br>
<a href="http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk" target="_blank">http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk</a><br>
_______________________________________________<br>
Genode-main mailing list<br>
<a href="mailto:Genode-main@lists.sourceforge.net">Genode-main@...12...ceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/genode-main" target="_blank">https://lists.sourceforge.net/lists/listinfo/genode-main</a><br>
</div></div></blockquote></div><br></div>