Guest Posted March 7, 2017 Posted March 7, 2017 Why not to add lirc_gpio support to NanoPiNeo Air ? Even if it is not planned, I try to use this patch :https://github.com/igorpecovnik/lib/blob/master/patch/kernel/sun7i-default/0050-lircgpio_and_raw.patch Kernel compilation is ok for me : apt-get -y install git git clonehttps://github.com/igorpecovnik/lib --depth 1 cp lib/compile.sh . ./compile.sh I try to apply this patch now : ~/crosscompile/lib/patch/kernel/sun7i-default/0050-lircgpio_and_raw.patch I expected to have a lircgpio.ko somewhere, but nothing. Is there a procedure or a tutorial or some help to build a driver ?
jernej Posted March 7, 2017 Posted March 7, 2017 You didn't compile the drivers, because you didn't enable them in kernel config file. You need this: CONFIG_LIRC_GPIO=y CONFIG_LIRC_SUNXI_RAW=y
Guest Posted March 8, 2017 Posted March 8, 2017 It is written that I can't modify these kernel config files : lib/config/kernel/linux-sun4i-default.config lib/config/kernel/linux-sun7i-default.config # # Automatically generated file; DO NOT EDIT. # Linux/arm 3.4.113 Kernel Configuration # I modified these files anyway but there is still no lirc_gpio.ko
Guest Posted March 8, 2017 Posted March 8, 2017 When KERNEL_CONFIGURE="yes" I can set options : Pressing <Y> includes, <N> excludes, <M> modularizes Press <Esc><Esc> to exit, <?> for Help, </> for Search. Legend: [*] built-in [ ] excluded <M> module < > module capable There is no lirc_gpio config near <M> "SUNXI IR remote control" What must be do ?
jernej Posted March 8, 2017 Posted March 8, 2017 This line gives you dependencies, which must be also enabled in order to be able to compile that (assuming patch is compatible with kernel source).
Guest Posted March 8, 2017 Posted March 8, 2017 Yes this patch is here : ~/crosscompile/lib/patch/kernel/sun7i-default/0050-lircgpio_and_raw.patch How can can it be applied ?
jernej Posted March 8, 2017 Posted March 8, 2017 In first post you said you applied the patch, e.g. copied it in right folder. What I linked is specific line in that patch (line 11, orange color if you use link above), which tells you what you have to enable before you can enable new functionality, e.g. on which kernel functionalities driver depends.
Guest Posted March 8, 2017 Posted March 8, 2017 No, I said I try. I asked "Is there a procedure or a tutorial or some help to build a driver ?" Now I see the patch is applied : [ o.k. ] Looking for user patches in [ userpatches/kernel/sun8i-default ] There is stil no *.ko What must be do ?
jernej Posted March 8, 2017 Posted March 8, 2017 uh, sorry, for .ko you must set to "m", not "y". Former will produce module and the later it will embed driver into kernel.
Guest Posted March 8, 2017 Posted March 8, 2017 Still no lirc_gpio.ko into the debs packages generated. Maybe I forgot something [ o.k. ] ... [c] 0050-lircgpio_and_raw.patch [ succeeded ]
jernej Posted March 8, 2017 Posted March 8, 2017 Just check if .config file in kernel's build folder has all required symbols enabled.
Guest Posted March 9, 2017 Posted March 9, 2017 @jernej I don't really underestand what you say... What must be do ? apt-get -y install git git clonehttps://github.com/igorpecovnik/lib --depth 1 cp lib/compile.sh . cp lib/patch/kernel/sun7i-default/0050-lircgpio_and_raw.patch userpatches/kernel/ Add CONFIG_LIRC_GPIO=y CONFIG_LIRC_SUNXI_RAW=y to output/linux-sun8i-default.config ./compile.sh (without kernel configure in order to not delete config file) What else
jernej Posted March 9, 2017 Posted March 9, 2017 Please excuse my rant: Quote Most of the time, when I don't give the direct answer on this forum (and elsewhere), it is done in a good faith that my answer will serve as a pointer where the answer could be found and that the person will learn in the process something about that particular topic. This is also the reason why I usually don't provide the binaries or at least not very often. It seems that this often backfire and I'm accussed that I'm not being clear enough or even that I ask too much question (?!, once). Maybe I'm just too optimistic and my image is distorted after having reverse engineering as a hobby for more than 10 years, where every clue is golden. Now I will deviate from my standard behaviour and I will provide step by step overview: 1. Figure out which symbols needs to be enabled: line 35 and 36 tells you that you have to add this to the config file: CONFIG_LIRC_GPIO=m CONFIG_LIRC_SUNXI_RAW=m Note that "m" means as a module, which will produce two .ko files. 2. Figure out if dependencies are satisfied: line 11 and line 19 gives you following dependencies: LIRC GPIOLIB Quick search trought sun8i kernel config file suggest that those options are already enabled here and here. 3. Start compiling and hope for the best. 4. When finished, search for lirc_gpio.ko and sunxi-lirc.ko. Note 1: You must set "m" or else driver will be embedded in kernel binary and there will not be separate .ko files. Note 2: I'm not completely sure how armbian build system handles the files. It is much better to use configuration through user interface as you already tried. Those options should be under "drivers/staging/media" menu. Every link is a pointer where I found the information and I didn't include exhaustive explanation of my last suggestion, because it is just check if everything went as planned.
zador.blood.stained Posted March 9, 2017 Posted March 9, 2017 11 hours ago, sirob said: Add CONFIG_LIRC_GPIO=y CONFIG_LIRC_SUNXI_RAW=y to output/linux-sun8i-default.config And please check the build script documentation again about preferred method of changing the kernel config and proper file path for the customized user provided config.
Guest Posted March 9, 2017 Posted March 9, 2017 I didn't saw building submenu in https://docs.armbian.com/ I clicked "Building Armbian" and I thought it was ended, the submenu is hidden after click ...... FFF Thank you Zador, haha @Jernej I don't think people wants to reverse your engineering as a hobby a mind far away from open source that we all use, do not waste your time to lose to others
Guest Posted March 10, 2017 Posted March 10, 2017 No because, I have some problems compiling kernel : [ o.k. ] This script will try to update Already up-to-date. Already on 'master' Your branch is up-to-date with 'origin/master'. /root/crosscompile/lib/general.sh: line 499: syntax error near unexpected token `(' /root/crosscompile/lib/general.sh: line 499: ` grep -q i386 <(dpkg --print-foreign-architectures) || dpkg --add-architecture i386' Yesterday it was compiling well..... I opened an issue, I hope I did a right thing : https://github.com/igorpecovnik/lib/issues
Guest Posted March 10, 2017 Posted March 10, 2017 It's ok now for me I don't know why, without update Maybe a github problem, I don't know.
Recommended Posts