Add: seamless boot splash, daemon for disabling keyboard and touchpad, and remove gzip compression on initramfs #215

Open
Maccraft123 wants to merge 17 commits from Maccraft123/to_upstream into master
Maccraft123 commented 2020-09-16 00:22:52 +02:00 (Migrated from github.com)

This needs to be tested on arm64 hardware and dumps of 1280x800, 1366x768 and 2400x1600 of splash have to be taken

This needs to be tested on arm64 hardware and dumps of 1280x800, 1366x768 and 2400x1600 of splash have to be taken
gregordinary commented 2020-09-16 05:38:56 +02:00 (Migrated from github.com)

Note: I don't have an arm64 chromebook to test with. I do have a NanoPi m4-v2 (RK3399-based) SBC, but I don't think that board is supported here. Still, wanted to try compiling for ARM-64 just to see the process as last time I compiled PrawnOS, this wasn't an option.

Anyway, tried compiling for arm64, first with @Maccraft123 's branch directly and got the following error:

+ mkdir brcm
+ cp /home/USERNAME/Development/git/ShrimpOS/kernel/resources/arm64/brcmfmac4354-sdio.bin brcm/
cp: cannot stat '/home/USERNAME/Development/git/ShrimpOS/kernel/resources/arm64/brcmfmac4354-sdio.bin': No such file or directory
make[1]: *** [/home/USERNAME/Development/git/ShrimpOS/kernel/makefile:68: /home/USERNAME/Development/git/ShrimpOS/build/arm64/linux/vmlinux.kpart] Error 1
make[1]: Leaving directory '/home/USERNAME/Development/git/ShrimpOS'
make: *** [makefile:89: image] Error 2

Tried again using the main repo from @SolidHal creating a local branch from this Pull Request (probably the right way to do this, I'm learning) and received the following:

1+0 records in
1+0 records out
512 bytes copied, 0.000100901 s, 5.1 MB/s
+ vbutil_kernel --pack vmlinux.kpart --version 1 --vmlinuz vmlinux.uimg --arch aarch64 --keyblock /usr/share/vboot/devkeys/kernel.keyblock --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk --config /home/USERNAME/Development/git/PrawnOS/kernel/resources/arm64/cmdline --bootloader bootloader.bin
+ RESULT=0
+ '[' '!' 0 -eq 0 ']'
++ stat -c %s vmlinux.kpart
+ KERNEL_SIZE=35241984
+ '[' 35241984 -gt 33554432 ']'
+ mv vmlinux.kpart oversized_vmlinux.kpart
+ echo 'kernel larger than max kernel size!'
kernel larger than max kernel size!
+ exit 1
make[1]: *** [/home/USERNAME/Development/git/PrawnOS/kernel/makefile:117: /home/USERNAME/Development/git/PrawnOS/build/arm64/linux-5.7.10/vmlinux.kpart] Error 1
make[1]: Leaving directory '/home/USERNAME/Development/git/PrawnOS'
make: *** [makefile:89: image] Error 2

Might the issue be from removing gzip compression?

**Note:** I don't have an arm64 chromebook to test with. I do have a NanoPi m4-v2 (RK3399-based) SBC, but I don't think that board is supported here. Still, wanted to try compiling for ARM-64 just to see the process as last time I compiled PrawnOS, this wasn't an option. Anyway, tried compiling for arm64, first with @Maccraft123 's branch directly and got the following error: ``` + mkdir brcm + cp /home/USERNAME/Development/git/ShrimpOS/kernel/resources/arm64/brcmfmac4354-sdio.bin brcm/ cp: cannot stat '/home/USERNAME/Development/git/ShrimpOS/kernel/resources/arm64/brcmfmac4354-sdio.bin': No such file or directory make[1]: *** [/home/USERNAME/Development/git/ShrimpOS/kernel/makefile:68: /home/USERNAME/Development/git/ShrimpOS/build/arm64/linux/vmlinux.kpart] Error 1 make[1]: Leaving directory '/home/USERNAME/Development/git/ShrimpOS' make: *** [makefile:89: image] Error 2 ``` Tried again using the main repo from @SolidHal creating a local branch from this Pull Request (probably the right way to do this, I'm learning) and received the following: ``` 1+0 records in 1+0 records out 512 bytes copied, 0.000100901 s, 5.1 MB/s + vbutil_kernel --pack vmlinux.kpart --version 1 --vmlinuz vmlinux.uimg --arch aarch64 --keyblock /usr/share/vboot/devkeys/kernel.keyblock --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk --config /home/USERNAME/Development/git/PrawnOS/kernel/resources/arm64/cmdline --bootloader bootloader.bin + RESULT=0 + '[' '!' 0 -eq 0 ']' ++ stat -c %s vmlinux.kpart + KERNEL_SIZE=35241984 + '[' 35241984 -gt 33554432 ']' + mv vmlinux.kpart oversized_vmlinux.kpart + echo 'kernel larger than max kernel size!' kernel larger than max kernel size! + exit 1 make[1]: *** [/home/USERNAME/Development/git/PrawnOS/kernel/makefile:117: /home/USERNAME/Development/git/PrawnOS/build/arm64/linux-5.7.10/vmlinux.kpart] Error 1 make[1]: Leaving directory '/home/USERNAME/Development/git/PrawnOS' make: *** [makefile:89: image] Error 2 ``` Might the issue be from removing gzip compression?
Maccraft123 commented 2020-09-16 15:52:18 +02:00 (Migrated from github.com)

Oh it barely doesn't fit.
PrawnOS works only on devices that boot with depthcharge, so it won't work on any SBC that doesn't run coreboot.

Oh it barely doesn't fit. PrawnOS works only on devices that boot with depthcharge, so it won't work on any SBC that doesn't run coreboot.
Maccraft123 commented 2020-09-16 17:05:40 +02:00 (Migrated from github.com)

I think that to fix this someone with arm64 chromebooks should remove some kernel config options to decrease space requirements and test if it still works fine

I think that to fix this someone with arm64 chromebooks should remove some kernel config options to decrease space requirements and test if it still works fine
Maccraft123 commented 2020-09-17 14:51:00 +02:00 (Migrated from github.com)

Update: blocked until https://github.com/SolidHal/PrawnOS/pull/216 is merged

Update: blocked until https://github.com/SolidHal/PrawnOS/pull/216 is merged
SolidEva commented 2020-09-17 16:05:35 +02:00 (Migrated from github.com)

I'm not surprised we went over, I made the config quite sparse and it just barely fit.

I'm not surprised we went over, I made the config quite sparse and it just barely fit.
Maccraft123 commented 2020-09-17 16:47:13 +02:00 (Migrated from github.com)

I guess it's time to do kernel module support

I guess it's time to do kernel module support
SolidEva commented 2020-09-17 17:37:28 +02:00 (Migrated from github.com)

kernel size bump is merged, pulling this to test

kernel size bump is merged, pulling this to test
SolidEva commented 2020-09-17 18:09:29 +02:00 (Migrated from github.com)

on an armhf build I get prompted for the following:

scripts/kconfig/conf  --syncconfig Kconfig
*
* Restart config...
*
*
* printk and dmesg options
*
Show timing information on printks (PRINTK_TIME) [Y/n/?] y
Show caller information on printks (PRINTK_CALLER) [N/y/?] n
Default console loglevel (1-15) (CONSOLE_LOGLEVEL_DEFAULT) [7] (NEW)

looks like this PR sets it to 0, which is not a valid value

that said, it looks like we manage the console log level in the initramfs, so is this needed?

on an armhf build I get prompted for the following: ``` scripts/kconfig/conf --syncconfig Kconfig * * Restart config... * * * printk and dmesg options * Show timing information on printks (PRINTK_TIME) [Y/n/?] y Show caller information on printks (PRINTK_CALLER) [N/y/?] n Default console loglevel (1-15) (CONSOLE_LOGLEVEL_DEFAULT) [7] (NEW) ``` looks like this PR sets it to 0, which is not a valid value that said, it looks like we manage the console log level in the initramfs, so is this needed?
SolidEva commented 2020-09-17 18:23:57 +02:00 (Migrated from github.com)

Could I get some insight into why we want these systemd settings? We might need to implement these settings in a different way, as the file will get overwritten anytime the systemd package is updated.

Could I get some insight into why we want these systemd settings? We might need to implement these settings in a different way, as the file will get overwritten anytime the systemd package is updated.
Maccraft123 commented 2020-09-17 18:55:51 +02:00 (Migrated from github.com)

Those settings are needed to silence systemd because any write to tty overwrites splash
And initramfs loglevel sometimes doesn't work

Those settings are needed to silence systemd because any write to tty overwrites splash And initramfs loglevel sometimes doesn't work
gdallasdye commented 2020-09-18 03:00:02 +02:00 (Migrated from github.com)

Quick questions:

Is disabling selinux necessary? I do have some selinux troubleshooting experience, have seen plymouth boot screens on selinux, and have a preference for keeping selinux enabled as it's mandatory access controls help maintain security when the old fashioned discretionary aces controls fail. I could go on for hours about selinx btw...

And is this some kind of workaround to implement plymouth boot screens in the PrawnOS initrd system? Since as we know, Debian's initrd generator doesn't support depthcharge targets. If so, this could help me use the plymouth-spinner-theme while booting, which has been a goal :)

Taking a look here it would seem like the system.conf file should be place in /etc/systemd/system.conf.d/system.conf You'll want to tell the script to mkdir -p that directory, then change the folder it gets copied to.

Would you also mind creating another branch and post screenshots and camera pictures to visually documenting the changes? A few weeks ago I made a branch called readme-minor-changes, which implies a future branch with bigger changes. But that's another topic for another day.

Quick questions: Is disabling selinux necessary? I do have some selinux troubleshooting experience, have seen plymouth boot screens on selinux, and have a preference for keeping selinux enabled as it's mandatory access controls help maintain security when the old fashioned discretionary aces controls fail. I could go on for hours about selinx btw... And is this some kind of workaround to implement plymouth boot screens in the PrawnOS initrd system? Since as we know, Debian's initrd generator doesn't support depthcharge targets. If so, this could help me use the plymouth-spinner-theme while booting, which has been a goal :) Taking a look [here](https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html) it would seem like the system.conf file should be place in /etc/systemd/system.conf.d/system.conf You'll want to tell the script to mkdir -p that directory, then change the folder it gets copied to. Would you also mind creating another branch and post screenshots and camera pictures to visually documenting the changes? A few weeks ago I made a branch called readme-minor-changes, which implies a future branch with bigger changes. But that's another topic for another day.
Maccraft123 commented 2020-09-18 07:22:05 +02:00 (Migrated from github.com)

Selinux displays some error message about some file not found, that overwrites part of splash.
And this is NOT plymouth. I made a youttube video displaying how it looks with gdm, https://youtu.be/Ha1-sOUqaDY
With other display managers it will work same way. I can make some pictures after it gets merged.

Selinux displays some error message about some file not found, that overwrites part of splash. And this is NOT plymouth. I made a youttube video displaying how it looks with gdm, https://youtu.be/Ha1-sOUqaDY With other display managers it will work same way. I can make some pictures after it gets merged.
Maccraft123 commented 2020-09-18 08:20:09 +02:00 (Migrated from github.com)

About selinux concerns: I've reverted commit that disables it.

About selinux concerns: I've reverted commit that disables it.
SolidEva (Migrated from github.com) reviewed 2020-09-22 21:50:46 +02:00
SolidEva (Migrated from github.com) commented 2020-09-17 18:59:14 +02:00

this is something I need to test and fix, but for now please don't include these .dsc files
the dsc file describes the sources, and since we build the source zip for some packages but not others I have to figure out which ones we only want to change when the version upload the the apt repo changes and how to make git/the apt repo happy

this is something I need to test and fix, but for now please don't include these .dsc files the dsc file describes the sources, and since we build the source zip for some packages but not others I have to figure out which ones we only want to change when the version upload the the apt repo changes and how to make git/the apt repo happy
SolidEva (Migrated from github.com) commented 2020-09-17 18:38:52 +02:00

I don't see what this file is for?

I don't see what this file is for?
@ -17,12 +17,11 @@
# You should have received a copy of the GNU General Public License
# along with PrawnOS. If not, see <https://www.gnu.org/licenses/>.
SolidEva (Migrated from github.com) commented 2020-09-17 18:37:21 +02:00

I see some potential issues for debugging with how the splash is implemented, which would be fixed by the following:

  1. some way to disable the splash and instead get all of the console output/debug echos. Doing this without rebuilding the kernel and initramfs would be nice. I'm not sure if this is possible though...
  2. keep the debug logging if we are not presenting the splash screen
  3. the fix for (2) needs to ensure that if we do enter the rescue_shell, we print out the debug messages
I see some potential issues for debugging with how the splash is implemented, which would be fixed by the following: 1) some way to disable the splash and instead get all of the console output/debug echos. Doing this without rebuilding the kernel and initramfs would be nice. I'm not sure if this is possible though... 2) keep the debug logging if we are not presenting the splash screen 3) the fix for (2) needs to ensure that if we do enter the rescue_shell, we print out the debug messages
@ -77,3 +87,4 @@
# label any partition on the system with RESCUESHELL to enter the initramfs rescue shell before mount and root_switch.
# you can do this with "cgpt add -i 1 -l RESCUESHELL /dev/sda" for example to label the first partiton of a usb drive.
SolidEva (Migrated from github.com) commented 2020-09-17 18:27:58 +02:00

