View previous topic :: View next topic |
Author |
Message |
bjorn-fischer n00b
Joined: 13 Nov 2023 Posts: 8 Location: Bielefeld
|
Posted: Tue Nov 14, 2023 3:02 pm Post subject: Misfits — Patches not fit for pushing upstream #31: agetty |
|
|
Hi folks!
Sorry for this longer post, deliberately assuming "chatty" is ok in Gentoo Chat. Let me know if this is not appropriate or wanted, and I'll leave it be.
One of the major advantages of Gentoo Linux is the exceptionally handy possibility to add and maintain local patches for any package installed onto the system. Every leap year or so I dig though /etc/portage/patches, doing some spring cleaning, checking if a patch should be pushed upstream or is still needed at all. Pushing patches upstream is always a good idea, even if the implementation is not optimal, as long as the idea gets conveyed and the proof of concept and usefulness has been provided.
But there are those other patches. Patches way too personal or too hacky to be even considered for pushing upstream. Hot gluing an abomination of code together that just works for me™ to silence darkest cravings never meant to be made public. This is the story of one of those patches.
The Unix that popped my cherry was SunOS on a SPARCstation IPX at Hildesheim University. The machines were configured very ascetically: You had to log onto the framebuffer console and startx your X11 session manually. Quite cumbersome compared with today's means. Yet, that environment left deep imprints. Nowdays I am hacking happily on my Happy Hacking keyboard resembling the Sun key layout and pushing around an optical mouse (without that griddy metal mouse pad, of course, I'm not a freak) just missing the freshly booted black on white framebuffer console with the graphical Sun logo and a very short MOTD. This gap had to be filled, which I did over the last five or so years, whenever I had to procrastinate away my writer's block. A framebuffer console? Anything that has not that dreadful VGA font? Linux has you covered, you can even have the original Sun font. Black on white text right from the moment the kernel prints it's first life signs? Easy money. Not even need to patch the kernel, just set the palette via kernel boot parameters:
Code: |
GRUB_CMDLINE_LINUX_DEFAULT="amdgpu.audio=0 snd-hda-intel.enable=0,1,1 \
vt.default_red=0xff,0xaa,0x00,0xaa,0x00,0xaa,0x00,0x00,0x55,0xff,0x55,0xdf,0x55,0xdf,0x45,0xaa \
vt.default_grn=0xff,0x00,0xaa,0x55,0x00,0x00,0xaa,0x00,0x55,0x55,0xff,0xdf,0x55,0x45,0xdf,0xaa \
vt.default_blu=0xff,0x00,0x00,0x00,0xaa,0xaa,0xaa,0x00,0x55,0x55,0x55,0x45,0xff,0xdf,0xdf,0xaa"
|
But a graphical Sun logo? Ok, a Linux logo would be more appropriate. Tux? Nah, I really like Larry the cow, the unofficial Gentoo mascot. So, for a long time I had an ASCII art larry the cow in my MOTD. Except that it didn't look like Larry. Not even remotely so. I know what you are thinking. And you are right. We have a framebuffer console. Let's use it! And after lots of trials and errors, senseless experimenting, excessive coffee consumption, and even more procrastination I got agetty to comply with my wishes. This is what it looks like when my workstation has finished booting:
https://docs.cebitec.uni-bielefeld.de/s/D3nAk52LSQN2A3X/preview
This is the patch for agetty:
https://docs.cebitec.uni-bielefeld.de/s/a8gYLK78WQX9fKm
Outlook: I'm still trying to figure out a method to have a margin on the framebuffer console so that the text does not start directly at the screen edge. I already tried fbset(8), that does not seem to work for amdgpudrmfb.
Cheers
Björn |
|
Back to top |
|
|
AJM Apprentice
Joined: 25 Sep 2002 Posts: 195 Location: Aberdeen, Scotland
|
Posted: Tue Nov 21, 2023 11:49 pm Post subject: |
|
|
Well, I like it. I'd never bother to do the same of course, but I kind of like the ultimately pointless things that humans do to personalise their stuff. Mind you, almost every Gentoo install is probably unique, customisation is after all the whole point... |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5353 Location: Bavaria
|
Posted: Wed Nov 22, 2023 1:01 am Post subject: |
|
|
I really like these kinds of stories.
BTW:
If your Kernel Command Line Parameters will become longer as today, you might use also an embedded bootconfig ... Example:
Code: | General setup --->
[*] Boot config support
[*] Embed bootconfig file in the kernel
() Embedded bootconfig file path |
This extra boot config allows you to pass a config file as complemental extension of your kernel cmdline when booting. Dont believe the Help saying: "the boot config file must be attached at the end of initramfs" ... you can embed a file directly into the kernel without needing an initramfs.
See more here: /usr/src/linux/Documentation/admin-guide/bootconfig.rst |
|
Back to top |
|
|
bjorn-fischer n00b
Joined: 13 Nov 2023 Posts: 8 Location: Bielefeld
|
Posted: Wed Nov 22, 2023 2:33 pm Post subject: |
|
|
AJM wrote: | [...] but I kind of like the ultimately pointless things that humans do to personalise their stuff. [...] |
We in Germany even have a word for this, well, psycological disorder: Konfiguritis. Triggered by highly configurable software, often aggravated by poor documentation.
In the early days software like fvwm(1) was prone to cause severe cases of konfiguritis. Today there are dangerous things like conky. "Ok, I could hunt down a recurring transient CephFS problem that seems impossible to reproduce, or I can make conky look like I always wanted it to."
And Gentoo with it's endless possibilities is no help at all. I love it!
Cheers
Björn |
|
Back to top |
|
|
bjorn-fischer n00b
Joined: 13 Nov 2023 Posts: 8 Location: Bielefeld
|
Posted: Wed Nov 22, 2023 2:46 pm Post subject: |
|
|
pietinger wrote: | I really like these kinds of stories. |
Thanks. Maybe there'll be more...
Quote: | [...] Dont believe the Help saying: "the boot config file must be attached at the end of initramfs" ... you can embed a file directly into the kernel without needing an initramfs. [...] |
Well, thank you for this. I've discovered the option myself, but discarded it at once as I read "initramfs". I will definitely try this. My kernel command line already is much longer than in my post.
Cheers
Björn
PS: As a moderator, could you give me a hint how to make those URLs to the screenshot and the patch more persistent? Or embed the screenshot, even? |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5353 Location: Bavaria
|
Posted: Wed Nov 22, 2023 3:10 pm Post subject: |
|
|
bjorn-fischer wrote: | [...] could you give me a hint how to make those URLs to the screenshot and the patch more persistent? [...] |
You might use it this way (without blanks):
[ url = https://.... ] Your text [ /url ]
TBH: There are two reasons I dont use it myself: I like it when I can see immediately the destination address of a link without having to move the mouse over a link first ... and I am very lazy
bjorn-fischer wrote: | [...] Or embed the screenshot, even? |
In our forum no pictures can be uploaded and therefore only a link to a picture can be set. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|