Get the necessary software and kernel the sources
sudo apt-get build-dep linux linux-image-$(uname -r)
sudo apt-get install libncurses-dev flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf
apt-get source linux-image-$(uname -r)
*optional - also install lzop if you want to build a kernel compressed in lzo - sudo apt install lzop
Once done, to create a static no modular and minimalist kernel enter into the source directory and then run
make localmodconfig
this will load only the necessary modules to your system excluding any further hardware.
Now what you need to do to make it static is to change some settings in the config file
run
make menuconfig
at this point you need to find and chenge the following options inside your kernel configuration:
On General setup:
*Optional - kernel compression mode - select lzo and add a name in "local version" and "signature"
*Optional Support for paging of anonymous memory (swap) - I have disabled as I don't use any swap
Initial RAM filesystem and RAM disk (initramfs/initrd) support - needs to be disabled, this is necesary to build it static so we don't use any initramfs/initrd at the system boot
Now get out of the "General Setup" and go back on the first menu
The option right after is "Enable loadable module support" - this needs to be disabled (we won't load any modules as we build it static)
*Optional - on Processor type and features- Processor family - select your type (if 2duo, i3,i5,i7 just select Core 2/newer Xeon)
*Optional - on kernel Hacking - Compile-time checks and compiler options - untick Compile the kernel with debug info (if ticked it can increase the size of the new kernel)
*Optional - on Device Drivers - Graphics support tick the Bootup logo if you wish to see penguins at the boot up (I do)
All done!
Now exit saving the configuration and lest start compiling
On my thinkpad t400 I did:
make -j3 deb-pkg
The recompilation takes a while and at the end you will get all the necessary packages to install the new kernel
Install the kernel image, headers and the firmware debs using gdebi or sudo dpkg -i "name .deb"
Reboot your system, you will see that no initramfs will be prompted by grub and you will start the kernel without loading the modules.
Enjoy the penguins! the number of penguin will depend on the number of your CPUs
Ps: don't delete the original kernel it can be useful!!
For example if adding a usb drive you see that it doesn't work.. keep in mind you are on a static kernel so you cannot load any module, if you wish to use it.. just boot the previous kernel!
See here the final results on my t400 and my x220
I assume that skulls is already installed on your x230 and you are happy with it :) however you would like to change the bootsplash image.. It seems to be simple... however it can be "tricky".. or at least it was for me.. That's because the "usable" image created by the skulls script is the "top" one only. the coreboot instructions to flash with a layout file with didn't work for me 0x00000000:0x007fffff ifdmegbe 0x00800000:0x00bfffff bios I get this error: Proceeding anyway because user forced us to. Found chipset "Intel QM77". Enabling flash write... Warning: SPI Configuration Lockdown activated. Enabling hardware sequencing due to multiple flash chips detected. OK. Found Programmer flash chip "Opaque flash chip" (12288 kB, Programmer-specific) mapped at physical address 0x0000000000000000. Error: Image size (4194304 B) doesn't match the flash chip's size (12582912 B)! So I thought it could be a good idea to flash fro...
Comments
Post a Comment