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 (~110MB download) * mkdir /lib/modules/`uname -r`/build && cd /lib/modules/`uname -r`/build * tce-load -i compiletc squashfs-tools * sudo su * 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 * export CFLAGS="-mtune=generic -Os -pipe" CXXFLAGS="-mtune=generic -Os -pipe" LDFLAGS="-Wl,-O1" * make mrproper && make oldconfig && make prepare && make modules_prepare * Unpack driver source archive somewhere * Enter driver directory and run: ./autorun.sh * src/r8168.ko is the kernel module * gzip src/r8168.ko #config: * 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