I'm facing the exact problem mentioned in the following thread :-
Using DMA API in linux kernel but channel is never available
I'm not able to see any DMA channel in /sys/class/dma. The solution for this has been suggested as to disable the CONFIG_NET_DMA. But can you guys tell me how I can disable this particular thing? I checked in make menuconfig but got no idea how to do it.
Output from the search function in menuconfig (type /)
Symbol: NET_DMA [=y]
Type : boolean
Prompt: Network: TCP receive copy offload
Defined at drivers/dma
Kconfig:304
Depends on: DMADEVICES [=y] && DMA_ENGINE [=y] && NET [=y]
Location:
-> Device Drivers
-> DMA Engine support (DMADEVICES [=y])
So you enter ne menu Device Driver and then the sub-menu DMA Engine Support. So, press N on Network: TCP receive copy offload
I took this from a kernel 3.6, but you should be able to find it on any other version.
Probably you can also open the .config file and just remove the line CONFIG_NET_DMA; it should not have other dependent modules
Related
I'm working with a custom IMX8 board with a phy that is not supported by the Linux kernel (it's a clause 45 automotive oabr transceiver).
The phy is actually working, and its mdio bus and digital IO's are controlled with an userspace application.
To acheive this i had to bind it in the device tree with the fixed-link property as below.
...
port#0 {
reg = <0x00>;
label = "oabr";
phy-mode = "rgmii";
fixed-link {
speed = <1000>;
full-duplex;
pause;
asym-pause;
};
};
...
Now... the question is, i would like to change the speed of the phy from 1000 to 100, i'm able to do it if configure the phy AND change the device tree, but this implies a reboot of the device to load a new dts file.
Is there a way to get it working runtime?
Thanks a lot,
Marco
In order to add or load a device tree blob in runtime, the only way is to use Linux overlay.
But the problem is that NXP does not support it in its linux-imx kernel , you can see their post about it here.
If you don't make the change permanently to your main device tree file used for the image, I can advise you of doing this:
Create another dts (Ex: new-phy.dts) that includes the main dts and add your override node there
Add the new dtb name to your ${MACHINE}.conf KERNEL_DEVICETREE variable:
KERNEL_DEVICETREE += "freescale/new-phy.dtb"
Now you need to choose it once you boot from u-boot CLI, like:
u-boot> setenv fdt_file new-phy.dtb
u-boot> saveenv
u-boot> boot
Or, you can set it in your u-boot/configs/${MACHINE}_defconfig:
CONFIG_DEFAULT_FDT_FILE="new-phy.dtb"
Otherwise, you can try to add the overlay support for the kernel you are using.
Toradex has SOMs and EVKs based on IMX8M and they are working with overlays, you can take a look here and try to understand what they did to support it.
I'm currently using CentOS 6 as a KVM host and will need to customise the kernel to suppport vfio-pci.
Where can I get the spec file for kernel 3.10+ or is there a src.rpm I can download that'll support this feature?
Additionally, I'll also need to patch the kernel with acs override patch and i915 vga arbiter fixes as mentioned in this article: https://bbs.archlinux.org/viewtopic.php?id=162768
Here's a thread for the ACS override patch: https://lkml.org/lkml/2013/5/30/513
and for the i915 vga arbiter fix: https://lkml.org/lkml/2014/5/9/517
How to I apply these patches to the kernel? Thanks.
I've decided to move to Fedora as they're more focussed on leading and advancement. I think it's more suited for the system I'm building.
Anyway, if you still interested in building the kernel on CentOS system, here's some of the things you can do.
SRPM of the kernel can be downloaded from ELRepo via the following link: http://elrepo.org/people/ajb/tmp/
However, it doesn't include the source file. You'll need to download this separately at:
https://www.kernel.org/
For the patch files, it's the difference between the source and target files. Save these differences as files. e.g. I would save the code below as a file called doc_kernel_param_patch:
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 47bb23c..a60e6ad 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
## -2349,6 +2349,16 ## bytes respectively. Such letter suffixes can also be entirely omitted.
nomsi Do not use MSI for native PCIe PME signaling (this makes
all PCIe root ports use INTx for all services).
+ pcie_acs_override =
+ [PCIE] Override missing PCIe ACS support for:
+ downstream
+ All downstream ports - full ACS capabilties
+ multifunction
+ All multifunction devices - multifunction ACS subset
+ id:nnnn:nnnn
+ Specfic device - full ACS capabilities
+ Specified as vid:did (vendor/device ID) in hex
+
pcmv= [HW,PCMCIA] BadgePAD 4
`pd. [PARIDE]`
You'll also need to update the specs file to refer to the patch files created:
Patch0 doc_kernel_param_patch
You can now start the build process. For more information refer to the following post:
https://www.centos.org/forums/viewtopic.php?f=14&t=50512
OK, so I have this embedded kernel whose network card used to work fine with the LLTEMAC option. The new one with LL_TEMAC doesn't. I still see the code with LLTEMAC in the source, but not in the available option in the .config file:
$ ack-grep LLTEMAC
drivers/net/ethernet/xilinx/xilinx_lltemac/Makefile:10:obj-$(CONFIG_XILINX_LLTEMAC) := xilinx_temac.o
drivers/net/ethernet/xilinx/xilinx_lltemac/xlltemac_main.c:2: * Xilinx Ethernet: Linux driver for the XPS_LLTEMAC core.
drivers/net/ethernet/xilinx/xilinx_lltemac/xlltemac_main.c:452:#ifdef CONFIG_XILINX_LLTEMAC_MARVELL_88E1111_RGMII
...
include/linux/xilinx_devices.h:83:/* LLTEMAC platform data */
Is there a way to compile the kernel with this removed option ?
Simply adding CONFIG_XILINX_LLTEMAC=y CONFIG_XILINX_LLTEMAC_MARVELL_88E1111_GMII=y to the .config file does not do anything as the dislaimer states: # Automatically generated file; DO NOT EDIT.
Thanks.
Why not just update this individual driver to understand the new configuration option?
I edit the function netif_rx in the dev.c at the /net/core just to make a printk when a packet arrives.
I called "make" at the kernel's root directory but i don't know witch module was compiled. I need to update the old-module ir order to turn on the changes that i made.
If i want to see my changes i need to:
1-make at the kernel's root directory;
2- make modules;
3-make bzImage;
4- insert the new bzImage on the grub file;
5-Reboot;
I want to to access directly to the modulean update withou do all that things.
Could you help me.
Best regards,
Ricardo Ribeiro
If I get your goal correctly, the simplest you can do is to implement your own kernel module where you register a protocol handler for ETH_P_ALL with dev_add_pack(). This way you will receive all incoming packets for a particular device (if you also specify pt->dev) or all devices (if pt->dev is NULL).
I'm developing a device driver for embedded linux(ARM).
How can I compile the KO file generated as a part of the kernel,
in a way that the module will be loaded in boot ?
this is the first time I need to compile the driver into the kernel and not as a loadable module. so I'm not sure how to do it.
Thanks,
Ramon.
For your first question, I assume that you want to build your driver statically into the kernel image(not as a module). First, you select a directory in drivers directory where you want to put your driver files. Assume you want to put your files in drivers/char/. Copy your files into this directory. There will be a Kconfig file in the drivers/char/ directory, open it and add an entry like this in the before the endmenu.
config MYDRIVER
bool "This is a driver for something"
default n
help
This is a test driver.
Save the file and open Makefile in the same directory. Goto end of the file and add the following entry.
obj-$(CONFIG_MYDRIVER) += mydriver.o
That's it you have added the file to the kernel tree. Now, as usual, do make menuconfig and select MYDRIVER.
See this Kernel Compilation article for more info.
You need to build your device driver as a built-in. You can either edit your kernel .config file manually and change "=m" to "=y" for the CONFIG option that belongs to your module, or use make menuconfig to change <M> to <*> for your device driver.
before -> <M> Your Device Driver Name Here
after -> <*> Your Device Driver Name Here