Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need a better understanding of make and menuconfig
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
mhsquire
n00b
n00b


Joined: 20 Apr 2014
Posts: 6

PostPosted: Sun Apr 20, 2014 3:24 pm    Post subject: Need a better understanding of make and menuconfig Reply with quote

I think this is an issue with make. So I successfully chrooted into the new environment. I followed the instructions to this point a few times.

Something I noticed right away was that the symlink was not set to the source, so I went ahead and set it myself.

Code:

(chroot) livecd linux # ls -l /usr/src
total 8
lrwxrwxrwx  1 root root   33 Apr 20 07:39 linux -> /usr/src/linux-3.13.6-hardened-r3
drwxr-xr-x 20 root root 4096 Apr 13 21:21 linux-3.12.13-gentoo
drwxr-xr-x 20 root root 4096 Apr 20 07:41 linux-3.13.6-hardened-r3


When I then try to use make to configure the kernel I receive this output.
Code:

(chroot) livecd linux # make menuconfig
make: *** No rule to make target `menuconfig'.  Stop.
(chroot) livecd linux # make config
make: *** No rule to make target `config'.  Stop.


So make is really confused. Is there another configuration file that was supposed to be setup automatically? Something similar to the symlink?

Here is the output of make.conf:
Code:

/etc/portage/make.conf
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-Os -march=native"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="i686-pc-linux-gnu"
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
USE="bindist"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
USE="symlink"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31692
Location: 56N 3W

PostPosted: Sun Apr 20, 2014 3:35 pm    Post subject: Reply with quote

mhsquire,

Welcome to Gentoo.

The Makefile has been removed from /usr/src/linux
This happens if you unmerge the kernel sources. Your .config remains, so the directory remains too.
What does
Code:
 ls -al /usr/src/linux/
show?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mhsquire
n00b
n00b


Joined: 20 Apr 2014
Posts: 6

PostPosted: Sun Apr 20, 2014 3:55 pm    Post subject: Reply with quote

Code:

(chroot) livecd kernel # ls -al /usr/src/linux/
total 172
drwxr-xr-x 20 root root  4096 Apr 20 07:41 .
drwxr-xr-x  4 root root  4096 Apr 20 07:39 ..
-r--r--r--  1 root root 90082 Apr 20 07:41 .config
drwxr-xr-x 55 root root  4096 Apr 13 22:24 drivers
drwxr-xr-x 36 root root  4096 Apr 19 21:07 firmware
drwxr-xr-x 73 root root  4096 Apr 19 21:07 fs
drwxr-xr-x  2 root root  4096 Apr 19 21:05 grsecurity
drwxr-xr-x 27 root root  4096 Apr 19 21:06 include
drwxr-xr-x  2 root root  4096 Apr 19 21:06 init
drwxr-xr-x  2 root root  4096 Apr 19 21:06 ipc
drwxr-xr-x 14 root root  4096 Apr 19 21:06 kernel
drwxr-xr-x 11 root root  4096 Apr 19 21:06 lib
drwxr-xr-x  2 root root  4096 Apr 19 21:06 mm
drwxr-xr-x 57 root root  4096 Apr 19 21:06 net
drwxr-xr-x 12 root root  4096 Apr 19 21:05 samples
drwxr-xr-x 13 root root  4096 Apr 19 21:05 scripts
drwxr-xr-x  9 root root  4096 Apr 19 21:05 security
drwxr-xr-x 22 root root  4096 Apr 19 21:05 sound
drwxr-xr-x 19 root root  4096 Apr 19 21:05 tools
drwxr-xr-x  2 root root  4096 Apr 19 21:05 usr
drwxr-xr-x  3 root root  4096 Apr 13 22:22 virt


To avoid confusion I should mention that I copied and decompressed a config file from /proc/config.gz into the folder, hoping that would work. How can I restore the Makefile?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31692
Location: 56N 3W

PostPosted: Sun Apr 20, 2014 4:12 pm    Post subject: Reply with quote

mhsquire,

Code:
emerge -1 hardened-sources
will restore the sources and leave the .config untouched.
In case I'm wrong, you may want to save it somewhere.

The /proc/config.gz file is for the running kernel, whatever that was. To turn that config into a legal config for some random kernel, you must run
Code:
make oldconfig

