Show your kernel configuration
- rockedge
- Site Admin
- Posts: 6547
- Joined: Mon Dec 02, 2019 1:38 am
- Location: Connecticut,U.S.A.
- Has thanked: 2750 times
- Been thanked: 2626 times
- Contact:
Re: Show your kernel configuration
Linux Kernel: 4.19.82-rt30 (x86_64)
Kernel Version: #1 SMP PREEMPT RT Wed Nov 27 09:24:12 EST 2019
Build GCC: 7.4.0
Kernel Command Line:
pdrv=01cec708-a02c-4fce-8656-50f9700d951f psubdir=/Bionic64-v8 pmedia=atahd pfix=fsck net.ifnames=0
Distro: bionicpup64 8.0
This is a Bionic64-v8 outfitted with a real time kernel. The pdrv is the partition's UUID, psubdir is the frugal directory where the system files reside. pmedia is indicating the partition is on a Hard drive. pfix is set for file system check and net.ifnames ensures that the network devices count starts at eth0 and wlan0 to be compatible with several scripts.
Kernel Version: #1 SMP PREEMPT RT Wed Nov 27 09:24:12 EST 2019
Build GCC: 7.4.0
Kernel Command Line:
pdrv=01cec708-a02c-4fce-8656-50f9700d951f psubdir=/Bionic64-v8 pmedia=atahd pfix=fsck net.ifnames=0
Distro: bionicpup64 8.0
This is a Bionic64-v8 outfitted with a real time kernel. The pdrv is the partition's UUID, psubdir is the frugal directory where the system files reside. pmedia is indicating the partition is on a Hard drive. pfix is set for file system check and net.ifnames ensures that the network devices count starts at eth0 and wlan0 to be compatible with several scripts.
-
- Posts: 718
- Joined: Thu Jul 16, 2020 2:16 am
- Location: CALABARZON, PH
- Has thanked: 3 times
- Been thanked: 173 times
Re: Show your kernel configuration
My slim32 series kernel has builtin basic keyboard, basic mouse, basic acpi, vesa, fbdev, sdcard, cf flash, memstick, pcmcia, ext2/3/4, ntfs, vfat, exfat, f2fs, aufs, overlay kernel modules (if I remember).
Re: Show your kernel configuration
I use Fatdog as the tool-chain (devx), download kernel source from kernel.org, copy in my .config file and 'make oldconfig' to import that (that .config was originally created using 'make localyesconfig' to build all modules into the kernel, that's been manually refined over time for my specific hardware/requirements) and then 'make' to build it. Track kernel 4.19 for its LTS to end of 2024.
kernel .config
Around 8MB filesize for combined initrd.xz and bzImage (vmlinuz, also xz compressed). Boots to either console (no job control), or pseudo terminals (job control available) in either vga mode or vesa mode (framebuffer). Predominately just kernel + busybox, but also with wifi (wpa...) dropbear (ssh) and fbvnc.
Boots to wifi net connected, KASLR kernel randomisation and MAC address randomisation. 1366x768 framebuffer where I can vnc into a server (desktop box) that also has its 1400x900 scaled down to 1366x768, so full GUI desktop experience available (chrome, libreoffice etc. etc.).
I used to have tmux, mc ...etc. inside that, but as I can vnc/ssh into other boxes and run tmux/mc/chrome/libreoffice from there, I opted to strip those out to leave just the ssh/wifi/vnc functionality alone. For instance this is tmux running on my desktop system (full Fatdog system beneath that tilda drop down terminal)
init ...
grub4dos menu.lst entry ...
busybox sourced from https://busybox.net/source.html
Dropbear (ssh) sourced from https://matt.ucc.asn.au/dropbear/releases/
wpa_supplicant (wifi) sourced from https://w1.fi/releases/
fbvnc (vnc) sourced from https://github.com/zohead/fbvnc
Prefer static musl builds (upx'd compressed) so for instance fbvnc compiled using
followed by upx --ultra-brute --best fbvnc ... for a bin file that
is around 39K filesize
EDIT: re-ran make menuconfig, turned on a number of input devices for mouse and synaptic, saved that and ran make -j2, and now booted into that and vnc'd to my desktop system, with the touchpad all working OK Posting this edit using that (chrome). Filesizes : vmlinuz (xz compressed) 6103600, initrd.xz (xz -e --check=crc32) 1960944. So combined just under 7.7MB.
kernel .config
Around 8MB filesize for combined initrd.xz and bzImage (vmlinuz, also xz compressed). Boots to either console (no job control), or pseudo terminals (job control available) in either vga mode or vesa mode (framebuffer). Predominately just kernel + busybox, but also with wifi (wpa...) dropbear (ssh) and fbvnc.
Boots to wifi net connected, KASLR kernel randomisation and MAC address randomisation. 1366x768 framebuffer where I can vnc into a server (desktop box) that also has its 1400x900 scaled down to 1366x768, so full GUI desktop experience available (chrome, libreoffice etc. etc.).
I used to have tmux, mc ...etc. inside that, but as I can vnc/ssh into other boxes and run tmux/mc/chrome/libreoffice from there, I opted to strip those out to leave just the ssh/wifi/vnc functionality alone. For instance this is tmux running on my desktop system (full Fatdog system beneath that tilda drop down terminal)
init ...
Code: Select all
#!/bin/ash
# Format of our boot (grub4dos menu.lst entry) ...
# kernel /bzImage net=wpa2:VMmmmmmm:xxxxxxxx:wlan0:dhcp
### bail out unless we're PID 1
[ $$ -eq 1 ] || exit 1
### configuration parameters
DEFAULT_DEVICE_DELAY=0 # seconds - default delay time for devices (so that they are recognised by kernel)
WIFI_ENABLE_TIMEOUT=${WIFI_ENABLE_TIMEOUT:-100} # unit of 1/10 seconds, max time to wait for wifi connection
KERNEL_POLL_MSECS=${KERNEL_POLL_MSECS:-5000} # default kernel polling value if unset
### utilities - decz
# decz - decrements counter, and return true when it is zero
# $1 - name of variable to be decremented
decz() {
local curval
eval "curval=\$$1"
curval=$((curval-1))
[ $curval -le 0 ] && return 0
eval "$1=$curval"
return 1
}
### cmdline processing - net
process_net() {
[ -z "$net" ] && return;
OIFS="$IFS"; IFS=":"; set -- $net; IFS="$OIFS"
echo -n "Configure network "
echo "on $2 ($1) using dhcp"
echo " "
# Ask if want to use a random mac
/usr/sbin/random-mac-ask $4
busybox ifconfig $4 up
wpa_supplicant -B -C/var/run/wpa_supplicant -Dwext -i$4
wpa_cli ap_scan 1 > /dev/null
wpa_cli add_net 0 > /dev/null
wpa_cli set_net 0 ssid \"$2\" > /dev/null
wpa_cli set_net 0 psk \"$3\" > /dev/null
wpa_cli select_net 0 > /dev/null
while [ "$(wpa_cli status | sed -ne '/wpa_state/ {s/wpa_state=//;p}')" != "COMPLETED" ];
do
sleep 0.1; decz WIFI_ENABLE_TIMEOUT && return
done;
iwconfig $4 power off # disable power management
shift 2
# connection type
udhcpc -i $2 > /dev/null
ifconfig lo up # in any case bring loopback up also
}
###################### main ##########################
# mount core filesystems
/bin/mount -t proc proc /proc # mount /proc first so /proc/self/exe works from now
mount -t sysfs sysfs /sys
if ! mount -t devtmpfs devtmpfs /dev 2> /null; then # /dev/null may not exist yet
# if no devtmpfs, use tmpfs and use mdev instead
mount -t tmpfs tmpfs /dev -o mode=755 # mode 755 is what devtmpfs uses
mdev -s
fi
[ -f /null ] && rm /null # Clear up the null file created above
[ ! -e /dev/shm ] && mkdir -p /dev/shm
[ ! -e /dev/pts ] && mkdir -p /dev/pts
[ "$TZ" ] && hwclock -t # set kernel timezone
# debugging and error logging
# comment out next two lines for greater info during bootup
! grep -q showerr /proc/cmdline && exec 2> /dev/initrd.err
grep -q debuginitrd /proc/cmdline && set -x
# enable polling
if ! grep -q block.events_dfl_poll_msecs /proc/cmdline; then # if not explicitly set
echo $KERNEL_POLL_MSECS > /sys/module/block/parameters/events_dfl_poll_msecs
fi
# keymap hard coded to use uk (GB)
loadkmap < /lib/boot/keymaps/uk
echo "Connecting to the net"
# configure network - after load modules, before basesfs
process_net
export HOME=/root
#echo console mode no job control no tty no ssh etc
#while :; do
# /bin/ash
#done
# pseudo terminal so we can run screen ssh etc
mount -t devpts none /dev/pts -o ptmxmode=0666,newinstance # pseudo terminal for screen
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib
# attach to a tty so we can ssh, use screen ...etc.
while :; do
setsid cttyhack /bin/ash
done
Code: Select all
title pugdog
root (hd0,3)
kernel /CODE/MINI/FRESH-BUILD/linux-4.19.146/arch/x86/boot/bzImage nomodeset vga=0x3D2 video=map:01,i810fb:xres:1366,yres:768,bpp:16,accel,mtrr,hwcur# net=wpa2:VMmmmmmm:xxxxxxxx:wlan0:dhcp
initrd /CODE/MINI/FRESH-BUILD/initrd
Dropbear (ssh) sourced from https://matt.ucc.asn.au/dropbear/releases/
wpa_supplicant (wifi) sourced from https://w1.fi/releases/
fbvnc (vnc) sourced from https://github.com/zohead/fbvnc
Prefer static musl builds (upx'd compressed) so for instance fbvnc compiled using
Code: Select all
make CC=musl-gcc CFLAGS=-I/usr/musl/kernel/include
is around 39K filesize
EDIT: re-ran make menuconfig, turned on a number of input devices for mouse and synaptic, saved that and ran make -j2, and now booted into that and vnc'd to my desktop system, with the touchpad all working OK Posting this edit using that (chrome). Filesizes : vmlinuz (xz compressed) 6103600, initrd.xz (xz -e --check=crc32) 1960944. So combined just under 7.7MB.
Re: Show your kernel configuration
Rather than using setsid cttyhack ... as the final loop within /init (within the initramfs), if you exec /bin/init instead and have /bin/init as a symbolic link to busybox (ln -s /bin/busybox init), then control is handed over to busyboxes init and in the absence of any /etc/inittab it has its own internal copy that it uses that amongst other things sets up multiple terminal sessions on ctrl-alt-F1, ctrl-alt-F2 ...etc. (it uses 'askfirst' i.e. you are prompted to press Enter to activate the cli on each terminal).
Setting my laptops boot screen size to VESA 640x480x16 (and adding nomodeset to the kernel boot parameters to ensure the kernel doesn't switch the graphics mode from vesa to whatever the graphics card supports), having vnc running on Ctrl-alt-F1 - vnc'd into my desktop running Fatdog (gui) and then flipping to ctrl-alt-F2 ... does, due to running in a framebuffer, see bleed. But in the fbvnc (framebuffer vnc) that I'm using, only of the changed things. Move the mouse and the entire vnc/graphics screen bleeds over, but you can still type/run cli commands.
It's a bit weird being at a text/cli terminal and having a video playing at the centre of that (btw I took that screen shot by simply using cat /dev/fb0 >fb.data ... and then later used Gimp to Open, raw *.data, and adjusted the x and y size to 640x480 (and type to RGB565) ... and then saved it to .png format. i.e. couldn't be bothered to download/compile fbgrab)
For me, running vnc at the standard laptops 1366x768 does result in jerky video plays etc. A bit too laggy. At 640x480 however its as good as being directly at the machine, at least when on the same LAN.
Sorry, I know, not kernel config related, just thought I'd mention it as I've just rebuild using the most recent stable busybox (I was using a rc) i.e.1.31.1 and latest 4.19 kernel point release (4.19.149). I've dropped using auto net connect to instead insert a 'wifi' script into that, so it lists and allows you to select which ssid to connect to; Along with dropbear (for ssh) and fbvnc. So primarily pure kernel+busybox, but with iwconfig, wpa_supplicant, dropbear, fbvnc additional binaries.
A kernel compiled with make localyesconfig and with near-as just busybox as the system (along with wifi net connect and vnc) is so small/fast that its a nice secondary boot choice to have hanging around. I need to update my server (old desktop) from Fatdog 7 to 8 and I intend to set it to use a 640x480 default size instead of its 1440x900 size so that vnc'ing into it from my laptop has that vnc display very responsive/fast. The desktop system is practically headless anyway (a monitor is attached but rarely used), so I don't really need it to be running at 1440x900 resolution. Nice being able to boot the laptop in a few seconds, wifi net connect and then vnc into the desktop system to have that all running at where it was last left off (chrome still on the same web pages as before ...etc.).
This is the build script content I used to build that (kernel and busybox source code download and compile)
initrd is here https://drive.google.com/file/d/1G9k027 ... sp=sharing
EDIT : Oh! See that initrd uploads to my googledrive are immediately being flagged as abuse!
Due to size restrictions, can't upload as-is here, but I can if I strip out /bin/busybox, and the other bin's i.e. /usr/sbin wpa_supplicant, dropbear (dbclient) ..etc.). So as a template initrd ...
Setting my laptops boot screen size to VESA 640x480x16 (and adding nomodeset to the kernel boot parameters to ensure the kernel doesn't switch the graphics mode from vesa to whatever the graphics card supports), having vnc running on Ctrl-alt-F1 - vnc'd into my desktop running Fatdog (gui) and then flipping to ctrl-alt-F2 ... does, due to running in a framebuffer, see bleed. But in the fbvnc (framebuffer vnc) that I'm using, only of the changed things. Move the mouse and the entire vnc/graphics screen bleeds over, but you can still type/run cli commands.
It's a bit weird being at a text/cli terminal and having a video playing at the centre of that (btw I took that screen shot by simply using cat /dev/fb0 >fb.data ... and then later used Gimp to Open, raw *.data, and adjusted the x and y size to 640x480 (and type to RGB565) ... and then saved it to .png format. i.e. couldn't be bothered to download/compile fbgrab)
For me, running vnc at the standard laptops 1366x768 does result in jerky video plays etc. A bit too laggy. At 640x480 however its as good as being directly at the machine, at least when on the same LAN.
Sorry, I know, not kernel config related, just thought I'd mention it as I've just rebuild using the most recent stable busybox (I was using a rc) i.e.1.31.1 and latest 4.19 kernel point release (4.19.149). I've dropped using auto net connect to instead insert a 'wifi' script into that, so it lists and allows you to select which ssid to connect to; Along with dropbear (for ssh) and fbvnc. So primarily pure kernel+busybox, but with iwconfig, wpa_supplicant, dropbear, fbvnc additional binaries.
A kernel compiled with make localyesconfig and with near-as just busybox as the system (along with wifi net connect and vnc) is so small/fast that its a nice secondary boot choice to have hanging around. I need to update my server (old desktop) from Fatdog 7 to 8 and I intend to set it to use a 640x480 default size instead of its 1440x900 size so that vnc'ing into it from my laptop has that vnc display very responsive/fast. The desktop system is practically headless anyway (a monitor is attached but rarely used), so I don't really need it to be running at 1440x900 resolution. Nice being able to boot the laptop in a few seconds, wifi net connect and then vnc into the desktop system to have that all running at where it was last left off (chrome still on the same web pages as before ...etc.).
This is the build script content I used to build that (kernel and busybox source code download and compile)
Code: Select all
# MAKE SURE THE INITRD IS IN THE SAME FOLDER AS BUILD.SH
# AS THIS SCRIPT COPIES THAT INTO THE VMLINUZ (BZIMAGE)
# MUST BE THE NON COMPRESSED VERSION
# ENSURE DEVX SFS IS LOADED
# ENSURE THE .config FILE IS IN THE SAME FOLDER AS BUILD.SH
# RUN THIS SCRIPT FROM THE FOLDER WHERE BUILD.SH IS LOCATED
# ==========================================================
# Modified version of as outlined in this thread/post
#http://www.murga-linux.com/puppy/viewtopic.php?p=949389
# We build a standard Linux kernel and initial basic initrd
# but replace that initrd with a cutdown version that
# includes wifi net connect and ssh .. also includes our
# kexec ... so can directly boot other vmlinuz/initrd
# and also has vnc.
# Modify the following two wget's as desired
# Note that there are repeated cases of filenames that have
# to changed I really should make those a variable that
# we define that the top/start
#
# Go to kernel.org and busybox.net to identify their latest
# point releases/stable versions.
#
# Kernel 4.19 LTS has Dec 2025 current date shown as of Sept 2020
# 1.31.1 is the most recent 'stable' busybox
wget http://kernel.org/pub/linux/kernel/v4.x/linux-4.19.149.tar.xz
wget http://busybox.net/downloads/busybox-1.31.1.tar.bz2
mkdir bootfiles
tar -xvf linux-4.19.149.tar.xz
tar -xvf busybox-1.31.1.tar.bz2
cd busybox-1.31.1
make distclean defconfig
sed -i "s/.*CONFIG_STATIC.*/CONFIG_STATIC=y/" .config
make busybox install
cd _install
rm -f linuxrc
# Need to open initrd and drop in the busybox file
# Not the cleanest way to do it, but it works.
cd ../..
mkdir extracted
cd extracted
cat ../initrd | cpio -id
cd bin
cp ../../busybox-1.31.1/busybox .
cd ..
find . | cpio -o -H newc > ../initrd
cd ..
rm -rf extracted
cd linux-4.19.149
cp ../.config .
cp ../initrd usr/.
N=`nproc`
N=`expr $N + 1`
echo ******************************************
echo ******************************************
echo ******************************************
echo You may get interactive prompts now that
echo require answering, more often just pressing
echo enter will do (i.e. accept the defaults)
echo ******************************************
echo ******************************************
echo ******************************************
echo
echo About to compile the kernel - press Enter when ready
read n
make oldconfig
make localyesconfig
make -j$N
cp arch/x86/boot/bzImage ../bootfiles/vmlinuz
EDIT : Oh! See that initrd uploads to my googledrive are immediately being flagged as abuse!
Due to size restrictions, can't upload as-is here, but I can if I strip out /bin/busybox, and the other bin's i.e. /usr/sbin wpa_supplicant, dropbear (dbclient) ..etc.). So as a template initrd ...
Re: Show your kernel configuration
Running with a modified version of fbvnc viewtopic.php?p=7411#p7411 ... and that's working really well.
I've dropped out dropbear as whilst its ssh supposedly uses compression, OpenSSH ssh compression seems to work much better. fbvnc passing raw screen/framebuffer through a compressed ssh tunnel nets much lower data flows when using standard ssh compared to dropbears ssh.
To help framebuffer vnc speeds, in .ssh folder config file, including ...
Protocol 1
Compression yes
Cipher blowfish
... settings seem to work very well. Good compression (low data transfers) and using a fast (albeit less secure) cipher (faster than the default des cipher).
[EDIT] The version of Dropbear in Fatdog has zlib disabled, so no compression. I did try building it with zlib included - but that version didn't work well. Frambuffer through a OpenSSH Protocol 2 tunnel with compression turned on and using a fast encryption method such as chacha ... works very well.
I've dropped out dropbear as whilst its ssh supposedly uses compression, OpenSSH ssh compression seems to work much better. fbvnc passing raw screen/framebuffer through a compressed ssh tunnel nets much lower data flows when using standard ssh compared to dropbears ssh.
To help framebuffer vnc speeds, in .ssh folder config file, including ...
Protocol 1
Compression yes
Cipher blowfish
... settings seem to work very well. Good compression (low data transfers) and using a fast (albeit less secure) cipher (faster than the default des cipher).
[EDIT] The version of Dropbear in Fatdog has zlib disabled, so no compression. I did try building it with zlib included - but that version didn't work well. Frambuffer through a OpenSSH Protocol 2 tunnel with compression turned on and using a fast encryption method such as chacha ... works very well.