WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how can i use lldpctl and lldpd and lldpcli command in tincore version14  (Read 1904 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14958
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #30 on: February 20, 2025, 10:00:56 AM »
Thanks Rich - I've rebooted since then and it takes 2h+ to prepare the kernel source on my ancient laptop, so I'll wait to see how @yimding gets on with the tc-14.x kernel source...

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11860
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #31 on: February 20, 2025, 10:11:16 AM »
Hi Juanito
... the tc-14.x kernel source...
Ah, I had checked the TC16 (6.12) source. I just checked the TC14 (6.1.2) source
and the same holds true for it.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14958
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #32 on: February 20, 2025, 10:41:16 AM »
I guess if it's changed here things should work:
Code: [Select]
grep -r no_llseek /usr/src/ice-1.16.3
/usr/src/ice-1.16.3/src/kcompat_gnss.c: .llseek         = no_llseek,

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11860
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #33 on: February 20, 2025, 11:07:36 AM »
Hi Juanito
Yes, changing that  no_llseek  to  noop_llseek  should fix that issue.

Offline yimding

  • Newbie
  • *
  • Posts: 21
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #34 on: February 20, 2025, 01:31:02 PM »
Hi Rich
Hi i had compiled the ice driver, and i get  a ice.ko file, but i can not use it, how can i do?
Code: [Select]
tc@box:/lib/modules/6.1.2-tinycore64/kernel/drivers/net/ethernet/intel/ice$ ls
ice.ko
tc@box:/lib/modules/6.1.2-tinycore64/kernel/drivers/net/ethernet/intel/ice$ sudo modprobe ice
modprobe: can't load module ice (kernel/drivers/net/ethernet/intel/ice/ice.ko.gz): No such file or directory
tc@box:/lib/modules/6.1.2-tinycore64/kernel/drivers/net/ethernet/intel/ice$

sudo gzip ice.ko
tc@box:/lib/modules/6.1.2-tinycore64/kernel/drivers/net/ethernet/intel/ice$ ls
ice.ko.gz
tc@box:/lib/modules/6.1.2-tinycore64/kernel/drivers/net/ethernet/intel/ice$ sudo modprobe ice
modprobe: can't load module ice (kernel/drivers/net/ethernet/intel/ice/ice.ko.gz): invalid module format

Offline yimding

  • Newbie
  • *
  • Posts: 21
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #35 on: February 20, 2025, 01:42:31 PM »
I install compiletc perl5 ncursesw-dev bc glibc_apps elfutils-dev openssl-dev tce-load, and such other tcz packages
Code: [Select]
tce-status -i
acl
attr
bash
bc
binutils
bison
bzip2
bzip2-dev
bzip2-lib
compiletc
diffutils
e2fsprogs_base-dev
elfutils
elfutils-dev
file
findutils
flex
gawk
gcc
gcc_base-dev
gcc_libs
gcc_libs-dev
gettext
glibc_add_lib
glibc_apps
glibc_base-dev
gmp
grep
isl
liblzma
liblzma-dev
libzstd
linux-6.1_api_headers
m4
make
mpc
mpfr
ncursesw
ncursesw-dev
openssh
openssl
openssl-dev
patch
perl5
pkg-config
readline
rsync
sed
util-linux_base-dev
zlib_base-dev

download linux-6.1.2 kernel code from Linux community, get ice code from intel

Code: [Select]
# cd /usr/src/linux-6.1.2
# make menuconfig
# make prepare
# make modules_prepare
# make SUBDIRS=scripts/mod
# ln -s /usr/src/linux-6.1.2 /lib/modules/6.1.2-tinycore64/build
# cd ~/ice-1.16.3/src
# make

tc@box:~/ice-1.16.3/src$ sudo make
mktemp: Invalid argument
/home/tc/ice-1.16.3/src/kcompat-generator.sh:496: failed with rc: 1
/home/tc/ice-1.16.3/src/kcompat-generator.sh:496: failed with rc: 1
make  ccflags-y="-std=gnu11 -Wno-nested-externs " -C "/lib/modules/6.1.2-tinycore64/build" CONFIG_=m CONFIG_MODULE_SIG=n CONFIG_MODULE_SIG_ALL= M="/home/tc/ice-1.16.3/src"   NEED_AUX_BUS="0"  modules
make[1]: Entering directory '/usr/src/linux-6.1.2'
mktemp: Invalid argument
realpath: /usr/src/linux-6.1.2//home/tc/ice-1.16.3/src/kcompat-generator.sh: No such file or directory
:496: failed with rc: 1
realpath: /usr/src/linux-6.1.2//home/tc/ice-1.16.3/src/kcompat-generator.sh: No such file or directory
:496: failed with rc: 1
  CC [M]  /home/tc/ice-1.16.3/src/ice_main.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_controlq.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_common.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_nvm.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_switch.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_sched.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_base.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_lib.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_txrx_lib.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_txrx.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_fltr.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_irq.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_pf_vsi_vlan_ops.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_vsi_vlan_ops.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_vsi_vlan_lib.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_hwmon.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_tc_lib.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_fdir.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_ethtool_fdir.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_acl_main.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_acl.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_acl_ctrl.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_vlan_mode.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_ddp.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_flex_pipe.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_flow.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_parser.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_imem.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_pg_cam.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_metainit.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_bst_tcam.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_ptype_mk.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_mk_grp.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_proto_grp.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_flg_rd.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_xlt_kb.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_parser_rt.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_aux_support.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_lag.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_cpi.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_ieps.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_ieps_lm.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_gnss.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_ethtool.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_devlink.o
  CC [M]  /home/tc/ice-1.16.3/src/devlink/ice_devlink_health.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_fw_update.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_eswitch.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_repr.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_idc.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_debugfs.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_fwlog.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_ptp.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_ptp_hw.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_tspll.o
  CC [M]  /home/tc/ice-1.16.3/src/ice_arfs.o
  CC [M]  /home/tc/ice-1.16.3/src/kcompat.o
  CC [M]  /home/tc/ice-1.16.3/src/kcompat_gnss.o
  LD [M]  /home/tc/ice-1.16.3/src/ice.o
mktemp: Invalid argument
realpath: /usr/src/linux-6.1.2//home/tc/ice-1.16.3/src/kcompat-generator.sh: No such file or directory
:496: failed with rc: 1
realpath: /usr/src/linux-6.1.2//home/tc/ice-1.16.3/src/kcompat-generator.sh: No such file or directory
:496: failed with rc: 1
  MODPOST /home/tc/ice-1.16.3/src/Module.symvers
  CC [M]  /home/tc/ice-1.16.3/src/ice.mod.o
  LD [M]  /home/tc/ice-1.16.3/src/ice.ko
make[1]: Leaving directory '/usr/src/linux-6.1.2'
tc@box:~/ice-1.16.3/src$ echo $?
0

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11860
Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
« Reply #36 on: February 20, 2025, 02:16:56 PM »
Hi yimding
Try this:
Code: [Select]
sudo /sbin/depmod -a
sudo modprobe ice

Offline yimding

  • Newbie
  • *
  • Posts: 21
Hi Rich
Hi Juanito
@Juanito i follow your step and rebuild an ice.ko version 1.16.3 again

use ice.ko that compile by myself to replace the orginal ice ko  then load it

Code: [Select]
#cp ice.ko /lib/modules/6.1.2-tinycore64/kernel/drivers/net/ethernet/intel/ice/.
#mv ice.ko.gz ~/ice.ko.gz.bak
#cd /lib/modules/6.1.2-tinycore64/kernel/drivers/net/ethernet/intel/ice/
#gzip ice.ko
#depmod -a
# modprobe -r ice
# modprobe ice
# lldpctl eth0
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface:    eth0, via: LLDP, RID: 1, Time: 0 day, 00:17:52
  Chassis:
    ChassisID:    xxxx
    SysName:      xxxx
    SysDescr:     xxxx
    MgmtIP:       xxxx
    MgmtIface:    83886080
    Capability:   Bridge, on
    Capability:   Router, on
  Port:
    PortID:       xxx
    PortDescr:    xxxx
    TTL:          xxx
  VLAN:         xxx
  Unknown TLVs:
    TLV:        xxx
-------------------------------------------------------------------------------

So thanks for your help @Rich @Juanito
and i think ice driver in tinycore 14 for e810 xxv has some bug

Offline yimding

  • Newbie
  • *
  • Posts: 21
Thanks Rich - I've rebooted since then and it takes 2h+ to prepare the kernel source on my ancient laptop, so I'll wait to see how @yimding gets on with the tc-14.x kernel source...
i follow your step to compile ice driver
The compilation was completed smoothly without encountering any issues related to "no_llseek"