我尝试用clang 8.0.0为Linux内核2.6.37代码生成AST文件。我在内核根目录中运行以下命令 clang -emit-ast init/main.c -o astfile -std=c11 -Iinclude -Iarch/x86/include 并获取错误 In file included from /mnt/lfs/sources/linux-2.6.37/init/main.c:12:
/mnt/lfs/sources/linux-2.6.37/include/linux/types.h:13:2: warning: "Attempt to use kernel
我在LFS中构建了linux内核,grub可以工作,但是当我加载linux内核时,屏幕就变黑了,之后什么也不会发生。我该怎么办?如果这件事重要的话,我在笔记本电脑上。下面是grub配置:
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5
insmod part_gpt
insmod ext2
set root=(hd0,2)
if loadfont /boot/grub/fonts/unicode.pf2; then
set gfxmode=auto
insmod all_video
terminal_output
到目前为止,我一直遵循LFS手册的指示,但是在生成bash时出现了一个错误,我在bash-5.1文件夹中运行了make,但是它在命令输出的末尾显示了一个错误:
/mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../x86_64-lfs-linux-gnu/bin/ld: ./lib/sh/libsh.a(tmpfile.o): in function `sh_mktmpname':
/mnt/lfs/sources/bash-5.1/lib/sh/tmpfile.c:160: warning: the use of
将以下脚本的第1部分和第2部分剪切并粘贴到终端中可以很好地工作,但将此文件作为脚本运行并非如此,因为某些命令需要以另一个用户的身份(通过"su - user")或在chroot环境中执行。例如,在第1部分中,脚本必须由用户"lfs“执行。
我已经尝试通过"su user -c 'really long list of commands'“和Here-Documents将命令传递给其他用户的shell,但似乎都不起作用。
我们的目标是成为一个可以正常运行的脚本,而不必费力地打开它,并将其内容复制并粘贴到虚拟终端中,使其正常工作。
#########
我在制作gcc 5.3.0的过程中遇到了一些问题。我用gcc 4.8在Xubuntu 14.04 LTS上。
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
我正在阅读Linux从头开始的书,这时我在配置Glibc时遇到错误(步骤5.7):
checking for sysdeps preconfigure fragments... aarch64 alpha arm configure: error: Old ABI no longer supported
我正在使用:
../glibc-2.20/configure \
--prefix=/tools \
--host=$LFS_TGT