UPDATE This tutorial is valid for Microcore Linux up to version 3.8.x, kernel 22.214.171.124. The newest Microcore 4.0 with the kernel 3.0.3 loads 8021q module without any difficulties.
Recently I have decided to add support for 802.1Q to Microcore Linux. First I tried to install 8021q-126.96.36.199-tinycore.tcz extension which is available for download in the Tinycore Linux 3.x repository. This extension is 8021q module that we can simply load with command modprobe 8021q to the kernel. Unfortunately, after I tried to load the module I always kept this error message:
modprobe: can't load module 8021q (kernel/net/8021q/8021q.ko.gz): unknown symbol in module, or unknown parameter
The output from dmesg said:
8021q: Unknown symbol vlan_dev_vlan_id
This was the same error which was originally presented in this topic but there was not solution mentioned there except of simply saying - it is working now. Unfortunately, I deal with the error even when I had compiled 8021q module by my own. For this reason I decided to compile my own linux kernel with direct support for 8021q Vlan tagging.
The kernel version 188.8.131.52 is the kernel which is used by Linux Microcore 3.x. These are the steps you need to follow to compile and install the kernel:
1. Install Microcore Linux
I assume you have your Microcore already installed. I mainly use Linux Microcore installed on Qemu image in GNS3 environment to simulate PC hosts on LAN. In order to start your Microcore Qemu image invoke this command:
qemu -no-acpi -boot c linux-microcore-3.6.img -m 1500M
I have noticed we need to have enough RAM assigned for the image thus to use of tmpfs in which are files stored. Also the content saved in this filesystem will be lost after reboot. To avoid lost of new kernel we need later to do some steps to have kernel kept in /usr/src/ after reboot.
2. Download and untar Linux kernel 184.108.40.206 which is patched for Microcore Linux
tar jxvf linux-220.127.116.11.tar.bz2 -C /usr/src
Note: if you want to keep kernel persistent in /usr/src/ you have to edit /opt/.filetool.lst and add /usr/src/ to the list of after-restart kept directories.
After that you have to call /usr/bin/filetool -b
3. Install tools for compiling, download an original .config kernel file
tce-load -wi compiletc.tcz ncurses-dev perl5
Note: perl is needed by make command.
Download kernel config file.
Create symbolic link /usr/src/linux pointed to /usr/src/linux-18.104.22.168 and copy config file to /usr/src/linux.
ln -sf linux-22.214.171.124 linux
cp ./config-126.96.36.199-tinycore ./linux/.config
4. Enable 8021q support in kernel config file, build the kernel with 8021q support
a) Enable 8021q support - change kernel config file
Network support-> Networking Options-> 8021q Support
Enter Y to include 8021q VLAN support. Exit and Save configuration to .config file.
b/ Build the kernel
After finishing, your new kernel bzImage is saved to /usr/src/linux/arch/x86/boot/. Replace old kernel with the new one and reboot. After the boot, check the version of the built kernel with uname -ra command.
mv /usr/src/linux/arch/x86/boot/bzImage /mnt/hda1/boot/
Note: In case you don't want to bother yourself with building your kernel, you can download my bzImage. It is the kernel 188.8.131.52, dedicated for Microcore 3.x. Just replace /mnt/hda1/boot/bzImage with this file.