I have done many boot tests on veyron-speedy and gru-kevin and have never seen this happen. I'm not convinced it could happen, as we are already booting from the device we are looking for. What situations did you see this happen?

I have done many boot tests on veyron-speedy and gru-kevin and have never seen this happen. I'm not convinced it could happen, as we are already booting from the device we are looking for. What situations did you see this happen?
@ -317,0 +338,4 @@
cd $outmnt/opt/git/
rm -rf $outmnt/opt/git/c100pa-daemon
git clone https://github.com/Maccraft123/c100pa-daemon.git $outmnt/opt/git/c100pa-daemon
SolidEva (Migrated from github.com) commented 2020-09-17 19:02:23 +02:00

I see parts of this repeated in the buildFilesystem and the InstallPackages scripts, are both necessary?

I see parts of this repeated in the buildFilesystem and the InstallPackages scripts, are both necessary?
Maccraft123 (Migrated from github.com) reviewed 2020-09-22 21:58:51 +02:00
@ -77,3 +87,4 @@
# label any partition on the system with RESCUESHELL to enter the initramfs rescue shell before mount and root_switch.
# you can do this with "cgpt add -i 1 -l RESCUESHELL /dev/sda" for example to label the first partiton of a usb drive.
Maccraft123 (Migrated from github.com) commented 2020-09-22 21:58:51 +02:00

