>> This is a README file, please read. Some lines are executable but do >> not treat this file as a script. base: 3.2.0 + patch-3.2.8.bz2 # or fetch linux-3.2.8.tar.bz2 from http://www.kernel.org # Untar it. It does not need (are arguably should not) to be done # as superuser. The following commands were done as a normal user # on a laptop running Ubuntu 11.10 # Now cd (change directory) to the top of the kernel source tree. ## wget http://www.acmesystems.it/foxg20/download/kernel_2.6.38/makefile wget http://foxg20.acmesystems.it/download/kernel_2.6.38/makefile # this file takes precedence over the Makefile in that directory. # The kernel executable it will generate is called uImage and the # kernel modules are placed in the foxg20-modules directory. Both uImage # and those kernel modules need to be moved to the target FoxG20. # # N.B. This patch should be in place _before_ make (with any argument) # is run as this sets the ARCH=arm and other important environment # variables. Without this makefile a kernel will be probably be built # for an i386 architecture. An i386 kernel is of no use to the FoxG20. # Building a .config file from scratch is painful (but instructive # especially if you have a few days to waste). Acme provides some # old .config files. One was here: # wget http://www.acmesystems.it/foxg20/download/kernel_2.6.38/.config # But Acme re-arranged their web pages again ... now at: # wget http://foxg20.acmesystems.it/download/kernel_2.6.38/.config # but that is getting a bit old for lk 3.2.9 and has way too many # modules selected. # It is suggested that this .config is used: wget http://sg.danny.cz/foxg20/320.config cp 320.config .config # That .config file should be placed in the top level directory of # the kernel source tree. The user may like to run # 'make menuconfig' to check that all drivers and modules required are # chosen. My .config file takes the minimalist approach. # The following patches and/or downloads should be done in the # top level kernel source directory. # Patches can be checked with (for example): # 'patch -p1 --dry-run < ../gpio_dev32a.patch' # and if that works drop the "--dry-run" option to apply. # # My patches (without the leading "../") can be found at # http://sg.danny.cz/foxg20/ # Following adds gpiodev driver with /dev/gpio device. Ioctl # interface in /include/linux/gpio_dev.h : ../gpio_dev32a.patch # Enable "Atmel AT91 I2C Two-Wire interface (TWI)" silicon # driver. Kernel mainline says Atmel's silicon broken, not # any more ... ../i2c-at91_32dpg1.patch # Configure AT91SAM9G20 silicon for SPI_1. Uses PB0, PB1, and # PB2 plus PB3 (select for MMC_SPI) and PC5 (select for SPIDEV): ../fg20_spi304.patch # Want second I2C bus. This time use bit banging kernel driver # PA25(SDA) and PA26(SCL): ../extra_i2c_313.patch # Mainline kernel builds for 1 debug serial port (ttyS0) and 6 # additional ports (ttyS1-6). Add conguration option to have # or remove UART4 (ttyS5) and/or UART5 (ttyS6): ../fg20_4_6_serial313.patch # If using the the FoxG20 V2 then a new driver is needed for the # DS28EA00 1-wire chip (temperature sensor and power supply control). # This driver is written by Claudo Mignanti with some modifications # by the author. The driver is integrated into the kernel source so # it can be a built in driver (rather than a module). ../w1_slv_ds28ea00a.patch # This patch is required to access SDHC cards. A rewrite of the # drivers/mmc/core/sd.c file in lk 3.0 resulted in accessing of # SDHC cards (typically all those 4 GBytes and larger) to fail. # The culprits have been informed but have yet to fix this. # Reverting that file to the state it was in lk 3.6.38 fixes # the problem (and in lk 3.2 another minor change is needed). ../mmc_core_sd_hc32.patch # Assuming a build on a recent Debian based distribution (e.g. Ubuntu 11.10 # or Mint 12) then an ARM cross build environment is needed. That can be # loaded with: # 'apt-get install gcc-arm-linux-gnueabi' # This will also be need to make the uboot image: # 'apt-get install u-boot-tools' # build the kernel with: make ; make modules ; make modules_install'. # When the .config matches the kernel version then 'make' should not result # in configuration questions being asked. If a lot of configuration # questions are asked then something is wrong; go back and check the # instructions above. # Note: Acme's .config selects way too many modules, most of which will never # be used. This slows down the build and leads to some silly selection # questions (e.g. "want the latest xyz Fibre Channel adapter driver?") # Geert Vancompernolle has provided a more compact .config file. Others may # need to add modules/drivers according to their needs. [Only general purpos # distributions need to select almost everything as a module!] # # dpg 20120228