dony71 Posted November 15, 2018 Posted November 15, 2018 I want to build driver module and follow this guideline https://docs.armbian.com/Developer-Guide_Build-Preparation/ However I notice it build driver for kernel 4.14.81 while my system has kernel 4.14.78 How to force compilation to make kernel 4.14.78 ? 0 Quote
Igor Posted November 15, 2018 Author Posted November 15, 2018 7 minutes ago, dony71 said: However I notice it build driver for kernel 4.14.81 while my system has kernel 4.14.78 How to force compilation to make kernel 4.14.78 ? Just make a new kernel with a module that you need and install it over the current one. This is simple and fairly safe in this case. 0 Quote
dony71 Posted November 15, 2018 Posted November 15, 2018 Just now, Igor said: Just make a new kernel with a module that you need and install it over the current one. This is simple and fairly safe in this case. the problem is new kernel doesn't work which means i need serial console port which i don't have now it will be more work to do rather than compiling a module fit to my current kernel 0 Quote
Igor Posted November 15, 2018 Author Posted November 15, 2018 1 minute ago, dony71 said: the problem is new kernel doesn't work which means i need serial console port which i don't have now it will be more work to do rather than compiling a module fit to my current kernel Kernel breakage from 4.14.78 - 4.14.81 is almost impossible. You build new kernel, copy image and dtb package to the board and install them with dpkg -i *.deb. It must work. I do this every day. If you want to compile some particular version: KERNELBRANCH="tag:v4.14.78" 0 Quote
dony71 Posted November 15, 2018 Posted November 15, 2018 3 minutes ago, Igor said: Kernel breakage from 4.14.78 - 4.14.81 is almost impossible. You build new kernel, copy image and dtb package to the board and install them with dpkg -i *.deb. It must work. I do this every day. If you want to compile some particular version: KERNELBRANCH="tag:v4.14.78" Thanks, for now I will try KERNELBRANCH method I will debug later why kernel broken after I get serial console Also I have question about add driver module Current mainline doesn't include snd-soc-pcm5102a driver so I need to modify .config to add this However everytime I build kernel using KERNEL_KEEP_CONFIG=no, it's always overwritten Anything I'm missing? 0 Quote
Igor Posted November 15, 2018 Author Posted November 15, 2018 2 minutes ago, dony71 said: Anything I'm missing? Spending some time with the documentation: https://docs.armbian.com/Developer-Guide_User-Configurations/ 0 Quote
dony71 Posted November 15, 2018 Posted November 15, 2018 8 minutes ago, Igor said: Spending some time with the documentation: https://docs.armbian.com/Developer-Guide_User-Configurations/ already spend 3 days now with kernel compilation maybe i'm not really good of doing this, but will keep learning though slow 0 Quote
dony71 Posted November 15, 2018 Posted November 15, 2018 8 minutes ago, Igor said: Spending some time with the documentation: https://docs.armbian.com/Developer-Guide_User-Configurations/ already spend 3 days now with kernel compilation maybe i'm not really good of doing this, but will keep learning though slow 0 Quote
Igor Posted November 15, 2018 Author Posted November 15, 2018 24 minutes ago, dony71 said: already spend 3 days now with kernel compilation We spent several years to learn and several years to make this system https://docs.armbian.com/Developer-Guide_User-Configurations/#user-provided-kernel-config 0 Quote
dony71 Posted November 15, 2018 Posted November 15, 2018 1 hour ago, Igor said: We spent several years to learn and several years to make this system https://docs.armbian.com/Developer-Guide_User-Configurations/#user-provided-kernel-config I try put userpatches/linux-sunxi-next.config and it seems user kernel config is being used but there is no snd-soc-pcm5102a.ko Also try KERNELBRANCH, but still using 4.14.81 sudo ./compile.sh KERNELBRANCH='tag:v4.14.78' KERNEL_KEEP_CONFIG=no KERNEL_ONLY=yes KERNEL_CONFIGURE=no BUILD_DESKTOP=no BOARD=bananapim2plus BRANCH=next RELEASE=stretch Attached compile log and linux-sunxi-next.config I just add "CONFIG_SND_SOC_PCM5102A=m" in config and copy "pcm5102a.c" in "linux-4.14.y/sound/soc/codecs" linux-sunxi-next.config output.log 0 Quote
dony71 Posted November 16, 2018 Posted November 16, 2018 3 hours ago, dony71 said: I try put userpatches/linux-sunxi-next.config and it seems user kernel config is being used but there is no snd-soc-pcm5102a.ko Also try KERNELBRANCH, but still using 4.14.81 sudo ./compile.sh KERNELBRANCH='tag:v4.14.78' KERNEL_KEEP_CONFIG=no KERNEL_ONLY=yes KERNEL_CONFIGURE=no BUILD_DESKTOP=no BOARD=bananapim2plus BRANCH=next RELEASE=stretch Attached compile log and linux-sunxi-next.config I just add "CONFIG_SND_SOC_PCM5102A=m" in config and copy "pcm5102a.c" in "linux-4.14.y/sound/soc/codecs" linux-sunxi-next.config output.log I put KERNELBRANCH='tag:v4.14.78' in userpatches/lib.config and now can generate v.4.14.78 kernel userpatches/linux-sunxi-next.config still problem, "CONFIG_SND_SOC_PCM5102A=m" not being executed 0 Quote
Igor Posted November 16, 2018 Author Posted November 16, 2018 6 hours ago, dony71 said: userpatches/linux-sunxi-next.config still problem, "CONFIG_SND_SOC_PCM5102A=m" not being executed This could mean that there are no drivers for it in the kernel (enabling non existing support is pointless. it must exists to be enabled). Or not solved dependencies (something that needs to be enabled before to enable this). 0 Quote
martinayotte Posted November 16, 2018 Posted November 16, 2018 12 hours ago, Igor said: This could mean that there are no drivers for it in the kernel I didn't check under 4.14.y, but under 4.19.y it is present there : cache/sources/linux-mainline/linux-4.19.y/sound/soc/codecs/Kconfig 18 hours ago, dony71 said: "CONFIG_SND_SOC_PCM5102A=m" not being executed Check if it present under cache/sources/linux-mainline/linux-4.14.y/sound/soc/codecs/Kconfig 0 Quote
dony71 Posted November 16, 2018 Posted November 16, 2018 25 minutes ago, martinayotte said: I didn't check under 4.14.y, but under 4.19.y it is present there : cache/sources/linux-mainline/linux-4.19.y/sound/soc/codecs/Kconfig Check if it present under cache/sources/linux-mainline/linux-4.14.y/sound/soc/codecs/Kconfig It's not there and I have to add it However while running ./compile.sh, this Kconfig will be overwritten from original source since it's being modified To get "pcm5102a.c" compiled successfully, I have to modify and copy this Kconfig on-the-fly during compilation Maybe you have better idea how to avoid compile script overwrite this file? 0 Quote
martinayotte Posted November 16, 2018 Posted November 16, 2018 1 minute ago, dony71 said: It's not there and I have to add it I think you misunderstood the way Kconfig works ... Kconfig is a list of available options, you should not edit it unless you are adding new drivers, in which can you would need to create a patch. Check if this file exist : cache/sources/linux-mainline/linux-4.14.y/sound/soc/codecs/pcm5102a.c If it doesn't exist, then, there is no way to have that driver under 4.14.y. If it is exist, then you probably messed up about the way to add CONFIG_SND_SOC_PCM5102A in your build... 0 Quote
dony71 Posted November 16, 2018 Posted November 16, 2018 pcm5102a.c is not exist but I can get it from sun8i-fay branch and copy it manually in directory. I know this is not proper way to add driver in the kernel but I don't know how is the proper way? 0 Quote
martinayotte Posted November 16, 2018 Posted November 16, 2018 10 minutes ago, dony71 said: pcm5102a.c is not exist but I can get it from sun8i-fay branch and copy it manually in directory. I know this is not proper way to add driver in the kernel but I don't know how is the proper way? Then, you will need to edit Kconfig and Makefile, then create a patch for those changes, and placed the patch under userpatches/kernel/sunxi-next/ . 0 Quote
chwe Posted November 16, 2018 Posted November 16, 2018 I assume you work from a ubuntu 18.04 machine (no docker or whatsoever): in config-default.conf CREATE_PATCHES="yes" sudo ./compile.sh the menu asks you if you want to make changes to the kernelconfig --> yes as well it then prompts you to make changes in the sources.. then you put in your new module, check that it is present in the makefile as well and that kconfig fits. See gpiomem from rk as an example: https://github.com/armbian/build/blob/master/patch/kernel/rockchip-default/261_gpiomem_driver.patch if there are dependencies in kconfig, check if they're available... otherwise you've to patch them as well. e.g. here's an example with dependencies: https://github.com/armbian/build/blob/a979430e9b2b9b11f858d751bcb9b98be760ab3b/patch/kernel/sun8i-default/0011-gpu-drm-Add-Mali-DX910-SW-99002-r2p4-02rel1.patch#L42 after patching, the new drives should show up in menueconfig and you can just activate them... You don't have to mess with a config file.. a proper new one will be generated. Don't try to build config files manually as long as you're not really experienced.. chances are high that you get fooled.. --> we have a great script which does it properly.. In case you messed with the cached kernel besides a generate patch session.. In can be that the patch you'll generate isn't properly.. So just wipe out the kernel and start from a freshly downloaded one. The buildscript sometimes doesn't revert new files which didn't exist before.. add sources to clean level or just wipe out the mainline kernel. 0 Quote
Heisath Posted November 17, 2018 Posted November 17, 2018 I used this as a patch. That enables building of the pcm5102a module. Put it in userpatches/kernel/yourkernel I got the feeling that Kconfig just doesnt show entries without a text in menuconfig. diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index c367d110..87c6ae4c 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -680,7 +680,7 @@ config SND_SOC_PCM3168A_SPI select REGMAP_SPI config SND_SOC_PCM5102A - tristate + tristate "Texas Instruments PCM5102A CODEC - I2S" config SND_SOC_PCM512x tristate 0 Quote
SK_D Posted November 19, 2018 Posted November 19, 2018 Hello, which Folder does compile.sh use for storage? My build system has two partitions and my "/" is running full when building armbian. Thanks Stefan 0 Quote
Igor Posted November 19, 2018 Author Posted November 19, 2018 4 hours ago, SK_D said: Hello, which Folder does compile.sh use for storage? My build system has two partitions and my "/" is running full when building armbian. Thanks Stefan It creates subdirectory cache (sources, tools, ..) and output (debs, images, debug, ...) 0 Quote
SK_D Posted November 19, 2018 Posted November 19, 2018 15 minutes ago, Igor said: It creates subdirectory cache (sources, tools, ..) and output (debs, images, debug, ...) Both located under git repo? 0 Quote
Igor Posted November 19, 2018 Author Posted November 19, 2018 19 minutes ago, SK_D said: Both located under git repo? Of course. Have you try by the book 1st?: apt-get -y install git git clone https://github.com/armbian/build cd build ./compile.sh 0 Quote
Evgeny Dmitrichenko Posted November 19, 2018 Posted November 19, 2018 Hello I use compile.sh and customize-image.sh to make my own custom image and every think is all right and work great. But now I need to set hardware config item "i2c0" = true as default (like here - in armbina-config) I thought that I will select this item by "show a kernel configuration menu before compilation", but installation process dose not show me "Toggle hardware config" how can I do it in my customize-image.sh (set item "i2c0" = true)? 0 Quote
SK_D Posted November 19, 2018 Posted November 19, 2018 39 minutes ago, Igor said: Of course. Have you try by the book 1st?: apt-get -y install git git clone https://github.com/armbian/build cd build ./compile.sh Of course I do this way. I'll lock at home. 0 Quote
minhhieuec Posted November 28, 2018 Posted November 28, 2018 On 5/23/2015 at 2:06 AM, Igor said: Preparation Supported build environment is Ubuntu Bionic 18.04 x64 (minimal iso image). a guest inside a VirtualBox or other virtualization software, a guest managed by Vagrant . This uses Virtualbox (as above) but does so in an easily repeatable way. Please check the Armbian with Vagrant README for a quick start HOWTO, inside a Docker , systemd-nspawn or other container environments (example), running natively on a dedicated PC or a server (not recommended), 20GB disk space or more and 2GB RAM or more available for the VM, container or native OS, superuser rights (configured sudo or root access). Execution apt-get -y install git git clone https://github.com/armbian/build cd build ./compile.sh This will download all necessary sources, execute compilation and/or build a boot-able image. Most of things will be cached so next run will be extremely faster! Real time examples: Documentation Hi Igor, I'm working on Orange Pi Zero. I created .deb file (u-boot, image, source) like you (in video 1). But i don't know how to run script to compile for SD card(in video 2). Please tell me how to run this script! I want to create the .img file for write to my SD card. Thanks! 0 Quote
vlad59 Posted November 28, 2018 Posted November 28, 2018 Check first 3 seconds of the first video : you can choose to generate a full image 0 Quote
dony71 Posted December 7, 2018 Posted December 7, 2018 On 11/15/2018 at 11:56 AM, dony71 said: already spend 3 days now with kernel compilation maybe i'm not really good of doing this, but will keep learning though slow @Igor where to put u-boot .config for userpatches? 0 Quote
Igor Posted December 7, 2018 Author Posted December 7, 2018 3 hours ago, dony71 said: where to put u-boot .config for userpatches? That feature is not supported. You need to use u-boot patch to patch the u-boot board config file. 0 Quote
Guest Posted March 11, 2019 Posted March 11, 2019 I called compile.sh multiple times. But, now it no longer shows the menu anymore, instead it downloads multiple old toolchains (4.8) although a newer toolchain is in PATH. I deleted the cache dir, but this still does not bring up the menu. What's broken here? I think I need to start over from scratch again... :-) 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.