tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: graphic drivers and simplefb



On Wed, Apr 04, 2018 at 07:25:41PM -0300, Jared McNeill wrote:
> On Thu, 5 Apr 2018, Manuel Bouyer wrote:
> 
> > looking closer at it I can't see how this change would be a problem.
> > With this /chosen/stdout-path may point to a path that doens't
> > exists, or is not okay.
> > If it's not okay the driver will not attach because the fdt bus logic will
> > skip it.
> > It it doesn't exists, fdtbus_get_stdout_phandle() will return -1, which should
> > prevent of_match_compatible() from matching.
> > Did I miss something ?
> 
> The default stdout-path is usually defined in board specific .dts files:
> 
> https://nxr.netbsd.org/xref/src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts#58

OK, if I read the sources properly u-boot will update linux,stdout-path
but will not touch stdout-path. So setting it in the dts should work.

But still, being able to switch the console from the bootargs is convenient.
On the device I'm working with, the normal stdout-path would be the
graphic display, but when doing developement I switch to serial console.
It's much easier to switch using bootargs (which I can always do using the
serial console) than updating the device tree (especially as I can't easily
extract the sd card, I have to dissasemble the boards for that).

I think there's a simple way to get it working: leave stdout-path to the
serial port, and move sunxi_com to pass 4, so that it's probed before
sunxi_dep. This way the kernel starts with console on serial, and switches
to graphic if the command line says so when the graphic drivers are activated.

I can do this in my kernel config file, but I think it would make sense to
do it in SUNXI instead.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index