mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-18 19:29:21 +01:00
Merge branch 'trunk' of git.linuxfromscratch.org:lfs into trunk
This commit is contained in:
commit
25cd02b9db
@ -105,6 +105,12 @@
|
|||||||
compiling the kernel and configuring the boot loader (assuming the host
|
compiling the kernel and configuring the boot loader (assuming the host
|
||||||
uses GRUB) are located in <xref linkend="chapter-bootable"/>.</para>
|
uses GRUB) are located in <xref linkend="chapter-bootable"/>.</para>
|
||||||
|
|
||||||
|
<para>We require the host kernel to support UNIX 98 pseudo terminal
|
||||||
|
(PTY). It should be enabled on all desktop or server distros shipping
|
||||||
|
Linux &min-kernel; or a newer kernel. If you are building a custom
|
||||||
|
host kernel, ensure <option>CONFIG_UNIX98_PTYS</option> is set to
|
||||||
|
<literal>y</literal> in the kernel configuration.</para>
|
||||||
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -230,6 +236,10 @@ ver_check Texinfo texi2any 4.7
|
|||||||
ver_check Xz xz 5.0.0
|
ver_check Xz xz 5.0.0
|
||||||
ver_kernel &min-kernel;
|
ver_kernel &min-kernel;
|
||||||
|
|
||||||
|
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() {
|
alias_check() {
|
||||||
if $1 --version 2>&1 | grep -qi $2
|
if $1 --version 2>&1 | grep -qi $2
|
||||||
then printf "OK: %-4s is $2\n" "$1";
|
then printf "OK: %-4s is $2\n" "$1";
|
||||||
|
@ -41,29 +41,6 @@
|
|||||||
<sect2 role="installation">
|
<sect2 role="installation">
|
||||||
<title>Installation of Binutils</title>
|
<title>Installation of Binutils</title>
|
||||||
|
|
||||||
<para>Verify that the PTYs are working properly inside the chroot
|
|
||||||
environment by performing a simple test:</para>
|
|
||||||
|
|
||||||
<screen><userinput remap="test">expect -c "spawn ls"</userinput></screen>
|
|
||||||
|
|
||||||
<para>This command should output the following:</para>
|
|
||||||
|
|
||||||
<screen><computeroutput>spawn ls</computeroutput></screen>
|
|
||||||
|
|
||||||
<para>If, instead, the output includes the message below, then the environment
|
|
||||||
is not set up for proper PTY operation. This issue needs to be resolved before
|
|
||||||
running the test suites for Binutils and GCC:</para>
|
|
||||||
|
|
||||||
<screen><computeroutput>The system has no more ptys.
|
|
||||||
Ask your system administrator to create more.</computeroutput></screen>
|
|
||||||
<!-- Fixed in binutils-2.39
|
|
||||||
<para>
|
|
||||||
Now make a fix identified upstream that affects building some packages:
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<screen><userinput remap="pre">sed -e '/R_386_TLS_LE /i \ || (TYPE) == R_386_TLS_IE \\' \
|
|
||||||
-i ./bfd/elfxx-x86.h</userinput></screen>
|
|
||||||
-->
|
|
||||||
<para>The Binutils documentation recommends building Binutils
|
<para>The Binutils documentation recommends building Binutils
|
||||||
in a dedicated build directory:</para>
|
in a dedicated build directory:</para>
|
||||||
|
|
||||||
|
@ -82,10 +82,27 @@
|
|||||||
|
|
||||||
<screen><userinput remap="make">make</userinput></screen>
|
<screen><userinput remap="make">make</userinput></screen>
|
||||||
|
|
||||||
|
<important>
|
||||||
|
<para>The test suite for Expect is considered critical.
|
||||||
|
Do not skip it under any circumstances.</para>
|
||||||
|
</important>
|
||||||
|
|
||||||
<para>To test the results, issue:</para>
|
<para>To test the results, issue:</para>
|
||||||
|
|
||||||
<screen><userinput remap="test">make test</userinput></screen>
|
<screen><userinput remap="test">make test</userinput></screen>
|
||||||
|
|
||||||
|
<para>If any test fails with the message
|
||||||
|
<quote><computeroutput>The system has no more ptys. Ask your system
|
||||||
|
administrator to create more</computeroutput></quote>, it indicates
|
||||||
|
you've not mounted the
|
||||||
|
<systemitem class="filesystem">devpts</systemitem> file system
|
||||||
|
correctly. You need to exit from the chroot environment, read
|
||||||
|
<xref linkend='ch-tools-kernfs'/> again, and ensure the
|
||||||
|
<systemitem class="filesystem">devpts</systemitem> file system (and
|
||||||
|
other virtual kernel file systems) mounted correctly. Then reenter
|
||||||
|
the chroot environment following <xref linkend='ch-tools-chroot'/>.
|
||||||
|
This issue needs to be resolved before continuing.</para>
|
||||||
|
|
||||||
<para>Install the package:</para>
|
<para>Install the package:</para>
|
||||||
|
|
||||||
<screen><userinput remap="install">make install
|
<screen><userinput remap="install">make install
|
||||||
|
@ -96,12 +96,28 @@
|
|||||||
information about configuring and building the kernel can be found at
|
information about configuring and building the kernel can be found at
|
||||||
<ulink url="http://www.kroah.com/lkn/"/> </para>
|
<ulink url="http://www.kroah.com/lkn/"/> </para>
|
||||||
|
|
||||||
<note>
|
<caution>
|
||||||
<para>A good starting place for setting up the kernel configuration is to
|
<para>A good starting place for setting up the kernel configuration is to
|
||||||
run <command>make defconfig</command>. This will set the base
|
run <command>make localmodconfig</command>. If the host kernel version
|
||||||
configuration to a good state that takes your current system architecture
|
is not too different from the version of the kernel you are building,
|
||||||
into account.</para>
|
this will set the base configuration to a good state similar to what
|
||||||
|
the host uses. Another possibility is to use <command>make
|
||||||
|
localyesconfig</command>, which does the same except everything is built
|
||||||
|
into the kernel.</para>
|
||||||
|
|
||||||
|
<para>Do not disable any option enabled by <command>make
|
||||||
|
localmodconfig</command> unless the following notes explicitly make it
|
||||||
|
disabled or you really know what you are doing.</para>
|
||||||
|
</caution>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
<para>Another possibility is to run <command>make defconfig</command>,
|
||||||
|
which creates a more generic configuration for your architecture. You
|
||||||
|
may then have to disable drivers for hardware you do not have if
|
||||||
|
you want to reduce the kernel size.</para>
|
||||||
|
</note>
|
||||||
|
|
||||||
|
<note>
|
||||||
<para>Be sure to enable/disable/set the following features or the system might
|
<para>Be sure to enable/disable/set the following features or the system might
|
||||||
not work correctly or boot at all:</para>
|
not work correctly or boot at all:</para>
|
||||||
|
|
||||||
@ -111,6 +127,7 @@
|
|||||||
General setup --->
|
General setup --->
|
||||||
[ ] Compile the kernel with warnings as errors [CONFIG_WERROR]
|
[ ] Compile the kernel with warnings as errors [CONFIG_WERROR]
|
||||||
< > Enable kernel headers through /sys/kernel/kheaders.tar.xz [CONFIG_IKHEADERS]
|
< > Enable kernel headers through /sys/kernel/kheaders.tar.xz [CONFIG_IKHEADERS]
|
||||||
|
[ ] Configure standard kernel features (expert users) [CONFIG_EXPERT]
|
||||||
General architecture-dependent options --->
|
General architecture-dependent options --->
|
||||||
[*] Stack Protector buffer overflow detection [CONFIG_STACKPROTECTOR]
|
[*] Stack Protector buffer overflow detection [CONFIG_STACKPROTECTOR]
|
||||||
[*] Strong Stack Protector [CONFIG_STACKPROTECTOR_STRONG]
|
[*] Strong Stack Protector [CONFIG_STACKPROTECTOR_STRONG]
|
||||||
@ -137,8 +154,7 @@ General setup --->
|
|||||||
[*] Control Group support [CONFIG_CGROUPS] --->
|
[*] Control Group support [CONFIG_CGROUPS] --->
|
||||||
[*] Memory controller [CONFIG_MEMCG]
|
[*] Memory controller [CONFIG_MEMCG]
|
||||||
[ ] Enable deprecated sysfs features to support old userspace tools [CONFIG_SYSFS_DEPRECATED]
|
[ ] Enable deprecated sysfs features to support old userspace tools [CONFIG_SYSFS_DEPRECATED]
|
||||||
[*] Configure standard kernel features (expert users) [CONFIG_EXPERT] --->
|
[ ] Configure standard kernel features (expert users) [CONFIG_EXPERT]
|
||||||
[*] open by fhandle syscalls [CONFIG_FHANDLE]
|
|
||||||
General architecture-dependent options --->
|
General architecture-dependent options --->
|
||||||
[*] Enable seccomp to safely compute untrusted bytecode [CONFIG_SECCOMP]
|
[*] Enable seccomp to safely compute untrusted bytecode [CONFIG_SECCOMP]
|
||||||
[*] Stack Protector buffer overflow detection [CONFIG_STACKPROTECTOR]
|
[*] Stack Protector buffer overflow detection [CONFIG_STACKPROTECTOR]
|
||||||
@ -236,6 +252,19 @@ Device Drivers --->
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<parameter>
|
||||||
|
Configure standard kernel features (expert users)
|
||||||
|
</parameter>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>This will make some options show up in the configuration
|
||||||
|
interface but changing those options may be dangerous. Do not use
|
||||||
|
this unless you know what you are doing.</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>Strong Stack Protector</parameter></term>
|
<term><parameter>Strong Stack Protector</parameter></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -293,7 +322,7 @@ Device Drivers --->
|
|||||||
<para>Support running the interrupt controller of 64-bit x86
|
<para>Support running the interrupt controller of 64-bit x86
|
||||||
processors in x2APIC mode. x2APIC may be enabled by firmware on
|
processors in x2APIC mode. x2APIC may be enabled by firmware on
|
||||||
64-bit x86 systems, and a kernel without this option enabled will
|
64-bit x86 systems, and a kernel without this option enabled will
|
||||||
panic on boot if x2APIC is enabled by firmware. This option has
|
panic on boot if x2APIC is enabled by firmware. This option
|
||||||
has no effect, but also does no harm if x2APIC is disabled by the
|
has no effect, but also does no harm if x2APIC is disabled by the
|
||||||
firmware.</para>
|
firmware.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
Loading…
Reference in New Issue
Block a user