Sunday, January 08, 2006

My patches to kernel 2.6.14-1.1656_FC4, try 1

My patches to kernel 2.6.14-1.1656_FC4, try 1

That is a patch to allow:
DMA Support to Southbridge SiS 965 with driver SiS 5513.
NTFS Read support.
Fix SiS190 Ethernet controller, [sis190].
Make SATA SiS, [sata_sis], part of kernel, instead of a module.

Supported (tested) kernels:
2.6.14-1.1656_FC4

Approach:
Apply all patches that I published, and apply to that situation.

Remarks:
SiS 5513, try 3
SiS 190, try 3

1. Get and install the kernel source that applies:
2.6.14-1.1656_FC4

2. Create the patch files mentioned on the remarks.

3. Create the script to change the defaults values on kernel configuration, called [/usr/src/redhat/SOURCES/make-config.sh]:

#!/bin/bash
# Please note that this script do NOT check if the [.config] was already patched
#
find /usr/src/redhat/SOURCES/ -name "*.config" -print | while read FILE
do
mv ${FILE} ${FILE}.orig
cat ${FILE}.orig | sed -e "s/\(CONFIG_SCSI=\)./\1y/" -e "s/\(CONFIG_SCSI_SATA_SIS=\).*/\1y/" -e "s/\(CONFIG_SIS190=\)./\1m/" -e "s/\(CONFIG_BLK_DEV_SIS5513=\)./\1y/" -e "s/# CONFIG_NTFS_FS is not set/CONFIG_NTFS_FS=m\n# CONFIG_NTFS_DEBUG is not set\n# CONFIG_NTFS_RW is not set\n/" > ${FILE}
done

4. Create the kernel spec patch, called [/usr/src/redhat/SPEC/kernel-2.6.spec.2.6.14.1-1656.patch]:

--- a/kernel-2.6.spec 2006-01-08 12:26:50.000000000 +0100
+++ b/kernel-2.6.spec 2006-01-08 12:30:37.000000000 +0100
@@ -19,7 +19,8 @@ Summary: The Linux kernel (the core of t
%define sublevel 14
%define kversion 2.6.%{sublevel}
%define rpmversion 2.6.%{sublevel}
-%define rhbsys %([ -r /etc/beehive-root -o -n "%{?__beehive_build}" ] && echo || echo .`whoami`)
+#%define rhbsys %([ -r /etc/beehive-root -o -n "%{?__beehive_build}" ] && echo || echo .`whoami`)
+%define rhbsys sis
%define release %(R="$Revision: 1.1656 $"; RR="${R##: }"; echo ${RR%%?})_FC4%{rhbsys}
%define signmodules 0
%define make_target bzImage
@@ -307,6 +308,7 @@ Patch1301: linux-2.6-net-sundance-ip100A
Patch1302: linux-2.6-net-atm-lanai-nodev-rmmod.patch
Patch1303: linux-2.6-net-acenic-use-after-free.patch
Patch1304: linux-2.6-net-sk98lin-vpd.patch
+Patch1305: linux-2.6-sis190.patch

Patch1400: linux-2.6-pcmcia-disable-warning.patch

@@ -348,6 +350,8 @@ Patch1771: linux-2.6-sata-promise-pata-p
Patch1782: linux-2.6-selinux-mls-compat.patch
Patch1783: linux-2.6-usbhid-wacom.patch
Patch1790: linux-2.6-block-reduce-stack.patch
+Patch1795: linux-2.6-pci_ids.patch
+Patch1796: linux-2.6-sis5513.patch

# ACPI patches.
Patch1800: linux-2.6-acpi-enable-ecburst.patch
@@ -728,6 +732,8 @@ cd linux-%{kversion}
%patch1303 -p1
# sk98lin vpd fix
%patch1304 -p1
+# sis190 fix hangup
+%patch1305 -p1

# disable pcmcia warnings
%patch1400 -p1
@@ -803,6 +809,9 @@ cd linux-%{kversion}
%patch1783 -p1
# Decrease stack usage in block layer
%patch1790 -p1
+# Fix DMA on SiS965 southbridge with SiS5513 driver
+%patch1795 -p1
+%patch1796 -p1

# ACPI patches.
# Enable EC burst


5. Execute the script to change kernel defaults:

###
cd /usr/src/redhat/SOURCES/
sh ./make-config.sh
###

6. Apply the kernel spec patch:

###
cd /usr/src/redhat/SPECS/
patch -p1 kernel-2.6.spec.2.6.14.1-1656.patch
###

7. Build the rpms:

###
rpmbuild -bb --target=i686 kernel-2.6.spec
###

Please always address to my hardware, os and kernel patching general procedures before posting a question.

Wednesday, January 04, 2006

My patches to kernel 2.6.14-1.1653_FC4, try 2

My patches to kernel 2.6.14-1.1653_FC4, try 2

Apologise:
I apologise for my last post where I say that was everything alright, I was wrong.

That is a patch to allow:
DMA Support to Southbridge SiS 965 with driver SiS 5513.
NTFS Read support.
Fix SiS190 Ethernet controller, [sis190].
Make SATA SiS, [sata_sis], part of kernel, instead of a module.

Supported (tested) kernels:
2.6.14-1.1653_FC4

Approach:
Apply all patches that I published, and apply to that situation.

Remarks:
SiS 5513, try 3
SiS 190, try 3

1. Get and install the kernel source that applies:
2.6.14-1.1653_FC4

2. Create the patch files mentioned on the remarks.

3. Create the script to change the defaults values on kernel configuration, called [/usr/src/redhat/SOURCES/make-config.sh]:

#!/bin/bash
# Please note that this script do NOT check if the [.config] was already patched
#
find /usr/src/redhat/SOURCES/ -name "*.config" -print | while read FILE
do
mv ${FILE} ${FILE}.orig
cat ${FILE}.orig | sed -e "s/\(CONFIG_SCSI=\)./\1y/" -e "s/\(CONFIG_SCSI_SATA_SIS=\).*/\1y/" -e "s/\(CONFIG_SIS190=\)./\1m/" -e "s/\(CONFIG_BLK_DEV_SIS5513=\)./\1y/" -e "s/# CONFIG_NTFS_FS is not set/CONFIG_NTFS_FS=m\n# CONFIG_NTFS_DEBUG is not set\n# CONFIG_NTFS_RW is not set\n/" > ${FILE}
done

4. Create the kernel spec patch, called [/usr/src/redhat/SPEC/kernel-2.6.spec.2.6.14.1-1653.patch]:

--- kernel-2.6.spec 2006-01-04 19:27:27.000000000 +0100
+++ kernel-2.6.spec.2.6.14.1-1653.orig 2005-12-26 09:04:38.000000000 +0100
@@ -19,8 +19,7 @@ Summary: The Linux kernel (the core of t
%define sublevel 14
%define kversion 2.6.%{sublevel}
%define rpmversion 2.6.%{sublevel}
-#%define rhbsys %([ -r /etc/beehive-root -o -n "%{?__beehive_build}" ] && echo || echo .`whoami`)
-%define rhbsys sis
+%define rhbsys %([ -r /etc/beehive-root -o -n "%{?__beehive_build}" ] && echo || echo .`whoami`)
%define release %(R="$Revision: 1.1653 $"; RR="${R##: }"; echo ${RR%%?})_FC4%{rhbsys}
%define signmodules 0
%define make_target bzImage
@@ -308,7 +307,6 @@ Patch1301: linux-2.6-net-sundance-ip100A
Patch1302: linux-2.6-net-atm-lanai-nodev-rmmod.patch
Patch1303: linux-2.6-net-acenic-use-after-free.patch
Patch1304: linux-2.6-net-sk98lin-vpd.patch
-Patch1305: linux-2.6-sis190.patch

Patch1400: linux-2.6-pcmcia-disable-warning.patch

@@ -354,8 +352,7 @@ Patch1771: linux-2.6-sata-promise-pata-p
Patch1780: linux-2.6-net-bonding-feature-consolidation.patch
Patch1781: linux-2.6-net-bridge-feature-consolidation.patch
Patch1782: linux-2.6-selinux-mls-compat.patch
-Patch1783: linux-2.6-pci_ids.patch
-Patch1784: linux-2.6-sis5513.patch
+

# ACPI patches.
Patch1800: linux-2.6-acpi-enable-ecburst.patch
@@ -735,8 +732,6 @@ cd linux-%{kversion}
%patch1303 -p1
# sk98lin vpd fix
%patch1304 -p1
-# sis190 fix
-%patch1305 -p1

# disable pcmcia warnings
%patch1400 -p1
@@ -818,9 +813,6 @@ cd linux-%{kversion}
%patch1780 -p1
%patch1781 -p1
%patch1782 -p1
-# Fix DMA on SiS965 southbridge with SiS5513 driver
-%patch1783 -p1
-%patch1784 -p1

# ACPI patches.
# Enable EC burst

5. Execute the script to change kernel defaults:

###
cd /usr/src/redhat/SOURCES/
sh ./make-config.sh
###

6. Apply the kernel spec patch:

###
cd /usr/src/redhat/SPECS/
patch -p1 kernel-2.6.spec.2.6.14.1-1653.patch
###

7. Build the rpms:

###
rpmbuild -bb --target=i686 kernel-2.6.spec
###

Please always address to my hardware, os and kernel patching general procedures before posting a question.

SiS Ethernet 0190 [sis190] patch, try 3

SiS Ethernet 0190 [sis190] patch, try 3

Supported (tested) kernels:
2.6.14-1.1653_FC4
2.6.14-1.1656_FC4

Problem:
On original Fedora kernel the module for SiS Ethernet controller model 190/191 hang the system if there is no response on the network, like an DHPC server failure.

Bugzilla:
Number 176969 at http://bugzilla.redhat.com/

1. You need to disable network and reboot, to avoid system hang:

chkconfig --level 345 network off

2. Get and install the kernel source that applies:

3. Unpack the kernel:

cd /usr/src/redhat/SPEC
rpmbuild -bp --target=i686 kernel-2.6.spec

4. Get the SiS driver for Linux
To take the driver by yourself go to SiS download center and chose:
Network Driver -> SiS190 Gigabit & SiS191 LAN -> Linux -> GO
Than proceed to the download of "SiS190 / SiS191 Gigabit LAN / LAN driver for Linux kernal 2.6.9 or later."

5. Extract the file [sis190.c] and make a patch from it:

tar -vxzf sis190191_linux.tar.gz -C /tmp/ # file from SiS
mkdir -p /tmp/a/drivers/net/
mkdir -p /tmp/b/drivers/net/
cp /tmp/sis190_20041220/sis190.c /tmp/b/drivers/net/
cp /usr/src/redhat/BUILD/kernel-2.6.14/linux-2.6.14/drivers/net/sis190.c /tmp/a/drivers/net
cd /tmp/
diff -Nup a/drivers/net/sis190.c b/drivers/net/sis190.c > /usr/src/redhat/SOURCES/linux-2.6-sis190.patch # create a patch file for later
cp /tmp/b/drivers/net/sis190.c /usr/src/redhat/BUILD/kernel-2.6.14/linux-2.6.14/drivers/net/ # this will patch the actual expansion to make a new module right now.

6. Prepare the kernel to compile the modules:

cd /usr/src/redhat/BUILD/kernel-2.6.14/linux-2.6.14/
cp /usr/src/redhat/SOURCES/kernel-2.6.14-i686.config .config # for normal i686
# cp /usr/src/redhat/SOURCES/kernel-2.6.14-i686-smp.config .config # for i686 SMP

5. Compile the modules and copy override the old driver

cd /usr/src/redhat/BUILD/kernel-2.6.14/linux-2.6.14/
make modules
cp /usr/src/redhat/BUILD/kernel-2.6.14/linux-2.6.14/drivers/net/sis190.ko /lib/modules/2.6.14-1.1644_FC4/kernel/drivers/net/sis190.ko # for normal i686
depmode -eaF /boot/System.map-2.6.14-1.1653_FC4 2.6.14-1.1644_FC4 # for normal i686
#cp /usr/src/redhat/BUILD/kernel-2.6.14/linux-2.6.14/drivers/net/sis190.ko /lib/modules/2.6.14-1.1644_FC4smp/kernel/drivers/net/sis190.ko # for i686 SMP
#depmode -eaF /boot/System.map-2.6.14-1.1644_FC4smp 2.6.14-1.1653_FC4smp # for i686 SMP

6. Reenable the network and reboot

chkconfig --level 345 network on
shutdown -r now

Please always address to my hardware, os and kernel patching general procedures before posting a question.