Re: cannot insmod sculld in ldd3

2017-03-12 Thread Ali Aminian
Hello, Freeman Zhang. copying 'Module.symvers' to sculld folder solved
the problem. Thank you, man.

Now I wonder what is the proper way to export "Module.symvers"
information to the outside so that modules that use it do not have to
copy that file into their directory. for example, what do pci and usb
buses do in this case?

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: cannot insmod sculld in ldd3

2017-03-11 Thread Ali Aminian
Hello Tobin C. Harding
I used the source you provided and still receive the same error.
also the output of "uname -a" is this. if that matters:
Linux ali-Z97-D3H 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15
UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


cannot insmod sculld in ldd3

2017-03-11 Thread Ali Aminian
Hello
I mean lddbus and sculld from the book "Linux Device Drivers, Third Edition".

Here I attached the codes.


sculld_lddbus.tar.gz
Description: GNU Zip compressed data
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


cannot insmod sculld in ldd3

2017-03-10 Thread Ali Aminian
Hello
when i try to insmod sculld insmod prints this error message:
insmod: ERROR: could not insert module ./sculld.ko: Invalid parameters

i checked dmsg and it says:
[12073.858764] sculld: no symbol version for unregister_ldd_driver
[12073.858767] sculld: Unknown symbol unregister_ldd_driver (err -22)
[12073.858780] sculld: no symbol version for register_ldd_device
[12073.858781] sculld: Unknown symbol register_ldd_device (err -22)
[12073.858789] sculld: no symbol version for unregister_ldd_device
[12073.858790] sculld: Unknown symbol unregister_ldd_device (err -22)
[12073.858794] sculld: no symbol version for register_ldd_driver
[12073.858795] sculld: Unknown symbol register_ldd_driver (err -22)

these functions are defined in lddbus and i have insmod lddbus.

can anyone tell me what is wrong.
thank you.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


question about nopage sample code

2017-02-22 Thread Ali Aminian
in ldd3 no page is implemented as the code posted below (page 428).
can someone explain why should we subtract vma->vm_start?

struct page *simple_vma_nopage(struct vm_area_struct *vma,
unsigned long address, int *type)
{
struct page *pageptr;
unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
unsigned long physaddr = address - vma->vm_start + offset;  // why
should we subtract vma->vm_start ?
unsigned long pageframe = physaddr >> PAGE_SHIFT;

if (!pfn_valid(pageframe))
return NOPAGE_SIGBUS;
pageptr = pfn_to_page(pageframe);
get_page(pageptr);
if (type)
*type = VM_FAULT_MINOR;
return pageptr;

}

thank you
Ali Aminian.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Why amdgpu pro does not work on kernel 4.10?

2017-02-12 Thread Ali Aminian
Hello again.
I just find out something weird.
1_ I typed make menuconfig
2_ I went to "general setup" and unchecked  "Automatically append
version information to the version string"
3_ recompiled and installed the new kernel

and suddenly all problems are disappeared.

I am wondering why this option causes problems.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Why amdgpu pro does not work on kernel 4.10?

2017-02-12 Thread Ali Aminian
Thank you for your response.
It does not work means:
1_ I have downloaded amdgpu-pro driver from AMD website and installed it.
2_ I have compiled linux kernel 4.10 and 4.9 with oldconfig.
3_ then I booted to new kernel and see login screen is distorted.
4_ I tried to login but it loops back to login screen again.
5_ Ctrl Alt F1-F6 results in a blank screen.
6_ I sshed into the system and check if amdgpu is loaded by "lsmod | grep amd"
and yes it is loaded.
7_ I uninstalled and installed amdgpu-pro again and i got dkms error
and it refered me to
/var/lib/dkms/amdgpu-pro/16.40-348864/build/make.log for further
details.

and here is the log file:

DKMS make.log for amdgpu-pro-14.40-348864 for kernel 4.10.0-rc7+ (x86_64)
Mon Feb 13 03:53:09 IRST 2017
  LD  /var/lib/dkms/amdgpu-pro/16.40-348864/build/built-in.o
  LD  /var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/built-in.o
  CC [M]  /var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/amdgpu_drv.o
In file included from
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/backport.h:8:0,
 from :0:
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/include/kcl/kcl_drm.h:68:72:
error: operator '+' has no right operand
   && LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) && (UBUNTU_BUILD_NUM < 36)) \
