<br><br>On Wednesday, February 24, 2016, nick <<a href="mailto:xerofoify@gmail.com">xerofoify@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 2016-02-23 09:35 AM, Woody Wu wrote:<br>
> Hi,<br>
><br>
> I am trying to port 3.18 kernel to a S3C2416. Years ago, a guy helped me<br>
> ported a 3.1.0 kernel to the same board, and the guy left and the kernel<br>
> got too old. The guy also ported an u-boot as boot loader to load the 3.1.0<br>
> kernel. I had the source code of the ported u-boot and the 3.1.0 linux.<br>
><br>
> Now, my problem is that my porting of 3.18 seems not working, I did not see<br>
> any kernel message printed to the first SoC serial port as I expected. As<br>
> long as I can get kernel message printed to the serial, I think I can step<br>
> by step finish the whole porting work eventually. But now, there is no<br>
> message and I have no other hardware debugging tools and knowledges, I felt<br>
> I lost my way totally.<br>
><br>
> I hope someone can give me some suggestions, clues to help me<br>
> understand where to check and what's the possible causes.<br>
><br>
Firstly my knowledge with kernel upstream porting to a non mainlined<br>
port is not as good as some of the other people here but let's see what<br>
I can do. </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> Since I found the old porting of the 3.1.0 is quit similar to SMDK2416,<br>
> then I started my work from also the SMDK2416 board code in 3.18.<br>
> Basically, I defined the machine-code to match that passed from u-boot, and<br>
> copied the MACHINE-START definition section with removing of some<br>
> not-immediately-needed stuff such as USB, NAND and HMSUI etc. I also<br>
> enabled the S3C2410 serial driver and enabled the serial console supporting<br>
> for the Samsung SoC. Of course, I had the kernel parameter of<br>
> "console=ttySAC0", ttySAC0 is the Linux device name of the first UART port<br>
> in the SoC. These are basically what I had done and I guess the SoC serial<br>
> part between my board and SMDK2416 should be very similar and the kernel<br>
> should at least be able to print it's first message then I should have<br>
> chance to fix other differences. But there is no kernel message at all as I<br>
> mentioned above.<br>
> </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can you either send me the patch series that the other developer used to port<br>
your port to 3.1.0 or I would recommend stating on kernel 3.1.0 as it's still<br>
a longterm kernel unless you have reason to upgrade. If you do I would recommend<br>
you either get something with experience or yourself to try and upstream the<br>
differences between your board and the mainline so others will not have to do<br>
the same work as you unless your company will not allow you to do this.<br>
> What should I check for the problem usually? Is there a checking list to go<br>
> through? I hope you experts can give me some clues. Thanks in advance!<br>
></blockquote><div><br></div><div>To make a patch, I have to have the original 3.1.0, but I was confused about how the <a href="http://kernel.org">kernel.org</a> organized, I just cannot find how to get a 3.1.0 tarball or git repository. Can you please give me a hint? BTW, I also dont really understand what the 'mainline' mens. If I download a latest 3.18.27.tar.xz, is it a mainline?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Their are two things you can do here either try and enable early_printk as this<br>
seems to be happening before the serial console is able to print the first kernel<br>
message. The second is trying to enable kgdb on the board and use another computer<br>
over the serial port to do this sort of debugging.<br>
Hope this gets you started,<br>
Nick</blockquote><div><br></div><div>Firstly, I will try early_printk soon. Before that, can your tell me what are differences betweenthe following printing technologies: 1, early_printk 2, early_print, 3, putc used in arch/arm/compressed/misc.c.</div><div><br></div><div>Secondly, I have a question about kgdb. You see the situation is that my serial port had been initialized by the u-boot, but not yet touched by the kernel since the kernel is not yet run and waiting for debugging, and now I am jusr sitting in the u-boot command prompt and has an uImage kernel image file loaded in a region of SDRAM, do you think that these all above are enough or possible to the kgdb debugging? </div><div><br></div><div>Many thanks!</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> Best Regards,<br>
> woody<br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="javascript:;" onclick="_e(event, 'cvml', 'Kernelnewbies@kernelnewbies.org')">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
><br>
</blockquote><br><br>-- <br>Life is the only flaw in an otherwise perfect nonexistence<br> -- Schopenhauer<br><br>woody<br>public key at <a href="http://subkeys.pgp.net:11371">http://subkeys.pgp.net:11371</a> (<a href="mailto:narkewoody@gmail.com">narkewoody@gmail.com</a>)<br><br><br>