Building the r8168 driver for RealTek RTL8168B/8111B, RTL8168C/8111C, RTL8168CP/8111CP, RTL8168D/8111D, DP/8111DP, and RTL8168E/8111E Gigabit Ethernet controllers with PCI-Express interface. * cd /tmp * kerver=`uname -r` && wget http://tinycorelinux.net/`version -m`.x/`uname -m`/release/src/kernel/linux-${kerver%-*}-patched.txz (~120MB download) * sudo mkdir /lib/modules/`uname -r`/build && cd /lib/modules/`uname -r`/build -Alternatively unpack on a mounted disk partition and symlink to /lib/modules/`uname -r`/build so files not lost on reboot. * tce-load -i compiletc squashfs-tools submitqc gettext * kerver=`uname -r` && tar xvJf /tmp/linux-${kerver%-*}-patched.txz * wget -O .config http://tinycorelinux.net/`version -m`.x/`uname -m`/release/src/kernel/config-${kerver%-*}-tinycore64 * wget http://tinycorelinux.net/`version -m`.x/`uname -m`/release/src/kernel/Module.symvers-${kerver%-*}-tinycore64 * gunzip -c Module.symvers-${kerver%-*}-tinycore64 > Module.symvers * export CFLAGS="-mtune=generic -Os -pipe" CXXFLAGS="-mtune=generic -Os -pipe" LDFLAGS="-Wl,-O1" * make oldconfig && make prepare && make modules_prepare * Unpack driver source archive somewhere * Enter driver source directory and run: make modules * cd src * r8168.ko is the kernel module * strip module debugging symbols with: strip --strip-unneeded r8168.ko * gzip r8168.ko #config (manual): * Add "blacklist=r8169" bootcode to bootloader parameters list to prevent the other driver from automatically loading at boot. * Add "insmod /usr/local/lib/modules/`uname -r`/kernel/drivers/net/ethernet/realtek/r8168.ko.gz" command to /opt/bootlocal.sh #Making an extension: * mkdir -p r8168/usr/local/lib/modules/`uname -r`/kernel/drivers/net/ethernet/realtek * cp ../r8168-master/src/r8168.ko.gz r8168/usr/local/lib/modules/`uname -r`/kernel/drivers/net/ethernet/realtek/ * sudo chown -R root:root r8168 * mksquashfs r8168 r8168-`uname -r`.tcz * md5sum r8168-`uname -r`.tcz > r8168-`uname -r`.tcz.md5.txt * submitqc