I was testing images on my microSD card and it has happened a few times
It may be due to its old age, or bad quality, either way, it won't hurt i think

I was testing images on my microSD card and it has happened a few times It may be due to its old age, or bad quality, either way, it won't hurt i think
Maccraft123 (Migrated from github.com) reviewed 2020-09-22 21:59:54 +02:00
Maccraft123 (Migrated from github.com) commented 2020-09-22 21:59:54 +02:00

oops

oops
Maccraft123 (Migrated from github.com) reviewed 2020-09-22 22:00:39 +02:00
@ -317,0 +338,4 @@
cd $outmnt/opt/git/
rm -rf $outmnt/opt/git/c100pa-daemon
git clone https://github.com/Maccraft123/c100pa-daemon.git $outmnt/opt/git/c100pa-daemon
Maccraft123 (Migrated from github.com) commented 2020-09-22 22:00:39 +02:00

When i was testing, when it was only on buildFilesystem or InstallPackages it was either not working on system before installing, or after installing.

When i was testing, when it was only on buildFilesystem or InstallPackages it was either not working on system before installing, or after installing.
Maccraft123 (Migrated from github.com) reviewed 2020-09-22 22:01:04 +02:00
Maccraft123 (Migrated from github.com) commented 2020-09-22 22:01:03 +02:00

.gitignore updates coming Soon™

.gitignore updates coming Soon™
Maccraft123 (Migrated from github.com) reviewed 2020-09-22 22:04:54 +02:00
@ -17,12 +17,11 @@
# You should have received a copy of the GNU General Public License
# along with PrawnOS. If not, see <https://www.gnu.org/licenses/>.
Maccraft123 (Migrated from github.com) commented 2020-09-22 22:04:54 +02:00

Splash can be removed with just simple 'clear' shell command
And inserting device with RESCUESHELL label should be enough, it jumps to shell before splash screen

Splash can be removed with just simple 'clear' shell command And inserting device with RESCUESHELL label should be enough, it jumps to shell before splash screen
SolidEva (Migrated from github.com) reviewed 2020-09-22 22:41:47 +02:00
SolidEva (Migrated from github.com) commented 2020-09-22 22:41:46 +02:00

heh, this file is still here?

heh, this file is still here?
Maccraft123 (Migrated from github.com) reviewed 2020-09-22 22:50:56 +02:00
Maccraft123 (Migrated from github.com) commented 2020-09-22 22:50:55 +02:00

yeah but now it's something better

yeah but now it's something better
Maccraft123 (Migrated from github.com) reviewed 2020-09-22 23:43:40 +02:00
@ -317,0 +338,4 @@
cd $outmnt/opt/git/
rm -rf $outmnt/opt/git/c100pa-daemon
git clone https://github.com/Maccraft123/c100pa-daemon.git $outmnt/opt/git/c100pa-daemon
Maccraft123 (Migrated from github.com) commented 2020-09-22 23:43:40 +02:00

oh and it needs to be tested on kevin and bob

oh and it needs to be tested on kevin and bob
SolidEva (Migrated from github.com) reviewed 2020-09-24 01:16:23 +02:00
SolidEva (Migrated from github.com) commented 2020-09-24 01:16:23 +02:00

