Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: yimding on August 08, 2024, 06:02:37 AM

Title: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding on August 08, 2024, 06:02:37 AM
hello
i need to use lldpctl and lldpcli and lldpd command in my tinycore system, but i can not see tcz package in http://tinycorelinux.net/14.x/x86_64/tcz/
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Juanito on August 08, 2024, 06:51:44 AM
Are these commands from lldpd?
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding on August 08, 2024, 07:31:52 AM
yes, but i can not find lldpd package in tcz url
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Juanito on August 08, 2024, 08:12:42 AM
If you know how, you could try compiling it yourself?
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding on August 09, 2024, 10:55:03 AM
you mean tinycore don't have lldpd packages, if i want to use lldpctl command, i must complie source code ?
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Rich on August 09, 2024, 12:17:25 PM
Hi yimding
I just checked the repos. Tinycore has never had a lldpd package.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: CentralWare on August 12, 2024, 11:36:14 PM
@Rich: Care to do the honors?
Take your FindMagic script and name it /usr/local/bin/magic
Code: [Select]
#!/bin/sh
CUR=$(pwd)
clear

EXTS="compiletc bc squashfs-tools"
for EXT in $EXTS
do
    EXT=${EXT/.tcz/}
    [ ! -f /etc/sysconfig/tcedir/optional/${EXT}.tcz ] && tce-load -w $EXT
    [ ! -d /tmp/tcloop/${EXT} ] && tce-load -i $EXT
done

[ -d lldp_all ] && rm lldp_* -fR
[ ! -f lldpd-1.0.18.tar.gz ] && wget https://media.luffy.cx/files/lldpd/lldpd-1.0.18.tar.gz
[ ! -d lldpd-1.0.18 ] && tar -zxf lldpd-1.0.18.tar.gz

cd lldpd-1.0.18; mkdir build; cd build
[ ! -f ../.configured ] && ../configure --prefix=/usr/local --localstatedir=/var --sysconfdir=/usr/local/etc --with-embedded-libevent --without-snmp && touch ../.configured
make -j 9
make DESTDIR=/tmp/lldp install
mv /tmp/lldp $CUR/lldp_all

mkdir -p $CUR/lldp_ext/usr/local \
         $CUR/lldp_doc/usr/local/share \
         $CUR/lldp_dev/usr/local

