Cpomiling Robert Nelsons kernel natively on the BBW...

Hi,

Want to compile the Linux Kernel by Robert Nelson
natively on the BBW. A harddisk is attached and
swap space is added to the system.

At first I want to try to co9mpile it with defconfig
settings.

I am using gentoo on the beagle bone.

./build_kernel.sh runs up to the start of the kernel
configuration. I saved .config and exited the tools.

There was no compilation starting but a help screen
output. Since this was a really native task :wink: (I did
it via the LCD7 screen), the name of the tool which prints
the help screen was out of sight.

I connected via ssh to the beaglebone and startet ./tools/rebuild.sh,
which again shows me the configuration panel.
I saved the .config and exited.

This was print on the screen:
    beaglebone:RobertCNelson-3.2/linux-dev>./tools/rebuild.sh
    which: no lsb_release in (/usr/local/bin:/bin/:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/armv7a-softfp-linux-gnueabi/gcc-bin/4.6.3:/usr/games/bin:/root/bin)
    + Detected build host []
    Error executing formatting or display command.
    System command (cd "/usr/share/man" && (echo ".pl 11i"; /bin/bzip2 -c -d '/usr/share/man/man1/git-pull.1.bz2') | /usr/bin/gtbl | /usr/bin/nroff -mandoc | /usr/bin/less) exited with status 141.
    No manual entry for git-pull

Hi,

Want to compile the Linux Kernel by Robert Nelson
natively on the BBW. A harddisk is attached and
swap space is added to the system.

At first I want to try to co9mpile it with defconfig
settings.

I am using gentoo on the beagle bone.

./build_kernel.sh runs up to the start of the kernel
configuration. I saved .config and exited the tools.

There was no compilation starting but a help screen
output. Since this was a really native task :wink: (I did
it via the LCD7 screen), the name of the tool which prints
the help screen was out of sight.

I connected via ssh to the beaglebone and startet ./tools/rebuild.sh,
which again shows me the configuration panel.
I saved the .config and exited.

This was print on the screen:
    beaglebone:RobertCNelson-3.2/linux-dev>./tools/rebuild.sh
    which: no lsb_release in (/usr/local/bin:/bin/:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/armv7a-softfp-linux-gnueabi/gcc-bin/4.6.3:/usr/games/bin:/root/bin)
    + Detected build host []

Blah, atleast "update" the am335x-3.2 branch..

    Error executing formatting or display command.
    System command (cd "/usr/share/man" && (echo ".pl 11i"; /bin/bzip2 -c -d '/usr/share/man/man1/git-pull.1.bz2') | /usr/bin/gtbl | /usr/bin/nroff -mandoc | /usr/bin/less) exited with status 141.
    No manual entry for git-pull

'man-db' is not installed...

    -----------------------------
    scripts/gcc: Using: gcc (Gentoo 4.6.3 p1.11, pie-0.5.2) 4.6.3
    Copyright (C) 2011 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.

No, It's using your native "gcc", no reason to specify "CC in sytstem.sh"...

    -----------------------------
    debug: CC=
    Error executing formatting or display command.
    System command (cd "/usr/share/man" && (echo ".pl 11i"; /bin/bzip2 -c -d '/usr/share/man/man1/git-pull.1.bz2') | /usr/bin/gtbl | /usr/bin/nroff -mandoc | /usr/bin/less) exited with status 141.
    No manual entry for git-pull
    scripts/kconfig/mconf Kconfig

    *** End of the configuration.
    *** Execute 'make' to start the build or try 'make help'.

¬†¬†¬†¬†‚Äė.config‚Äô -> ‚Äė/home/mccramer/data/pools/pool01/RobertCNelson-3.2/linux-dev/patches/defconfig‚Äô
    -----------------------------
    make -j0 ARCH=arm LOCALVERSION=-psp27 CROSS_COMPILE="" zImage modules

"-j0" already fixed, just update your branch..

    -----------------------------
    make: the `-j' option requires a positive integral argument
    Usage: make [options] [target] ...
    Options:
    -b, -m Ignored for compatibility.
    -B, --always-make Unconditionally make all targets.
    -C DIRECTORY, --directory=DIRECTORY
                                Change to DIRECTORY before doing anything.
    -d Print lots of debugging information.
    --debug[=FLAGS] Print various types of debugging information.
    -e, --environment-overrides
                                Environment variables override makefiles.
    --eval=STRING Evaluate STRING as a makefile statement.
    -f FILE, --file=FILE, --makefile=FILE
                                Read FILE as a makefile.
    -h, --help Print this message and exit.
    -i, --ignore-errors Ignore errors from recipes.
    -I DIRECTORY, --include-dir=DIRECTORY
                                Search DIRECTORY for included makefiles.
    -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
    -k, --keep-going Keep going when some targets can't be made.
    -l [N], --load-average[=N], --max-load[=N]
                                Don't start multiple jobs unless load is below N.
    -L, --check-symlink-times Use the latest mtime between symlinks and target.
    -n, --just-print, --dry-run, --recon
                                Don't actually run any recipe; just print them.
    -o FILE, --old-file=FILE, --assume-old=FILE
                                Consider FILE to be very old and don't remake it.
    -p, --print-data-base Print make's internal database.
    -q, --question Run no recipe; exit status says if up to date.
    -r, --no-builtin-rules Disable the built-in implicit rules.
    -R, --no-builtin-variables Disable the built-in variable settings.
    -s, --silent, --quiet Don't echo recipes.
    -S, --no-keep-going, --stop
                                Turns off -k.
    -t, --touch Touch targets instead of remaking them.
    -v, --version Print the version number of make and exit.
    -w, --print-directory Print the current directory.
    --no-print-directory Turn off -w, even if it was turned on implicitly.
    -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
                                Consider FILE to be infinitely new.
    --warn-undefined-variables Warn when an undefined variable is referenced.

    This program built for armv7a-softfp-linux-gnueabi
    Report bugs to <bug-make@gnu.org>
    [1] 27804 exit 2 ./tools/rebuild.sh

I tried to set CC in sytstem.sh to "/usr/bin/gcc", but the according line
changes to

¬†¬†¬†¬†‚Äė.config‚Äô -> ‚Äė/home/mccramer/data/pools/pool01/RobertCNelson-3.2/linux-dev/patches/defconfig‚Äô
    -----------------------------
    make -j0 ARCH=arm LOCALVERSION=-psp27 CROSS_COMPILE="" zImage modules
    -----------------------------
    make: the `-j' option requires a positive integral argument

