Port-arm archive

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

Re: LG Nexus 5



Hi Shao --

You should not have to change initarm(). You can introduce SoC specific initialization using the ARM_PLATFORM macro. Have a look at arch/arm/sunxi/sunxi_platform.c, arch/arm/ti/omap3_platform.c for examples. This will handle any SoC specific early init, nonstandard MP startup, timers, reset handling, etc.

Getting your framebuffer to work should require little to no code:

 - Your bootloader is responsible for setting up the display and creating
   a linear framebuffer.
 - In your FDT, declare a node under /chosen (lets keep it simple and call
   it /chosen/framebuffer) with a compatible string of
   "simple-framebuffer" and describing the linear FB setup by the
   bootloader using the simple-framebuffer bindings[1]

NetBSD's simplefb driver (sys/arch/arm/fdt/arm_simplefb.c and sys/dev/fdt/simplefb.c) will do the rest for you.

Hope this helps,
Jared

[1] https://www.kernel.org/doc/Documentation/devicetree/bindings/display/simple-framebuffer.yaml


On Fri, 4 Nov 2022, Shao Miller wrote:

Maybe this question just above was a silly one. I have a framebuffer region of memory and I have successfully drawn lines on the display from the aforementioned initarm(). Perhaps there's some way I can attach something with the name genfb in it at such an early stage, in order for early prints to work, and doing so will remove any need for me to process a font and draw it myself?

A new question: what's your favourite guide to follow for porting NetBSD to some hardware using the FDT approach? I've examined the non-FDT https://www.netbsd.org/docs/kernel/porting_netbsd_arm_soc.html article, so far.

Thank you for any time you can spare.

- Shao Miller




Home | Main Index | Thread Index | Old Index