This takes the existing .config as input, silently drops all the options that have been removed, passes on existing options unchanged and asks you what to do with new options.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mhsquire
n00b
n00b


Joined: 20 Apr 2014
Posts: 6

PostPosted: Sun Apr 20, 2014 4:39 pm    Post subject: Reply with quote

It's emerging now. I wonder if anyone has a theory about why the Makefile was not made to begin with. Is this because I selected a hardened package that was incomplete? This is the first time I have rolled my own kernel. I wanted to take advantage of gentoo to understand how to tailor a kernel for small systems.

The specs on my laptop are modest at best. It is an ancient toshiba satellite 1115-s103

Code:

livecd ~ # lspci
00:00.0 Host bridge: Intel Corporation 82845 845 [Brookdale] Chipset Host Bridge (rev 05)
00:01.0 PCI bridge: Intel Corporation 82845 845 [Brookdale] Chipset AGP Bridge (rev 05)
00:1d.0 USB controller: Intel Corporation 82801CA/CAM USB Controller #1 (rev 02)
00:1d.1 USB controller: Intel Corporation 82801CA/CAM USB Controller #2 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 42)
00:1f.0 ISA bridge: Intel Corporation 82801CAM ISA Bridge (LPC) (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801CAM IDE U100 Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801CA/CAM SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801CA/CAM AC'97 Audio Controller (rev 02)
00:1f.6 Modem: Intel Corporation 82801CA/CAM AC'97 Modem Controller (rev 02)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV100/M6 [Rage/Radeon Mobility Series]
02:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8100/8101L/8139 PCI Fast Ethernet Adapter (rev 10)
02:04.0 CardBus bridge: O2 Micro, Inc. OZ6933/711E1 CardBus/SmartCardBus Controller (rev 01)
02:04.1 CardBus bridge: O2 Micro, Inc. OZ6933/711E1 CardBus/SmartCardBus Controller (rev 01)


I ran that line of code, it seems to be hung for a while. Then it said it failed.
Code:

*    /usr/src/linux-3.13.6-hardened-r3/grsecurity/Makefile
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/gracl.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/gracl_alloc.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/gracl_cap.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/gracl_compat.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/gracl_fs.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/gracl_ip.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/gracl_learn.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/gracl_policy.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/gracl_res.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/gracl_segv.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/gracl_shm.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_chdir.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_chroot.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_disabled.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_exec.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_fifo.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_fork.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_init.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_ipc.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_link.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_log.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_mem.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_mount.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_pax.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_ptrace.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_sig.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_sock.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_sysctl.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_time.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_tpe.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsec_usb.c
 *    /usr/src/linux-3.13.6-hardened-r3/grsecurity/grsum.c
 *    /usr/share/doc/hardened-sources-3.13.6-r3/0000_README.bz2
 *
 * Searching all installed packages for file collisions...
 *
 * Press Ctrl-C to Stop
 *
 * None of the installed packages claim the file(s).
 *
 * Package 'sys-kernel/hardened-sources-3.13.6-r3' merged despite file
 * collisions. If necessary, refer to your elog messages for the whole
 * content of the above message.
!!! Unable to set SELinux security labels

>>> Failed to install sys-kernel/hardened-sources-3.13.6-r3, Log file:

>>>  '/var/tmp/portage/sys-kernel/hardened-sources-3.13.6-r3/temp/build.log'

 * GNU info directory index is up-to-date.

 * IMPORTANT: 6 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


So it seems to be failing before it makes the final Makefile. Is there a way to turn SELinux off? I know the whole reason to run SELinux is to avoid such a situation where you avoid using security tags.
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 3998

PostPosted: Sun Apr 20, 2014 5:09 pm    Post subject: Reply with quote

mhsquire wrote:
Is there a way to turn SELinux off?

Code:
FEATURES=-selinux emerge -1O hardened-sources
Back to top
View user's profile Send private message
mhsquire
n00b
n00b


Joined: 20 Apr 2014
Posts: 6

PostPosted: Sun Apr 20, 2014 9:16 pm    Post subject: Reply with quote

I just restarted the installation to make sure gentoo will run on my laptop. I will then try to upgrade the kernel later.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum