feature/72: Add configuration option for screen rotation #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
config.ini changes:
if
use
is false, the default screen orientation is 180 degrees.You can do any angle you want, although you'll be greeted with something like this if you chose anything other than 0 or 180:

45 degrees
Bootup screen orientation
One thing that is not tied to this configuration is the bootup screen orientation. That is written directly to the frame buffer when the init system starts. To change this image to match your screen orientation you'll have to modify
/sbin/preinit
:preinit contents for 180 screen rotation:
preinit contents for 0 degrees screen rotation:
You can get access to
preinit
to make these changes in three ways:Modify buildroot
The preinit file can be found at
board/volvodash-rpi4/rootfs_overlay/sbin/preinit
. Openpreinit
in a text editor and make the changes outlined above. To get the change to your device, you then need to rebuild the linux image. If you know you're going to keep it this way forever, do this.Modify SD card rootfs
Pull out your SD card and plug it into your computer in which ever way works for you. On the drive there will be three partitions. The partition you're looking for is labeled
rootfs
and should be an ext3/ext4 partition. You can then opensbin/preinit/
and modify the contents as outlined above. This would be a good option if you're just testing out what screen orientation is going to work for you. If you rebuild a linux image and overwrite your SD card, this change will be lost.SSH
Following the instructions on the main README you can SSH into the device and modify the file
/sbin/preinit
usingnano
, modify the file as described above. This is equivalent to modifying the rootfs using an SD card, so should only be used when you're testing out what screen orientation is going to work.