but the behaviour and the result were (except those lines above) the same.

It seems, that the script still thinks, that it needs to cross compile
things instead of doing a native compilation task.

On my beaglebone "uname -a" produces:

    Linux beaglebone 3.2.42-20130505-psp27 #1 Sun May 5 06:09:59 CEST 2013 armv7l ARMv7 Processor rev 2 (v7l) am335xevm GNU/Linux

.

What I am doing wrong here?

just update the branch and atleast install 'man-db'...

Regards,

Hi mcc!

please tell us how long the process of compilation it took

P.S. I remember how compiled Qt 4.8 at am3517 host. It took a little more than 24 hours :slight_smile:

Hi Maxim,

I am not 100% sure, since dont sit here and watch line by line
moving accross the LCD7 screen until it says: "Hurray! Ready!" :))))

But roughly I would say about 7-8 hours. I had found the CORES problem,
Robert mentioned before Robert mailed. I had hardfixed (==hacked) it
directly in the script.

BUT! The process stopped again with a problem which I have to
investigate further. At this point, I have seen a vmlinux. So the
main task is already done I think.

My setup:

BeagleBone White
System on a cheap SD-card (16GB).
/var/tmp and /usr/src are mounted on a 500GB external 2.5" harddisc.
I have added 5GB swapspace (taken from the hd).
The harddisc is connected to a powered USB3 hub. The hd is also USB3.
Also connected to that hub is a KBTalking PURE 60 keyboard and a
Perixx Peripad 501 touchpad as replacement for a mouse.
The BBW is attached to a LCD7 display.

If I have solved the remaining problem I will mail again.
If not I fear I have to mail too.... :wink:

HTH!
Best regards,
mcc

Maxim Podbereznyy <lisarden@gmail.com> [13-07-30 06:52]:

Frankly speaking I don‚Äôt understand where your problems come from. I‚Äôve compiled a number of software packages natively on a BBB clone under Ubuntu and everything runs smoothly like it runs at x86. All you need is to install all dependencies by ‚Äúapt-get install‚ÄĚ. Probably Robert‚Äôs scripts are not optimized for native building but you can set the CC variable manually. Robert, am I right?

Hi Maxim,

:slight_smile: ...I also dont know where the problems are coming from...
Thats why I am investigateing.

And...by the way....the world of linux does not only consists
of derivates of Debian-derivates...

When you do a native comnpilation, leave CC alone...

Best regards,
mcc

Maxim Podbereznyy <lisarden@gmail.com> [13-07-30 09:52]:

Hi Maxim,

:slight_smile: ...I also dont know where the problems are coming from...
Thats why I am investigateing.

Well next time, if you "pastebin.com" your build log, i bet i can tell
you what "package" your missing next...

And...by the way....the world of linux does not only consists
of derivates of Debian-derivates...

Actually "it does" as in this context, where you are running "my
script", the "world of linux" equals, Debian/Suse/Fedora, as THAT is
all it's currently setup to detect.. :wink:

got a patch?)
https://github.com/RobertCNelson/linux-dev/blob/am33x-v3.2/tools/host_det.sh#L16

B: Debian: this is the "full" list of packages needed: (got a patch for Gentoo?)
https://github.com/RobertCNelson/linux-dev/blob/am33x-v3.2/tools/host_det.sh#L93

When you do a native comnpilation, leave CC alone...

Regards,

Gentoo doesn’t really need patching - I build your standard standard kernel in accordance
with your (standard) instructions, and it runs perfectly well with a Gentoo root file-system,
cross-compiled and exported via NFS. Some stuff (gcc, for instance) is a pig to cross-compile
since it first builds tools to build the final package, and gets confused between the system
tools and the final package. In that case I just emerge it on the BBB and leave it running
overnight.

What I need to do next is to sort out the patches needed to build a native ARM kernel
and write them into a standard Gentoo ebuild; then everything could be run natively,
but building a native kernel is slow, so I’d rather stick with your cross-compile setup.

Will