📄 elinux.patch
字号:
+# CONFIG_I2C is not set++#+# Mice+#+# CONFIG_BUSMOUSE is not set+CONFIG_MOUSE=m+# CONFIG_PSMOUSE is not set+# CONFIG_82C710_MOUSE is not set+# CONFIG_PC110_PAD is not set++#+# Joysticks+#++#+# Game port support+#++#+# Gameport joysticks+#++#+# Serial port support+#++#+# Serial port joysticks+#++#+# Parallel port joysticks+#++#+# Parport support is needed for parallel port joysticks+#+# CONFIG_QIC02_TAPE is not set++#+# Watchdog Cards+#+# CONFIG_WATCHDOG is not set+# CONFIG_NVRAM is not set+# CONFIG_RTC is not set+CONFIG_SA1100_RTC=m+# CONFIG_DTLK is not set+# CONFIG_R3964 is not set+# CONFIG_APPLICOM is not set++#+# Ftape, the floppy tape device driver+#+# CONFIG_FTAPE is not set+# CONFIG_AGP is not set+# CONFIG_DRM is not set+CONFIG_PCMCIA_SERIAL=m++#+# PCMCIA character device support+#+CONFIG_PCMCIA_SERIAL_CS=m++#+# Multimedia devices+#+# CONFIG_VIDEO_DEV is not set++#+# File systems+#+# CONFIG_QUOTA is not set+# CONFIG_AUTOFS_FS is not set+# CONFIG_AUTOFS4_FS is not set+# CONFIG_REISERFS_FS is not set+# CONFIG_ADFS_FS is not set+# CONFIG_AFFS_FS is not set+# CONFIG_HFS_FS is not set+# CONFIG_BFS_FS is not set+CONFIG_FAT_FS=m+# CONFIG_MSDOS_FS is not set+CONFIG_VFAT_FS=m+# CONFIG_EFS_FS is not set+# CONFIG_JFFS_FS is not set+CONFIG_JFFS2_FS=y+CONFIG_JFFS2_FS_DEBUG=1+CONFIG_CRAMFS=m+CONFIG_RAMFS=m+# CONFIG_ISO9660_FS is not set+# CONFIG_MINIX_FS is not set+# CONFIG_NTFS_FS is not set+# CONFIG_HPFS_FS is not set+CONFIG_PROC_FS=y+CONFIG_DEVFS_FS=y+# CONFIG_DEVFS_MOUNT is not set+# CONFIG_DEVFS_DEBUG is not set+CONFIG_DEVPTS_FS=y+# CONFIG_QNX4FS_FS is not set+# CONFIG_ROMFS_FS is not set+CONFIG_EXT2_FS=m+# CONFIG_SYSV_FS is not set+# CONFIG_UDF_FS is not set+# CONFIG_UFS_FS is not set++#+# Network File Systems+#+# CONFIG_CODA_FS is not set+CONFIG_NFS_FS=m+# CONFIG_NFS_V3 is not set+# CONFIG_NFSD is not set+CONFIG_SUNRPC=m+CONFIG_LOCKD=m+CONFIG_SMB_FS=m+# CONFIG_SMB_NLS_DEFAULT is not set+# CONFIG_NCP_FS is not set++#+# Partition Types+#+# CONFIG_PARTITION_ADVANCED is not set+CONFIG_MSDOS_PARTITION=y+CONFIG_SMB_NLS=y+CONFIG_NLS=y++#+# Native Language Support+#+CONFIG_NLS_DEFAULT="iso8859-1"+# CONFIG_NLS_CODEPAGE_437 is not set+# CONFIG_NLS_CODEPAGE_737 is not set+# CONFIG_NLS_CODEPAGE_775 is not set+# CONFIG_NLS_CODEPAGE_850 is not set+# CONFIG_NLS_CODEPAGE_852 is not set+# CONFIG_NLS_CODEPAGE_855 is not set+# CONFIG_NLS_CODEPAGE_857 is not set+# CONFIG_NLS_CODEPAGE_860 is not set+# CONFIG_NLS_CODEPAGE_861 is not set+# CONFIG_NLS_CODEPAGE_862 is not set+# CONFIG_NLS_CODEPAGE_863 is not set+# CONFIG_NLS_CODEPAGE_864 is not set+# CONFIG_NLS_CODEPAGE_865 is not set+# CONFIG_NLS_CODEPAGE_866 is not set+# CONFIG_NLS_CODEPAGE_869 is not set+# CONFIG_NLS_CODEPAGE_874 is not set+# CONFIG_NLS_CODEPAGE_932 is not set+# CONFIG_NLS_CODEPAGE_936 is not set+# CONFIG_NLS_CODEPAGE_949 is not set+# CONFIG_NLS_CODEPAGE_950 is not set+# CONFIG_NLS_ISO8859_1 is not set+# CONFIG_NLS_ISO8859_2 is not set+# CONFIG_NLS_ISO8859_3 is not set+# CONFIG_NLS_ISO8859_4 is not set+# CONFIG_NLS_ISO8859_5 is not set+# CONFIG_NLS_ISO8859_6 is not set+# CONFIG_NLS_ISO8859_7 is not set+# CONFIG_NLS_ISO8859_8 is not set+# CONFIG_NLS_ISO8859_9 is not set+# CONFIG_NLS_ISO8859_14 is not set+# CONFIG_NLS_ISO8859_15 is not set+# CONFIG_NLS_KOI8_R is not set+# CONFIG_NLS_UTF8 is not set++#+# Console drivers+#+CONFIG_PC_KEYMAP=y+# CONFIG_VGA_CONSOLE is not set+CONFIG_FB=y++#+# Frame-buffer support+#+CONFIG_FB=y+CONFIG_DUMMY_CONSOLE=y+CONFIG_FB_SA1100=y+# CONFIG_FB_VIRTUAL is not set+CONFIG_FBCON_ADVANCED=y+# CONFIG_FBCON_MFB is not set+# CONFIG_FBCON_CFB2 is not set+# CONFIG_FBCON_CFB4 is not set+# CONFIG_FBCON_CFB8 is not set+CONFIG_FBCON_CFB16=y+# CONFIG_FBCON_CFB24 is not set+# CONFIG_FBCON_CFB32 is not set+# CONFIG_FBCON_AFB is not set+# CONFIG_FBCON_ILBM is not set+# CONFIG_FBCON_IPLAN2P2 is not set+# CONFIG_FBCON_IPLAN2P4 is not set+# CONFIG_FBCON_IPLAN2P8 is not set+# CONFIG_FBCON_MAC is not set+# CONFIG_FBCON_VGA_PLANES is not set+# CONFIG_FBCON_VGA is not set+# CONFIG_FBCON_HGA is not set+CONFIG_FBCON_FONTWIDTH8_ONLY=y+CONFIG_FBCON_FONTS=y+CONFIG_FONT_8x8=y+# CONFIG_FONT_8x16 is not set+# CONFIG_FONT_SUN8x16 is not set+# CONFIG_FONT_PEARL_8x8 is not set+# CONFIG_FONT_ACORN_8x8 is not set++#+# Sound+#+CONFIG_SOUND=m+CONFIG_SOUND_UDA1341=m+# CONFIG_SOUND_SA1100_SSP is not set+# CONFIG_SOUND_CMPCI is not set+# CONFIG_SOUND_EMU10K1 is not set+# CONFIG_SOUND_FUSION is not set+# CONFIG_SOUND_CS4281 is not set+# CONFIG_SOUND_ES1370 is not set+# CONFIG_SOUND_ES1371 is not set+# CONFIG_SOUND_ESSSOLO1 is not set+# CONFIG_SOUND_MAESTRO is not set+# CONFIG_SOUND_SONICVIBES is not set+# CONFIG_SOUND_TRIDENT is not set+# CONFIG_SOUND_MSNDCLAS is not set+# CONFIG_SOUND_MSNDPIN is not set+# CONFIG_SOUND_OSS is not set++#+# USB support+#+# CONFIG_USB is not set++#+# Kernel hacking+#+# CONFIG_NO_FRAME_POINTER is not set+# CONFIG_DEBUG_ERRORS is not set+# CONFIG_DEBUG_USER is not set+# CONFIG_DEBUG_INFO is not set+# CONFIG_MAGIC_SYSRQ is not set+# CONFIG_DEBUG_LL is not setdiff -uNr --exclude=.*flags --exclude=*.[ao] --exclude=.*depend /work2/iPAQ/HandHelds.org/cvs/linux/kernel/drivers/mtd/Makefile ./drivers/mtd/Makefile--- /work2/iPAQ/HandHelds.org/cvs/linux/kernel/drivers/mtd/Makefile Thu Mar 22 20:04:59 2001+++ ./drivers/mtd/Makefile Fri Mar 23 05:26:31 2001@@ -108,7 +108,7 @@ obj-$(CONFIG_MTD_SC520CDP) += sc520cdp.o obj-$(CONFIG_MTD_SBC_MEDIAGX) += sbc_mediagx.o mtdpart.o obj-$(CONFIG_MTD_ELAN_104NC) += elan-104nc.o mtdpart.o-obj-$(CONFIG_MTD_SA1100) += sa1100-flash.o mtdpart.o+obj-$(CONFIG_MTD_SA1100) += sa1100-flash.o mtdpart.o redboot.o obj-$(CONFIG_MTD_DC21285) += dc21285.o mtdpart.o obj-$(CONFIG_MTD_IQ80310) += iq80310.o mtdpart.o diff -uNr --exclude=.*flags --exclude=*.[ao] --exclude=.*depend /work2/iPAQ/HandHelds.org/cvs/linux/kernel/drivers/mtd/sa1100-flash.c ./drivers/mtd/sa1100-flash.c--- /work2/iPAQ/HandHelds.org/cvs/linux/kernel/drivers/mtd/sa1100-flash.c Thu Mar 22 20:05:13 2001+++ ./drivers/mtd/sa1100-flash.c Fri Mar 23 20:06:24 2001@@ -387,6 +387,7 @@ #define NB_OF(x) (sizeof(x)/sizeof(x[0])) static struct mtd_info *mymtd;+extern int parse_redboot_partitions(struct mtd_info *master, struct mtd_partition **pparts); int __init sa1100_mtd_init(void) {@@ -485,14 +486,36 @@ nb_parts, buswidth); mymtd = do_cfi_probe(&sa1100_map);- if (mymtd) {- mymtd->module = THIS_MODULE;- add_mtd_partitions(mymtd, parts, nb_parts);- printk(KERN_NOTICE "SA1100 flash access initialized\n");- return 0;+ if (!mymtd)+ return -ENXIO;+++#define CONFIG_SA1100_REDBOOT_PARTITIONS+#ifdef CONFIG_SA1100_REDBOOT_PARTITIONS+ {+ int redboot_nr_parts;+ struct mtd_partitions *redboot_parts;++ + redboot_nr_parts = parse_redboot_partitions(mymtd, &redboot_parts);+ if (nb_parts > 0) {+ int i;++ parts = redboot_parts;+ nb_parts = redboot_nr_parts;+ for (i=0; i<nb_parts; i++) {+ printk("RedBoot Partition: \"%s\", 0x%08lx-0x%08lx\n", parts[i].name, parts[i].offset, parts[i].offset+parts[i].size);+ }++ } } - return -ENXIO;+#endif++ mymtd->module = THIS_MODULE;+ add_mtd_partitions(mymtd, parts, nb_parts);+ printk(KERN_NOTICE "SA1100 flash access initialized\n");+ return 0; } static void __exit sa1100_mtd_cleanup(void)diff -uNr /work2/iPAQ/HandHelds.org/cvs/linux/kernel/drivers/mtd/redboot.c drivers/mtd/redboot.c--- /work2/iPAQ/HandHelds.org/cvs/linux/kernel/drivers/mtd/redboot.c Wed Dec 31 17:00:00 1969+++ drivers/mtd/redboot.c Fri Mar 23 20:11:37 2001@@ -0,0 +1,148 @@+/*+ * $Id: redboot.c,v 1.2 2001/03/14 13:19:47 dwmw2 Exp $+ *+ * Parse RedBoot-style Flash Image System (FIS) tables and+ * produce a Linux partition array to match.+ */++#include <linux/kernel.h>+#include <linux/slab.h>++#include <linux/mtd/mtd.h>+#include <linux/mtd/partitions.h>++struct fis_image_desc {+ unsigned char name[16]; // Null terminated name+ unsigned long flash_base; // Address within FLASH of image+ unsigned long mem_base; // Address in memory where it executes+ unsigned long size; // Length of image+ unsigned long entry_point; // Execution entry point+ unsigned long data_length; // Length of actual data+ unsigned char _pad[256-(16+7*sizeof(unsigned long))];+ unsigned long desc_cksum; // Checksum over image descriptor+ unsigned long file_cksum; // Checksum over image data+};++struct fis_list {+ struct fis_image_desc *img;+ struct fis_list *next;+};++static inline int redboot_checksum(struct fis_image_desc *img)+{+ /* RedBoot doesn't actually write the desc_cksum field yet AFAICT */+ return 1;+}++int parse_redboot_partitions(struct mtd_info *master, struct mtd_partition **pparts)+{+ int nrparts = 0;+ struct fis_image_desc *buf;+ struct mtd_partition *parts;+ struct fis_list *fl = NULL, *tmp_fl;+ int ret, i;+ size_t retlen;+ char *names;+ int namelen = 0;++ buf = kmalloc(PAGE_SIZE, GFP_KERNEL);++ if (!buf)+ return -ENOMEM;++ /* Read the start of the last erase block */+ ret = master->read(master, master->size - master->erasesize,+ PAGE_SIZE, &retlen, (void *)buf);++ if (ret)+ goto out;++ if (retlen != PAGE_SIZE) {+ ret = -EIO;+ goto out;+ }++ if (memcmp(buf, "RedBoot", 8)) {+ ret = 0;+ goto out;+ }++ for (i = 0; i < PAGE_SIZE / sizeof(struct fis_image_desc); i++) {+ struct fis_list *new_fl, **prev;++ if (buf[i].name[0] == 0xff)+ break;+ if (!redboot_checksum(&buf[i]))+ break;++ new_fl = kmalloc(sizeof(struct fis_list), GFP_KERNEL);+ namelen += strlen(buf[i].name)+1;+ if (!new_fl) {+ ret = -ENOMEM;+ goto out;+ }+ new_fl->img = &buf[i];+ buf[i].flash_base &= master->size-1;++ /* I'm sure the JFFS2 code has done me permanent damage.+ * I now think the following is _normal_+ */+ prev = &fl;+ while(*prev && (*prev)->img->flash_base < new_fl->img->flash_base)+ prev = &(*prev)->next;+ new_fl->next = *prev;+ *prev = new_fl;++ nrparts++;+ }+ if (fl->img->flash_base)+ nrparts++;++ for (tmp_fl = fl; tmp_fl->next; tmp_fl = tmp_fl->next) {+ if (tmp_fl->img->flash_base + tmp_fl->img->size + master->erasesize < tmp_fl->next->img->flash_base)+ nrparts++;+ }+ parts = kmalloc(sizeof(*parts)*nrparts + namelen, GFP_KERNEL);++ if (!parts) {+ ret = -ENOMEM;+ goto out;+ }+ names = &parts[nrparts];+ memset(parts, 0, sizeof(*parts)*nrparts + namelen);+ i=0;++ if (fl->img->flash_base) {+ parts[0].name = "unallocated space";+ parts[0].size = fl->img->flash_base;+ parts[0].offset = 0;+ }+ for ( ; i<nrparts; i++) {+ parts[i].size = fl->img->size;+ parts[i].offset = fl->img->flash_base;+ parts[i].name = names;++ strcpy(names, fl->img->name);+ names += strlen(names)+1;++ if(fl->next && fl->img->flash_base + fl->img->size + master->erasesize < fl->next->img->flash_base) {+ i++;+ parts[i].offset = parts[i-1].size + parts[i-1].offset;+ parts[i].size = fl->next->img->flash_base - parts[i].offset;+ parts[i].name = "unallocated space";+ }+ tmp_fl = fl;+ fl = fl->next;+ kfree(tmp_fl);+ }+ ret = nrparts;+ *pparts = parts;+ out:+ while (fl) {+ struct fis_list *old = fl;+ fl = fl->next;+ kfree(old);+ }+ kfree(buf);+ return ret;+}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -