summary refs log tree commit diff stats
path: root/ranger.py
blob: 9703b243c9875c4b10c419bc77bc6159d9a84d15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/python
# coding=utf-8
#
# Ranger: Explore your forest of files from inside your terminal
# Copyright (C) 2009, 2010  Roman Zimbelmann <romanz@lavabit.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# ----------------------------------------------------------------------------
#
# An embedded shell script. It allows you to change the directory
# of the parent shell to the last visited directory in ranger after exit.
# For more information, check out doc/cd-after-exit.txt
# To enable this, start ranger with:
#     source /path/ranger /path/ranger
"""":
if [ $1 ]; then
	ranger_exec="$1"
	shift
	cd "`exec $ranger_exec --cd-after-exit $@ 3>&1 1>&2 2>&3 3>&-`"
	unset ranger_exec
else
	echo "usage: source path/to/ranger.py path/to/ranger.py"
fi
return 1
"""

# Redefine the docstring, since the previous one was hijacked to
# embed a shellscript.
__doc__ = """Ranger - file browser for the unix terminal"""


# Importing the main method may fail if the ranger directory
# is neither in the same directory as this file, nor in one of
# pythons global import paths.
try:
	from ranger import main

except ImportError:
	import sys
	if '-d' not in sys.argv and '--debug' not in sys.argv:
		print("Can't import the main module.")
		print("To run an uninstalled copy of ranger,")
		print("launch ranger.py in the top directory.")
	else:
		raise

else:
	main()
s="p">> </head> <body> <a href="index.html">Systools Index</a> <h1 id="kernel">3.6. Kernel Linux</h1> <p>Linux is a monolith kernel, a big one !!!.</p> <p>This instructions are done with <a href="install.html#step6">active chroot</a> and inside chroot;</p> <pre> # chroot $CHROOT /bin/bash </pre> <h2 id="#linuxlibre">3.6.1. Port Linux Libre</h2> <p>This will install <a href="../ports/linux-libre/">linux-libre</a> port and dracut;</p> <pre> $ prt-get depinst linux-libre </pre> <h2 id="kinstall">3.6.2. Manual Install</h2> <p>Download Linux Source from <a href="http://linux-libre.fsfla.org/pub/linux-libre/releases/">linux libre</a>, this ensure that kernel is free of blobs.</p> <pre> $ pkgmk -do </pre> <p>Crux iso comes with config that you can use as a starting point.</p> <pre> cp ../linux-4.5.5.defconfig .config $ make oldefconfig </pre> <p>If you like <a href="https://github.com/graysky2/kernel_gcc_patch/">graysky2</a> kernel_gcc_patch (<a href="https://github.com/graysky2/kernel_gcc_patch/archive/master.zip">download master</a>) that adds more cpu options (FLAGS native)</p> <pre> $ unzip kernel_gcc_patch-master.zip </pre> <pre> $ cd ~/linux-4.5.5/ $ patch -p1 &lt; ../kernel_gcc_patch-master/enable_additional_cpu_optimizations_fo r_gcc_v4.9+_kernel_v3.15+.patch patching file arch/x86/include/asm/module.h patching file arch/x86/Kconfig.cpu patching file arch/x86/Makefile Hunk #1 succeeded at 85 (offset -7 lines). patching file arch/x86/Makefile_32.cpu </pre> <p><a href="https://en.wikibooks.org/wiki/Grsecurity/Configuring_and_Installing_grsecurity#Patching_Your_Kernel_with_grsecurity">Gresecurity</a></p> <pre> patch -p1 &lt; $SRC/grsecurity-3.1-4.5.5-201605291201.patch </pre> <p>Configure kernel according to your current kernel hardware support run;</p> <pre> $ make localmodconfig </pre> <p>This will disable all unloaded modules, you can use localyesconfig mark all loaded to be built in the kernel. This example get information about which graphic module (driver) is in use;</p> <pre> # lspci -nnk | grep -i vga -A3 | grep 'in use' Kernel driver in use: i915 # </pre> <pre> $ cd ~/linux-4.5.5/ $ make -j $(nproc) all $ sudo make modules_install $ sudo cp arch/x86/boot/bzImage /boot/vmlinuz-4.5.5 $ sudo cp System.map /boot/System.map-4.5.5 </pre> <h2 id="kuninstall">3.6.3. Manual Remove</h2> <pre> $ sudo rm -r /lib/modules/4.5.5-gnu $ sudo rm /boot/vmlinuz-4.5.5 $ sudo rm /boot/System.map-4.5.5 </pre> <a href="index.html">Systools Index</a> <p>This is part of the c9-doc Manual. Copyright (C) 2016 Silvino Silva. See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a> for copying conditions.</p> </body> </html>