This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM8168 kernel modules compile and insert



hi,

anyone to help!

I was working on the custom board based on DM 8168, and I saw many problem with ko files when I boot from SD card.

Firstly, I don't know how to compile the ko files. Finnally, I found the command as "make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules". And I can get some ko files as VPSS and so on which I don't need. So my first question is that is this the way to get some ko files related to my kernel Image? If the ko files is not generated from this way, do they work with a uncorrelated kernel?

Secondly, I want to insmod g_ether.ko and g_zero.ko to my system. But they can not be generated from the way in the first question. I have download the two files from the internet which don't work well. So who can tell me how to do with this?

  • Hello,

    host > make distclean
    host > make CROSS_COMPILE=/home/users/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- ARCH=arm ti8168_evm_defconfig
    host > make CROSS_COMPILE=/home/users/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- ARCH=arm menuconfig
    host > make CROSS_COMPILE=/home/users/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- ARCH=arm uImage
    host > make ARCH=arm CROSS_COMPILE=/home/users/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- modules
    host > make install

    Some of the modules could be add/remove by menuconfig.

    BR
    Margarita
  • Thank you for your reply,
    With the steps you have given, I use the uImage generated from step make *** uImage in the directory /arch/arm/boot. I put the uImage to my SD card for booting. Is it right?
    What should I do with the ko files generated from the step make *** modules, put in the rootfs on the SD card?or what? And what's the function of the step of make install? Should it generate the file of uImage? Should I use the uImage for booting?

    What about the second question above. How should I do with the g_ether.ko and g_zero.ko files which wouldn't be generated from the step of make *** modules.
  • Hello,

    Fire Lord said:
    With the steps you have given, I use the uImage generated from step make *** uImage in the directory /arch/arm/boot. I put the uImage to my SD card for booting. Is it right?

    You cp it to the boot partition of sd card.

    Fire Lord said:
    What should I do with the ko files generated from the step make *** modules, put in the rootfs on the SD card?or what? And what's the function of the step of make install? Should it generate the file of uImage? Should I use the uImage for booting?

    When you execute make install the new modules and uimage will be places in folder with name install. In the install folder you could see boot folder with the new kernel image. You could see lib and usr which are parts of the ROOTFS.

    Fire Lord said:
    What about the second question above. How should I do with the g_ether.ko and g_zero.ko files which wouldn't be generated from the step of make *** modules.

    Some of the modules could be add/remove by menuconfig and the kernel should be rebuild.

    BR
    Margarita

  • hi,
    When I use the command "make install", it will come out many choices. I have no idea about what to choose. So do you have a guider about the command "make install"?

    (I am reediting this reply)

    After few tries, I found that "make install" just put something to the directory of install and do nothing else. Is it right?

    So I can get the ko files and put them to the right place without the command of "make install"?

    Another question is that I can choose "y" in the menuconfig and then I neddn't to add the files to the right folder. Right?

  • Hello,

    Fire Lord said:

    After few tries, I found that "make install" just put something to the directory of install and do nothing else. Is it right?

    As I said it will create a folder and there you could find the uimage, modules etc.

    Fire Lord said:
    So I can get the ko files and put them to the right place without the command of "make install"?

    Yes but it is more easy to use make install.

    Fire Lord said:
    Another question is that I can choose "y" in the menuconfig and then I neddn't to add the files to the right folder. Right?

    Here is the difference between "y", "m", "n":

    "In Linux kernel config file, y,n and m stands for yes, no and module respectively. Most functionality in the Linux kernel can either be compiled in (y) or left out (n), and most of it can also be compiled as a loadable module(m). This makes sense when you don't know exactly if you will need some feature in the future. If you compile it as module and it turns out that it is needed, it will work, but until then it will not bloat the kernel."

    BR
    Margarita

  • hi,

    Thank you for reply.

    I know that it is more easy to use make install, But after i run the command make install, there comes many choice to choose. Here is the pictures which just one piece of them.

  • Hello,

    This is not what I see on my side.

    Please follow this steps if you need to rebuild the kernel:
    host > make CROSS_COMPILE=/home/users/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- ARCH=arm ti8168_evm_defconfig
    host > make CROSS_COMPILE=/home/users/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- ARCH=arm menuconfig
    host > make CROSS_COMPILE=/home/users/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- ARCH=arm uImage
    host > make ARCH=arm CROSS_COMPILE=/home/users/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- modules
    host > make install

    BR
    Margarita
  • hi,
    I have tried many times even with new kernel which is get from the new installed ezsdk. But it always came out the complex choices. Do you know what's the problem? Why in your side it's OK but my side isn't.
  • Hello,

    Could you confirm:

    1. cd in the ezsdk/board-support/psp folder?

    2. make distclean

    3. make CROSS_COMPILE=/home/users/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-  ARCH=arm ti8168_evm_defconfig

    ...

    Are you have installed codesourcery?

    If yes, you should specify the path to it.

    Could you provide  all the steps that you are executing?

    Best Regards,

    Margarita

  • hi,

    I have installed the codesourcery. And I have add the path to the /etc/profile. As showing below:

    And here is the steps I am using:

    make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean

    make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8168_evm_defconfig

    make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm menuconfig

    make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage

    make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules

    make install(In the first five steps, they are all good. But whne I did this step, there comes many choices like I post in the earlier post.)

    for help. Thank you.

  • Hello,

    I will check.

    I will let you know.

    Best Regards,
    Margarita
  • Hello,

    Could you try to execute "make install" in the ezsdk main folder.

    BR
    Margarita