^
In file included from
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/backport.h:9:0,
 from :0:
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/include/kcl/kcl_ttm.h:
In function ‘kcl_ttm_bo_reserve’:
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/include/kcl/kcl_ttm.h:109:9:
error: too many arguments to function ‘ttm_bo_reserve’
  return ttm_bo_reserve(bo, interruptible, no_wait, false, ticket);
 ^
In file included from
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/include/kcl/kcl_ttm.h:6:0,
 from
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/backport.h:9,
 from :0:
./include/drm/ttm/ttm_bo_driver.h:875:19: note: declared here
 static inline int ttm_bo_reserve(struct ttm_buffer_object *bo,
   ^
In file included from
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/include/kcl/kcl_amdgpu.h:5:0,
 from
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../backport/backport.h:10,
 from :0:
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../amdgpu/amdgpu.h:
At top level:
/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/../amdgpu/amdgpu.h:37:25:
fatal error: linux/fence.h: No such file or directory
compilation terminated.
scripts/Makefile.build:294: recipe for target
'/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/amdgpu_drv.o'
failed
make[4]: *** 
[/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu/amdgpu_drv.o]
Error 1
scripts/Makefile.build:553: recipe for target
'/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu' failed
make[3]: *** [/var/lib/dkms/amdgpu-pro/16.40-348864/build/amd/amdgpu] Error 2
Makefile:1490: recipe for target
'_module_/var/lib/dkms/amdgpu-pro/16.40-348864/build' failed
make[2]: *** [_module_/var/lib/dkms/amdgpu-pro/16.40-348864/build] Error 2

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Why amdgpu pro does not work on kernel 4.10?

2017-02-12 Thread Ali Aminian
I was heard that amdgpu pro is user space driver and the kernel space
part (amdgpu) is merged into Linux kernel. And that means amdgpu pro
should work on all kernels above 4.3. But why amdgpu pro does not work
on kernel 4.10?

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Problem in loading Nouveau driver

2014-12-20 Thread Ali Aminian
Hello
when i use modprobe it gives me this:
modprobe: ERROR: ../libkmod/libkmod-module.c:809
kmod_module_insert_module() could not find module by name='off'
modprobe: ERROR: could not insert 'off': Function not implemented
modprobe: ERROR: ../libkmod/libkmod-module.c:809
kmod_module_insert_module() could not find module by name='off'

I guess at least i should once load the module manually and then try
using modprobe.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Problem in loading Nouveau driver

2014-12-19 Thread Ali Aminian
Hello
How should i enable Nouveau driver in a custom kernel. Here is how i
compiled my kernel:
1_make localmodconfig
2_make menuconfig and then went to: device drivers --  Graphics
support -- Nouveau Support
3_make
4_make modules_install
5_make install

and after booting the kernel i tried loading Nouveau by following commands:

1_insmod drm.ko
2_insmod drm_kms_helper.ko
3_insmod ttm.ko
4_insmod nouveau.ko

but in the last step it gives me Unknown symbol in module

here is the result of dmesg | tail after i tried insmod nouvea.ko:

drm: module verification failed: signature and/or  required key
missing - tainting kernel
[  212.330197] [drm] Initialized drm 1.1.0 20060810
[  255.336591] nouveau: Unknown symbol i2c_bit_add_bus (err 0)
[  255.336610] nouveau: Unknown symbol mxm_wmi_call_mxds (err 0)
[  255.336625] nouveau: Unknown symbol mxm_wmi_supported (err 0)
[  255.336644] nouveau: Unknown symbol i2c_bit_algo (err 0)
[  255.336719] nouveau: Unknown symbol wmi_evaluate_method (err 0)
[  255.336777] nouveau: Unknown symbol wmi_has_guid (err 0)
[  255.336904] nouveau: Unknown symbol mxm_wmi_call_mxmx (err 0)

I don't know in what step i did wrong.

thank you.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Problem using git

2014-06-11 Thread Ali Aminian
Hello
The kernel tar file from www.kernel.org is around 70MB.
but when i want to download the kernel using git it seems it's really huge.
git shows 1% for 25MB. Is it how it should be or am i missing something?
the git command i used is this: git clone
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies