WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Need help compiling Linux  (Read 6554 times)

Offline kalu

  • Newbie
  • *
  • Posts: 41
Need help compiling Linux
« on: January 23, 2015, 02:47:01 PM »
Hi all!

I'm in the process of compiling Linux-3.16.6. I have all of these extensions already loaded:
*compiletc
*perl5
*bash
*ncurses-dev
*linux-3.16.2_api_headers
I've also copied config-3.16.6-tinycore to .config

But an error keeps on appearing with 'make menuconfig' or 'make oldconfig':
Code: [Select]
tc@FujitsuUPG:/mnt/sda1/fresh6/linux-3.10.65$ make oldconfig
  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c:106:23: fatal error: sys/types.h: No such file or directory
 #include <sys/types.h>
                       ^
compilation terminated.
scripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' failed
make[1]: *** [scripts/basic/fixdep] Error 1
Makefile:419: recipe for target 'scripts_basic' failed
make: *** [scripts_basic] Error 2
tc@FujitsuUPG:/mnt/sda1/fresh6/linux-3.10.65$

I tried replacing replacing 'sys' with 'linux' (because 'sys/types.h' doesn't exist anyway), but it still complains that the 'linux/types.h' doesn't exist (when in fact, it does). And after having tried doing this several times, sometimes it still looked for 'sys/types.h' even after I had changed it to 'linux/types.h'. Does anyone have a clue?

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Need help compiling Linux
« Reply #1 on: January 24, 2015, 12:57:58 AM »
Sorry, forgot to add that I'm using TC v6.0.

And the kernel I'm currently using (Linux-3.16.6) is the same as the one I'm trying to compile in the hope that my systems aren't not so different other TC v6.0.

The reason for compiling is that we have several equipments requiring the experimental option 'CONFIG_DRM_GMA3600=y'. And also I need to change to kernel bootsplash logo for a lightweight bootsplash as an alternative to plymouth. So I'm thinking that I only need to turn this option on, change the logo and keep everything else the same. So what do you think? (anyone)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Need help compiling Linux
« Reply #2 on: January 24, 2015, 01:34:37 AM »
'looks OK to me using linux-3.16.6-patched.txz  ???

Code: [Select]
$ tce-load -i compiletc perl5 bash ncurses-dev
$ make mrproper
$ cp /mnt/sdb1/source/config-3.16.6-tinycore64 /usr/src/linux-3.16.6/.config
$ make oldconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2537:0:
scripts/kconfig/menu.c: In function 'get_symbol_str':
scripts/kconfig/menu.c:590:18: warning: 'jump' may be used uninitialized in this function [-Wmaybe-uninitialized]
     jump->offset = strlen(r->s);
                  ^
scripts/kconfig/menu.c:551:19: note: 'jump' was declared here
  struct jump_key *jump;
                   ^
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Need help compiling Linux
« Reply #3 on: January 24, 2015, 10:43:14 AM »
Hmmm... I'm starting to think that something is wrong with the way I installed my tinycore. My 'tce-load -wil compiletc' doesn't even include 'make'. I had to download 'make' separately. Maybe I should try to start over again..?

The way I installed my system is by downloading the 'Core-current.iso' in a TC v5.4 system. I mounted the iso and copied core.gz and vmlinuz to the /mnt/sda1/tce/boot/tcv6.0/ directory and configured extlinux so that it would boot these two instead of the TC v5.4 ones and then I installed all the softwares I need including X. There's nothing wrong with this way of installing right? I didn't use the Install app in CorePlus to install because the graphics was unusable with all window managers.

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Need help compiling Linux
« Reply #4 on: January 24, 2015, 10:54:45 AM »
That's the strange thing.... Now I have X and openbox in my TC v6.0 working fine (except that xrandr reports 'default connected', which my superior says it means that Linux didn't find the driver). On the other hand, when I was trying to install TC v6.0 using the Install app in CorePlus, graphics was unbearable, full of glitches. I couldn't see what I was typing, I couldn't see where where the cursor was, etc. Straaaange... :o

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Need help compiling Linux
« Reply #5 on: February 04, 2015, 02:24:35 AM »
Hi!!!

I tried doing many things in that machine, but it kept on giving me various strange errors (for example tce-load keeps on trying to download "<HTML><" instead of the usual "extension-name.tcz"). But I moved to a different machine and all those errors went away (wished I had tried that earlier).

It's been more than a week now (and still working on the same thing :-[), but I've come across other errors (not as weird as before). I would do the complete module installation like this just to make sure I don't have missing dependencies between the kernel modules:
Code: [Select]
$ make bzImage
$ make modules
$ make install_modules

But my thin client doesn't have enough space, so I have opted for this instead to not install every module there is:
Code: [Select]
$ make bzImage
$ make prepare
$ make modules_prepare
$ make M=driver/gpu/drm/gma500
$ sudo make M=driver/gpu/drm/gma500 modules_install

No errors in the process above and it produced file '/lib/modules/3.16.6-tinycore/extra/gma500_gfx.ko'.
But it returns an error when I try to load it:
Code: [Select]
tc@box:~$ sudo modprobe gma500_gfx
modprobe: can't load module gma500_gfx (extra/gma500_gfx.ko): unknown symbol in module, or unknown parameter

Searching online for similar errors pointed me to put 'Module.symvers' (which I copied from linux-3.16.6 directory) in '/lib/modules/3.16.6-tinycore/build/' or run 'sudo depmod -a'. I've tried those too in combinations, but it still gave the same error. Any help is appreciated as I'm still learning and don't really understand what Module.symvers or 'depmod -a' do.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Need help compiling Linux
« Reply #6 on: February 04, 2015, 02:50:34 AM »
"unknown symbol in module, or unknown parameter" means that gma500_gfx depends on another module that is not loaded.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Need help compiling Linux
« Reply #7 on: February 04, 2015, 03:22:48 AM »
Use modinfo to see dependencies.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Need help compiling Linux
« Reply #8 on: February 04, 2015, 04:08:27 AM »
Thank you both, I really appreciate it!

Another question, is there a way to make this module (and other modules it depends on) available to other systems running the same version of Tiny Core? (Would this work? 'scp gma500_gfx.ko user@ip-address:' :P)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: Need help compiling Linux
« Reply #9 on: February 04, 2015, 04:57:54 AM »
..or make an extension out of it (and any modules not already in the base/existing extensions)...

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Need help compiling Linux
« Reply #10 on: February 06, 2015, 02:31:07 AM »
Thanks all, it's working now!

..or make an extension out of it (and any modules not already in the base/existing extensions)...

I'll try that...