This doesn't actually disable selinux, just changes when it is loaded. Instead of loading selinux then U DAC, it loads U DAC first. If this fixes the issue you are seeing, great, its a win-win.

This doesn't actually disable selinux, just changes when it is loaded. Instead of loading selinux then U DAC, it loads U DAC first. If this fixes the issue you are seeing, great, its a win-win.
SolidEva (Migrated from github.com) reviewed 2020-09-24 01:17:44 +02:00
SolidEva (Migrated from github.com) commented 2020-09-24 01:17:44 +02:00

Ah, I see, you reverted the change that disabled SElinux and this config change stayed?

Ah, I see, you reverted the change that disabled SElinux and this config change stayed?
SolidEva commented 2020-09-24 01:36:51 +02:00 (Migrated from github.com)

hm, I got prompted to set LSM_MMAP_MIN_ADDR on the armhf build

hm, I got prompted to set `LSM_MMAP_MIN_ADDR` on the armhf build
SolidEva commented 2020-09-24 02:25:52 +02:00 (Migrated from github.com)

tested this on my c201 and got dropped right into the initramfs errr shell

tested this on my c201 and got dropped right into the initramfs errr shell
Maccraft123 commented 2020-09-25 22:28:21 +02:00 (Migrated from github.com)

oops

oops
SolidEva commented 2020-09-28 04:18:42 +02:00 (Migrated from github.com)

tested the image built here by the PR automation, definitely doesn't work. something goes wrong int the initramfs. @Maccraft123 if you leave this long enough, I will get around to debugging it for you hahaha.

tested the image built here by the PR automation, definitely doesn't work. something goes wrong int the initramfs. @Maccraft123 if you leave this long enough, I will get around to debugging it for you hahaha.
ghost commented 2020-09-30 18:29:25 +02:00 (Migrated from github.com)

Sorry if im on the wrong track here, but i don't think all those suppressed log levels are needed. For FB-Coding you can tell the bootsplash program (whatever is used) to claim the framebuffer as a graphical console and thus silence all console messages like this:

	int tty_fd = open("/dev/tty0", O_RDWR);
	ioctl(tty_fd,KDSETMODE,KD_GRAPHICS);

	//At exit:
	ioctl(tty_fd,KDSETMODE,KD_TEXT);

in ubuntu the splashscreen can be disabled with a simple press on ESC.

I like this solution more because we can handle decrypting the root partition in a similiar nice manner and will give it a try.

Sorry if im on the wrong track here, but i don't think all those suppressed log levels are needed. For FB-Coding you can tell the bootsplash program (whatever is used) to claim the framebuffer as a graphical console and thus silence all console messages like this: ``` int tty_fd = open("/dev/tty0", O_RDWR); ioctl(tty_fd,KDSETMODE,KD_GRAPHICS); //At exit: ioctl(tty_fd,KDSETMODE,KD_TEXT); ``` in ubuntu the splashscreen can be disabled with a simple press on ESC. I like this solution more because we can handle decrypting the root partition in a similiar nice manner and will give it a try.
SolidEva commented 2020-12-11 04:59:25 +01:00 (Migrated from github.com)

Seems stock plymouth works just fine with depthcharge. Seems reasonable to attempt to implement the logo in plymouth if work picks back up on this.

Seems stock plymouth works just fine with depthcharge. Seems reasonable to attempt to implement the logo in plymouth if work picks back up on this.
This pull request has changes conflicting with the target branch.
  • .gitignore
  • initramfs/resources/initramfs-init
  • kernel/resources/arm64/blobby-config
  • kernel/resources/armhf/blobby-config
  • scripts/BuildScripts/FilesystemScripts/buildFilesystem.sh
  • scripts/BuildScripts/InitramfsScripts/buildInitramFs.sh
  • scripts/InstallScripts/InstallPackages.sh
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin Maccraft123/to_upstream:Maccraft123/to_upstream
git switch Maccraft123/to_upstream

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff Maccraft123/to_upstream
git switch Maccraft123/to_upstream
git rebase master
git switch master
git merge --ff-only Maccraft123/to_upstream
git switch Maccraft123/to_upstream
git rebase master
git switch master
git merge --no-ff Maccraft123/to_upstream
git switch master
git merge --squash Maccraft123/to_upstream
git switch master
git merge --ff-only Maccraft123/to_upstream
git switch master
git merge Maccraft123/to_upstream
git push origin master
Sign in to join this conversation.
No description provided.