WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Request: Recompile dCore-xenial to use more than 4 serial ports  (Read 3981 times)

Offline Mzem

  • Newbie
  • *
  • Posts: 7
Hello,

I hope I can request this here.

I was trying to recompile kernel for the dCore-xenial, but with no success. Can someone help me out.
I added
Code: [Select]
8250.nr_uarts=8 in to the extlinux.conf but the system don't recognize 4 new serial ports that were added.

I presume that I need to recomplie the kernel and add
Code: [Select]
CONFIG_SERIAL_8250_NR_UARTS=32
CONFIG_SERIAL_8250_RUNTIME_UARTS=8
to the new kernel.

I will appreciate a lot, if anyone can give me some link how to do it or maybe could someone recompile the kernel for me?

Best regards!

Offline Mzem

  • Newbie
  • *
  • Posts: 7
Re: Request: Recompile dCore-xenial to use more than 4 serial ports
« Reply #1 on: June 07, 2017, 04:31:57 AM »
I have solve this problem.

No I would like to make a module, but got this error:
Code: [Select]
make -C /lib/modules/`uname -r`/build SUBDIRS= modules
make[1]: *** /lib/modules/4.2.9-tinycore/build: No such file or directory.  Stop.
Makefile:15: recipe for target 'build' failed
make: *** [build] Error 2

I did a research and found out that I need
Code: [Select]
linux-kernel-sources-env but I couldn't imported in dCore. Is there another way to make it and than use it in dCore?

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Request: Recompile dCore-xenial to use more than 4 serial ports
« Reply #2 on: June 07, 2017, 06:25:46 AM »
Besides the package build-essential, you need the kernel source below if you are not already.  Also, start with the config that enables devtmpfs.  The README provides some basic info:

http://tinycorelinux.net/dCore/x86/import/src/kernel-4.2.9/linux-4.2.9-patched.tar.xz
http://tinycorelinux.net/dCore/x86/import/src/kernel-4.2.9/config-4.2.9-tinycore-devtmpfs
http://tinycorelinux.net/dCore/x86/import/src/kernel-4.2.9/README

The kernel for dCore-xenial was built on Tinycore 7.x, so you would need to build on that if you want to use kernel module packages in the dCore prebuilt repo or simply use the resulting module.  If you want to just use the resulting bzImage (vmlinuz) and modules you build then you can compile on dCore-xenial.

Starting with the 4.8.17-tinycore kernel found in dCore-stretch and dCore-zesty, it was built on dCore-stretch.  Future kernel updates will also be built on a dCore port, will be the most recent Debian one at that time.

also create the build and source symlinks:

mkdir /usr/src
ln -sf /path/to/linux-4.2.9-patched /usr/src/linux
ln -sf /usr/src/linux /lib/modules/4.2.9-tinycore/build
ln -sf /usr/src/linux /lib/modules/4.2.9-tinycore/source


Offline Mzem

  • Newbie
  • *
  • Posts: 7
Re: Request: Recompile dCore-xenial to use more than 4 serial ports
« Reply #3 on: June 12, 2017, 03:45:08 AM »
I followed your tips, but it didn't work. I got just the black screen at boot with no error.

I first create the build and source symlinks. Then extraxt linux-4.2.9-patched.txz. Then run make command in the directory of drivers which I want to have. Then I followed the README file. Got the bzImage and put it in extlinux.conf.
Did I do something wrong?

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Request: Recompile dCore-xenial to use more than 4 serial ports
« Reply #4 on: June 12, 2017, 04:57:02 PM »
I have built the module and uploaded it to the repo.  Built in Core 7.x as was the 4.2.9 kernel.  The name of it is:

adv17v35x-modules-4.2.9-tinycore

Please install it and test.  I don't have the hardware, but dmesg gives the below output when the module is loaded on dCore-xenial:

Code: [Select]

===============================================================
[  785.218734] Advantech PCIe (17V35x) Serial Device Drivers.
[  785.218736] Product V5.0.2.0 [2016/08/29]
               File V5.0.2.0
[  785.218738] Supports: RS232/422/485 auto detection and setting
[  785.218740] Devices:  ICOM: PCIE-1602, PCIE-1604
                               PCIE-1610, PCIE-1612
                               PCIE-1620, PCIE-1622
                               PCM_3612I
                               PCI-1602, PCI-1604
                               PCI-1610, PCI-1612
                               PCI-1620, PCI-1622
[  785.218742] Advantech Industrial Automation Group.
[  785.218744] ===============================================================

« Last Edit: June 12, 2017, 04:59:41 PM by Jason W »

Offline mzlj10

  • Newbie
  • *
  • Posts: 23
Re: Request: Recompile dCore-xenial to use more than 4 serial ports
« Reply #5 on: June 15, 2017, 07:40:21 AM »
Thank you very much!! You are the best!!
Ports are working now and for now everything seems to be ok.