1 args @ { stdenv, fetchurl, fetchsvn, userModeLinux ? false, extraConfig ? ""
5 configWithPlatform = kernelPlatform :
7 # Don't include any debug features.
10 # Support drivers that need external firmware.
13 # Make /proc/config.gz available.
16 # Optimize with -O2, not -Os.
17 CC_OPTIMIZE_FOR_SIZE n
19 # Enable the kernel's built-in memory tester.
22 # Include the CFQ I/O scheduler in the kernel, rather than as a
23 # module, so that the initrd gets a good I/O scheduler.
26 # Disable some expensive (?) features.
32 # Enable various subsystems.
33 ACCESSIBILITY y # Accessibility support
34 AUXDISPLAY y # Auxiliary Display support
35 DONGLE y # Serial dongle support
37 MTD_COMPLEX_MAPPINGS y # needed for many devices
38 NET_POCKET y # enable pocket and portable adapters
39 SCSI_LOWLEVEL y # enable lots of SCSI devices
40 SCSI_LOWLEVEL_PCMCIA y
41 SPI y # needed for many devices
53 IP_DCCP_CCID3 n # experimental
57 # Wireless networking.
58 IPW2100_MONITOR y # support promiscuous mode
59 IPW2200_MONITOR y # support promiscuous mode
60 IWL4965 y # Intel Wireless WiFi 4965AGN
61 IWL5000 y # Intel Wireless WiFi 5000AGN
62 HOSTAP_FIRMWARE y # Support downloading firmware images with Host AP driver
63 HOSTAP_FIRMWARE_NVRAM y
65 # Some settings to make sure that fbcondecor works - in particular,
66 # disable tileblitting and the drivers that need it.
68 # Enable various FB devices.
71 FB_NVIDIA_I2C y # Enable DDC Support
73 FB_ATY_CT y # Mach64 CT/VT/GT/LT (incl. 3D RAGE) support
74 FB_ATY_GX y # Mach64 GX support
83 # The intel drivers already require KMS
87 SND_AC97_POWER_SAVE y # AC97 Power-Saving Mode
88 SND_HDA_INPUT_BEEP y # Support digital beep via input layer
90 PSS_MIXER y # Enable PSS mixer (Beethoven ADSP-16 and other compatible)
93 USB_SERIAL_GENERIC y # USB Generic Serial Driver
94 USB_SERIAL_KEYSPAN_MPR y # include firmware for various USB serial devices
95 USB_SERIAL_KEYSPAN_USA28 y
96 USB_SERIAL_KEYSPAN_USA28X y
97 USB_SERIAL_KEYSPAN_USA28XA y
98 USB_SERIAL_KEYSPAN_USA28XB y
99 USB_SERIAL_KEYSPAN_USA19 y
100 USB_SERIAL_KEYSPAN_USA18X y
101 USB_SERIAL_KEYSPAN_USA19W y
102 USB_SERIAL_KEYSPAN_USA19QW y
103 USB_SERIAL_KEYSPAN_USA19QI y
104 USB_SERIAL_KEYSPAN_USA49W y
105 USB_SERIAL_KEYSPAN_USA49WLC y
107 # Filesystem options - in particular, enable extended attributes and
108 # ACLs for all filesystems that support them.
109 EXT2_FS_XATTR y # Ext2 extended attributes
110 EXT2_FS_POSIX_ACL y # Ext2 POSIX Access Control Lists
111 EXT2_FS_SECURITY y # Ext2 Security Labels
112 EXT2_FS_XIP y # Ext2 execute in place support
116 REISERFS_FS_POSIX_ACL y
117 REISERFS_FS_SECURITY y
122 XFS_RT y # XFS Realtime subvolume support
123 OCFS2_DEBUG_MASKLOG n
126 UBIFS_FS_ADVANCED_COMPR y
134 # Security related features.
135 STRICT_DEVMEM y # Filter access to /dev/mem
136 SECURITY_SELINUX_BOOTPARAM_VALUE 0 # disable SELinux by default
140 8139TOO_PIO n # PIO is slower
141 AIC79XX_DEBUG_ENABLE n
142 AIC7XXX_DEBUG_ENABLE n
146 BLK_DEV_CMD640_ENHANCED y # CMD640 enhanced support
147 BLK_DEV_IDEACPI y # IDE ACPI support
149 BSD_PROCESS_ACCT_V3 y
151 BT_HCIUART_H4 y # UART (H4) protocol support
153 BT_RFCOMM_TTY y # RFCOMM TTY support
156 DMAR? n # experimental
157 DVB_DYNAMIC_MINORS y # we use udev
158 FUSION y # Fusion MPT device support
159 IDE_GD_ATAPI y # ATAPI floppy support
160 IRDA_ULTRA y # Ultra (connectionless) protocol
161 JOYSTICK_IFORCE_232 y # I-Force Serial joysticks and wheels
162 JOYSTICK_IFORCE_USB y # I-Force USB joysticks and wheels
163 JOYSTICK_XPAD_FF y # X-Box gamepad rumble support
164 JOYSTICK_XPAD_LEDS y # LED Support for Xbox360 controller 'BigX' LED
165 KALLSYMS_EXTRA_PASS n
166 LDM_PARTITION y # Windows Logical Disk Manager (Dynamic Disk) support
167 LEDS_TRIGGER_IDE_DISK y # LED IDE Disk Trigger
168 LOGIRUMBLEPAD2_FF y # Logitech Rumblepad 2 force feedback
174 MOUSE_PS2_ELANTECH y # Elantech PS/2 protocol extension
176 NET_FC y # Fibre Channel driver support
177 PPP_MULTILINK y # PPP multilink support
178 REGULATOR y # Voltage and Current Regulator Support
179 SCSI_LOGGING y # SCSI logging facility
180 SERIAL_8250 y # 8250/16550 and compatible serial support
181 SLIP_COMPRESSED y # CSLIP compressed headers
183 THERMAL_HWMON y # Hardware monitoring support
185 USB_EHCI_ROOT_HUB_TT y # Root Hub Transaction Translators
186 X86_CHECK_BIOS_CORRUPTION y
189 ${if kernelPlatform ? kernelExtraConfig then kernelPlatform.kernelExtraConfig else ""}
194 import ./generic.nix (
197 version = "qi_lb60-2.6.36.3-openwrt-24283";
200 url = "mirror://kernel/linux/kernel/v2.6/linux-2.6.36.3.tar.bz2";
201 sha256 = "1kxj4m9f5iplbll1c5inszg5yxywakz533nl5p4ia84mq2ch03dc";
204 srcPatch = fetchsvn {
205 url = "svn://svn.openwrt.org/openwrt/trunk/target/linux";
207 sha256 = "4e30266bbaf004acb10b5c182d0c01c7aba685956d36e76ea7c24dd55ae51c10";
211 cp -R ${srcPatch}/generic/files/* .
213 GLOBIGNORE='.:..:*preinit_as_init*:*gpio-for-the-6th-row-of-the-keyboard*'
214 for a in ${srcPatch}/generic/patches-2.6.36/* ${srcPatch}/xburst/patches-2.6.36/* ; do
215 echo applying patch $a
219 cat ${srcPatch}/generic/config-2.6.36 ${srcPatch}/xburst/config-2.6.36 \
220 ${srcPatch}/xburst/qi_lb60/config-2.6.36 > arch/mips/configs/qi_lb60_defconfig
225 gzip -9 -c $out/vmlinux.bin > $out/vmlinux.bin.gz
226 KERNEL_ENTRY="0x`$crossConfig-nm $out/vmlinux 2>/dev/null |
227 grep " kernel_entry" | cut -f1 -d ' '`"
228 mkimage -A mips -O linux -T kernel -a 0x80010000 -C gzip \
229 -e $KERNEL_ENTRY -n "MIPS Nix Linux-2.6.36" \
230 -d $out/vmlinux.bin.gz $out/uImage
234 config = configWithPlatform stdenv.platform;
235 configCross = configWithPlatform stdenv.cross.platform;
237 features.iwlwifi = true;
240 // removeAttrs args ["extraConfig"]