Porting to an S3C2416 failed with no console message

Woody Wu narkewoody at gmail.com
Wed Feb 24 09:07:13 EST 2016


On Wednesday, February 24, 2016, nick <xerofoify at gmail.com> wrote:

>
>
> On 2016-02-23 09:35 AM, Woody Wu wrote:
> > Hi,
> >
> > I am trying to port 3.18 kernel to a S3C2416.  Years ago, a guy helped me
> > ported a 3.1.0 kernel to the same board, and the guy left and the kernel
> > got too old. The guy also ported an u-boot as boot loader to load the
> 3.1.0
> > kernel.  I had the source code of the ported u-boot and the 3.1.0 linux.
> >
> > Now, my problem is that my porting of 3.18 seems not working, I did not
> see
> > any kernel message printed to the first SoC serial port as I expected. As
> > long as I can get kernel message printed to the serial, I think I can
> step
> > by step finish the whole porting work eventually. But now, there is no
> > message and I have no other hardware debugging tools and knowledges, I
> felt
> > I lost my way totally.
> >
> > I hope someone can give me some suggestions, clues to help me
> > understand where to check and what's the possible causes.
> >
> Firstly my knowledge with kernel upstream porting to a non mainlined
> port is not as good as some of the other people here but let's see what
> I can do.

> Since I found the old porting of the 3.1.0 is quit similar to SMDK2416,
> > then I started my work from also the SMDK2416 board code in 3.18.
> > Basically, I defined the machine-code to match that passed from u-boot,
> and
> > copied the MACHINE-START definition section with removing of some
> > not-immediately-needed stuff such as USB, NAND and HMSUI etc. I also
> > enabled the S3C2410 serial driver and enabled the serial console
> supporting
> > for the Samsung SoC. Of course, I had the kernel parameter of
> > "console=ttySAC0", ttySAC0 is the Linux device name of the first UART
> port
> > in the SoC. These are basically what I had done and I guess the SoC
> serial
> > part between my board and SMDK2416 should be very similar and the kernel
> > should at least be able to print it's first message then I should have
> > chance to fix other differences. But there is no kernel message at all
> as I
> > mentioned above.
> >

Can you either send me the patch series that the other developer used to
> port
> your port to 3.1.0 or I would recommend stating on kernel 3.1.0 as it's
> still
> a longterm kernel unless you have reason to upgrade. If you do I would
> recommend
> you either get something with experience or yourself to try and upstream
> the
> differences between your board and the mainline so others will not have to
> do
> the same work as you unless your company will not allow you to do this.
> > What should I check for the problem usually? Is there a checking list to
> go
> > through? I hope you experts can give me some clues.  Thanks in advance!
> >


To make a patch, I have to have the original 3.1.0, but I was confused
about how the kernel.org 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?


> Their are two things you can do here either try and enable early_printk as
> this
> seems to be happening before the serial console is able to print the first
> kernel
> message. The second is trying to enable kgdb on the board and use another
> computer
> over the serial port to do this sort of debugging.
> Hope this gets you started,
> Nick


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.

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?

Many thanks!

> Best Regards,
> > woody
> >
> >
> >
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org <javascript:;>
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
>


-- 
Life is the only flaw in an otherwise perfect nonexistence
    -- Schopenhauer

woody
public key at http://subkeys.pgp.net:11371 (narkewoody at gmail.com)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160224/5a963b55/attachment-0001.html 


More information about the Kernelnewbies mailing list