We're using an embedded Raspberry Pi that uses a (I2C) 4x20 LCD (character) instead of HDMI.

Since the boot process can take some time I'd like to get something on the LCD as soon as possible to say we're alive. The existing code I have is C++ using the Wiring Pi library so does not need python or any other scripting.

What is the earliest place in the boot process we could run something to init the LCD (I2C) & where would I need to insert this?

While I've written lots of user level code I'm not familiar with the Linux boot process other than auto running a program as the last thing.

  • 2
    GPIO is available within the initramfs via /sys, I'm guessing you could load the I2C driver there as well. – Roger Jones Apr 13 at 21:53

Raspberry Pi does not use a structured boot loader like grub or lilo or usable U-boot and Berryboot. It is seen as an embedded system and typical for this the boot procedure is very hardware-dependent. I think it's not an easy task to modify it.

To get an idea you may have a look at the Boot flow to find the right place for your insertion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.