WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Community thread on building a RPi2 kernel  (Read 13014 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Community thread on building a RPi2 kernel
« Reply #15 on: March 08, 2015, 03:27:12 PM »

2. make zImage needs bc at some point. bc requires lex, so I had to download and build flex and bc to finish the compile. Are there equivalent packages or commands for these that I couldn't find, or can we get these?


flex.tcz is in the repo. Did you try to install it?
Béla
Ham Radio callsign: HA5DI

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

Offline andyj

  • Hero Member
  • *****
  • Posts: 1023
Re: Community thread on building a RPi2 kernel
« Reply #16 on: March 08, 2015, 03:51:36 PM »
Probably, but I usually load from the command line so I must have guessed / typed the name wrong. I see it now in the app browser so it's good to know that it's there for future reference.

I did figure out the compressed module issue. I copied the updated modules.dep file from memory back to the working ramfs image directory on disk. Then I recreated the image and rebooted and it worked. I suppose that I could have chroot'ed to the image root, run depmod and then remake the image. I'll try that next time when I get around to loading wireless modules.

Offline Mucke

  • Newbie
  • *
  • Posts: 31
Re: Community thread on building a RPi2 kernel
« Reply #17 on: March 21, 2015, 05:55:03 PM »
Trying to compile the actual Rasbian kernel 3.18.7 on the Pi2 with 3.18.9_v7-piCore+ gives 2 problems here:

1. make mrproper
Code: [Select]
./scripts/link-vmlinux.sh: trap: line 113: ERR: invalid signal specification
2. make menuconfig
Code: [Select]
...scripts/kconfig/mconf.o: In function `show_help´:
mconf.c:(.text+0x98c): undefined reference to `stdscr´
...

Can someone tell me how to fix it? What is missed?
ncurses-dev.tcz is installed btw.

Mucke

Offline andyj

  • Hero Member
  • *****
  • Posts: 1023
Re: Community thread on building a RPi2 kernel
« Reply #18 on: March 21, 2015, 07:52:24 PM »
1. Remove the ERR signal from the line in question.
2. I had to do a lot of hand patching to get mconf to build. Basically you need to add -lncurses after everywhere you see -lreadline in the files in that directory, IIRC. As you can see that was almost two weeks ago.

Offline Mucke

  • Newbie
  • *
  • Posts: 31
Re: Community thread on building a RPi2 kernel
« Reply #19 on: March 23, 2015, 02:42:59 AM »
1. Removing ERR helps

But I have not got a solution for your proposal 2.
mconf is in the folder /scripts/kconfig. There is no file with -lreadline in that directory.
Can you be a bit more precise?

Bela, how did you get your make menuconfig running on the Pi2 ?

Mucke

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Community thread on building a RPi2 kernel
« Reply #20 on: March 23, 2015, 02:51:40 AM »

Bela, how did you get your make menuconfig running on the Pi2 ?


Easy. I'm not using it :)
Béla
Ham Radio callsign: HA5DI

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

Offline andyj

  • Hero Member
  • *****
  • Posts: 1023
Re: Community thread on building a RPi2 kernel
« Reply #21 on: March 28, 2015, 08:08:01 PM »
Try this patch to the scripts directory:

--- linux-rpi-3.18.y/scripts/kconfig/Makefile
+++ linux-rpi-3.18.y-menuconfig-patched/scripts/kconfig/Makefile
@@ -212,7 +212,7 @@
 HOSTLOADLIBES_nconf    = $(shell \
                                pkg-config --libs menuw panelw ncursesw 2>/dev/null \
                                || pkg-config --libs menu panel ncurses 2>/dev/null \
-                               || echo "-lmenu -lpanel -lncurses"  )
+                               || echo "-lmenu -lpanel -lncursesw"  )
 $(obj)/qconf.o: $(obj)/.tmp_qtcheck
 
 ifeq ($(MAKECMDGOALS),xconfig)
--- linux-rpi-3.18.y/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ linux-rpi-3.18.y-menuconfig-patched/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -15,6 +15,7 @@
                        fi
                done
        done
+       echo "-lncursesw"
        exit 1
 }
 
@@ -25,14 +26,14 @@
                echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
        elif pkg-config --cflags ncurses 2>/dev/null; then
                echo '-DCURSES_LOC="<ncurses.h>"'
-       elif [ -f /usr/include/ncursesw/curses.h ]; then
-               echo '-I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"'
+       elif [ -f /usr/local/include/ncursesw/curses.h ]; then
+               echo '-I/usr/local/include/ncursesw -DCURSES_LOC="<curses.h>"'
                echo ' -DNCURSES_WIDECHAR=1'
-       elif [ -f /usr/include/ncurses/ncurses.h ]; then
-               echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
-       elif [ -f /usr/include/ncurses/curses.h ]; then
-               echo '-I/usr/include/ncurses -DCURSES_LOC="<curses.h>"'
-       elif [ -f /usr/include/ncurses.h ]; then
+       elif [ -f /usr/local/include/ncurses/ncurses.h ]; then
+               echo '-I/usr/local/include/ncurses -DCURSES_LOC="<ncurses.h>"'
+       elif [ -f /usr/local/include/ncurses/curses.h ]; then
+               echo '-I/usr/local/include/ncurses -DCURSES_LOC="<curses.h>"'
+       elif [ -f /usr/local/include/ncurses.h ]; then
                echo '-DCURSES_LOC="<ncurses.h>"'
        else
                echo '-DCURSES_LOC="<curses.h>"'

Offline Mucke

  • Newbie
  • *
  • Posts: 31
Re: Community thread on building a RPi2 kernel
« Reply #22 on: March 29, 2015, 12:01:04 PM »
Thanks, the patches allow to run make menuconfig smoothly.

Now after kernel compilation I get a next problem as mkknlimg does not run. It simplereports that for grep -b the option -b does not exist. So it seems that grep needs an update or a replace. Is there a proper tcx extension?

Mucke

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11329
Re: Community thread on building a RPi2 kernel
« Reply #23 on: March 29, 2015, 02:01:58 PM »
Hi Mucke
Quote
So it seems that grep needs an update or a replace. Is there a proper tcx extension?
Maybe  grep.tcz ?

Offline Mucke

  • Newbie
  • *
  • Posts: 31
Re: Community thread on building a RPi2 kernel
« Reply #24 on: March 29, 2015, 02:09:59 PM »
Funny, I can bite myself
Honestly speaking I did not expect that there is a tcz option for grep itself, so I did not check. I was simply expecting to find it embedded in a package with other stuff without knowing what package it could be.
Thanks, I'll try it.

Mucke

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Community thread on building a RPi2 kernel
« Reply #25 on: March 29, 2015, 02:28:46 PM »
In the base grep is provided by BusyBox as all other basic utilities. BusyBox versions do not implement all features of the GNU equivalent, specific applications require the original version from the repo.
Béla
Ham Radio callsign: HA5DI

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