# DEV
mv $CUR/lldp_all/usr/local/include $CUR/lldp_dev/usr/local/
# DOC
mv $CUR/lldp_all/usr/local/share/doc $CUR/lldp_doc/usr/local/share/
mv $CUR/lldp_all/usr/local/share/man $CUR/lldp_doc/usr/local/share/
# EXT
mv $CUR/lldp_all/usr/local/* $CUR/lldp_ext/usr/local/

# STRIP Binaries
touch $CUR/.deps; rm $CUR/.deps -f
cd $CUR/lldp_ext
find -type f | magic | grep ELF | awk '{print $2}' > /tmp/bins
for file in $(cat /tmp/bins)
do
    strip -s ${file}
    ldd ${file} >> $CUR/.deps
done
rm /tmp/bins -f

# Create TCZs
cd $CUR
mksquashfs lldp_ext lldp.tcz >/dev/null 2>&1
mksquashfs lldp_doc lldp-doc.tcz >/dev/null 2>&1
mksquashfs lldp_dev lldp-dev.tcz >/dev/null 2>&1

cat > lldp.tcz.dep << "EOF"
readline
ncursesw
EOF
Feel free to add generic flags to taste! :)
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Rich on August 13, 2024, 10:19:16 AM
Hi CentralWare
I'll take care of it this evening.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: CentralWare on August 13, 2024, 12:53:12 PM
I'll take care of it this evening.
@Rich: 'Knew you were the man for the job!  LOL, plus, you've got keys to make it happen! :)
As noted, I didn't tune the compiler for any given platforms as I was aiming at completion and integrity.
It'll still need md5 and info/tree files, but most everything else should be laid out.  Thank you, sir!
Please also upload tcz/src to the appropriate platforms if you would.

@yimding: This means you're the "Beta Tester!"  Please be sure to come back here afterward and leave comments of successes and/or failures!  (Building a project is one thing...  knowing at least one person out there who is knowledgeable of what it is supposed to do has actually done it...  that's the important part to me.)  Additionally, you'll want to set your "Mirror" back to http://repo.tinycorelinux.net/ if you changed it, as that's the only place that you'll find "new" release files when they first get uploaded.  ( /opt/tcemirror )

@Rich @Curaga @Paul_123 @Juanito: I'd recommend looking into the new hosting service versus the other mirrors being able to stop by and get updates as I don't think files are being mirrored anymore.  (ie: repo.tinycorelinux.net/15/86/tcz shows a recent project called boinc.tcz as being on the server, but the file does not exist at ibiblio's mirror and the file has been on the repo server for quite some time now.)  This may be intentional due to the index page created that's home to platform/tcz, I'm not sure, thus why I bring it up - assuming you don't WANT 15.x to mirror out.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: curaga on August 14, 2024, 03:35:31 AM
ibiblio had done an update and its new ssh keys needed accepting. Syncs happening again.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: CentralWare on August 14, 2024, 08:54:07 AM
@curaga: Thanks!  I didn't know it was just Ibiblio that was caught up on syncs.

Question: Is there a purpose behind the static index page on 15.x/(platform)/tcz ?  (ie: no links, just a file listing)
I'm guessing it's to prevent spidering/mirroring/etc., and IF SO, is this because of 15.x being beta-like or is this the new preferred method for releases?
(...or it could be because a static file listing is a lot faster to load!? :) )
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: curaga on August 14, 2024, 09:23:22 AM
It's because generating the listings uses a ton of CPU for large dirs like these. Apache/nginx/etc dirlistings all take a ton of resources. So to be considerate for other mirrors, and to keep the load light on ours, it's pregenerated. As for why a plain text listing and not a HTML, that's both size and to discourage manually downloading extensions.

edit: Not specific to 15.x, it's been like this for all versions for a long time.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Rich on August 14, 2024, 02:15:04 PM
Hi CentralWare
lldpd added to tc14 x86_64 repository.
Build script and source tarball are here:
http://tinycorelinux.net/14.x/x86_64/tcz/src/lldpd/

I'll PM yimding to see if he comes back.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: CentralWare on August 14, 2024, 07:07:53 PM
@Rich: Thank you, kind sir! :)
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding on February 17, 2025, 10:51:52 PM
@Rich
HI, long time to see, i test this package in lenovo sd530 and hp dl360, all is right
but when i test in dell760 and dell760, i use lldpctl can not get neighbor infomation, maybe it's not lldp package problem

when i start tinycore os i can see below problem
ice 0000:1f:00.0 the ddp package file was not found or could not be read , entering safe mode
ice 0000:1f:00.1 the ddp package file was not found or could not be read , entering safe mode

this problems maybe cause by driver issue

my server netcard is  Intel(R) Ethernet 25G 2P E810-XXV
whether tinycore 14 can support this netcard
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Rich on February 17, 2025, 11:11:21 PM
Hi yimding
Try installing  firmware-intel.tcz.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding on February 18, 2025, 02:01:49 AM
@Rich
i try to install firmware-intel.tcz in my os, and exec modprobe -r ice && modprobe ice
strill has error
Code: [Select]
ice: module unloaded
ice: Intel(R) Ethernet Connection E800 Series Linux Driver
ice: Copyright (c) 2018, Intel Corporation.
ice 0000:1f:00.0: Direct firmware load for intel/ice/ddp/ice.pkg failed with error -2
ice 0000:1f:00.0: Falling back to sysfs fallback for: intel/ice/ddp/ice.pkg
ice 0000:1f:00.0: The DDP package file was not found or could not be read. Entering Safe Mode
ice 0000:1f:00.0: not enough device MSI-X vectors. wanted = 66, available = 2
ice 0000:1f:00.0: Reducing request to 1 MSI-X vectors for LAN traffic.
ice 0000:1f:00.0: RDMA is not supported on this device
ice 0000:1f:00.1: Direct firmware load for intel/ice/ddp/ice.pkg failed with error -2
ice 0000:1f:00.1: Falling back to sysfs fallback for: intel/ice/ddp/ice.pkg
ice 0000:1f:00.1: The DDP package file was not found or could not be read. Entering Safe Mode
ice 0000:1f:00.1: not enough device MSI-X vectors. wanted = 66, available = 2
ice 0000:1f:00.1: Reducing request to 1 MSI-X vectors for LAN traffic.
ice 0000:1f:00.1: RDMA is not supported on this device
ice 0000:1f:00.0 eth2: NIC Link is up 25 Gbps Full Duplex, Requested FEC: RS-FEC, Negotiated FEC: FC-FEC/BASE-R, Autoneg Advertised: Off, Autoneg Negotiated: False, Flow Control: None

and i can norr find this path "intel/ice/ddp/ice.pkg" in my system

just can see

Code: [Select]
root@yim:/# find / -name ice
/usr/local/lib/firmware/intel/ice
/tmp/tcloop/intel-firmware/usr/local/lib/firmware/intel/ice
/lib/modules/6.1.2-tinycore64/kernel/drivers/net/ethernet/intel/ice
/sys/bus/pci/drivers/ice
/sys/module/ice

Code: [Select]
root@yim:/# cd /usr/local/lib/firmware/intel/ice/ddp
ddp-comms/          ddp-wireless_edge/  ddp/
root@yim:/# cd /usr/local/lib/firmware/intel/ice/ddp
root@yim:/usr/local/lib/firmware/intel/ice/ddp# ls
ice-1.3.30.0.pkg
root@yim:/usr/local/lib/firmware/intel/ice/ddp#

    [Edit]: Added code tags added.  Rich
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Rich on February 18, 2025, 09:09:35 AM
Hi yimding
Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:

Quote
[code][   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]

It will appear like this in your post:
Code: [Select]
[   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517

Code Tags  serve as visual markers between what you are trying to say and the information you are posting. They also preserve
spacing so column aligned data displays properly. Code tags also automatically add horizontal and or vertical scrollbars
to accommodate long lines and listings.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Rich on February 18, 2025, 09:09:53 AM
Hi yimding
See if this fixes it:
Code: [Select]
sudo mkdir -p /lib/firmware/intel/ice/ddp
sudo cp /tmp/tcloop/intel-firmware/usr/local/lib/firmware/intel/ice/ddp/ice-1.3.30.0.pkg /lib/firmware/intel/ice/ddp/ice.pkg
sudo modprobe -r ice
sudo modprobe ice
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding on February 18, 2025, 10:01:40 AM
@Rich
Hi Rich, thanks for your help, ice had load rightly

when i rebuild my os, i do followe below step
Code: [Select]
1. mkdir -p /lib/firmware/intel/ice/ddp/
2. mount firmware-intel.tcz, and get ice-xxxx.pkg
3. cp ice-xxxx.pkg /lib/firmware/intel/ice/ddp/ice.pkg
4. rebuild my os
5. deploy it in my server
6. dmesg
ice 0000:1f:00.0: The DDP package was successfully loaded: [b]ICE OS Default Package version 1.3.30.0[/b]
ipmi_si IPI0001:00: Using irq 10
ipmi_si IPI0001:00: IPMI message handler: Found new BMC (man_id: 0x0002a2, prod_id: 0x0100, dev_id: 0x20)
ipmi_si IPI0001:00: IPMI kcs interface initialized
ipmi_ssif: IPMI SSIF Interface driver
ice 0000:1f:00.0: PTP init successful
ice 0000:1f:00.0: 126.024 Gb/s available PCIe bandwidth (16.0 GT/s PCIe x8 link)
ice 0000:1f:00.1: DDP package already present on device: [b]ICE OS Default Package version 1.3.30.0[/b]
random: crng init done
Adding 131737436k swap on /dev/zram0.  Priority:-2 extents:1 across:131737436k SS
ice 0000:1f:00.1: PTP init successful
this means ice driver load success

but i still can not get neighbor device info when i exec lldpctl, this make me very concern
Code: [Select]
# lldpctl
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------

# tcpdump -i eth2 ether proto 0x88cc -A -s0 -t -c 1 -vvv
tcpdump: listening on eth2, link-type EN10MB (Ethernet), capture size 262144 bytes
LLDP, length 168
Chassis ID TLV (1), length 7
  Subtype MAC address (4): 92:13:04:4c:6e:9d (oui Unknown)
  0x0000:  0492 1304 4c6e 9d
Port ID TLV (2), length 7
  Subtype MAC address (3): 30:3e:a7:0f:2b:d0 (oui Unknown)
  0x0000:  0330 3ea7 0f2b d0
Time to Live TLV (3), length 2: TTL 120s
  0x0000:  0078
System Name TLV (5), length 6: yimding
  0x0000:  7061 7970 616c
System Description TLV (6), length 86
  TinyCoreLinux 14.0 Linux 6.1.2-tinycore64 #612 SMP Mon Jan  2 17:24:30 UTC 2023 x86_64
  0x0000:  5469 6e79 436f 7265 4c69 6e75 7820 3134
  0x0010:  2e30 204c 696e 7578 2036 2e31 2e32 2d74
  0x0020:  696e 7963 6f72 6536 3420 2336 3132 2053
  0x0030:  4d50 204d 6f6e 204a 616e 2020 3220 3137
  0x0040:  3a32 343a 3330 2055 5443 2032 3032 3320
  0x0050:  7838 365f 3634
System Capabilities TLV (7), length 4
  System  Capabilities [Bridge, WLAN AP, Router, Station Only] (0x009c)
  Enabled Capabilities [Station Only] (0x0080)
  0x0000:  009c 0080
Management Address TLV (8), length 12
  Management Address length 5, AFI IPv4 (1): 10.160.64.93
  Interface Index Interface Numbering (2): 6
  0x0000:  0501 0aa0 405d 0200 0000 0600
Port Description TLV (4), length 4: eth2
  0x0000:  6574 6832
Organization specific TLV (127), length 9: OUI IEEE 802.3 Private (0x00120f)
  Link aggregation Subtype (3)
    aggregation status [supported], aggregation port ID 0
  0x0000:  0012 0f03 0100 0000 00
Organization specific TLV (127), length 9: OUI IEEE 802.3 Private (0x00120f)
  MAC/PHY configuration/status Subtype (1)
    autonegotiation [none] (0x00)
    PMD autoneg capability [unknown] (0x0000)
    MAU type unknown (0x0072)
  0x0000:  0012 0f01 0000 0000 72
End TLV (0), length 0
......Ln....0>..+....x
.yimdingl.VTinyCoreLinux 14.0 Linux 6.1.2-tinycore64 #612 SMP Mon Jan  2 17:24:30 UTC 2023 x86_64..........
.@]........eth2. .......... ........r..
1 packet captured
1 packet received by filter
0 packets dropped by kernel
281 packets dropped by interface

could you give some advice
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding on February 18, 2025, 10:19:28 AM
@Rich
when i test in ubuntu20.04 in my dell660 server
i move ice.pkg to other dir, and reload ice driver, i can not get neighbor info by lldpctl
then i move ice.pkg to right dir, and reload ice driver, i can get neighbor info by lldpctl

This means that whether the DDP package is loaded normally does have an impact on LLDP. However, I've resolved the issue of abnormal loading of the DDP package in TinyCore, but I still can't obtain the information of neighbor devices.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Rich on February 18, 2025, 10:27:21 AM
Hi yimding
From what I've read, lldpctl is obsolete and kept for backward compatibility.
lldpcli is the preferred command:
Code: [Select]
lldpcli show neighbors
I also saw something about NAT causing neighbors not to show up, and
that bridging needed to be used. You might have to google that one, I'm
not familiar with that technique.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding on February 18, 2025, 12:23:03 PM
@Rich
I sincerely appreciate your detailed and useful reply.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding on February 19, 2025, 12:01:34 PM
Hi Rich
i want compile the latest ice driver, and i want to know how to compile in tinycore 14, could you give some document about  this

now i have install compiletc gcc and make

i copy ice source code in os,and cd to src, then i exec make
Code: [Select]
cd src/
tc@box:~/ice-1.16.3/src$ make
make: /bin/bash: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
make: -c: No such file or directory
common.mk:71: *** Kernel header files not in any of the expected locations.
common.mk:72: *** Install the appropriate kernel development package, e.g.
common.mk:73: *** kernel-devel, for building kernel modules and try again.  Stop
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Juanito on February 19, 2025, 12:08:05 PM
You need to load the compiletc extension.

It also looks like the bash extension is needed.

You can search the forum on how to prepare the tinycore kernel source.

See also the extension making section of the wiki.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding on February 19, 2025, 12:21:25 PM
i installed bash.tcz
then make
Code: [Select]
tc@box:~/ice-1.16.3/src$ make install
common.mk:71: *** Kernel header files not in any of the expected locations.
common.mk:72: *** Install the appropriate kernel development package, e.g.
common.mk:73: *** kernel-devel, for building kernel modules and try again.  Stop.
tc@box:~/ice-1.16.3/src$ tce-load -wi linux-headers-$(uname -r).tcz
Downloading: linux-headers-6.1.2-tinycore64.tcz
Connecting to repo.tinycorelinux.net (128.127.66.77:80)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: linux-headers-6.1.2-tinycore64.tcz.md5.txt: No such file or directory
Error on linux-headers-6.1.2-tinycore64.tcz
tc@box:~/ice-1.16.3/src$

how can i get linux-header?
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Juanito on February 19, 2025, 12:23:40 PM
As said, load the compiletc extension.

After that prepare the kernel source.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Juanito on February 19, 2025, 12:35:12 PM
Something like this should prepare the kernel source:
Code: [Select]
tce-load -i compiletc perl5 ncursesw-dev bc glibc_apps elfutils-dev

wget http://tinycorelinux.net/14.x/x86_64/release/src/kernel/linux-6.1.2-patched.txz
wget http://tinycorelinux.net/14.x/x86_64/release/src/kernel/Module.symvers-6.1.2-tinycore64.gz
wget http://tinycorelinux.net/14.x/x86_64/release/src/kernel/config-6.1.2-tinycore64

gunzip Module.symvers-6.1.2-tinycore64.gz
tar xf linux-6.1.2-patched.txz
cd linux-6.1.2

make mrproper
cp ../config-6.1.2-tinycore64 .config
make oldconfig
make prepare
make modules_prepare

mv ../Module.symvers-6.1.2-tinycore64 Module.symvers
make SUBDIRS=scripts/mod
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Juanito on February 20, 2025, 08:19:48 AM
Once you have the tinycore kernel source prepared, you will need to make a symlink to the source.

If, for example the prepared source is at /usr/src/linux-6.1.2, then you need:
Code: [Select]
sudo ln -s /usr/src/linux-6.1.2 /lib/modules/6.1.2-tinycore64/build
After loading the coreutils extension you can compile ice-1.16.3:
Code: [Select]
cd ice-1.16.3/src
make

However, when I try with tc-16.x, the build fails with:
Code: [Select]
/usr/src/ethernet-linux-ice/src/kcompat_gnss.c:224:27: error: 'no_llseek' undeclared here (not in a function); did you mean 'noop_llseek'?
  224 |         .llseek         = no_llseek,
      |                           ^~~~~~~~~
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Rich on February 20, 2025, 09:04:43 AM
Hi Juanito
A search of the kernel source for no_llseek turned up this:
Code: [Select]
tc@box:~$ grep -Ris "no_llseek" Downloads/linux-6.12.11/*
Downloads/linux-6.12.11/Documentation/filesystems/porting.rst:no_llseek is gone; don't set .llseek to that - just leave it NULL instead.
Downloads/linux-6.12.11/scripts/coccinelle/api/stream_open.cocci:@ has_no_llseek @
Downloads/linux-6.12.11/scripts/coccinelle/api/stream_open.cocci:@ maybe_stream depends on (!has_llseek || has_no_llseek || has_noop_llseek) && !has_mmap && !has_copy_file_range && !has_remap_file_range && !has_read_iter && !has_write_iter && !has_splice_read && !has_splice_write @
So the documentation suggests it's gone.

A search of the kernel source for noop_llseek turned up this:
Code: [Select]
Downloads/linux-6.12.11/fs/read_write.c: * able to perform the seek. In this case you use noop_llseek() instead of
Downloads/linux-6.12.11/fs/read_write.c:loff_t noop_llseek(struct file *file, loff_t offset, int whence)
Downloads/linux-6.12.11/fs/read_write.c:EXPORT_SYMBOL(noop_llseek);
Downloads/linux-6.12.11/fs/cachefiles/daemon.c: .llseek         = noop_llseek,
Downloads/linux-6.12.11/fs/dlm/plock.c: .llseek  = noop_llseek,
Downloads/linux-6.12.11/fs/dlm/user.c:  .llseek  = noop_llseek,
Downloads/linux-6.12.11/fs/dlm/user.c:  .llseek  = noop_llseek,
Downloads/linux-6.12.11/fs/dlm/user.c:  .llseek  = noop_llseek,
Downloads/linux-6.12.11/fs/coda/psdev.c:        .llseek         = noop_llseek,
Downloads/linux-6.12.11/fs/coda/pioctl.c:       .llseek         = noop_llseek,
Downloads/linux-6.12.11/fs/fuse/cuse.c: .llseek         = noop_llseek,
Downloads/linux-6.12.11/fs/eventpoll.c: .llseek         = noop_llseek,
Downloads/linux-6.12.11/fs/btrfs/super.c:       .llseek = noop_llseek,
Downloads/linux-6.12.11/fs/ecryptfs/miscdev.c:  .llseek  = noop_llseek,
Downloads/linux-6.12.11/fs/char_dev.c:  .llseek = noop_llseek,
Downloads/linux-6.12.11/include/drm/drm_accel.h:        .llseek         = noop_llseek, \
Downloads/linux-6.12.11/include/drm/drm_gem_dma_helper.h:               .llseek         = noop_llseek,\
Downloads/linux-6.12.11/include/drm/drm_gem.h:  .llseek         = noop_llseek,\
Downloads/linux-6.12.11/include/linux/fs.h:extern loff_t noop_llseek(struct file *file, loff_t offset, int whence);
Downloads/linux-6.12.11/ipc/shm.c:      .llseek         = noop_llseek,
Downloads/linux-6.12.11/ipc/shm.c:      .llseek         = noop_llseek,
Downloads/linux-6.12.11/kernel/trace/blktrace.c:        .llseek =       noop_llseek,
Downloads/linux-6.12.11/kernel/power/qos.c:     .llseek = noop_llseek,
Downloads/linux-6.12.11/kernel/gcov/fs.c:       .llseek = noop_llseek,
Downloads/linux-6.12.11/net/atm/proc.c: .proc_lseek     = noop_llseek,
Downloads/linux-6.12.11/net/mac80211/debugfs.c: .llseek = noop_llseek,
Downloads/linux-6.12.11/samples/kfifo/inttype-example.c:        .proc_lseek     = noop_llseek,
Downloads/linux-6.12.11/samples/kfifo/record-example.c: .proc_lseek     = noop_llseek,
Downloads/linux-6.12.11/samples/kfifo/bytestream-example.c:     .proc_lseek     = noop_llseek,
Downloads/linux-6.12.11/scripts/coccinelle/api/stream_open.cocci:@ has_noop_llseek @
Downloads/linux-6.12.11/scripts/coccinelle/api/stream_open.cocci:    .llseek = noop_llseek,
Downloads/linux-6.12.11/scripts/coccinelle/api/stream_open.cocci:@ maybe_stream depends on (!has_llseek || has_no_llseek || has_noop_llseek) && !has_mmap && !has_copy_file_range && !has_remap_file_range && !has_read_iter && !has_write_iter && !has_splice_read && !has_splice_write @
Downloads/linux-6.12.11/security/tomoyo/securityfs_if.c:        .llseek  = noop_llseek,
Downloads/linux-6.12.11/sound/sound_core.c:     .llseek = noop_llseek,
Downloads/linux-6.12.11/sound/core/sound.c:     .llseek =       noop_llseek,
Downloads/linux-6.12.11/sound/core/timer.c:     .llseek = noop_llseek,
Downloads/linux-6.12.11/sound/core/seq/oss/seq_oss.c:   .llseek =       noop_llseek,
Downloads/linux-6.12.11/virt/kvm/kvm_main.c:    .llseek         = noop_llseek,
Downloads/linux-6.12.11/virt/kvm/kvm_main.c:    .llseek = noop_llseek,
Downloads/linux-6.12.11/virt/kvm/kvm_main.c:    .llseek = noop_llseek,
Downloads/linux-6.12.11/virt/kvm/kvm_main.c:    .llseek         = noop_llseek,
Downloads/linux-6.12.11/virt/kvm/kvm_main.c:    .llseek         = noop_llseek,
You can see noop_llseek is defined in /fs/read_write.c and used all over the place.
The list shown is not complete. I only posted about 1/4 of it.

So it looks like  no_llseek  should be changed to  noop_llseek.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Juanito 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...
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Rich 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.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Juanito 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,
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Rich on February 20, 2025, 11:07:36 AM
Hi Juanito
Yes, changing that  no_llseek  to  noop_llseek  should fix that issue.
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding 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
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding 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
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: Rich on February 20, 2025, 02:16:56 PM
Hi yimding
Try this:
Code: [Select]
sudo /sbin/depmod -a
sudo modprobe ice
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding on February 21, 2025, 06:07:06 AM
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
Title: Re: how can i use lldpctl and lldpd and lldpcli command in tincore version14
Post by: yimding on February 21, 2025, 07:11:26 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...
i follow your step to compile ice driver
The compilation was completed smoothly without encountering any issues related to "no_llseek"