updated vimrc and deleted cava and lfs
This commit is contained in:
1 parent
a9472585ef
commit
1a34f854ef
11 files changed
-859
No files matched your search
-233
@@ -1,233 +0,0 @@
|
||||
## Configuration file for CAVA.
|
||||
# Remove the ; to change parameters.
|
||||
|
||||
|
||||
[general]
|
||||
|
||||
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0
|
||||
; mode = normal
|
||||
|
||||
# Accepts only non-negative values.
|
||||
; framerate = 60
|
||||
|
||||
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
|
||||
# new as of 0.6.0 autosens of low values (dynamic range)
|
||||
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0
|
||||
; autosens = 1
|
||||
; overshoot = 20
|
||||
|
||||
# Manual sensitivity in %. If autosens is enabled, this will only be the initial value.
|
||||
# 200 means double height. Accepts only non-negative values.
|
||||
; sensitivity = 100
|
||||
|
||||
# The number of bars (0-512). 0 sets it to auto (fill up console).
|
||||
# Bars' width and space between bars in number of characters.
|
||||
; bars = 0
|
||||
; bar_width = 2
|
||||
; bar_spacing = 1
|
||||
# bar_height is only used for output in "noritake" format
|
||||
; bar_height = 32
|
||||
|
||||
# For SDL width and space between bars is in pixels, defaults are:
|
||||
; bar_width = 20
|
||||
; bar_spacing = 5
|
||||
|
||||
# sdl_glsl have these default values, they are only used to calulate max number of bars.
|
||||
; bar_width = 1
|
||||
; bar_spacing = 0
|
||||
|
||||
|
||||
# Lower and higher cutoff frequencies for lowest and highest bars
|
||||
# the bandwidth of the visualizer.
|
||||
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
|
||||
# Cava will automatically increase the higher cutoff if a too low band is specified.
|
||||
; lower_cutoff_freq = 50
|
||||
; higher_cutoff_freq = 10000
|
||||
|
||||
|
||||
# Seconds with no input before cava goes to sleep mode. Cava will not perform FFT or drawing and
|
||||
# only check for input once per second. Cava will wake up once input is detected. 0 = disable.
|
||||
; sleep_timer = 0
|
||||
|
||||
|
||||
[input]
|
||||
|
||||
# Audio capturing method. Possible methods are: 'pulse', 'alsa', 'fifo', 'sndio' or 'shmem'
|
||||
# Defaults to 'pulse', 'pipewire', 'alsa' or 'fifo', in that order, dependent on what support cava was built with.
|
||||
# On Mac it defaults to 'portaudio' or 'fifo'
|
||||
# On windows this is automatic and no input settings are needed.
|
||||
#
|
||||
# All input methods uses the same config variable 'source'
|
||||
# to define where it should get the audio.
|
||||
#
|
||||
# For pulseaudio and pipewire 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
|
||||
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
|
||||
#
|
||||
# For piepwire 'source' will be the object name or object.serial of the device to capture from.
|
||||
# Both input and output devices are supported.
|
||||
#
|
||||
# For alsa 'source' will be the capture device.
|
||||
# For fifo 'source' will be the path to fifo-file.
|
||||
# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address
|
||||
; method = pulse
|
||||
; source = auto
|
||||
|
||||
; method = pipewire
|
||||
; source = auto
|
||||
|
||||
; method = alsa
|
||||
; source = hw:Loopback,1
|
||||
|
||||
; method = fifo
|
||||
; source = /tmp/mpd.fifo
|
||||
; sample_rate = 44100
|
||||
; sample_bits = 16
|
||||
|
||||
; method = shmem
|
||||
; source = /squeezelite-AA:BB:CC:DD:EE:FF
|
||||
|
||||
; method = portaudio
|
||||
; source = auto
|
||||
|
||||
|
||||
[output]
|
||||
|
||||
# Output method. Can be 'ncurses', 'noncurses', 'raw', 'noritake', 'sdl'
|
||||
# or 'sdl_glsl'.
|
||||
# 'noncurses' uses a custom framebuffer technique and prints only changes
|
||||
# from frame to frame in the terminal. 'ncurses' is default if supported.
|
||||
#
|
||||
# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data
|
||||
# stream of the bar heights that can be used to send to other applications.
|
||||
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
|
||||
#
|
||||
# 'noritake' outputs a bitmap in the format expected by a Noritake VFD display
|
||||
# in graphic mode. It only support the 3000 series graphical VFDs for now.
|
||||
#
|
||||
# 'sdl' uses the Simple DirectMedia Layer to render in a graphical context.
|
||||
# 'sdl_glsl' uses SDL to create an OpenGL context. Write your own shaders or
|
||||
# use one of the predefined ones.
|
||||
method = ncurses
|
||||
|
||||
# Orientation of the visualization. Can be 'bottom', 'top', 'left' or 'right'.
|
||||
# Default is 'bottom'. Other orientations are only supported on sdl and ncruses
|
||||
# output. Note: many fonts have weird glyphs for 'top' and 'right' characters,
|
||||
# which can make ncurses not look right.
|
||||
; orientation = bottom
|
||||
|
||||
# Visual channels. Can be 'stereo' or 'mono'.
|
||||
# 'stereo' mirrors both channels with low frequencies in center.
|
||||
# 'mono' outputs left to right lowest to highest frequencies.
|
||||
# 'mono_option' set mono to either take input from 'left', 'right' or 'average'.
|
||||
# set 'reverse' to 1 to display frequencies the other way around.
|
||||
; channels = stereo
|
||||
; mono_option = average
|
||||
; reverse = 0
|
||||
|
||||
# Raw output target. A fifo will be created if target does not exist.
|
||||
; raw_target = /dev/stdout
|
||||
|
||||
# Raw data format. Can be 'binary' or 'ascii'.
|
||||
; data_format = binary
|
||||
|
||||
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
|
||||
; bit_format = 16bit
|
||||
|
||||
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
|
||||
; ascii_max_range = 1000
|
||||
|
||||
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
|
||||
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
|
||||
; bar_delimiter = 59
|
||||
; frame_delimiter = 10
|
||||
|
||||
# sdl window size and position. -1,-1 is centered.
|
||||
; sdl_width = 1000
|
||||
; sdl_height = 500
|
||||
; sdl_x = -1
|
||||
; sdl_y= -1
|
||||
|
||||
# set label on bars on the x-axis. Can be 'frequency' or 'none'. Default: 'none'
|
||||
# 'frequency' displays the lower cut off frequency of the bar above.
|
||||
# Only supported on ncurses and noncurses output.
|
||||
; xaxis = none
|
||||
|
||||
# enable alacritty synchronized updates. 1 = on, 0 = off
|
||||
# removes flickering in alacritty terminal emulator.
|
||||
# defaults to off since the behaviour in other terminal emulators is unknown
|
||||
; alacritty_sync = 0
|
||||
|
||||
# Shaders for sdl_glsl, located in $HOME/.config/cava/shaders
|
||||
; vertex_shader = pass_through.vert
|
||||
; fragment_shader = bar_spectrum.frag
|
||||
|
||||
; for glsl output mode, keep rendering even if no audio
|
||||
; continuous_rendering = 0
|
||||
|
||||
[color]
|
||||
|
||||
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
|
||||
# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires
|
||||
# a terminal that can change color definitions such as Gnome-terminal or rxvt.
|
||||
# default is to keep current terminal color
|
||||
#; background = default
|
||||
#; foreground = default
|
||||
|
||||
# SDL and sdl_glsl only support hex code colors, these are the default:
|
||||
;background = '#000000'
|
||||
;foreground = '#333333'
|
||||
|
||||
|
||||
# Gradient mode, only hex defined colors are supported,
|
||||
# background must also be defined in hex or remain commented out. 1 = on, 0 = off.
|
||||
# You can define as many as 8 different colors. They range from bottom to top of screen
|
||||
gradient = 1
|
||||
gradient_count = 8
|
||||
gradient_color_1 = '#59cc33'
|
||||
gradient_color_2 = '#80cc33'
|
||||
gradient_color_3 = '#a6cc33'
|
||||
gradient_color_4 = '#cccc33'
|
||||
gradient_color_5 = '#cca633'
|
||||
gradient_color_6 = '#cc8033'
|
||||
gradient_color_7 = '#cc5933'
|
||||
gradient_color_8 = '#cc3333'
|
||||
|
||||
|
||||
|
||||
[smoothing]
|
||||
|
||||
# Percentage value for integral smoothing. Takes values from 0 - 100.
|
||||
# Higher values means smoother, but less precise. 0 to disable.
|
||||
# DEPRECATED as of 0.8.0, use noise_reduction instead
|
||||
; integral = 77
|
||||
|
||||
# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable.
|
||||
; monstercat = 0
|
||||
; waves = 0
|
||||
|
||||
# Set gravity percentage for "drop off". Higher values means bars will drop faster.
|
||||
# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off".
|
||||
# DEPRECATED as of 0.8.0, use noise_reduction instead
|
||||
; gravity = 100
|
||||
|
||||
|
||||
# In bar height, bars that would have been lower that this will not be drawn.
|
||||
# DEPRECATED as of 0.8.0
|
||||
; ignore = 0
|
||||
|
||||
# Noise reduction, int 0 - 100. default 77
|
||||
# the raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth
|
||||
# 100 will be very slow and smooth, 0 will be fast but noisy.
|
||||
; noise_reduction = 77
|
||||
|
||||
|
||||
[eq]
|
||||
|
||||
# This one is tricky. You can have as much keys as you want.
|
||||
# Remember to uncomment more than one key! More keys = more precision.
|
||||
# Look at readme.md on github for further explanations and examples.
|
||||
; 1 = 1 # bass
|
||||
; 2 = 1
|
||||
; 3 = 1 # midtone
|
||||
; 4 = 1
|
||||
; 5 = 1 # treble
|
||||
@@ -1,79 +0,0 @@
|
||||
#version 330
|
||||
|
||||
in vec2 fragCoord;
|
||||
out vec4 fragColor;
|
||||
|
||||
// bar values. defaults to left channels first (low to high), then right (high to low).
|
||||
uniform float bars[512];
|
||||
|
||||
uniform int bars_count; // number of bars (left + right) (configurable)
|
||||
uniform int bar_width; // bar width (configurable), not used here
|
||||
uniform int bar_spacing; // space bewteen bars (configurable)
|
||||
|
||||
uniform vec3 u_resolution; // window resolution
|
||||
|
||||
//colors, configurable in cava config file (r,g,b) (0.0 - 1.0)
|
||||
uniform vec3 bg_color; // background color
|
||||
uniform vec3 fg_color; // foreground color
|
||||
|
||||
uniform int gradient_count;
|
||||
uniform vec3 gradient_colors[8]; // gradient colors
|
||||
|
||||
vec3 normalize_C(float y,vec3 col_1, vec3 col_2, float y_min, float y_max)
|
||||
{
|
||||
//create color based on fraction of this color and next color
|
||||
float yr = (y - y_min) / (y_max - y_min);
|
||||
return col_1 * (1.0 - yr) + col_2 * yr;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// find which bar to use based on where we are on the x axis
|
||||
float x = u_resolution.x * fragCoord.x;
|
||||
int bar = int(bars_count * fragCoord.x);
|
||||
|
||||
//calculate a bar size
|
||||
float bar_size = u_resolution.x / bars_count;
|
||||
|
||||
//the y coordinate and bar values are the same
|
||||
float y = bars[bar];
|
||||
|
||||
// make sure there is a thin line at bottom
|
||||
if (y * u_resolution.y < 1.0)
|
||||
{
|
||||
y = 1.0 / u_resolution.y;
|
||||
}
|
||||
|
||||
//draw the bar up to current height
|
||||
if (y > fragCoord.y)
|
||||
{
|
||||
//make some space between bars basen on settings
|
||||
if (x > (bar + 1) * (bar_size) - bar_spacing)
|
||||
{
|
||||
fragColor = vec4(bg_color,1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gradient_count == 0)
|
||||
{
|
||||
fragColor = vec4(fg_color,1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
//find which color in the configured gradient we are at
|
||||
int color = int((gradient_count - 1) * fragCoord.y);
|
||||
|
||||
//find where on y this and next color is supposed to be
|
||||
float y_min = color / (gradient_count - 1.0);
|
||||
float y_max = (color + 1.0) / (gradient_count - 1.0);
|
||||
|
||||
//make color
|
||||
fragColor = vec4(normalize_C(fragCoord.y, gradient_colors[color], gradient_colors[color + 1], y_min, y_max), 1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fragColor = vec4(bg_color,1.0);
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
#version 330
|
||||
|
||||
in vec2 fragCoord;
|
||||
out vec4 fragColor;
|
||||
|
||||
// bar values. defaults to left channels first (low to high), then right (high to low).
|
||||
uniform float bars[512];
|
||||
|
||||
uniform int bars_count; // number of bars (left + right) (configurable)
|
||||
|
||||
uniform vec3 u_resolution; // window resolution, not used here
|
||||
|
||||
//colors, configurable in cava config file
|
||||
uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here
|
||||
uniform vec3 fg_color; // foreground color, not used here
|
||||
|
||||
void main()
|
||||
{
|
||||
// find which bar to use based on where we are on the x axis
|
||||
int bar = int(bars_count * fragCoord.x);
|
||||
|
||||
float bar_y = 1.0 - abs((fragCoord.y - 0.5)) * 2.0;
|
||||
float y = (bars[bar]) * bar_y;
|
||||
|
||||
float bar_x = (fragCoord.x - float(bar) / float(bars_count)) * bars_count;
|
||||
float bar_r = 1.0 - abs((bar_x - 0.5)) * 2;
|
||||
|
||||
bar_r = bar_r * bar_r * 2;
|
||||
|
||||
// set color
|
||||
fragColor.r = fg_color.x * y * bar_r;
|
||||
fragColor.g = fg_color.y * y * bar_r;
|
||||
fragColor.b = fg_color.z * y * bar_r;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#version 330
|
||||
|
||||
|
||||
// Input vertex data, different for all executions of this shader.
|
||||
layout(location = 0) in vec3 vertexPosition_modelspace;
|
||||
|
||||
// Output data ; will be interpolated for each fragment.
|
||||
out vec2 fragCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(vertexPosition_modelspace,1);
|
||||
fragCoord = (vertexPosition_modelspace.xy+vec2(1,1))/2.0;
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
PATH=/usr/bin:/usr/sbin
|
||||
export PATH
|
||||
|
||||
problem()
|
||||
{
|
||||
printf "Encountered a problem!\n\nDropping you to a shell.\n\n"
|
||||
sh
|
||||
}
|
||||
|
||||
no_device()
|
||||
{
|
||||
printf "The device %s, which is supposed to contain the\n" $1
|
||||
printf "root file system, does not exist.\n"
|
||||
printf "Please fix this problem and exit this shell.\n\n"
|
||||
}
|
||||
|
||||
no_mount()
|
||||
{
|
||||
printf "Could not mount device %s\n" $1
|
||||
printf "Sleeping forever. Please reboot and fix the kernel command line.\n\n"
|
||||
printf "Maybe the device is formatted with an unsupported file system?\n\n"
|
||||
printf "Or maybe filesystem type autodetection went wrong, in which case\n"
|
||||
printf "you should add the rootfstype=... parameter to the kernel command line.\n\n"
|
||||
printf "Available partitions:\n"
|
||||
}
|
||||
|
||||
do_mount_root()
|
||||
{
|
||||
mkdir /.root
|
||||
[ -n "$rootflags" ] && rootflags="$rootflags,"
|
||||
rootflags="$rootflags$ro"
|
||||
|
||||
case "$root" in
|
||||
/dev/* ) device=$root ;;
|
||||
UUID=* ) eval $root; device="/dev/disk/by-uuid/$UUID" ;;
|
||||
PARTUUID=*) eval $root; device="/dev/disk/by-partuuid/$PARTUUID" ;;
|
||||
LABEL=* ) eval $root; device="/dev/disk/by-label/$LABEL" ;;
|
||||
"" ) echo "No root device specified." ; problem ;;
|
||||
esac
|
||||
|
||||
while [ ! -b "$device" ] ; do
|
||||
no_device $device
|
||||
problem
|
||||
done
|
||||
|
||||
if ! mount -n -t "$rootfstype" -o "$rootflags" "$device" /.root ; then
|
||||
no_mount $device
|
||||
cat /proc/partitions
|
||||
while true ; do sleep 10000 ; done
|
||||
else
|
||||
echo "Successfully mounted device $root"
|
||||
fi
|
||||
}
|
||||
|
||||
do_try_resume()
|
||||
{
|
||||
case "$resume" in
|
||||
UUID=* ) eval $resume; resume="/dev/disk/by-uuid/$UUID" ;;
|
||||
LABEL=*) eval $resume; resume="/dev/disk/by-label/$LABEL" ;;
|
||||
esac
|
||||
|
||||
if $noresume || ! [ -b "$resume" ]; then return; fi
|
||||
|
||||
ls -lH "$resume" | ( read x x x x maj min x
|
||||
echo -n ${maj%,}:$min > /sys/power/resume )
|
||||
}
|
||||
|
||||
init=/sbin/init
|
||||
root=
|
||||
rootdelay=
|
||||
rootfstype=auto
|
||||
ro="ro"
|
||||
rootflags=
|
||||
device=
|
||||
resume=
|
||||
noresume=false
|
||||
|
||||
mount -n -t devtmpfs devtmpfs /dev
|
||||
mount -n -t proc proc /proc
|
||||
mount -n -t sysfs sysfs /sys
|
||||
mount -n -t tmpfs tmpfs /run
|
||||
|
||||
read -r cmdline < /proc/cmdline
|
||||
|
||||
for param in $cmdline ; do
|
||||
case $param in
|
||||
init=* ) init=${param#init=} ;;
|
||||
root=* ) root=${param#root=} ;;
|
||||
rootdelay=* ) rootdelay=${param#rootdelay=} ;;
|
||||
rootfstype=*) rootfstype=${param#rootfstype=} ;;
|
||||
rootflags=* ) rootflags=${param#rootflags=} ;;
|
||||
resume=* ) resume=${param#resume=} ;;
|
||||
noresume ) noresume=true ;;
|
||||
ro ) ro="ro" ;;
|
||||
rw ) ro="rw" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# udevd location depends on version
|
||||
if [ -x /sbin/udevd ]; then
|
||||
UDEVD=/sbin/udevd
|
||||
elif [ -x /lib/udev/udevd ]; then
|
||||
UDEVD=/lib/udev/udevd
|
||||
elif [ -x /lib/systemd/systemd-udevd ]; then
|
||||
UDEVD=/lib/systemd/systemd-udevd
|
||||
else
|
||||
echo "Cannot find udevd nor systemd-udevd"
|
||||
problem
|
||||
fi
|
||||
|
||||
${UDEVD} --daemon --resolve-names=never
|
||||
udevadm trigger
|
||||
udevadm settle
|
||||
|
||||
if [ -f /etc/mdadm.conf ] ; then mdadm -As ; fi
|
||||
if [ -x /sbin/vgchange ] ; then /sbin/vgchange -a y > /dev/null ; fi
|
||||
if [ -n "$rootdelay" ] ; then sleep "$rootdelay" ; fi
|
||||
|
||||
do_try_resume # This function will not return if resuming from disk
|
||||
do_mount_root
|
||||
|
||||
killall -w ${UDEVD##*/}
|
||||
|
||||
exec switch_root /.root "$init" "$@"
|
||||
@@ -1 +0,0 @@
|
||||
/usr/share/mkinitramfs/init.in
|
||||
@@ -1,226 +0,0 @@
|
||||
#!/bin/sh
|
||||
# This file based in part on the mkinitramfs script for the LFS LiveCD
|
||||
# written by Alexander E. Patrakov and Jeremy Huntwork.
|
||||
|
||||
copy()
|
||||
{
|
||||
local file
|
||||
|
||||
if [ "$2" = "lib" ]; then
|
||||
file=$(PATH=/usr/lib type -p $1)
|
||||
else
|
||||
file=$(type -p $1)
|
||||
fi
|
||||
|
||||
if [ -n "$file" ] ; then
|
||||
cp $file $WDIR/usr/$2
|
||||
else
|
||||
echo "Missing required file: $1 for directory $2"
|
||||
rm -rf $WDIR
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -z $1 ] ; then
|
||||
INITRAMFS_FILE=initrd.img-no-kmods
|
||||
else
|
||||
KERNEL_VERSION=$1
|
||||
INITRAMFS_FILE=initrd.img-$KERNEL_VERSION
|
||||
fi
|
||||
|
||||
if [ -n "$KERNEL_VERSION" ] && [ ! -d "/usr/lib/modules/$1" ] ; then
|
||||
echo "No modules directory named $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf "Creating $INITRAMFS_FILE... "
|
||||
|
||||
binfiles="sh cat cp dd killall ls mkdir mknod mount "
|
||||
binfiles="$binfiles umount sed sleep ln rm uname"
|
||||
binfiles="$binfiles readlink basename"
|
||||
|
||||
# Systemd installs udevadm in /bin. Other udev implementations have it in /sbin
|
||||
if [ -x /usr/bin/udevadm ] ; then binfiles="$binfiles udevadm"; fi
|
||||
|
||||
sbinfiles="modprobe blkid switch_root"
|
||||
|
||||
# Optional files and locations
|
||||
for f in mdadm mdmon udevd udevadm; do
|
||||
if [ -x /usr/sbin/$f ] ; then sbinfiles="$sbinfiles $f"; fi
|
||||
done
|
||||
|
||||
# Add lvm if present (cannot be done with the others because it
|
||||
# also needs dmsetup
|
||||
if [ -x /usr/sbin/lvm ] ; then sbinfiles="$sbinfiles lvm dmsetup"; fi
|
||||
|
||||
unsorted=$(mktemp /tmp/unsorted.XXXXXXXXXX)
|
||||
|
||||
DATADIR=/usr/share/mkinitramfs
|
||||
INITIN=init.in
|
||||
|
||||
# Create a temporary working directory
|
||||
WDIR=$(mktemp -d /tmp/initrd-work.XXXXXXXXXX)
|
||||
|
||||
# Create base directory structure
|
||||
mkdir -p $WDIR/{dev,run,sys,proc,usr/{bin,lib/{firmware,modules},sbin}}
|
||||
mkdir -p $WDIR/etc/{modprobe.d,udev/rules.d}
|
||||
touch $WDIR/etc/modprobe.d/modprobe.conf
|
||||
ln -s usr/bin $WDIR/bin
|
||||
ln -s usr/lib $WDIR/lib
|
||||
ln -s usr/sbin $WDIR/sbin
|
||||
ln -s lib $WDIR/lib64
|
||||
|
||||
# Create necessary device nodes
|
||||
mknod -m 640 $WDIR/dev/console c 5 1
|
||||
mknod -m 664 $WDIR/dev/null c 1 3
|
||||
|
||||
# Install the udev configuration files
|
||||
if [ -f /etc/udev/udev.conf ]; then
|
||||
cp /etc/udev/udev.conf $WDIR/etc/udev/udev.conf
|
||||
fi
|
||||
|
||||
for file in $(find /etc/udev/rules.d/ -type f) ; do
|
||||
cp $file $WDIR/etc/udev/rules.d
|
||||
done
|
||||
|
||||
# Install any firmware present
|
||||
cp -a /usr/lib/firmware $WDIR/usr/lib
|
||||
|
||||
# Copy the RAID configuration file if present
|
||||
if [ -f /etc/mdadm.conf ] ; then
|
||||
cp /etc/mdadm.conf $WDIR/etc
|
||||
fi
|
||||
|
||||
# Install the init file
|
||||
install -m0755 $DATADIR/$INITIN $WDIR/init
|
||||
|
||||
if [ -n "$KERNEL_VERSION" ] ; then
|
||||
if [ -x /usr/bin/kmod ] ; then
|
||||
binfiles="$binfiles kmod"
|
||||
else
|
||||
binfiles="$binfiles lsmod"
|
||||
sbinfiles="$sbinfiles insmod"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install basic binaries
|
||||
for f in $binfiles ; do
|
||||
ldd /usr/bin/$f | sed "s/\t//" | cut -d " " -f1 >> $unsorted
|
||||
copy /usr/bin/$f bin
|
||||
done
|
||||
|
||||
for f in $sbinfiles ; do
|
||||
ldd /usr/sbin/$f | sed "s/\t//" | cut -d " " -f1 >> $unsorted
|
||||
copy $f sbin
|
||||
done
|
||||
|
||||
# Add udevd libraries if not in /usr/sbin
|
||||
if [ -x /usr/lib/udev/udevd ] ; then
|
||||
ldd /usr/lib/udev/udevd | sed "s/\t//" | cut -d " " -f1 >> $unsorted
|
||||
elif [ -x /usr/lib/systemd/systemd-udevd ] ; then
|
||||
ldd /usr/lib/systemd/systemd-udevd | sed "s/\t//" | cut -d " " -f1 >> $unsorted
|
||||
fi
|
||||
|
||||
# Add module symlinks if appropriate
|
||||
if [ -n "$KERNEL_VERSION" ] && [ -x /usr/bin/kmod ] ; then
|
||||
ln -s kmod $WDIR/usr/bin/lsmod
|
||||
ln -s kmod $WDIR/usr/bin/insmod
|
||||
fi
|
||||
|
||||
# Add lvm symlinks if appropriate
|
||||
# Also copy the lvm.conf file
|
||||
if [ -x /usr/sbin/lvm ] ; then
|
||||
ln -s lvm $WDIR/usr/sbin/lvchange
|
||||
ln -s lvm $WDIR/usr/sbin/lvrename
|
||||
ln -s lvm $WDIR/usr/sbin/lvextend
|
||||
ln -s lvm $WDIR/usr/sbin/lvcreate
|
||||
ln -s lvm $WDIR/usr/sbin/lvdisplay
|
||||
ln -s lvm $WDIR/usr/sbin/lvscan
|
||||
|
||||
ln -s lvm $WDIR/usr/sbin/pvchange
|
||||
ln -s lvm $WDIR/usr/sbin/pvck
|
||||
ln -s lvm $WDIR/usr/sbin/pvcreate
|
||||
ln -s lvm $WDIR/usr/sbin/pvdisplay
|
||||
ln -s lvm $WDIR/usr/sbin/pvscan
|
||||
|
||||
ln -s lvm $WDIR/usr/sbin/vgchange
|
||||
ln -s lvm $WDIR/usr/sbin/vgcreate
|
||||
ln -s lvm $WDIR/usr/sbin/vgscan
|
||||
ln -s lvm $WDIR/usr/sbin/vgrename
|
||||
ln -s lvm $WDIR/usr/sbin/vgck
|
||||
# Conf file(s)
|
||||
cp -a /etc/lvm $WDIR/etc
|
||||
fi
|
||||
|
||||
# Install libraries
|
||||
sort $unsorted | uniq | while read library ; do
|
||||
# linux-vdso and linux-gate are pseudo libraries and do not correspond to a file
|
||||
# libsystemd-shared is in /lib/systemd, so it is not found by copy, and
|
||||
# it is copied below anyway
|
||||
if [[ "$library" == linux-vdso.so.1 ]] ||
|
||||
[[ "$library" == linux-gate.so.1 ]] ||
|
||||
[[ "$library" == libsystemd-shared* ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
copy $library lib
|
||||
done
|
||||
|
||||
if [ -d /usr/lib/udev ]; then
|
||||
cp -a /usr/lib/udev $WDIR/usr/lib
|
||||
fi
|
||||
if [ -d /usr/lib/systemd ]; then
|
||||
cp -a /usr/lib/systemd $WDIR/usr/lib
|
||||
fi
|
||||
if [ -d /usr/lib/elogind ]; then
|
||||
cp -a /usr/lib/elogind $WDIR/usr/lib
|
||||
fi
|
||||
|
||||
# Install the kernel modules if requested
|
||||
if [ -n "$KERNEL_VERSION" ]; then
|
||||
find \
|
||||
/usr/lib/modules/$KERNEL_VERSION/kernel/{crypto,fs,lib} \
|
||||
/usr/lib/modules/$KERNEL_VERSION/kernel/drivers/{block,ata,nvme,md,firewire} \
|
||||
/usr/lib/modules/$KERNEL_VERSION/kernel/drivers/{scsi,message,pcmcia,virtio} \
|
||||
/usr/lib/modules/$KERNEL_VERSION/kernel/drivers/usb/{host,storage} \
|
||||
-type f 2> /dev/null | cpio --make-directories -p --quiet $WDIR
|
||||
|
||||
cp /usr/lib/modules/$KERNEL_VERSION/modules.{builtin,order} \
|
||||
$WDIR/usr/lib/modules/$KERNEL_VERSION
|
||||
if [ -f /usr/lib/modules/$KERNEL_VERSION/modules.builtin.modinfo ]; then
|
||||
cp /usr/lib/modules/$KERNEL_VERSION/modules.builtin.modinfo \
|
||||
$WDIR/usr/lib/modules/$KERNEL_VERSION
|
||||
fi
|
||||
|
||||
depmod -b $WDIR $KERNEL_VERSION
|
||||
fi
|
||||
|
||||
( cd $WDIR ; find . | cpio -o -H newc --quiet | gzip -9 ) > $INITRAMFS_FILE
|
||||
|
||||
# Prepare early loading of microcode if available
|
||||
if ls /usr/lib/firmware/intel-ucode/* >/dev/null 2>&1 ||
|
||||
ls /usr/lib/firmware/amd-ucode/* >/dev/null 2>&1; then
|
||||
|
||||
# first empty WDIR to reuse it
|
||||
rm -r $WDIR/*
|
||||
|
||||
DSTDIR=$WDIR/kernel/x86/microcode
|
||||
mkdir -p $DSTDIR
|
||||
|
||||
if [ -d /usr/lib/firmware/amd-ucode ]; then
|
||||
cat /usr/lib/firmware/amd-ucode/microcode_amd*.bin > $DSTDIR/AuthenticAMD.bin
|
||||
fi
|
||||
|
||||
if [ -d /usr/lib/firmware/intel-ucode ]; then
|
||||
cat /usr/lib/firmware/intel-ucode/* > $DSTDIR/GenuineIntel.bin
|
||||
fi
|
||||
|
||||
( cd $WDIR; find . | cpio -o -H newc --quiet ) > microcode.img
|
||||
cat microcode.img $INITRAMFS_FILE > tmpfile
|
||||
mv tmpfile $INITRAMFS_FILE
|
||||
rm microcode.img
|
||||
fi
|
||||
|
||||
# Remove the temporary directories and files
|
||||
rm -rf $WDIR $unsorted
|
||||
printf "done.\n"
|
||||
@@ -1,2 +0,0 @@
|
||||
chmod 0755 /usr/bin/mkinitramfs
|
||||
mkinitramfs [KERNEL VERSION]
|
||||
@@ -1,47 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
function mountbind
|
||||
{
|
||||
if ! mountpoint $LFS/$1 >/dev/null; then
|
||||
$SUDO mount --bind /$1 $LFS/$1
|
||||
echo $LFS/$1 mounted
|
||||
else
|
||||
echo $LFS/$1 already mounted
|
||||
fi
|
||||
}
|
||||
|
||||
function mounttype
|
||||
{
|
||||
if ! mountpoint $LFS/$1 >/dev/null; then
|
||||
$SUDO mount -t $2 $3 $4 $5 $LFS/$1
|
||||
echo $LFS/$1 mounted
|
||||
else
|
||||
echo $LFS/$1 already mounted
|
||||
fi
|
||||
}
|
||||
|
||||
if [ $EUID -ne 0 ]; then
|
||||
SUDO=sudo
|
||||
else
|
||||
SUDO=""
|
||||
fi
|
||||
|
||||
if [ x$LFS == x ]; then
|
||||
echo "LFS not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mountbind dev
|
||||
mounttype dev/pts devpts devpts -o gid=5,mode=620
|
||||
mounttype proc proc proc
|
||||
mounttype sys sysfs sysfs
|
||||
mounttype run tmpfs run
|
||||
if [ -h $LFS/dev/shm ]; then
|
||||
mkdir -pv $LFS/$(readlink $LFS/dev/shm)
|
||||
else
|
||||
mounttype dev/shm tmpfs tmpfs -o nosuid,nodev
|
||||
fi
|
||||
|
||||
#mountbind usr/src
|
||||
#mountbind boot
|
||||
#mountbind home
|
||||
@@ -1,90 +0,0 @@
|
||||
#!/bin/sh
|
||||
# A script to list version numbers of critical development tools
|
||||
|
||||
# If you have tools installed in other directories, adjust PATH here AND
|
||||
# in ~lfs/.bashrc (section 4.4) as well.
|
||||
|
||||
LC_ALL=C
|
||||
PATH=/usr/bin:/bin
|
||||
|
||||
bail() { echo "FATAL: $1"; exit 1; }
|
||||
grep --version > /dev/null 2> /dev/null || bail "grep does not work"
|
||||
sed '' /dev/null || bail "sed does not work"
|
||||
sort /dev/null || bail "sort does not work"
|
||||
|
||||
ver_check()
|
||||
{
|
||||
if ! type -p $2 &>/dev/null
|
||||
then
|
||||
echo "ERROR: Cannot find $2 ($1)"; return 1;
|
||||
fi
|
||||
v=$($2 --version 2>&1 | grep -E -o '[0-9]+\.[0-9\.]+[a-z]*' | head -n1)
|
||||
if printf '%s\n' $3 $v | sort --version-sort --check &>/dev/null
|
||||
then
|
||||
printf "OK: %-9s %-6s >= $3\n" "$1" "$v"; return 0;
|
||||
else
|
||||
printf "ERROR: %-9s is TOO OLD ($3 or later required)\n" "$1";
|
||||
return 1;
|
||||
fi
|
||||
}
|
||||
|
||||
ver_kernel()
|
||||
{
|
||||
kver=$(uname -r | grep -E -o '^[0-9\.]+')
|
||||
if printf '%s\n' $1 $kver | sort --version-sort --check &>/dev/null
|
||||
then
|
||||
printf "OK: Linux Kernel $kver >= $1\n"; return 0;
|
||||
else
|
||||
printf "ERROR: Linux Kernel ($kver) is TOO OLD ($1 or later required)\n" "$kver";
|
||||
return 1;
|
||||
fi
|
||||
}
|
||||
|
||||
# Coreutils first because --version-sort needs Coreutils >= 7.0
|
||||
ver_check Coreutils sort 8.1 || bail "Coreutils too old, stop"
|
||||
ver_check Bash bash 3.2
|
||||
ver_check Binutils ld 2.13.1
|
||||
ver_check Bison bison 2.7
|
||||
ver_check Diffutils diff 2.8.1
|
||||
ver_check Findutils find 4.2.31
|
||||
ver_check Gawk gawk 4.0.1
|
||||
ver_check GCC gcc 5.2
|
||||
ver_check "GCC (C++)" g++ 5.2
|
||||
ver_check Grep grep 2.5.1a
|
||||
ver_check Gzip gzip 1.3.12
|
||||
ver_check M4 m4 1.4.10
|
||||
ver_check Make make 4.0
|
||||
ver_check Patch patch 2.5.4
|
||||
ver_check Perl perl 5.8.8
|
||||
ver_check Python python3 3.4
|
||||
ver_check Sed sed 4.1.5
|
||||
ver_check Tar tar 1.22
|
||||
ver_check Texinfo texi2any 5.0
|
||||
ver_check Xz xz 5.0.0
|
||||
ver_kernel 4.19
|
||||
|
||||
if mount | grep -q 'devpts on /dev/pts' && [ -e /dev/ptmx ]
|
||||
then echo "OK: Linux Kernel supports UNIX 98 PTY";
|
||||
else echo "ERROR: Linux Kernel does NOT support UNIX 98 PTY"; fi
|
||||
|
||||
alias_check() {
|
||||
if $1 --version 2>&1 | grep -qi $2
|
||||
then printf "OK: %-4s is $2\n" "$1";
|
||||
else printf "ERROR: %-4s is NOT $2\n" "$1"; fi
|
||||
}
|
||||
echo "Aliases:"
|
||||
alias_check awk GNU
|
||||
alias_check yacc Bison
|
||||
alias_check sh Bash
|
||||
|
||||
echo "Compiler check:"
|
||||
if printf "int main(){}" | g++ -x c++ -
|
||||
then echo "OK: g++ works";
|
||||
else echo "ERROR: g++ does NOT work"; fi
|
||||
rm -f a.out
|
||||
|
||||
if [ "$(nproc)" = "" ]; then
|
||||
echo "ERROR: nproc is not available or it produces empty output"
|
||||
else
|
||||
echo "OK: nproc reports $(nproc) logical cores are available"
|
||||
fi
|
||||
@@ -9,9 +9,6 @@ set foldcolumn=2
|
||||
set mouse=a
|
||||
set encoding=utf8
|
||||
set guifont=JetBrains\ Mono\ Nerd\ Font\ 11
|
||||
"----- color scheme ---
|
||||
colorscheme tokyonight
|
||||
"----------------------
|
||||
"-------- colorcolumn ------------------
|
||||
set colorcolumn=110
|
||||
highlight ColorColumn ctermbg=darkgray
|
||||
@@ -24,12 +21,8 @@ call plug#begin()
|
||||
Plug 'ap/vim-css-color'
|
||||
Plug 'leshill/vim-json'
|
||||
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
|
||||
Plug 'kassio/neoterm'
|
||||
Plug 'othree/html5-syntax.vim'
|
||||
Plug 'tomasr/molokai'
|
||||
Plug 'wolf-dog/nighted.vim'
|
||||
Plug 'ale-cci/aqua-vim'
|
||||
Plug 'ghifarit53/tokyonight-vim'
|
||||
Plug 'Eliot00/git-lens.vim'
|
||||
Plug 'pangloss/vim-javascript'
|
||||
Plug 'mxw/vim-jsx'
|
||||
|
||||
Reference in new issue
Block a user