bifferboard

Recent site activity

Home‎ > ‎

Bifferboard Kernel Patch for 2.6.30.5

The following issues are addressed by this patch:

CPU Detection

RDC cpu type is correctly detected and will appear in /proc/cpuinfo.  Without the patch, some 2.6.30.X kernels fail to boot, and will Ooops in the CPU detection code.

/ # cat /proc/cpuinfo
processor       : 0
vendor_id       : RDC
cpu family      : 4
model           : 0
model name      : S3282/CodeTek
stepping        : unknown
fdiv_bug        : yes
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : no
fpu_exception   : no
cpuid level     : -1
wp              : yes
flags           :
bogomips        : 56.44
clflush size    : 32
power management:



Generic GPIO support


GPIO support has been added, and uses the sysfs mechanism.


1-wire support

To specify that a 1-wire device should be on pin 12 ensure w1-gpio-custom module is compiled into the kernel and add the following to the command-line:

w1-gpio-custom.bus0
=0,12,0

Bear in mind that at 3.3v the pull-up resistor needs to be a maximum of 2.2K to ensure sufficient current is supplied to w1 parasitic devices during operation (assuming parasitic powered).


i2c support

i2c-gpio-custom module allows the GPIO pin configuration to be specified on the kernel command-line. To specify that an i2c device has SDA on pin 12 and SCL on pin 9, add the following to the Biffboot command-line (or compile it in):

i2c-gpio-custom.bus0
=0,12,9


MMC-over-GPIO Support


MMC via SPI-over-GPIO can be configured via the mmcgpio module.  This requires the kernel to have support for configfs.  GPIO pins for this are configured by writing to various files under /config/mmcgpio/, see the file Documentation/mmcgpio.txt for the details.


Block device precedence

The kernel won't boot from an initrd system if the block layer has been enabled.  If the kernel has support for block devices then the bootloader needs to supply a 'proper' ramdisk as an argument to the kernel boot.  Biffboot doesn't have support for this, and only knows how to boot a kernel.  This allows one to have a Biffboot-compatible initrd, but then later access USB storage devices (e.g. for NAS applications).


R6040 2nd Ethernet NIC detection

RDC chips contain 2 NICs, however on the Bifferboard only one is wired.  The patch prevents detection of the 2nd nic, effectively giving up after it has found one, which avoids a non-functioning eth1 device appearing, and also saving a bit of memory.


Boot without maths emulation

Normally, when a system doesn't have an FPU the kernel makes a check for the kernel FPU emulation code.  If not present the kernel refuses to boot. For embedded systems the overhead of having FPU emulation code (~20kbytes) that no user processes make use of can be unacceptable. The patch allows removal of FPU emulation on 486SX CPUs while still getting a boot.


(EXPERIMENTAL) Flash memory read/write access via /config/biffconfig

A driver has been written to allow access to the Bios config block.  The driver uses the configfs mechanism, to allow read or modification of Biffboot parameters.  To use it you must include configfs support in your kernel, and also mount the config file system at boot, e.g.:

mount -t configfs configfs /config

Under /config/bifferboard you will find a series of files.  Modifiy the files by echoing new strings to them, and when done echo something (anything) to the file called 'commit'.


Software watchdog

When using a software watchdog invalid op-code can result from the fact that Linux performs a somewhat naive check for the presence of VMX, using the cpuid instruction, before attempting to shut it down.  The code should probably toggle the ID bit in the proper manner to determine presence of cpuid, and, in cases where it's missing simply report vmx as not being available.  This patch simply #ifdefs out the check for RDC cpus.


Hardware Watchdog

Most RDC BIOSes, (including Redboot) initialise Southbridge such that PCIRST_n is 'inactive'.  This means that some extra work is required in reboot fixups to enable this line in order to get a reboot.  The comments in reboot_fixups_32.c concerning the watchdog timer are incorrect.  The code in rdc321x_reset() in fact simply enables PCIRST_n such that the following outb(1, 0x92) takes effect.  A similar fix is required in order for the hardware watchdog to trigger.  In this patch PCIRST_n is enabled when the hardware watchdog driver is activated.


Kexec kernel relocation

The kexec system call results in references to CR4, which is not available on RDC chips (or any 386/486 CPUs).  This results in an illegal instruction when kexec is attempted, and a probable reboot.  This patch removes the CR4 references when CONFIG_X86_RDC321X is defined.


MCE, Machine Check Exception

According to the Linux kernel documentation, the check for MCE capability can be avoided by passing 'nomce' to on the kernel command-line.  This doesn't seem to work.  The only work-around is to disable CONFIG_X86_MCE in the kernel config.
Affected Kernels:  2.6.27.7.  Not tested on later kernels.


Attachments (4)

  • bifferboard-2.6.30.5-12.patch - on Oct 13, 2009 2:48 PM by bifferos ' (version 1)
    86k Download
  • bifferboard-2.6.30.5-3.config - on Sep 7, 2009 11:56 AM by bifferos ' (version 3 / earlier versions)
    28k Download
  • bzImage - on Sep 6, 2009 1:28 PM by bifferos ' (version 7 / earlier versions)
    918k Download
  • watchdog-test.c - on Sep 20, 2009 5:22 AM by bifferos ' (version 1)
    2k Download