From 4777a70d6665e319ae3723b5e75f67ed0f10997d Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Thu, 6 Jul 2006 14:41:19 +0000 Subject: linux/linux-titan-sh4: Upgrade the titan kernel from 2.6.16 to 2.6.17 now that the sh tree has been upgraded to 2.6.17. --- .../linux/linux-titan-sh4-2.6.16/.mtn2git_empty | 0 packages/linux/linux-titan-sh4-2.6.16/titan-config | 1530 ---------- .../linux/linux-titan-sh4-2.6.16/titan-flash.patch | 3157 -------------------- .../linux/linux-titan-sh4-2.6.17/.mtn2git_empty | 0 packages/linux/linux-titan-sh4-2.6.17/titan-config | 1551 ++++++++++ packages/linux/linux-titan-sh4/.mtn2git_empty | 0 packages/linux/linux-titan-sh4/titan-flash.patch | 3157 ++++++++++++++++++++ packages/linux/linux-titan-sh4_2.6.16.bb | 52 - packages/linux/linux-titan-sh4_2.6.17.bb | 50 + 9 files changed, 4758 insertions(+), 4739 deletions(-) delete mode 100644 packages/linux/linux-titan-sh4-2.6.16/.mtn2git_empty delete mode 100644 packages/linux/linux-titan-sh4-2.6.16/titan-config delete mode 100644 packages/linux/linux-titan-sh4-2.6.16/titan-flash.patch create mode 100644 packages/linux/linux-titan-sh4-2.6.17/.mtn2git_empty create mode 100644 packages/linux/linux-titan-sh4-2.6.17/titan-config create mode 100644 packages/linux/linux-titan-sh4/.mtn2git_empty create mode 100644 packages/linux/linux-titan-sh4/titan-flash.patch delete mode 100644 packages/linux/linux-titan-sh4_2.6.16.bb create mode 100644 packages/linux/linux-titan-sh4_2.6.17.bb (limited to 'packages') diff --git a/packages/linux/linux-titan-sh4-2.6.16/.mtn2git_empty b/packages/linux/linux-titan-sh4-2.6.16/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/linux/linux-titan-sh4-2.6.16/titan-config b/packages/linux/linux-titan-sh4-2.6.16/titan-config deleted file mode 100644 index 11bfc7535c..0000000000 --- a/packages/linux/linux-titan-sh4-2.6.16/titan-config +++ /dev/null @@ -1,1530 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.16-sh -# Thu Jun 29 15:50:21 2006 -# -CONFIG_SUPERH=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_CALIBRATE_DELAY=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=n -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=m - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -# CONFIG_LBD is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# System type -# -# CONFIG_SH_SOLUTION_ENGINE is not set -# CONFIG_SH_7751_SOLUTION_ENGINE is not set -# CONFIG_SH_7300_SOLUTION_ENGINE is not set -# CONFIG_SH_73180_SOLUTION_ENGINE is not set -# CONFIG_SH_7751_SYSTEMH is not set -# CONFIG_SH_STB1_HARP is not set -# CONFIG_SH_STB1_OVERDRIVE is not set -# CONFIG_SH_HP6XX is not set -# CONFIG_SH_CQREEK is not set -# CONFIG_SH_DMIDA is not set -# CONFIG_SH_EC3104 is not set -# CONFIG_SH_SATURN is not set -# CONFIG_SH_DREAMCAST is not set -# CONFIG_SH_CAT68701 is not set -# CONFIG_SH_BIGSUR is not set -# CONFIG_SH_SH2000 is not set -# CONFIG_SH_ADX is not set -# CONFIG_SH_MPC1211 is not set -# CONFIG_SH_SH03 is not set -# CONFIG_SH_SECUREEDGE5410 is not set -# CONFIG_SH_HS7751RVOIP is not set -# CONFIG_SH_RTS7751R2D is not set -# CONFIG_SH_R7780RP is not set -# CONFIG_SH_EDOSK7705 is not set -# CONFIG_SH_SH4202_MICRODEV is not set -# CONFIG_SH_LANDISK is not set -CONFIG_SH_TITAN=y -# CONFIG_SH_UNKNOWN is not set - -# -# Processor selection -# -CONFIG_CPU_SH4=y - -# -# SH-2 Processor Support -# -# CONFIG_CPU_SUBTYPE_SH7604 is not set - -# -# SH-3 Processor Support -# -# CONFIG_CPU_SUBTYPE_SH7300 is not set -# CONFIG_CPU_SUBTYPE_SH7705 is not set -# CONFIG_CPU_SUBTYPE_SH7707 is not set -# CONFIG_CPU_SUBTYPE_SH7708 is not set -# CONFIG_CPU_SUBTYPE_SH7709 is not set - -# -# SH-4 Processor Support -# -# CONFIG_CPU_SUBTYPE_SH7750 is not set -# CONFIG_CPU_SUBTYPE_SH7091 is not set -# CONFIG_CPU_SUBTYPE_SH7750R is not set -# CONFIG_CPU_SUBTYPE_SH7750S is not set -CONFIG_CPU_SUBTYPE_SH7751=y -CONFIG_CPU_SUBTYPE_SH7751R=y -# CONFIG_CPU_SUBTYPE_SH7760 is not set -# CONFIG_CPU_SUBTYPE_SH4_202 is not set - -# -# ST40 Processor Support -# -# CONFIG_CPU_SUBTYPE_ST40STB1 is not set -# CONFIG_CPU_SUBTYPE_ST40GX1 is not set - -# -# SH-4A Processor Support -# -# CONFIG_CPU_SUBTYPE_SH73180 is not set -# CONFIG_CPU_SUBTYPE_SH7770 is not set -# CONFIG_CPU_SUBTYPE_SH7780 is not set - -# -# Memory management options -# -CONFIG_MMU=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 - -# -# Cache configuration -# -# CONFIG_SH_DIRECT_MAPPED is not set -# CONFIG_SH_WRITETHROUGH is not set -# CONFIG_SH_OCRAM is not set -CONFIG_MEMORY_START=0x08030000 -CONFIG_MEMORY_SIZE=0x7fd0000 - -# -# Processor features -# -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_SH_RTC=y -CONFIG_SH_FPU=y -# CONFIG_SH_STORE_QUEUES is not set -CONFIG_CPU_HAS_INTEVT=y -CONFIG_CPU_HAS_SR_RB=y - -# -# Timer support -# -CONFIG_SH_TMU=y -CONFIG_SH_PCLK_FREQ=30000000 - -# -# CPU Frequency scaling -# -# CONFIG_CPU_FREQ is not set - -# -# DMA support -# -CONFIG_SH_DMA=y -CONFIG_NR_ONCHIP_DMA_CHANNELS=8 -# CONFIG_NR_DMA_CHANNELS_BOOL is not set - -# -# Companion Chips -# -# CONFIG_HD6446X_SERIES is not set - -# -# Kernel features -# -# CONFIG_KEXEC is not set -# CONFIG_PREEMPT is not set -# CONFIG_SMP is not set - -# -# Boot options -# -CONFIG_ZERO_PAGE_OFFSET=0x00001000 -CONFIG_BOOT_LINK_OFFSET=0x009e0000 -# CONFIG_UBC_WAKEUP is not set -CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE="console=ttySC1,38400N81 root=/dev/sm0p2 ip=off" - -# -# Bus options -# -CONFIG_PCI=y -CONFIG_SH_PCIDMA_NONCOHERENT=y -CONFIG_PCI_AUTO=y -CONFIG_PCI_AUTO_UPDATE_RESOURCES=y -CONFIG_PCI_LEGACY_PROC=y -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -# CONFIG_HOTPLUG_PCI_FAKE is not set -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_FLAT is not set -# CONFIG_BINFMT_MISC is not set - -# -# Power management options (EXPERIMENTAL) -# -# CONFIG_PM is not set - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_FWMARK is not set -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_MULTIPATH_CACHED=y -CONFIG_IP_ROUTE_MULTIPATH_RR=m -CONFIG_IP_ROUTE_MULTIPATH_RANDOM=m -CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=m -CONFIG_IP_ROUTE_MULTIPATH_DRR=m -# CONFIG_IP_ROUTE_VERBOSE is not set -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -CONFIG_NET_IPIP=y -CONFIG_NET_IPGRE=y -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_INET6_AH=y -CONFIG_INET6_ESP=y -CONFIG_INET6_IPCOMP=y -CONFIG_INET6_TUNNEL=y -CONFIG_IPV6_TUNNEL=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -# CONFIG_IP_NF_CT_PROTO_SCTP is not set -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -# CONFIG_IP_NF_AMANDA is not set -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_MULTIPORT=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_MATCH_POLICY=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_MULTIPORT=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AHESP=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_MATCH_POLICY=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -# CONFIG_BRIDGE_NF_EBTABLES is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -CONFIG_BRIDGE=y -CONFIG_VLAN_8021Q=y -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -# CONFIG_NET_ACT_SIMP is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_IEEE80211=y -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=y -CONFIG_IEEE80211_CRYPT_CCMP=y -CONFIG_IEEE80211_CRYPT_TKIP=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=m - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -CONFIG_MTD_DEBUG=y -CONFIG_MTD_DEBUG_VERBOSE=0 -# CONFIG_MTD_CONCAT is not set -# CONFIG_MTD_PARTITIONS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -# CONFIG_MTD_BLOCK_RO is not set -CONFIG_FTL=m -CONFIG_NFTL=m -# CONFIG_NFTL_RW is not set -CONFIG_INFTL=m -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_CFI_INTELEXT is not set -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_SOLUTIONENGINE is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_IDS=m -# CONFIG_MTD_NAND_DISKONCHIP is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -CONFIG_BLK_SSFDC=y -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set -# CONFIG_FUSION_FC is not set -# CONFIG_FUSION_SAS is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_IFB is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_STNIC is not set -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_SMC91X is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -# CONFIG_NE2000 is not set -CONFIG_NET_PCI=y -# CONFIG_PCNET32 is not set -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -# CONFIG_E100 is not set -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -CONFIG_8139TOO=y -# CONFIG_8139TOO_PIO is not set -CONFIG_8139TOO_TUNE_TWISTER=y -# CONFIG_8139TOO_8129 is not set -CONFIG_8139_OLD_RX_RESET=y -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SIS190 is not set -# CONFIG_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set -# CONFIG_HERMES is not set -# CONFIG_ATMEL is not set - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -# CONFIG_HOSTAP is not set -CONFIG_NET_WIRELESS=y - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -CONFIG_SH_WDT=m - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -# CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia Capabilities Port drivers -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=y -# CONFIG_USB_EHCI_SPLIT_ISO is not set -# CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_UHCI_HCD is not set -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_ZD1201 is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -# CONFIG_USB_SERIAL_AIRPRIME is not set -# CONFIG_USB_SERIAL_ANYDATA is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP2101 is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -# CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -CONFIG_USB_SERIAL_PL2303=m -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -# CONFIG_USB_SERIAL_OMNINET is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_REISERFS_FS_XATTR is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -CONFIG_XFS_FS=m -CONFIG_XFS_EXPORT=y -# CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set -# CONFIG_XFS_POSIX_ACL is not set -# CONFIG_XFS_RT is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -CONFIG_FUSE_FS=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=m -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLBFS is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -CONFIG_RELAYFS_FS=m -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_9P_FS=m - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=m -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=m -# 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_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -# 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_9 is not set -# CONFIG_NLS_ISO8859_13 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_KOI8_U is not set -CONFIG_NLS_UTF8=m - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=16 -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_FRAME_POINTER is not set -# CONFIG_FORCED_INLINING is not set -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_SH_STANDARD_BIOS is not set -CONFIG_EARLY_SCIF_CONSOLE=y -# CONFIG_EARLY_PRINTK is not set -# CONFIG_KGDB is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=y -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=y -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_MICHAEL_MIC=y -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m diff --git a/packages/linux/linux-titan-sh4-2.6.16/titan-flash.patch b/packages/linux/linux-titan-sh4-2.6.16/titan-flash.patch deleted file mode 100644 index fc633f3e05..0000000000 --- a/packages/linux/linux-titan-sh4-2.6.16/titan-flash.patch +++ /dev/null @@ -1,3157 +0,0 @@ - -Add the driver for onboard flash. -The quality of this driver means that it has not been included in the -upstream CVS. -This implements the block device translation layer to match what the -onboard firmware implements. - -diff -duNr linux-2.6.16-orig/drivers/block/Kconfig linux-2.6.16/drivers/block/Kconfig ---- linux-2.6.16-orig/drivers/block/Kconfig 2006-06-29 16:12:57.000000000 +1000 -+++ linux-2.6.16/drivers/block/Kconfig 2006-06-29 16:13:27.000000000 +1000 -@@ -190,6 +190,13 @@ - To compile this driver as a module, choose M here: the - module will be called DAC960. - -+config BLK_SSFDC -+ tristate "SmartMedia(TM) Driver (sm)" -+ depends on SH_TITAN -+ help -+ Say Y here if you want the SmartMedia chip enabled. -+ Otherwise say N. -+ - config BLK_DEV_UMEM - tristate "Micro Memory MM5415 Battery Backed RAM support (EXPERIMENTAL)" - depends on PCI && EXPERIMENTAL -diff -duNr linux-2.6.16-orig/drivers/block/Makefile linux-2.6.16/drivers/block/Makefile ---- linux-2.6.16-orig/drivers/block/Makefile 2006-06-29 16:12:57.000000000 +1000 -+++ linux-2.6.16/drivers/block/Makefile 2006-06-29 16:13:27.000000000 +1000 -@@ -21,6 +21,7 @@ - obj-$(CONFIG_BLK_CPQ_DA) += cpqarray.o - obj-$(CONFIG_BLK_CPQ_CISS_DA) += cciss.o - obj-$(CONFIG_BLK_DEV_DAC960) += DAC960.o -+obj-$(CONFIG_BLK_SSFDC) += ssfdc.o - obj-$(CONFIG_CDROM_PKTCDVD) += pktcdvd.o - - obj-$(CONFIG_BLK_DEV_UMEM) += umem.o -diff -duNr linux-2.6.16-orig/drivers/block/ssfdc.c linux-2.6.16/drivers/block/ssfdc.c ---- linux-2.6.16-orig/drivers/block/ssfdc.c 1970-01-01 10:00:00.000000000 +1000 -+++ linux-2.6.16/drivers/block/ssfdc.c 2006-06-29 16:13:50.000000000 +1000 -@@ -0,0 +1,2742 @@ -+/* $id: $ -+ssfdc.c - Solid State Flopyy Disk Card -+ -+Original source curtesy of Toshiba Corporation. -+ -+Modification for use by Linux provided by Nimble Microsystems Inc. -+ -+TODO: -+ -+Modification History: -+ -+ March 2001 - Initial port of Toshiba sources by Bill Mann -+ May 2001 - Debug of staticly linked ssfdc driver, Bill Mann -+ Nov 2001 - Reimplementation using tasklets and timers. -+ May 2002 - Partition support added. -+ Oct 2003 - Port to kernel 2.6.0 -+ Mar 2004 - Stabilization refinements... -+ -+Overview: The kernel interfaces to the device via the "block_device_operations -+ ssfdc_fops", the device's request handling function -+ "do_ssfdc_request(request_queue_t * q)", or by the ioctl interface ssfdc_ioctl(). -+ -+ do_ssfdc_request() purpose is to kickstart ssfdc_thread via a wake_up call. ssfdc_thread -+ then processes requests from the queue. -+ -+ Blocks are mapped logically. So a sector read/write results in the determination -+ of the logical block address of the block containing the desired sector and the -+ corresponding physical block being accessed. Note the use of ReadBlock, WriteBlock, -+ and PhyBlock, Log2Phy[] etc. -+ -+ This driver implements a wear leveling strategy where sector writes to the -+ SmartMedia causes the block which is the target of the write to be copied into a -+ new block, the new data written and the old block erased. This makes the driver -+ more complicated than a straightforward sector read/write. -+ -+*/ -+ -+/* Section device headers */ -+#define DEBUG_SSFDC 0 -+#define DEBUG_SSFDC_STRUCT 0 -+#define DEBUG_SSFDC_REQUEST 0 -+#define DEBUG_SSFDC_READREDT 0 -+#define DEBUG_SSFDC_WRITE 0 -+#define DEBUG_SSFDC_WRITESECT 0 -+#define DEBUG_SSFDC_WRITEBLKS 0 -+#define DEBUG_SSFDC_READ 0 -+#define DEBUG_SSFDC_ADDR 0 -+#define DEBUG_SSFDC_ASSIGNRELEASE 0 -+#define SSFDC_READINGTASKLET 0 -+/* Edition Compilation Mode */ -+ -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "ssfdc.h" -+ -+#define SSFDC_MAJOR 240 -+ -+static int static_ssfdc_debug = 0; -+ -+static DECLARE_WAIT_QUEUE_HEAD(ssfdc_wait); -+ -+static struct gendisk *disks[MAX_SSFDC]; -+static ssfdc_dev *ssfdc[MAX_SSFDC]; -+ -+static int ssfdc_open(struct inode *i_node, struct file *fptr); -+static int ssfdc_getgeo(struct block_device *bdev, struct hd_geometry *geo); -+static int ssfdc_release(struct inode *i_node, struct file *fptr); -+static int ssfdc_ioctl(struct inode *i_node, struct file *fptr, unsigned cmd, unsigned long arg); -+static int ssfdc_revalidate(struct gendisk *disk); -+void do_ssfdc_request(request_queue_t * q); -+ -+static struct block_device_operations ssfdc_fops = { -+ .owner = THIS_MODULE, -+ .open = ssfdc_open, -+ .getgeo = ssfdc_getgeo, -+ .release = ssfdc_release, -+ .ioctl = ssfdc_ioctl, -+ // bjm out .revalidate_disk = ssfdc_revalidate, -+}; -+ -+ -+/*************************************************************************** -+ BIT Control Macro -+ ***************************************************************************/ -+static char BitData[] = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80 }; -+#define SetBit(a,b) (a[(unsigned char)((b)/8)]|= BitData[(b)%8]) -+#define ClrBit(a,b) (a[(unsigned char)((b)/8)]&=~BitData[(b)%8]) -+#define ChkBit(a,b) (a[(unsigned char)((b)/8)] & BitData[(b)%8]) -+ -+/***************************************************************************/ -+static int MediaReadSector(ssfdc_dev *, struct request *, char *, long,int); -+static int MediaWriteSector(ssfdc_dev *, struct request *, char *, long,int); -+ -+/***************************************************************************/ -+static int CheckLogCHS(ssfdc_dev *,unsigned int *,unsigned char *,unsigned char *); -+static int CheckMediaWP(ssfdc_dev *); -+static int ConvMediaAddr(ssfdc_dev *,long); -+static int IncMediaAddr(ssfdc_dev *); -+static int WriteReqInCurrBlk(ssfdc_dev *, long, int *); -+/******************************************/ -+/******************************************/ -+static int AssignWriteBlock(ssfdc_dev *, int); -+/******************************************/ -+/******************************************/ -+static int SetPhyFmtValue(ssfdc_dev *); -+static int SearchCIS(ssfdc_dev *,unsigned int *); -+static int MakeLogTable(ssfdc_dev *,unsigned int); -+/******************************************/ -+static int MarkFailPhyOneBlock(ssfdc_dev *); -+ -+static void _ReadSsfdcBuf(ssfdc_dev *, unsigned char *databuf,unsigned char *redundant); -+static void _WriteSsfdcBuf(ssfdc_dev *,unsigned char *,unsigned char *); -+static void _ReadSsfdcWord(ssfdc_dev *,unsigned int *); -+static void _ReadRedtSsfdcBuf(ssfdc_dev *, unsigned char *redundant); -+static void _WriteRedtSsfdcBuf(ssfdc_dev*, unsigned char *redundant); -+ -+/***************************************************************************/ -+static void _SetSsfdcCmd(ssfdc_dev *, unsigned char); -+static void _SetSsfdcAddr(ssfdc_dev *, unsigned char); -+static void _SetSsfdcBlock(ssfdc_dev *); -+static void _SetSsfdcChip(ssfdc_dev *); -+static void _SetSsfdcStandby(ssfdc_dev *); -+static int _CheckSsfdcBusy(ssfdc_dev *, unsigned int); -+static int _CheckSsfdcStatus(ssfdc_dev *); -+static void _ResetSsfdcErr(ssfdc_dev *psm); -+static unsigned char _CheckDevCode(unsigned char); -+void SsfdcReset(ssfdc_dev *); -+void CntReset(ssfdc_dev *); -+ -+static char BitCount(unsigned char); -+static char BitCountWord(unsigned int); -+ -+static void _WaitTimer(long int); -+typedef void (*timeout_fn)(unsigned long); -+static void ssfdc_rw_request(ssfdc_dev *psm, struct request *req); -+static int ssfdc_end_request(ssfdc_dev *psm, struct request *req, int status); -+static void ssfdc_terminate_request(ssfdc_dev *psm, struct request *req); -+static struct request *ssfdc_get_request(ssfdc_dev *psm); -+ -+/* debugging utils etc. */ -+ -+#if DEBUG_SSFDC -+static void dump_ssfdc_state(ssfdc_dev * psm); -+#endif -+ -+/* end of debugging utils etc. */ -+ -+/* our tasklets */ -+/* top level R/W initiation tasklet */ -+static void initxfer(unsigned long); -+#if 0 // use thread and not a tasklet -+DECLARE_TASKLET(initxfer_tasklet0, initxfer, 0); -+#ifdef CONFIG_SH_NIMBLE_MINI -+DECLARE_TASKLET(initxfer_tasklet1, initxfer, 1); -+#endif -+#endif -+ -+/* Sector Write Tasklets, This group includes a readcopy tasklet for block copies...*/ -+ -+/* Tasklet to read a sector into a temporary buffer for later write */ -+ -+/* power is turned on, and then left on for TIMER_ON_TIMEOUT */ -+// bjm debug struct timer_list mediachange_timer; -+// bjm debug static void mediachangetest(unsigned long); -+ -+// bjm out -+// bjm out struct timer_list waiting_timer; -+static void waiting_timeout(unsigned long); -+ -+/******************************************************************************/ -+static void trans_result \ -+ (unsigned char,unsigned char,unsigned char *,unsigned char *); -+static void calculate_ecc \ -+ (unsigned char *,unsigned char *,unsigned char *,unsigned char *,unsigned char *); -+static unsigned char correct_data \ -+ (unsigned char *,unsigned char *,unsigned char,unsigned char,unsigned char); -+ -+ /* CP0-CP5 code table */ -+static unsigned char ecctable[256] = { -+ 0x00,0x55,0x56,0x03,0x59,0x0C,0x0F,0x5A,0x5A,0x0F,0x0C,0x59,0x03,0x56,0x55,0x00, -+ 0x65,0x30,0x33,0x66,0x3C,0x69,0x6A,0x3F,0x3F,0x6A,0x69,0x3C,0x66,0x33,0x30,0x65, -+ 0x66,0x33,0x30,0x65,0x3F,0x6A,0x69,0x3C,0x3C,0x69,0x6A,0x3F,0x65,0x30,0x33,0x66, -+ 0x03,0x56,0x55,0x00,0x5A,0x0F,0x0C,0x59,0x59,0x0C,0x0F,0x5A,0x00,0x55,0x56,0x03, -+ 0x69,0x3C,0x3F,0x6A,0x30,0x65,0x66,0x33,0x33,0x66,0x65,0x30,0x6A,0x3F,0x3C,0x69, -+ 0x0C,0x59,0x5A,0x0F,0x55,0x00,0x03,0x56,0x56,0x03,0x00,0x55,0x0F,0x5A,0x59,0x0C, -+ 0x0F,0x5A,0x59,0x0C,0x56,0x03,0x00,0x55,0x55,0x00,0x03,0x56,0x0C,0x59,0x5A,0x0F, -+ 0x6A,0x3F,0x3C,0x69,0x33,0x66,0x65,0x30,0x30,0x65,0x66,0x33,0x69,0x3C,0x3F,0x6A, -+ 0x6A,0x3F,0x3C,0x69,0x33,0x66,0x65,0x30,0x30,0x65,0x66,0x33,0x69,0x3C,0x3F,0x6A, -+ 0x0F,0x5A,0x59,0x0C,0x56,0x03,0x00,0x55,0x55,0x00,0x03,0x56,0x0C,0x59,0x5A,0x0F, -+ 0x0C,0x59,0x5A,0x0F,0x55,0x00,0x03,0x56,0x56,0x03,0x00,0x55,0x0F,0x5A,0x59,0x0C, -+ 0x69,0x3C,0x3F,0x6A,0x30,0x65,0x66,0x33,0x33,0x66,0x65,0x30,0x6A,0x3F,0x3C,0x69, -+ 0x03,0x56,0x55,0x00,0x5A,0x0F,0x0C,0x59,0x59,0x0C,0x0F,0x5A,0x00,0x55,0x56,0x03, -+ 0x66,0x33,0x30,0x65,0x3F,0x6A,0x69,0x3C,0x3C,0x69,0x6A,0x3F,0x65,0x30,0x33,0x66, -+ 0x65,0x30,0x33,0x66,0x3C,0x69,0x6A,0x3F,0x3F,0x6A,0x69,0x3C,0x66,0x33,0x30,0x65, -+ 0x00,0x55,0x56,0x03,0x59,0x0C,0x0F,0x5A,0x5A,0x0F,0x0C,0x59,0x03,0x56,0x55,0x00 -+}; -+ -+#define BIT7 0x80 -+#define BIT6 0x40 -+#define BIT5 0x20 -+#define BIT4 0x10 -+#define BIT3 0x08 -+#define BIT2 0x04 -+#define BIT1 0x02 -+#define BIT0 0x01 -+ -+#define BIT1BIT0 0x03 -+#define BIT23 0x00800000L -+#define MASK_CPS 0x3f -+#define CORRECTABLE 0x00555554L -+ -+/* -+ Transfer result -+ LP14,12,10,... & LP15,13,11,... -> LP15,14,13,... & LP7,6,5,.. -+*/ -+static void trans_result(reg2,reg3,ecc1,ecc2) -+unsigned char reg2; /* LP14,LP12,LP10,... */ -+unsigned char reg3; /* LP15,LP13,LP11,... */ -+unsigned char *ecc1; /* LP15,LP14,LP13,... */ -+unsigned char *ecc2; /* LP07,LP06,LP05,... */ -+{ -+ unsigned char a; /* Working for reg2,reg3 */ -+ unsigned char b; /* Working for ecc1,ecc2 */ -+ unsigned char i; /* For counting */ -+ -+ a=BIT7; b=BIT7; /* 80h=10000000b */ -+ *ecc1=*ecc2=0; /* Clear ecc1,ecc2 */ -+ for(i=0; i<4; ++i) { -+ if ((reg3&a)!=0) *ecc1|=b; /* LP15,13,11,9 -> ecc1 */ -+ b=b>>1; /* Right shift */ -+ if ((reg2&a)!=0) *ecc1|=b; /* LP14,12,10,8 -> ecc1 */ -+ b=b>>1; /* Right shift */ -+ a=a>>1; /* Right shift */ -+ } -+ b=BIT7; /* 80h=10000000b */ -+ for(i=0; i<4; ++i) { -+ if ((reg3&a)!=0) *ecc2|=b; /* LP7,5,3,1 -> ecc2 */ -+ b=b>>1; /* Right shift */ -+ if ((reg2&a)!=0) *ecc2|=b; /* LP6,4,2,0 -> ecc2 */ -+ b=b>>1; /* Right shift */ -+ a=a>>1; /* Right shift */ -+ } -+} -+ -+ -+/* -+ Calculating ECC -+ data[0-255] -> ecc1,ecc2,ecc3 using CP0-CP5 code table[0-255] -+*/ -+static void calculate_ecc(table,data,ecc1,ecc2,ecc3) -+unsigned char *table; /* CP0-CP5 code table */ -+unsigned char *data; /* DATA */ -+unsigned char *ecc1; /* LP15,LP14,LP13,... */ -+unsigned char *ecc2; /* LP07,LP06,LP05,... */ -+unsigned char *ecc3; /* CP5,CP4,CP3,...,"1","1" */ -+{ -+ unsigned int i; /* For counting */ -+ unsigned char a; /* Working for table */ -+ unsigned char reg1; /* D-all,CP5,CP4,CP3,... */ -+ unsigned char reg2; /* LP14,LP12,L10,... */ -+ unsigned char reg3; /* LP15,LP13,L11,... */ -+ -+ reg1=reg2=reg3=0; /* Clear parameter */ -+ -+ for(i=0; i<256; ++i) { -+ a=table[data[i]]; /* Get CP0-CP5 code from table */ -+ reg1^=(a&MASK_CPS); /* XOR with a */ -+ if ((a&BIT6)!=0) { /* If D_all(all bit XOR) = 1 */ -+ reg3^=(unsigned char)i; /* XOR with counter */ -+ reg2^=~((unsigned char)i); /* XOR with inv. of counter */ -+ } -+ } -+ -+ /* Trans LP14,12,10,... & LP15,13,11,... -> LP15,14,13,... & LP7,6,5,.. */ -+ trans_result(reg2,reg3,ecc1,ecc2); -+ -+ *ecc1=~(*ecc1); *ecc2=~(*ecc2); /* Inv. ecc2 & ecc3 */ -+ *ecc3=((~reg1)<<2)|BIT1BIT0; /* Make TEL format */ -+} -+ -+static unsigned char correct_data(data,eccdata,ecc1,ecc2,ecc3) -+unsigned char *data; /* DATA */ -+unsigned char *eccdata; /* ECC DATA */ -+unsigned char ecc1; /* LP15,LP14,LP13,... */ -+unsigned char ecc2; /* LP07,LP06,LP05,... */ -+unsigned char ecc3; /* CP5,CP4,CP3,...,"1","1" */ -+{ -+ unsigned long l; /* Working to check d */ -+ unsigned long d; /* Result of comparison */ -+ unsigned int i; /* For counting */ -+ unsigned char d1,d2,d3; /* Result of comparison */ -+ unsigned char a; /* Working for add */ -+ unsigned char add; /* Byte address of cor. DATA */ -+ unsigned char b; /* Working for bit */ -+ unsigned char bit; /* Bit address of cor. DATA */ -+ -+ d1=ecc1^eccdata[1]; d2=ecc2^eccdata[0]; /* Compare LP's */ -+ d3=ecc3^eccdata[2]; /* Comapre CP's */ -+ d=((unsigned long)d1<<16) /* Result of comparison */ -+ +((unsigned long)d2<<8) -+ +(unsigned long)d3; -+ -+ if (d==0) return(0); /* If No error, return */ -+ if (((d^(d>>1))&CORRECTABLE)==CORRECTABLE) { /* If correctable */ -+ l=BIT23; -+ add=0; /* Clear parameter */ -+ a=BIT7; -+ for(i=0; i<8; ++i) { /* Checking 8 bit */ -+ if ((d&l)!=0) add|=a; /* Make byte address from LP's */ -+ l>>=2; a>>=1; /* Right Shift */ -+ } -+ bit=0; /* Clear parameter */ -+ b=BIT2; -+ for(i=0; i<3; ++i) { /* Checking 3 bit */ -+ if ((d&l)!=0) bit|=b; /* Make bit address from CP's */ -+ l>>=2; b>>=1; /* Right shift */ -+ } -+ b=BIT0; -+ data[add]^=(b<>=1; /* Right shift */ -+ } -+ if (i==1) { /* If ECC error */ -+ eccdata[1]=ecc1; eccdata[0]=ecc2; /* Put right ECC code */ -+ eccdata[2]=ecc3; -+ return(2); -+ } -+ return(3); /* Uncorrectable error */ -+} -+/*************************************************************************** -+ Common Subroutine -+ ***************************************************************************/ -+char BitCount(unsigned char cdata) -+{ -+ char bitcount=0; -+ while(cdata) { -+ bitcount+=(cdata &0x01); -+ cdata /=2; -+ } -+ return(bitcount); -+} -+ -+char BitCountWord(unsigned int cdata) -+{ -+ char bitcount=0; -+ while(cdata) { -+ bitcount+=(cdata &0x01); -+ cdata /=2; -+ } -+ return(bitcount); -+} -+ -+/***************************************************************************/ -+void StringCopy(char *stringA, char *stringB, int count) -+{ -+ int i; -+ for(i=0; iRedundant+REDT_ADDR1H)*0x100+*(psm->Redundant+REDT_ADDR1L); -+ addr2=*(psm->Redundant+REDT_ADDR2H)*0x100+*(psm->Redundant+REDT_ADDR2L); -+ if(addr1==addr2) -+ if((addr1 &0xF000)==0x1000) -+ { psm->LogBlock=(addr1 &0x0FFF)/2; return(SUCCESS); } -+ if(BitCountWord(addr1^addr2)>1) return(ERROR); -+ if((addr1 &0xF000)==0x1000) -+ if(! (BitCountWord(addr1) &0x0001)) -+ { psm->LogBlock=(addr1 &0x0FFF)/2; return(SUCCESS); } -+ if((addr2 &0xF000)==0x1000) -+ if(! (BitCountWord(addr2) &0x0001)) -+ { psm->LogBlock=(addr2 &0x0FFF)/2; return(SUCCESS); } -+ return(ERROR); -+} -+/***************************************************************************/ -+void ClrRedundantData(unsigned char *redundant) -+{ -+ char i; -+ for(i=0; iLogBlock*2+0x1000; -+ if((BitCountWord(addr)%2)) addr++; -+ *(redundant+REDT_ADDR1H)=*(redundant+REDT_ADDR2H)=addr/0x100; -+ *(redundant+REDT_ADDR1L)=*(redundant+REDT_ADDR2L)=(unsigned char)addr; -+} -+ -+void SetFailBlock(unsigned char *redundant) -+{ -+ char i; -+ for(i=0; iZone,psm->LogBlock,psm->PhyBlock,psm->Sector); -+#endif -+ addr=(unsigned int)psm->Zone*psm->MaxBlocks+psm->PhyBlock; -+ addr=addr*(unsigned int)psm->MaxSectors+psm->Sector; -+ if((psm->Attribute &MPS)==PS256) /* for 256byte/page */ -+ addr=addr*2+(unsigned int)add; -+/*-----------------------------------------------*/ -+ _HwSetAddr(psm); -+ _HwOutData(psm,0x00); -+ _HwOutData(psm,(unsigned char)addr); -+ _HwOutData(psm,(unsigned char)(addr/0x0100)); -+ if((psm->Attribute &MADC)==AD4CYC) -+ _HwOutData(psm,(unsigned char)(psm->Zone/2)); /* Patch */ -+ _HwSetData(psm); -+} -+ -+static void _SetSsfdcBlock(ssfdc_dev *psm) -+{ -+ unsigned int addr; -+#if DEBUG_SSFDC_ASSIGNRELEASE -+ printk(KERN_DEBUG "_SetSsfdcBlock() set card addr to PhyBlock %d\n", psm->PhyBlock); -+#endif -+ addr=(unsigned int)psm->Zone*psm->MaxBlocks+psm->PhyBlock; -+ addr=addr*(unsigned int)psm->MaxSectors; -+ if((psm->Attribute &MPS)==PS256) /* for 256byte/page */ -+ addr=addr*2; -+/*-----------------------------------------------*/ -+ _HwSetAddr(psm); -+ _HwOutData(psm,(unsigned char)addr); -+ _HwOutData(psm,(unsigned char)(addr/0x0100)); -+ if((psm->Attribute &MADC)==AD4CYC) -+ _HwOutData(psm,(unsigned char)(psm->Zone/2)); /* Patch */ -+ _HwSetData(psm); -+} -+ -+static inline void _SetSsfdcStandby(ssfdc_dev *psm) -+{ -+ _HwSetStandby(psm); -+} -+ -+static int _CheckSsfdcStatus(ssfdc_dev *psm) -+{ -+ int status; -+ if((status=_HwInData(psm)) & WR_FAIL) { -+ printk(KERN_DEBUG "_CheckSsfdcStatus() error %x\n", status); -+ return(ERROR); -+ } -+ return(SUCCESS); -+} -+ -+static void _ResetSsfdcErr(ssfdc_dev *psm) -+{ -+ _HwSetCmd(psm); -+ _HwOutData(psm,SSFDC_RST_CHIP); -+ _HwSetData(psm); -+ while(1) { -+ udelay(30); -+ if(! _HwChkBusy(psm)) break; -+ } -+ _HwSetStandby(psm); -+} -+ -+static void waiting_timeout(unsigned long psm) -+{ -+ // enable the wakeup signal! -+ wake_up(&((ssfdc_dev *)psm)->thread_wq); -+} -+ -+/* -+ _CheckSsfdcBusy() -+ -+ set a timer in jiffies from int time x .1ms -+*/ -+ -+static int _CheckSsfdcBusy(ssfdc_dev *psm, unsigned int time) -+{ -+ unsigned long incr_div = 4; -+ unsigned long incr_us = time / incr_div, -+ jticks=time/(MSEC * JIFFY_TICK_MS); -+ unsigned long tick_retried=0, wrap_flag, expires; -+ -+ if (!jticks) { -+ // small delay first to test completion -+ do { -+ udelay(incr_us); -+ if (!_HwChkBusy(psm)) -+ return(SUCCESS); -+ } while (incr_div--); -+ return(ERROR); -+ } -+ -+ // Block the wakeup signal? -+ -+one_more_time: -+ expires = jiffies + jticks; -+ wrap_flag = ( expires < jiffies); -+ -+ do { -+ wait_event_interruptible_timeout(psm->thread_wq, 0, jticks); -+ if (!_HwChkBusy(psm)) { -+ return(SUCCESS); -+ } -+ } while (wrap_flag ? expires <= jiffies : expires >= jiffies); -+ -+#if 1 -+ // Is the chip not busy? If so its an ERROR -+ if (!_HwChkBusy(psm)) { -+ return(SUCCESS); -+ } -+ else { -+ // if we came back, give us one more tick/time -+ if (! tick_retried ) { -+ tick_retried = 1; -+ jticks = 0; -+ printk("."); -+ goto one_more_time; -+ } -+ return(ERROR); -+ } -+#endif -+} -+ -+static void _SetSsfdcChip(ssfdc_dev *psm) -+{ -+ _HwSetAddr(psm); -+ _HwOutData(psm,0x00); -+ _HwSetData(psm); -+} -+/*************************************************************************** -+ NAND Memory (SmartMedia) Buffer Data Xfer Subroutine -+ ***************************************************************************/ -+static void _ReadSsfdcBuf(ssfdc_dev *psm,unsigned char *databuf,unsigned char *redundant) -+{ -+ int i; -+ for(i=0x00;i<(((psm->Attribute &MPS)==PS256)?0x100:0x200);i++) -+ *databuf++ =_HwInData(psm); -+ for(i=0x00;i<(((psm->Attribute &MPS)==PS256)?0x08:0x10);i++) -+ *redundant++ =_HwInData(psm); -+} -+ -+static void _WriteSsfdcBuf(ssfdc_dev *psm, unsigned char *databuf,unsigned char *redundant) -+{ -+ int i; -+ for(i=0x00;i<(((psm->Attribute &MPS)==PS256)?0x100:0x200);i++) -+ _HwOutData(psm,*databuf++); -+ for(i=0x00;i<(((psm->Attribute &MPS)==PS256)?0x08:0x10);i++) -+ _HwOutData(psm,*redundant++); -+} -+ -+static void _ReadSsfdcWord(ssfdc_dev *psm, unsigned int *pdata) -+{ -+ *pdata =_HwInData(psm)*0x100; -+ *pdata|=(unsigned char)_HwInData(psm); -+} -+ -+static void _ReadRedtSsfdcBuf(ssfdc_dev *psm,unsigned char *redundant) -+{ -+ int i; -+ for(i=0x00;i<(((psm->Attribute &MPS)==PS256)?0x08:0x10);i++) -+ redundant[i] =_HwInData(psm); -+} -+ -+static void _WriteRedtSsfdcBuf(ssfdc_dev *psm, unsigned char *redundant) -+{ -+ char i; -+ for(i=0x00;i<(((psm->Attribute &MPS)==PS256)?0x08:0x10);i++) -+ _HwOutData(psm,*redundant++); -+} -+ -+/*************************************************************************** -+ Timer Control Subroutine -+ ***************************************************************************/ -+#define SHORT_DELAY 1 -+ -+ -+ -+ -+void _GetDateTime(char *date) -+{ -+} -+ -+/* -+_WaitTimer(long time) time is in ticks. -+*/ -+ -+static inline void _WaitTimer(long time) -+{ -+} -+ -+/*************************************************************************** -+ SmartMedia Function Command Subroutine -+ ***************************************************************************/ -+void SsfdcReset(ssfdc_dev *psm) -+{ -+ _SetSsfdcCmd(psm, SSFDC_RST_CHIP); -+ _CheckSsfdcBusy(psm,BUSY_RESET); -+ _SetSsfdcCmd(psm,SSFDC_READ); -+ _CheckSsfdcBusy(psm,BUSY_READ); -+ _SetSsfdcStandby(psm); -+} -+ -+void SsfdcWriteRedtMode(ssfdc_dev *psm) -+{ -+ _SetSsfdcCmd(psm,SSFDC_RST_CHIP); -+ _CheckSsfdcBusy(psm,BUSY_RESET); -+ _SetSsfdcCmd(psm,SSFDC_READ_REDT); -+ _CheckSsfdcBusy(psm,BUSY_READ); -+ _SetSsfdcStandby(psm); -+} -+ -+void SsfdcReadID(ssfdc_dev *psm, unsigned int *pid) -+{ -+ _SetSsfdcCmd(psm,SSFDC_READ_ID); -+ _SetSsfdcChip(psm); -+ _ReadSsfdcWord(psm,pid); -+ _SetSsfdcStandby(psm); -+} -+ -+int SsfdcCheckStatus(ssfdc_dev *psm) -+{ -+ _SetSsfdcCmd(psm,SSFDC_RDSTATUS); -+ if(_CheckSsfdcStatus(psm)) -+ { _SetSsfdcStandby(psm); return(ERROR); } -+ _SetSsfdcStandby(psm); -+ return(SUCCESS); -+} -+ -+int SsfdcReadSect(ssfdc_dev *psm, unsigned char *buf,unsigned char *redundant) -+{ -+#if DEBUG_SSFDC_READ -+ printk(KERN_DEBUG "SsfdcReadSect() - Zone %d LogBlock %d, PhyBlock %d, Sector %d\n", -+ psm->Zone, psm->LogBlock, psm->PhyBlock, psm->Sector); -+#endif -+ _SetSsfdcCmd(psm,SSFDC_READ); -+ _SetSsfdcAddr(psm, EVEN); -+ if(_CheckSsfdcBusy(psm,BUSY_READ)) -+ { _ResetSsfdcErr(psm); return(ERROR); } -+ _ReadSsfdcBuf(psm,buf,redundant); -+ if(_CheckSsfdcBusy(psm,BUSY_READ)) -+ { _ResetSsfdcErr(psm); return(ERROR); } -+ if((psm->Attribute &MPS)==PS256) { -+ _SetSsfdcCmd(psm,SSFDC_READ); -+ _SetSsfdcAddr(psm, ODD); -+ if(_CheckSsfdcBusy(psm,BUSY_READ)) -+ { _ResetSsfdcErr(psm); return(ERROR); } -+ _ReadSsfdcBuf(psm,buf+0x100,redundant+0x08); -+ if(_CheckSsfdcBusy(psm,BUSY_READ)) -+ { _ResetSsfdcErr(psm); return(ERROR); } -+ } -+ _SetSsfdcStandby(psm); -+ return(SUCCESS); -+} -+ -+int SsfdcWriteSect(ssfdc_dev *psm, unsigned char *buf, unsigned char *redundant) -+{ -+#if DEBUG_SSFDC_WRITESECT -+ printk(KERN_DEBUG "SsfdcWriteSect() - Zone %d LogBlock %d, PhyBlock %d, Sector %d\n", \ -+ psm->Zone, psm->LogBlock, psm->PhyBlock, psm->Sector); -+#endif -+ _SetSsfdcCmd(psm,SSFDC_WRDATA); -+ _SetSsfdcAddr(psm,EVEN); -+ _WriteSsfdcBuf(psm,buf,redundant); -+ _SetSsfdcCmd(psm,SSFDC_WRITE); -+ if(_CheckSsfdcBusy(psm,BUSY_PROG)) -+ { _ResetSsfdcErr(psm); -+#if DEBUG_SSFDC_WRITESECT -+ printk(KERN_DEBUG "SsfdcWriteSect() e 1\n"); -+#endif -+ return(ERROR); } -+ if((psm->Attribute &MPS)==PS256) { -+ _SetSsfdcCmd(psm,SSFDC_RDSTATUS); -+ if(_CheckSsfdcStatus(psm)) -+ { _SetSsfdcStandby(psm); return(SUCCESS); } -+ _SetSsfdcCmd(psm,SSFDC_WRDATA); -+ _SetSsfdcAddr(psm,ODD); -+ _WriteSsfdcBuf(psm,buf+0x100,redundant+0x08); -+ _SetSsfdcCmd(psm,SSFDC_WRITE); -+ if(_CheckSsfdcBusy(psm,BUSY_PROG)) -+ { _ResetSsfdcErr(psm); -+#if DEBUG_SSFDC_WRITESECT -+ printk(KERN_DEBUG "SsfdcWriteSect() e 2\n"); -+#endif -+ return(ERROR); } -+ } -+ _SetSsfdcStandby(psm); -+ return(SUCCESS); -+} -+ -+int SsfdcEraseBlock(ssfdc_dev *psm) -+{ -+ _SetSsfdcCmd(psm,SSFDC_ERASE1); -+ _SetSsfdcBlock(psm); -+ _SetSsfdcCmd(psm,SSFDC_ERASE2); -+ if(_CheckSsfdcBusy(psm,BUSY_ERASE) || SsfdcCheckStatus(psm)) { -+ _ResetSsfdcErr(psm); -+ return(ERROR); -+ } -+ _SetSsfdcStandby(psm); -+ return(SUCCESS); -+} -+ -+int SsfdcReadRedtData(ssfdc_dev *psm, unsigned char *redundant) -+{ -+#if DEBUG_SSFDC_READREDT -+ printk(KERN_DEBUG " +"); -+#endif -+ _SetSsfdcCmd(psm,SSFDC_READ_REDT); -+ _SetSsfdcAddr(psm,EVEN); -+ if(_CheckSsfdcBusy(psm,BUSY_READ)) -+ { _ResetSsfdcErr(psm); -+#if DEBUG_SSFDC_READREDT -+ printk(KERN_DEBUG " e 1\n"); -+#endif -+ return(ERROR); } -+ _ReadRedtSsfdcBuf(psm, redundant); -+ if(_CheckSsfdcBusy(psm,BUSY_READ)) -+ { _ResetSsfdcErr(psm); -+#if DEBUG_SSFDC_READREDT -+ printk(KERN_DEBUG " e 2\n"); -+#endif -+ return(ERROR); } -+ if((psm->Attribute &MPS)==PS256) { -+ _SetSsfdcCmd(psm,SSFDC_READ_REDT); -+ _SetSsfdcAddr(psm,ODD); -+ if(_CheckSsfdcBusy(psm,BUSY_READ)) -+ { _ResetSsfdcErr(psm); -+#if DEBUG_SSFDC_READREDT -+ printk(KERN_DEBUG " e 3\n"); -+#endif -+ -+ return(ERROR); } -+ _ReadRedtSsfdcBuf(psm, redundant+0x08); -+ if(_CheckSsfdcBusy(psm,BUSY_READ)) -+ { _ResetSsfdcErr(psm); -+#if DEBUG_SSFDC_READREDT -+ printk(KERN_DEBUG " e 4\n"); -+#endif -+ return(ERROR); } -+ } -+ _SetSsfdcStandby(psm); -+#if DEBUG_SSFDC_READREDT -+ printk(KERN_DEBUG " -\n"); -+#endif -+ return(SUCCESS); -+} -+ -+int SsfdcWriteRedtData(ssfdc_dev *psm, unsigned char *redundant) -+{ -+ _SetSsfdcCmd(psm,SSFDC_WRDATA); -+ _SetSsfdcAddr(psm,EVEN); -+ _WriteRedtSsfdcBuf(psm,redundant); -+ _SetSsfdcCmd(psm,SSFDC_WRITE); -+ if(_CheckSsfdcBusy(psm,BUSY_PROG)) -+ { _ResetSsfdcErr(psm); return(ERROR); } -+ if((psm->Attribute &MPS)==PS256) { -+ _SetSsfdcCmd(psm,SSFDC_RDSTATUS); -+ if(_CheckSsfdcStatus(psm)) -+ { _SetSsfdcStandby(psm); return(SUCCESS); } -+ _SetSsfdcCmd(psm,SSFDC_WRDATA); -+ _SetSsfdcAddr(psm,ODD); -+ _WriteRedtSsfdcBuf(psm,redundant+0x08); -+ _SetSsfdcCmd(psm,SSFDC_WRITE); -+ if(_CheckSsfdcBusy(psm,BUSY_PROG)) -+ { _ResetSsfdcErr(psm); return(ERROR); } -+ } -+ _SetSsfdcStandby(psm); -+ return(SUCCESS); -+} -+ -+/*************************************************************************** -+ SmartMedia ID Code Check & Mode Set Subroutine -+ ***************************************************************************/ -+int SetSsfdcModel(ssfdc_dev *psm, unsigned char dcode) -+{ -+ switch(_CheckDevCode(dcode)) { -+ case SSFDC1MB: -+ psm->Model = SSFDC1MB; -+ psm->Attribute = FLASH | AD3CYC | BS16 | PS256; -+ psm->MaxZones = 1; -+ psm->MaxBlocks = 256; -+ psm->MaxLogBlocks = 250; -+ psm->MaxSectors = 8; -+ break; -+ case SSFDC2MB: -+ psm->Model = SSFDC2MB; -+ psm->Attribute = FLASH | AD3CYC | BS16 | PS256; -+ psm->MaxZones = 1; -+ psm->MaxBlocks = 512; -+ psm->MaxLogBlocks = 500; -+ psm->MaxSectors = 8; -+ break; -+ case SSFDC4MB: -+ psm->Model = SSFDC4MB; -+ psm->Attribute = FLASH | AD3CYC | BS16 | PS512; -+ psm->MaxZones = 1; -+ psm->MaxBlocks = 512; -+ psm->MaxLogBlocks = 500; -+ psm->MaxSectors = 16; -+ break; -+ case SSFDC8MB: -+ psm->Model = SSFDC8MB; -+ psm->Attribute = FLASH | AD3CYC | BS16 | PS512; -+ psm->MaxZones = 1; -+ psm->MaxBlocks = 1024; -+ psm->MaxLogBlocks = 1000; -+ psm->MaxSectors = 16; -+ break; -+ case SSFDC16MB: -+ psm->Model = SSFDC16MB; -+ psm->Attribute = FLASH | AD3CYC | BS32 | PS512; -+ psm->MaxZones = 1; -+ psm->MaxBlocks = 1024; -+ psm->MaxLogBlocks = 1000; -+ psm->MaxSectors = 32; -+ break; -+ case SSFDC32MB: -+ psm->Model = SSFDC32MB; -+ psm->Attribute = FLASH | AD3CYC | BS32 | PS512; -+ psm->MaxZones = 2; -+ psm->MaxBlocks = 1024; -+ psm->MaxLogBlocks = 1000; -+ psm->MaxSectors = 32; -+ break; -+ case SSFDC64MB: -+ psm->Model = SSFDC64MB; -+ psm->Attribute = FLASH | AD4CYC | BS32 | PS512; -+ psm->MaxZones = 4; -+ psm->MaxBlocks = 1024; -+ psm->MaxLogBlocks = 1000; -+ psm->MaxSectors = 32; -+ break; -+ case SSFDC128MB: -+ psm->Model = SSFDC128MB; -+ psm->Attribute = FLASH | AD4CYC | BS32 | PS512; -+ psm->MaxZones = 8; -+ psm->MaxBlocks = 1024; -+ psm->MaxLogBlocks = 1000; -+ psm->MaxSectors = 32; -+ break; -+ default: -+ psm->Model = NOSSFDC; -+ return(ERROR); -+ } -+ return(SUCCESS); -+} -+ -+/***************************************************************************/ -+static unsigned char _CheckDevCode(unsigned char dcode) -+{ -+ switch(dcode){ -+ case 0x6E: -+ case 0xE8: -+ case 0xEC: return(SSFDC1MB); /* 8Mbit (1M) NAND */ -+ case 0x64: -+ case 0xEA: return(SSFDC2MB); /* 16Mbit (2M) NAND */ -+ case 0x6B: -+ case 0xE3: -+ case 0xE5: return(SSFDC4MB); /* 32Mbit (4M) NAND */ -+ case 0xE6: return(SSFDC8MB); /* 64Mbit (8M) NAND */ -+ case 0x73: return(SSFDC16MB); /*128Mbit (16M)NAND */ -+ case 0x75: return(SSFDC32MB); /*256Mbit (32M)NAND */ -+ case 0x76: return(SSFDC64MB); /*512Mbit (64M)NAND */ -+ case 0x79: return(SSFDC128MB); /* 1Gbit(128M)NAND */ -+ default: return(ERROR); -+ } -+} -+/*************************************************************************** -+ SmartMedia Power Control Subroutine -+ ***************************************************************************/ -+void CntReset(ssfdc_dev *psm) -+{ -+ _HwSetStandby(psm); -+ _HwVccOff(psm); -+} -+ -+int CntPowerOn(ssfdc_dev *psm) -+{ -+ _HwVccOn(psm); -+ _WaitTimer(TIME_PON); -+ if(_HwChkPower(psm)) -+ return(SUCCESS); -+ _HwVccOff(psm); -+ return(ERROR); -+} -+ -+#if 0 // remove for now -+static void mediachangetest(unsigned long dev_idx) -+{ -+ ssfdc_dev *psm = ssfdc[dev_idx]; -+ unsigned int cardpresent; -+ unsigned long flags; -+ -+ spin_lock_irqsave( &psm->req_queue_lock, flags ); -+ // bjm spin_lock( &psm->req_queue_lock); -+ -+ del_timer(&mediachange_timer); -+ -+ // check current card presence -+ if ( ! (cardpresent = CntPowerOn(psm)) && psm->CardPresent ) { -+ psm->MediaChange = 1; -+ psm->DataBuf_Valid = 0; -+ } -+ psm->CardPresent = cardpresent; -+ -+ // set up to run again... -+ mediachange_timer.function = mediachangetest; -+ mediachange_timer.expires = jiffies + (HZ / 2); -+ mediachange_timer.data = dev_idx; -+ add_timer(&mediachange_timer); -+ -+ spin_unlock_irqrestore( &psm->req_queue_lock, flags ); -+ // bjm spin_unlock( &psm->req_queue_lock); -+} -+#endif -+ -+int CheckCardExist(ssfdc_dev *psm) -+{ -+ char i,j,k; -+ if(! _HwChkStatus(psm)) /***** Not Status Change *****/ -+ if(_HwChkCardIn(psm)) return(SUCCESS); /* Card exist in Slot */ -+ for(i=0,j=0,k=0; i<0x10; i++) { -+ if(_HwChkCardIn(psm)) /***** Status Change *****/ -+ { j++; k=0; } -+ else { j=0; k++; } -+ if(j>3) return(SUCCESS); /* Card exist in Slot */ -+ if(k>3) return(ERROR); /* NO Card exist in Slot */ -+ _WaitTimer(TIME_CDCHK); -+ } -+ return(ERROR); -+} -+ -+int CheckSsfdcWP(ssfdc_dev *psm) -+{ /* ERROR: WP, SUCCESS: Not WP */ -+ char i; -+ for(i=0; i<0x08; i++) { -+ if(_HwChkWP(psm)) -+ return(ERROR); -+ _WaitTimer(TIME_WPCHK); -+ } -+ return(SUCCESS); -+} -+ -+/******************************************/ -+int CheckCISdata(unsigned char *buf,unsigned char *redundant) -+{ -+ static unsigned char cis[]={ 0x01,0x03,0xD9,0x01,0xFF,0x18,0x02,0xDF,0x01,0x20 }; -+ unsigned char ecc1,ecc2,ecc3; -+ unsigned int err; -+ calculate_ecc(ecctable,buf,&ecc1,&ecc2,&ecc3); -+ err=correct_data(buf,redundant+0x0D,ecc1,ecc2,ecc3); -+ if(err==0 || err==1 || err==2) -+ return(StringCmp(buf,cis,10)); -+ buf+=0x100; -+ calculate_ecc(ecctable,buf,&ecc1,&ecc2,&ecc3); -+ err=correct_data(buf,redundant+0x08,ecc1,ecc2,ecc3); -+ if(err==0 || err==1 || err==2) -+ return(StringCmp(buf,cis,10)); -+ return(ERROR); -+} -+ -+int CheckECCdata(unsigned char *buf,unsigned char *redundant) -+{ -+ unsigned char ecc1,ecc2,ecc3; -+ unsigned int err, corr=SUCCESS; -+ calculate_ecc(ecctable,buf,&ecc1,&ecc2,&ecc3); -+ err=correct_data(buf,redundant+0x0D,ecc1,ecc2,ecc3); -+ if(err==1 || err==2) corr=CORRECT; -+ else if(err) return(ERROR); -+ buf+=0x100; -+ calculate_ecc(ecctable,buf,&ecc1,&ecc2,&ecc3); -+ err=correct_data(buf,redundant+0x08,ecc1,ecc2,ecc3); -+ if(err==1 || err==2) corr=CORRECT; -+ else if(err) return(ERROR); -+ return(corr); -+} -+ -+void SetECCdata(unsigned char *buf,unsigned char *redundant) -+{ -+ calculate_ecc(ecctable,buf,redundant+0x0E,redundant+0x0D,redundant+0x0F); -+ buf+=0x100; -+ calculate_ecc(ecctable,buf,redundant+0x09,redundant+0x08,redundant+0x0A); -+} -+ -+/*************************************************************************** -+ Power Control & Media Exist Check Function -+ ***************************************************************************/ -+ -+/*************************************************************************** -+ SmartMedia Read/Write/Erase Function -+ ***************************************************************************/ -+static int MediaReadSector(ssfdc_dev *psm, struct request *req, -+ char * bbuf, long start,int count) -+{ -+ char *buf; -+ int i, err, request_complete, -+ PrevBlock = NO_ASSIGN; -+ int read_status=0; -+ -+ if (ConvMediaAddr(psm, start)) { -+ printk(KERN_ERR "MediaReadSector() - bad address conversion\n"); -+ goto read_exit; -+ } -+ -+ psm->ReqSectorSize = count; -+ psm->BufIndex = 0; -+ psm->RetryCount = 0; -+ -+#if DEBUG_SSFDC_READ -+ printk(KERN_DEBUG "MediaReadSector() - read %d sectors @ %d\n", psm->ReqSectorSize, start); -+#endif -+ while (psm->ReqSectorSize) { -+ // if this PhyBlock is not assigned, fill with dummy data and return -+ // An assigned block results in a card access and readsector schedule... -+ if (psm->PhyBlock == NO_ASSIGN) { -+#if DEBUG_SSFDC_READ -+ printk(KERN_DEBUG "Read NO_ASSIGN block %x\n", psm->PhyBlock); -+#endif -+ buf = bbuf + psm->BufIndex; -+ for(i=0; iPhyBlock) { -+#if DEBUG_SSFDC_READ -+ printk(KERN_DEBUG "Read block %x\n", psm->PhyBlock); -+#endif -+ PrevBlock = psm->PhyBlock; -+ _SetSsfdcCmd(psm,SSFDC_READ); -+ _SetSsfdcAddr(psm, EVEN); -+ for (i=0; i<5; ++i) { -+ if (!_HwChkBusy(psm)) -+ break; -+ udelay(10); -+ } -+ } -+ -+ -+ if ( _HwChkBusy(psm) ) { -+ ++psm->Sect_rd_errs_ttl; -+#if DEBUG_SSFDC_READ -+ printk(KERN_DEBUG "MediaReadSector() - Hardware busy!\n"); -+#endif -+ } -+ else { -+ ++psm->Sector_reads; -+ _ReadSsfdcBuf( psm, psm->SectBuf, psm->Redundant); -+ -+ // verify the integrity of what was read -+ if (CheckDataStatus(psm->Redundant)) { -+#if DEBUG_SSFDC_READ -+ printk(KERN_DEBUG "Bad Data Status\n"); -+#endif -+ goto error_state; -+ } -+ -+ switch (err = CheckECCdata(psm->SectBuf,psm->Redundant)) -+ { -+ case CORRECT: -+ // Correctable data, fix and copy like SUCCESS -+ SetECCdata(psm->SectBuf,psm->Redundant); -+ case SUCCESS: -+ memcpy(bbuf + psm->BufIndex, psm->SectBuf, SSFDC_SECTSIZE); -+ break; -+ -+ case ERROR: -+error_state: -+ ++psm->Sect_rd_errs_ttl; -+#if DEBUG_SSFDC_READ -+ printk(KERN_DEBUG "readsector() - err == ERROR\n"); -+#endif -+ _ResetSsfdcErr(psm); -+ if (++psm->RetryCount < RD_RETRY_LIMIT) { -+ continue; -+ } -+ break; -+ default: -+ ssfdc_terminate_request( psm, req); -+ break; -+ } -+ -+ } // if ( _HwChkBusy(psm) ) -+ } // if (psm->PhyBlock == NO_ASSIGN) -+ -+ // common req/buffer management code for either unassigned or assigned -+ // block from /dev/ssfdc -+ psm->RetryCount = 0; -+ psm->BufIndex += SSFDC_SECTSIZE; -+ request_complete = (--psm->ReqSectorSize == 0); -+ if (request_complete) { -+ // completed the read, req->buffer now has requested sector(s). -+ // End the request waking sleeping process and reschedule initxfer(). -+#if DEBUG_SSFDC_READ -+ printk(KERN_DEBUG "readsector() - req %x complete\n", req); -+#endif -+ read_status = 1; -+ } -+ else if (IncMediaAddr(psm)) { -+ printk(KERN_DEBUG "readsector() - IncMediaAddr() error.\n"); -+ goto read_exit; -+ } -+ } // while (psm->ReqSectorSize) -+ -+read_exit: -+ psm->XferState = xfer_idle; -+ -+ return read_status; -+ -+} -+ -+/* -+ ReadBlkCopy(ssfdc_dev *psm, unsigned char *buf) -+*/ -+int ReadBlkCopy(ssfdc_dev *psm, unsigned char *buf, char *rd_sector_status) -+{ -+ int err, read_error=0, rw_retry=0; -+ unsigned long PrevBlock=NO_ASSIGN; -+ -+ if ( ! buf ) { -+ printk(KERN_ERR "NULL buffer pointer\n"); -+ return ERROR; -+ } -+ -+ if (psm->PhyBlock == NO_ASSIGN) { -+ memset(buf, 0xff, psm->MaxSectors * SSFDC_SECTSIZE); -+ memset(rd_sector_status, 1, sizeof(char) * MAX_SECTNUM); -+ return SUCCESS; -+ } -+ -+#if 0 -+ printk(KERN_ERR "ReadBlkCopy() - LogBlk %d\n", psm->LogBlock); -+#endif -+ -+ for (psm->Sector = 0; -+ psm->PhyBlock != NO_ASSIGN && psm->Sector < psm->MaxSectors; -+ ++psm->Sector) -+ { -+ if (PrevBlock != psm->PhyBlock) { -+ _SetSsfdcCmd(psm,SSFDC_READ); -+ _SetSsfdcAddr(psm, EVEN); -+ PrevBlock = psm->PhyBlock; -+ _CheckSsfdcBusy(psm, BUSY_ADDR_SET); -+ } -+ -+ if ( _HwChkBusy(psm) ) { -+ printk(KERN_ERR "%s: HW busy during block copy!\n", MAJOR_NAME); -+ goto error_state; -+ } -+ -+ _ReadSsfdcBuf( psm, psm->SectBuf, psm->Redundant); -+ if (CheckDataStatus(psm->Redundant)) { -+ printk("KERN_ERR reading Block %d, sector %d\n", psm->PhyBlock, psm->Sector); -+ goto error_state; -+ } -+ -+ // Attempt to correct -+ switch (err = CheckECCdata(psm->SectBuf,psm->Redundant)) -+ { -+ case CORRECT: -+#if DEBUG_SSFDC_WRITE -+ printk(KERN_DEBUG "ReadBlkCopy() - err == CORRECT\n"); -+#endif -+ SetECCdata(psm->SectBuf,psm->Redundant); -+ case SUCCESS: -+ read_error = 0; -+ rw_retry = 0; -+ memcpy(buf + (psm->Sector * SSFDC_SECTSIZE), psm->SectBuf, SSFDC_SECTSIZE); -+ rd_sector_status[psm->Sector] = 1; -+ read_error = 0; -+ break; -+ -+ case ERROR: -+error_state: -+/*bjm*/ printk("ERR - ECC error reading Block %d, Sector %d\n", psm->PhyBlock,psm->Sector); -+#if DEBUG_SSFDC_WRITE -+ printk(KERN_DEBUG "ReadBlkCopy() - err == ERROR\n"); -+ printk("_ResetSsfdcErr(psm)\n"); -+#endif -+ _ResetSsfdcErr(psm); -+ PrevBlock = NO_ASSIGN; -+ if (++rw_retry < RD_RETRY_LIMIT) { -+ // retry current Sector/loop counter on next loop iteration. -+ --psm->Sector; -+ } -+ else { -+ // set sector data in copy buf to the unassigned value 0xFF -+ // next loop iteration will read next Sector, zero RetryCount -+ // for next sectors read -+ // map bad sector... -+ memset(buf + psm->Sector * SSFDC_SECTSIZE, 0xFF, SSFDC_SECTSIZE); -+ rw_retry = 0; -+ rd_sector_status[psm->Sector] = 0; -+ ++psm->Sect_rd_errs_ttl; -+ read_error = 1; -+ } -+#if DEBUG_SSFDC_WRITE -+ printk(KERN_DEBUG "Unable to read Blk %d Sector %d\n", psm->PhyBlock, psm->Sector); -+#endif -+ break; -+ } -+ } -+ if (!read_error) { -+ if (SsfdcEraseBlock(psm)) { -+ MarkFailPhyOneBlock(psm); -+ ++psm->Bad_blks_erase; -+ } -+ else { -+ ClrBit(psm->Assign[psm->Zone], psm->PhyBlock); -+ } -+ } -+ else { -+ printk("Read error block %d\n", psm->PhyBlock); -+ MarkFailPhyOneBlock(psm); -+ } -+ psm->Sector = 0; -+ return read_error ? ERROR : SUCCESS; -+} -+ -+/* -+ WriteBlock() -+*/ -+int WriteBlock(ssfdc_dev *psm, char *buf, char *wr_sector_status) -+{ -+ int write_error=0, reassign_retry=0; -+ -+ for ( reassign_retry = 0; reassign_retry < REASSIGN_RETRY_LIMIT; ++reassign_retry) -+ { -+ /* -+ assign new write block for write req -+ - set new write address -+ - write buffer to new block -+ */ -+#if DEBUG_SSFDC_WRITE -+ if (AssignWriteBlock(psm,1)) { -+#else -+ if (AssignWriteBlock(psm,0)) { -+#endif -+ write_error = 1; -+ printk(KERN_ERR "sm%dd Unable to assign new write block.\n", psm->sm_minor); -+ memset(wr_sector_status, 1, sizeof(char) * MAX_SECTNUM); -+ // ssfdc_terminate_request(psm, req); -+ return ERROR; -+ } -+ -+#if 0 -+ printk(KERN_ERR "WriteBlock() - LogBlock %d\n", psm->LogBlock); -+#endif -+ -+ for (psm->Sector = 0; psm->Sector < psm->MaxSectors; ++psm->Sector) -+ { -+ memcpy(psm->SectBuf,buf+psm->Sector*SSFDC_SECTSIZE,SSFDC_SECTSIZE); -+ -+ _SetSsfdcCmd(psm,SSFDC_WRDATA); -+ _SetSsfdcAddr(psm,EVEN); -+ ClrRedundantData(psm->Redundant); -+ SetLogBlockAddr(psm,psm->Redundant); -+ SetECCdata(psm->SectBuf,psm->Redundant); -+ _WriteSsfdcBuf(psm,psm->SectBuf,psm->Redundant); -+ -+#if DEBUG_SSFDC_WRITE -+ printk("%d ", psm->Sector); -+#endif -+ -+ _SetSsfdcCmd(psm, SSFDC_WRITE); -+ if ( ! _CheckSsfdcBusy(psm, BUSY_PROG) && !SsfdcCheckStatus(psm)) { -+#if DEBUG_SSFDC_WRITE -+ printk("\nMulti-Sector write OK!\n"); -+#endif -+ _SetSsfdcStandby(psm); -+ // mark status a success -+ wr_sector_status[psm->Sector] = 1; -+ -+#if 0 // bjm removed -+ { unsigned char parbuf[SSFDC_SECTSIZE]; -+ unsigned char redtpar[REDTSIZE]; -+ -+ _SetSsfdcCmd(psm,SSFDC_READ); -+ _SetSsfdcAddr(psm, EVEN); -+ -+ udelay(30); -+ if ( _HwChkBusy(psm) ) { -+ _ResetSsfdcErr(psm); -+ printk("paranoid read failure\n"); -+ } -+ else { -+ _ReadSsfdcBuf(psm, parbuf, redtpar); -+ if (CheckDataStatus(redtpar)) { -+ printk("paranoid read, bad data status\n"); -+ } -+ else { -+ switch( err = CheckECCdata(parbuf,redtpar)) -+ { -+ case CORRECT: -+ printk("paranoid correctable\n"); -+ SetECCdata(parbuf,redtpar); -+ case SUCCESS: -+ if (memcmp(parbuf,psm->SectBuf, SSFDC_SECTSIZE)) -+ write_error = 1; -+ else -+ write_error = 0; -+ break; -+ case ERROR: -+ MarkFailPhyOneBlock(psm); -+ write_error=1; -+ break; -+ } -+ } -+ } -+ } // bjm end of paranoid read back test... -+#endif -+ } -+ else { -+#if DEBUG_SSFDC_WRITE -+ printk("\nMulti-Sector write FAILED!\n"); -+#endif -+ // mark status a failure -+ wr_sector_status[psm->Sector] = 0; -+ _ResetSsfdcErr(psm); -+ write_error = 1; -+ break; -+ } // for (psm->Sector ...) -+ if (write_error) -+ break; -+ } -+ if ( ! write_error ) { -+ psm->Log2Phy[psm->Zone][psm->LogBlock] = psm->WriteBlock; -+ break; -+ } -+ } -+ psm->Sector = 0; -+ return write_error ? ERROR : SUCCESS; -+} -+ -+/* -+ MediaWriteSector() -+ -+*/ -+static int MediaWriteSector(ssfdc_dev *psm, struct request *req, char * bbuf, long start, int count) -+{ -+ int write_error=0, unwritten_block=0; -+ char *buf; -+ unsigned long curr_sector, blksize, PrevBlock; -+ unsigned long writebuf_index, readbio_index; -+ int i, sector, rw_retry=0; -+ int sectors_in_block; -+ char rd_sector_status[MAX_SECTNUM]; -+ char wr_sector_status[MAX_SECTNUM]; -+ -+ // optimized write, new vars -+ int bio_endios=0; -+ int bio_bvecs=0; -+ struct bio *bio; -+ // optimized for write -+ -+#if DEBUG_SSFDC_WRITE -+ printk(KERN_DEBUG "+MediaWriteSector()\n"); -+#endif -+ -+ if (!count) { -+ printk("MediaWriteSector() count == 0!\n"); -+ ssfdc_end_request(psm, req, 0); -+ return 1; -+ } -+ -+ if (CheckMediaWP(psm)) { -+ printk(KERN_DEBUG "%s: write protected media.\n", MAJOR_NAME); -+ ssfdc_terminate_request( psm, req); -+ psm->XferState = xfer_idle; -+ return -EIO; -+ } -+ -+ // allocate block size buffer -+ blksize = psm->MaxSectors * SSFDC_SECTSIZE; -+#if DEBUG_SSFDC_WRITE -+ printk(KERN_DEBUG "%s: Allocate %d sized block.\n", MAJOR_NAME, blksize); -+#endif -+ if ((buf = kmalloc(blksize, GFP_ATOMIC)) == NULL) { -+ printk(KERN_ERR "%s: Null buffer allocated!\n", MAJOR_NAME); -+ ssfdc_terminate_request( psm, req); -+ goto the_exit; -+ } -+ -+ /* -+ Loop to handle a request at the curr_sector of count sectors. -+ The write operation my encompas more than one phys block. -+ */ -+ curr_sector = start; -+ sectors_in_block = 0; -+ // zero out our sector R/W status array -+ memset(rd_sector_status, 1, sizeof(char) * MAX_SECTNUM); -+ memset(wr_sector_status, 1, sizeof(char) * MAX_SECTNUM); -+ -+ // rangecheck this sector within the device. -+ if (ConvMediaAddr(psm, curr_sector)) { -+ ssfdc_terminate_request(psm, req); -+ printk(KERN_ERR "WriteSector: ConvMediaAddr() error\n"); -+#if DEBUG_SSFDC_WRITE -+ printk(KERN_DEBUG "-MediaWriteSector()\n"); -+#endif -+ return 0; -+ } -+ -+#if DEBUG_SSFDC_WRITE -+ printk(KERN_DEBUG "MediaWriteSector() Zone %d, LogBlock %d PhyBlock %d, Sector %d\n", -+ psm->Zone,psm->LogBlock, psm->PhyBlock,psm->Sector); -+#endif -+ -+ PrevBlock = NO_ASSIGN; -+ rw_retry = 0; -+ -+#if DEBUG_SSFDC_WRITE -+ printk(KERN_DEBUG "Copy Zone %d, Phys %d\n", psm->Zone, psm->PhyBlock); -+#endif -+ // As a technique for wear leveling, a write to the SM results in the contents -+ // of the block to be copied into a blocksize buffer, the write data of the -+ // write request being overlayed onto the buffer containing the copied block, -+ // a new logical to physical mapping defined, and the buffer written into this -+ // newly mapped (logically) physical block. -+ -+ // read the physical block into the buffer. -+#if DEBUG_SSFDC_WRITE -+ printk(KERN_DEBUG "ReadBlock = %d LogBlock %d\n", psm->PhyBlock, psm->LogBlock); -+#endif -+ if (ReadBlkCopy(psm, buf, rd_sector_status) != SUCCESS) { -+ printk(KERN_ERR "Unable to read block.\n"); -+ goto the_exit; -+ } -+ -+#if DEBUG_SSFDC_WRITE -+ printk(KERN_DEBUG "Read from pending write request "); -+#endif -+ -+#if 0 -+ int bio_idx=0; -+#endif -+ rq_for_each_bio(bio, req) { -+ struct bio_vec *bvec; -+ int i, break_flag=0; -+#if 0 -+ int segment_idx; -+ printk(KERN_ERR "bio %d\n", bio_idx++); -+ -+ segment_idx = 0; -+#endif -+ // bio_bvecs = 0; -+ bio_for_each_segment(bvec, bio, i) { -+#if 0 -+ printk(KERN_ERR "segment %d\n", segment_idx++); -+#endif -+ // The conditions... -+ // bio fits within block -+ if (WriteReqInCurrBlk(psm,curr_sector + (bvec->bv_len >> 9) - 1,§or) -+ && WriteReqInCurrBlk(psm,curr_sector, §or)) -+ { -+#if 0 -+ printk(KERN_ERR "LogBlk %d: write at %d, %d sectors\n", -+ psm->LogBlock, curr_sector % psm->MaxSectors, bio_cur_sectors(bio)); -+#endif -+ // write bio into copied block -+ ++bio_bvecs; -+ writebuf_index = sector * SSFDC_SECTSIZE; -+#if 0 -+ printk(KERN_ERR "memcpy buf at 0x%x, 0x%x bytes\n", -+ writebuf_index, bvec->bv_len); -+#endif -+ memcpy(buf + writebuf_index, -+ page_address(bvec->bv_page) + bvec->bv_offset, bvec->bv_len); -+ unwritten_block = 1; -+ curr_sector += bvec->bv_len >> 9; -+ } -+ // bio fits partially within block -+ else if (WriteReqInCurrBlk(psm,curr_sector, §or)) -+ { -+ // put portion of bio in block -+ ++bio_bvecs; -+ writebuf_index = sector * SSFDC_SECTSIZE; -+ sectors_in_block = psm->MaxSectors - sector; -+ readbio_index = sectors_in_block * SSFDC_SECTSIZE; -+#if 0 -+ printk(KERN_ERR "memcpy buf at %x, %x bytes\n", -+ writebuf_index, readbio_index); -+#endif -+ memcpy(buf + writebuf_index, -+ page_address(bvec->bv_page) + bvec->bv_offset, readbio_index); -+#if 0 -+ printk(KERN_ERR "LogBlk %d: partial-write at %d, %d sectors first\n", -+ psm->LogBlock, curr_sector % psm->MaxSectors, sectors_in_block); -+#endif -+ // write block -+ unwritten_block = 0; -+ if (WriteBlock(psm, buf, wr_sector_status) != SUCCESS) { -+ printk(KERN_ERR "Unable to write block %d\n", psm->LogBlock); -+ // write_error - writing this block failed -+ break_flag = 1; -+ break; -+ } -+ // incr addr & read next block, -+ curr_sector += sectors_in_block; -+ if (ConvMediaAddr(psm,curr_sector) != SUCCESS) { -+ printk(KERN_ERR "MediaWriteSector() IncMediaAddr() error!\n"); -+ // write_error - address into next block is bogus -+ write_error = 1; -+ break_flag = 1; -+ break; -+ } -+ if (ReadBlkCopy(psm, buf, rd_sector_status) != SUCCESS) { -+ printk(KERN_ERR "MediaWriteSector() ReadBlkCopy() error!\n"); -+ // write error - next block read error -+ write_error = 1; -+ break_flag =1; -+ break; -+ } -+ // write remainder of bio into block -+#if 0 -+ printk(KERN_ERR "LogBlk %d: partial-write at %d, %d sectors, second write\n", -+ psm->LogBlock, curr_sector % psm->MaxSectors, (bvec->bv_len >> 9) - sectors_in_block); -+#endif -+#if 0 -+ printk(KERN_ERR "memcpy buf at 0x%x, from bio 0x%x, for 0x%x bytes\n", -+ 0, readbio_index, ((bvec->bv_len >> 9) - sectors_in_block) * SSFDC_SECTSIZE); -+#endif -+ memcpy(buf, (page_address(bvec->bv_page) + bvec->bv_offset) + readbio_index, -+ ((bvec->bv_len >> 9) - sectors_in_block) * SSFDC_SECTSIZE); -+ writebuf_index = ((bvec->bv_len >> 9) - sectors_in_block) * SSFDC_SECTSIZE; -+ unwritten_block = 1; -+ curr_sector += (bvec->bv_len >> 9) - sectors_in_block; -+ } -+ // bio is not in block at all. coplete unwritten block and exit loop. -+ else { -+ // write current block -+#if 0 -+ printk(KERN_ERR "bio no longer in block\n"); -+#endif -+ if (unwritten_block) { -+ if (WriteBlock(psm, buf, wr_sector_status) != SUCCESS) { -+ printk(KERN_ERR "MediaWriteSector() WriteBlock() error!\n"); -+ // write_error -+ } -+ unwritten_block = 0; -+ } -+ break_flag = 1; -+ break; -+ } -+ } -+ // bjm if (bio_bvecs) +bio_bvecs; -+ -+ if (break_flag) -+ break; -+ } -+ -+ if (unwritten_block) { -+ if (WriteBlock(psm, buf, wr_sector_status) != SUCCESS) { -+ printk(KERN_ERR "MediaWriteSector() WriteBlock() error!\n"); -+ write_error = 1; -+ } -+ } -+ -+ if (!(bio_endios=bio_bvecs)) { -+ if (static_ssfdc_debug) -+ printk("no bios from request!\n"); -+ ++bio_endios; -+ write_error = 0; -+ } -+ -+the_exit: -+ // log sector status for the copied/unmodified Sectors and flag any that have cpy errors -+ for (sector = 0; sector < psm->MaxSectors; ++sector) { -+ if ( ! rd_sector_status[sector] ) -+ printk(KERN_ERR "%s: READ sector %d invalid for block %d!\n", \ -+ MAJOR_NAME, sector, psm->LogBlock); -+ if ( ! wr_sector_status[sector]) -+ printk(KERN_ERR "%s: WRITTEN sector %d invalid for block %d!\n", \ -+ MAJOR_NAME, sector, psm->LogBlock); -+ } -+ -+ // free our prev allocated block for copy... -+ if (buf) -+ kfree(buf); -+ -+ psm->XferState = xfer_idle; -+ -+#if DEBUG_SSFDC_WRITE -+ printk(KERN_DEBUG "-MediaWriteSector()\n"); -+#endif -+ if (static_ssfdc_debug) -+ printk("end_request(%d) ", ! write_error); -+ for (i = 0; i < bio_endios; ++i) { -+ if (static_ssfdc_debug) -+ printk("%d ", i); -+ ssfdc_end_request(psm, req, ! write_error); -+ } -+ if (static_ssfdc_debug) -+ printk("\n"); -+ -+ return ! write_error; -+ -+} -+ -+ -+/*************************************************************************** -+ SmartMedia Logical Format Subroutine -+ ***************************************************************************/ -+int CheckLogCHS(ssfdc_dev *psm, unsigned int *c,unsigned char *h,unsigned char *s) -+{ -+ switch(psm->Model) { -+ case SSFDC1MB: *c=125; *h= 4; *s= 4; break; -+ case SSFDC2MB: *c=125; *h= 4; *s= 8; break; -+ case SSFDC4MB: *c=250; *h= 4; *s= 8; break; -+ case SSFDC8MB: *c=250; *h= 4; *s=16; break; -+ case SSFDC16MB: *c=500; *h= 4; *s=16; break; -+ case SSFDC32MB: *c=500; *h= 8; *s=16; break; -+ case SSFDC64MB: *c=500; *h= 8; *s=32; break; -+ case SSFDC128MB: *c=500; *h=16; *s=32; break; -+ default: -+ *c= 0; *h= 0; *s= 0; -+ psm->ErrCode=ERR_NoSmartMedia; -+ return(ERROR); -+ } -+ return(SUCCESS); -+} -+/*************************************************************************** -+ Power Control & Media Exist Check Subroutine -+ ***************************************************************************/ -+ -+int CheckMediaWP(ssfdc_dev *psm) -+{ -+ if(psm->Attribute &MWP) -+ { psm->ErrCode=ERR_WrtProtect; return(ERROR); } -+ return(SUCCESS); -+} -+ -+/*************************************************************************** -+ SmartMedia Physical Address Control Subroutine -+ ***************************************************************************/ -+int ConvMediaAddr(ssfdc_dev *psm, long addr) -+{ -+ long temp; -+ temp =addr/psm->MaxSectors; -+ psm->Sector =addr%psm->MaxSectors; -+ psm->LogBlock=temp%psm->MaxLogBlocks; -+ psm->Zone =temp/psm->MaxLogBlocks; -+ if(psm->ZoneMaxZones) { -+ ClrRedundantData(psm->Redundant); -+ SetLogBlockAddr(psm,psm->Redundant); -+ psm->PhyBlock=psm->Log2Phy[psm->Zone][psm->LogBlock]; -+#if DEBUG_SSFDC_ASSIGNRELEASE -+ printk(KERN_DEBUG "ConvMediaAddr() LogBlock %d -> PhyBlock %d\n", -+ psm->LogBlock, psm->PhyBlock); -+#endif -+ return(SUCCESS); -+ } -+ psm->ErrCode=ERR_OutOfLBA; -+ return(ERROR); -+} -+ -+int IncMediaAddr(ssfdc_dev *psm) -+{ -+ if(++psm->SectorMaxSectors) -+ return(SUCCESS); -+ psm->Sector=0; -+ if(++psm->LogBlockMaxLogBlocks) { -+ ClrRedundantData(psm->Redundant); -+ SetLogBlockAddr(psm,psm->Redundant); -+ psm->PhyBlock=psm->Log2Phy[psm->Zone][psm->LogBlock]; -+#if DEBUG_SSFDC_ASSIGNRELEASE -+ printk(KERN_DEBUG "IncMediaAddr() PhyBlock %d <- LogBlock %d\n", -+ psm->PhyBlock, psm->LogBlock); -+#endif -+ return(SUCCESS); -+ } -+ psm->LogBlock=0; -+ if(++psm->ZoneMaxZones) { -+ ClrRedundantData(psm->Redundant); -+ SetLogBlockAddr(psm,psm->Redundant); -+ psm->PhyBlock=psm->Log2Phy[psm->Zone][psm->LogBlock]; -+#if DEBUG_SSFDC_ASSIGNRELEASE -+ printk(KERN_DEBUG "IncMediaAddr() PhyBlock %d <- LogBlock %d\n", -+ psm->PhyBlock, psm->LogBlock); -+#endif -+ return(SUCCESS); -+ } -+ psm->Zone=0; -+ psm->ErrCode=ERR_OutOfLBA; -+ return(ERROR); -+} -+ -+/***************************************************************************/ -+ -+ -+static int WriteReqInCurrBlk(ssfdc_dev *psm, long sector, int *blksector) -+{ -+ long temp; -+ unsigned char Zone; /* Zone Number */ -+ unsigned int LogBlock; /* Logical Block Number of Zone */ -+ -+ if (!psm) -+ return 0; -+ -+ temp = sector / psm->MaxSectors; -+ *blksector = sector % psm->MaxSectors; -+ LogBlock = temp % psm->MaxLogBlocks; -+ Zone = temp / psm->MaxLogBlocks; -+ -+ return (psm->LogBlock == LogBlock && psm->Zone == Zone); -+} -+ -+/*************************************************************************** -+ SmartMedia Read/Write Subroutine with Retry -+ ***************************************************************************/ -+ -+/*************************************************************************** -+ SmartMedia Physical Block Assign/Release Subroutine -+ ***************************************************************************/ -+int AssignWriteBlock(ssfdc_dev *psm, int verbose_flag) -+{ -+ psm->ReadBlock=psm->PhyBlock; -+#if DEBUG_SSFDC_WRITE -+ int Zonesave=psm->Zone, ZoneIndex; -+#endif -+ -+#if DEBUG_SSFDC_WRITE -+ if (verbose_flag) { -+ printk("AssignWriteBlock() verbose mode. psm->Zone %d\n",psm->Zone); -+ for (psm->Zone = 0; psm->Zone < psm->MaxZones; psm->Zone++) { -+ int free_blk=0; -+ printk("\tZone %d, AssignStart %d and ", psm->Zone, psm->AssignStart[psm->Zone]); -+ for (psm->WriteBlock=0; psm->WriteBlock < psm->MaxLogBlocks; psm->WriteBlock++) -+ if (! ChkBit(psm->Assign[psm->Zone],psm->WriteBlock)) ++free_blk; -+ printk("%d free blocks.\n", free_blk); -+ } -+ psm->Zone = Zonesave; -+ } -+#endif -+ for(psm->WriteBlock=psm->AssignStart[psm->Zone]; psm->WriteBlockMaxBlocks; psm->WriteBlock++) -+ if(! ChkBit(psm->Assign[psm->Zone],psm->WriteBlock)) { -+ SetBit(psm->Assign[psm->Zone],psm->WriteBlock); -+ psm->AssignStart[psm->Zone]=psm->WriteBlock+1; -+ psm->PhyBlock=psm->WriteBlock; -+ psm->SectCopyMode=REQ_ERASE; -+#if DEBUG_SSFDC_ASSIGNRELEASE -+ printk(KERN_DEBUG "AssignWriteBlock() - WriteBlock %d ReadBlock %d LogBlock %d\n", -+ psm->WriteBlock, psm->ReadBlock, psm->LogBlock); -+#endif -+ return(SUCCESS); -+ } -+ for(psm->WriteBlock=0; psm->WriteBlockAssignStart[psm->Zone]; psm->WriteBlock++) -+ if(! ChkBit(psm->Assign[psm->Zone],psm->WriteBlock)) { -+ SetBit(psm->Assign[psm->Zone],psm->WriteBlock); -+ psm->AssignStart[psm->Zone]=psm->WriteBlock+1; -+ psm->PhyBlock=psm->WriteBlock; -+ psm->SectCopyMode=REQ_ERASE; -+#if DEBUG_SSFDC_ASSIGNRELEASE -+ printk(KERN_DEBUG "AssignWriteBlock() - WriteBlock %d PhyBlock %d LogBlock %d\n", -+ psm->WriteBlock, psm->PhyBlock, psm->LogBlock); -+#endif -+ return(SUCCESS); -+ } -+ psm->WriteBlock=NO_ASSIGN; -+ psm->ErrCode=ERR_WriteFault; -+ return(ERROR); -+} -+ -+/*************************************************************************** -+ SmartMedia Physical Format Check Local Subroutine -+ ***************************************************************************/ -+static int SetPhyFmtValue(ssfdc_dev *psm) -+{ -+ unsigned int idcode; -+ SsfdcReadID(psm, &idcode); -+ if(SetSsfdcModel(psm,(unsigned char)idcode)) -+ return(ERROR); -+ if(CheckSsfdcWP(psm)) -+ psm->Attribute|=WP; -+ return(SUCCESS); -+} -+ -+static int SearchCIS(ssfdc_dev *psm, unsigned int *pcis) -+{ -+ psm->Zone=0; psm->Sector=0; -+ for(psm->PhyBlock=0; psm->PhyBlock<(psm->MaxBlocks-psm->MaxLogBlocks-1); psm->PhyBlock++) { -+ if(SsfdcReadRedtData(psm, psm->Redundant)) -+ { SsfdcReset(psm); return(ERROR); } -+ if(! CheckFailBlock(psm->Redundant)) { -+ if(CheckCisBlock(psm->Redundant)) -+ { SsfdcReset(psm); return(ERROR); } -+ break; -+ } -+ } -+ while(psm->SectorMaxSectors) { -+ if(psm->Sector) -+ if(SsfdcReadRedtData(psm, psm->Redundant)) -+ { SsfdcReset(psm); return(ERROR); } -+ if(! CheckDataStatus(psm->Redundant)) { -+ if(SsfdcReadSect(psm,psm->WorkBuf,psm->Redundant)) -+ { SsfdcReset(psm); return(ERROR); } -+ if(CheckCISdata(psm->WorkBuf,psm->Redundant)) -+ { SsfdcReset(psm); return(ERROR); } -+ *pcis=psm->PhyBlock; -+ SsfdcReset(psm); -+ return(SUCCESS); -+ } -+ psm->Sector++; -+ } -+ SsfdcReset(psm); -+ return(ERROR); -+} -+ -+/***************************************************************************/ -+static int MakeLogTable(ssfdc_dev *psm, unsigned int start) -+{ -+ unsigned int block; -+ unsigned int blk_total=0, blk_blank=0, blk_nologaddr=0, -+ blk_fail=0, blk_assigned=0; -+ -+#if DEBUG_SSFDC -+ printk(KERN_DEBUG "MakeLogTable()\n"); -+#endif -+ psm->DataBuf_Valid = 1; -+ psm->Sector=0; -+ for(psm->Zone=0; psm->ZoneMaxZones; psm->Zone++) { -+ /* set all LogBlocks to NO_ASSIGN */ -+ for(psm->LogBlock=0; psm->LogBlockMaxLogBlocks; psm->LogBlock++) -+ psm->Log2Phy[psm->Zone][psm->LogBlock]=NO_ASSIGN; -+ /* for all Assigns[zone][PhyBlock] = 0x00 */ -+ for(psm->PhyBlock=0; psm->PhyBlock<(MAX_BLOCKNUM/8); psm->PhyBlock++) -+ psm->Assign[psm->Zone][psm->PhyBlock]=0x00; -+ /*******************************************************************/ -+ for(psm->PhyBlock=0; psm->PhyBlockMaxBlocks; psm->PhyBlock++) { -+ if((! psm->Zone) && (psm->PhyBlockAssign[psm->Zone],psm->PhyBlock); -+ continue; -+ } -+ ++blk_total; -+ if(SsfdcReadRedtData(psm,psm->Redundant)) { -+ SsfdcReset(psm); -+#if 0 -+ printk(KERN_ERR "error 1 PhyBlock %d\n", psm->PhyBlock); -+#endif -+ return(ERROR); -+ } -+ if(! CheckDataBlank(psm->Redundant)) { -+ ++blk_blank; -+ continue; -+ } -+ SetBit(psm->Assign[psm->Zone],psm->PhyBlock); -+ if(CheckFailBlock(psm->Redundant)) { -+#if 0 -+ printk("Zone %d, Block %d failed\n", psm->Zone, psm->PhyBlock); -+#endif -+ ++blk_fail; -+ continue; -+ } -+ if(LoadLogBlockAddr(psm)) { -+ ++blk_nologaddr; -+ continue; -+ } -+ if(psm->LogBlock>=psm->MaxLogBlocks) -+ continue; -+ ++blk_assigned; -+ if(psm->Log2Phy[psm->Zone][psm->LogBlock]==NO_ASSIGN) { -+#if DEBUG_SSFDC_ASSIGNRELEASE -+ if (psm->LogBlock == 0) -+ printk(KERN_DEBUG "MakeLogTable() LogBlock %d = PhyBlock %d\n", -+ psm->LogBlock, psm->PhyBlock); -+#endif -+ psm->Log2Phy[psm->Zone][psm->LogBlock]=psm->PhyBlock; -+ continue; -+ } -+ psm->Sector=psm->MaxSectors-1; -+ if(SsfdcReadRedtData(psm,psm->Redundant)) { -+ SsfdcReset(psm); -+#if 0 -+ printk(KERN_ERR "error 2\n"); -+#endif -+ return(ERROR); -+ } -+ psm->Sector=0; -+ block=psm->LogBlock; -+ if(! LoadLogBlockAddr(psm)) -+ if(psm->LogBlock==block) { -+#ifdef L2P_ERR_ERASE /***************************************************/ -+ block=psm->Log2Phy[psm->Zone][psm->LogBlock]; -+ psm->Log2Phy[psm->Zone][psm->LogBlock]=psm->PhyBlock; -+ psm->PhyBlock=block; -+ if(!(psm->Attribute &MWP)) { -+ SsfdcReset(psm); -+ if(SsfdcEraseBlock(psm)) { -+ printk(KERN_ERR "error 3\n"); -+ return(ERROR); -+ } -+ if(SsfdcCheckStatus(psm)) { -+ if(MarkFailPhyOneBlock(psm)) { -+ printk(KERN_ERR "error 4\n"); -+ return(ERROR); -+ } -+ } -+ else ClrBit(psm->Assign[psm->Zone],psm->PhyBlock); -+ } -+ psm->PhyBlock=psm->Log2Phy[psm->Zone][psm->LogBlock]; -+#else /*******************************************************************/ -+ psm->Log2Phy[psm->Zone][psm->LogBlock]=psm->PhyBlock; -+#endif /*******************************************************************/ -+ continue; -+ } -+#ifdef L2P_ERR_ERASE /***************************************************/ -+ if(!(psm->Attribute &MWP)) { -+ SsfdcReset(psm); -+ if(SsfdcEraseBlock(psm)) { -+ printk(KERN_ERR "error 5\n"); -+ return(ERROR); -+ } -+ if(SsfdcCheckStatus(psm)) { -+ if(MarkFailPhyOneBlock(psm)) { -+ printk(KERN_ERR "error 6\n"); -+ return(ERROR); -+ } -+ } -+ else ClrBit(psm->Assign[psm->Zone],psm->PhyBlock); -+ } -+#endif /*******************************************************************/ -+ } -+ psm->AssignStart[psm->Zone]=0; -+ } -+ SsfdcReset(psm); -+#if 0 -+ printk("MakeLogTable()\n"); -+ printk("\t%d failed\n", blk_fail); -+ printk("\t%d blank\n", blk_blank); -+ printk("\t%d assigned\n", blk_assigned); -+ printk("\t%d no logical addr\n", blk_nologaddr); -+ printk("\n\t%d total\n", blk_total); -+ printk("\t%d sum total\n", blk_fail + blk_blank + blk_assigned + blk_nologaddr); -+#endif -+ return(SUCCESS); -+} -+ -+/***************************************************************************/ -+static int MarkFailPhyOneBlock(ssfdc_dev *psm) -+{ -+ unsigned char sect; -+ sect=psm->Sector; -+ SetFailBlock(psm->WorkRedund); -+ SsfdcWriteRedtMode(psm); -+ for(psm->Sector=0; psm->SectorMaxSectors; psm->Sector++) -+ if(SsfdcWriteRedtData(psm,psm->WorkRedund)) { -+ SsfdcReset(psm); -+ psm->Sector=sect; -+ psm->ErrCode=ERR_HwError; -+ return(ERROR); -+ } /* NO Status Check */ -+ SsfdcReset(psm); -+ psm->Sector=sect; -+ return(SUCCESS); -+} -+ -+/*************************************************************************** -+ SmartMedia Control subroutine -+ Rev 0.30('98-06-30) ***** BETA RELEASE ***** -+ Copyright (c) 1997-98, Toshiba Corporation. All rights reserved. -+ ***************************************************************************/ -+ -+ -+/* Linux Driver Modifications */ -+/* -+dump_ssfdc_state -+*/ -+#if DEBUG_SSFDC -+void dump_ssfdc_state(ssfdc_dev * psm) -+{ -+#if DEBUG_SSFDC_STRUCT -+ // misc structure dump information -+ printk(KERN_DEBUG "psm->\n"); -+ /* unsigned long */ printk(KERN_DEBUG "\t address %x\n", psm->address); -+ /* int */ printk(KERN_DEBUG "\t sm_minor %d\n",psm->sm_minor); -+ /* struct dentry printk(KERN_DEBUG "\t *sm_dentry %x\n",psm->sm_dentry );*/ -+ /* kdev_t */ printk(KERN_DEBUG "\t sm_device %x\n",psm->sm_device); -+ /* int */ printk(KERN_DEBUG "\t sm_flags %x\n",psm->sm_flags); -+ /* unsigned int */ printk(KERN_DEBUG "\t UseCount %d\n",psm->UseCount); -+ /* unsigned int */ printk(KERN_DEBUG "\t ErrCode %d\n",psm->ErrCode); -+ /* unsigned int */ printk(KERN_DEBUG "\t MediaChange %d\n",psm->MediaChange); -+ /* unsigned int */ printk(KERN_DEBUG "\t SectCopyMode %d\n",psm->SectCopyMode); -+ /* unsigned int */ printk(KERN_DEBUG "\t HostCyl %d\n",psm->HostCyl ); -+ /* unsigned char */ printk(KERN_DEBUG "\t HostHead %d\n",psm->HostHead ); -+ /* unsigned char */ printk(KERN_DEBUG "\t HostSect %d\n",psm->HostSect ); -+ /* unsigned int */ printk(KERN_DEBUG "\t ReadBlock %d\n",psm->ReadBlock ); -+ /* unsigned int */ printk(KERN_DEBUG "\t WriteBlock %d\n",psm->WriteBlock ); -+ -+ /* Card attributes */ -+ /* unsigned char */ printk(KERN_DEBUG "\t Model %d\n",psm->Model ); -+ /* unsigned char */ printk(KERN_DEBUG "\t Attribute %x\n",psm->Attribute ); -+ /* unsigned char */ printk(KERN_DEBUG "\t MaxZones %d\n",psm->MaxZones ); -+ /* unsigned char */ printk(KERN_DEBUG "\t MaxSectors %d\n",psm->MaxSectors ); -+ /* unsigned int */ printk(KERN_DEBUG "\t MaxBlocks %d\n",psm->MaxBlocks ); -+ /* unsigned int */ printk(KERN_DEBUG "\t MaxLogBlocks %d\n",psm->MaxLogBlocks ); -+ /* unsigned char */ printk(KERN_DEBUG "\t Zone %d\n",psm->Zone ); -+ /* unsigned char */ printk(KERN_DEBUG "\t Sector %d\n",psm->Sector ); -+ /* unsigned int */ printk(KERN_DEBUG "\t PhyBlock %d\n",psm->PhyBlock ); -+ /* unsigned int */ printk(KERN_DEBUG "\t LogBlock %d\n",psm->LogBlock ); -+#endif -+} -+#endif -+ -+typedef struct { -+ int sm_error; -+ int lnx_error; -+ char *smerrstr; -+} errmap; -+ -+static errmap error_map_table [] = { -+ { NO_ERROR, 0x0000, ""}, -+ { ERR_WriteFault, EIO, "Peripheral Device Write Fault "}, -+ { ERR_HwError, EIO, "Hardware Error"}, -+ { ERR_DataStatus, EIO, "DataStatus Error"}, -+ { ERR_EccReadErr, EIO, "Unrecovered Read Error" }, -+ { ERR_CorReadErr, EIO, "Recovered Read Data with ECC" }, -+ { ERR_OutOfLBA, EIO, "Illegal Logical Block Address" }, -+ { ERR_WrtProtect, EROFS, "Write Protected" }, -+ { ERR_ChangedMedia, EIO, "Medium Changed" }, -+ { ERR_UnknownMedia, EIO, "Incompatible Medium Installed" }, -+ { ERR_IllegalFmt, EIO, "Medium Format Corrupted" }, -+ { ERR_NoSmartMedia, EIO, "Medium Not Present" } -+}; -+ -+static int ssfdc_maperror(int ssfdc_error) { -+ int loopus=0; -+ -+ if (!ssfdc_error) return 0; -+ -+ do { -+ if (error_map_table[loopus].sm_error == ssfdc_error) { -+ printk("%s\n", error_map_table[loopus].smerrstr); -+ return -error_map_table[loopus].lnx_error; -+ } -+ } while (++loopus < (sizeof(error_map_table) / (sizeof(errmap)))); -+ -+ printk(KERN_ERR "%s: error code %d is not mapped, EIO\n", MAJOR_NAME, ssfdc_error); -+ return -EIO; -+} -+ -+static int ssfdc_thread(void * arg) -+{ -+ ssfdc_dev *psm = arg; -+ unsigned long flags; -+ -+ daemonize("sm%dd",psm->sm_minor); -+ -+ spin_lock_irqsave(¤t->sighand->siglock,flags); // _irq -+ sigfillset(¤t->blocked); -+ recalc_sigpending(); -+ spin_unlock_irqrestore(¤t->sighand->siglock,flags); // _irq -+ -+ while (!psm->exiting) { -+ if ( ssfdc_get_request(psm) ) -+ initxfer(psm->sm_minor); -+ -+ spin_lock_irqsave(&psm->req_queue_lock,flags); // _irq -+ // bjm spin_lock(&psm->req_queue_lock); // _irq -+ psm->waiting = 0; -+ spin_unlock_irqrestore(&psm->req_queue_lock,flags); // _irq -+ // bjm spin_unlock(&psm->req_queue_lock); // _irq -+ if (wait_event_interruptible(psm->thread_wq,ssfdc_get_request(psm))) -+ printk("ssfdc_thread() interrupted\n"); -+ // wait_event(psm->thread_wq,ssfdc_get_request(psm)); -+ spin_lock_irqsave(&psm->req_queue_lock,flags); // _irq -+ // bjm spin_lock(&psm->req_queue_lock); // _irq -+ psm->waiting = 1; -+ spin_unlock_irqrestore(&psm->req_queue_lock,flags); // _irq -+ // bjm spin_unlock(&psm->req_queue_lock); // _irq -+ } -+ -+ printk("ssfdcd Exiting!\n"); -+ -+ complete_and_exit(&psm->thread_dead, 0); -+ -+} -+ -+/* -+ssfdc_init_device(ssfdc_dev *, int minor, unsigned long baseaddr, int removable) -+ reset and initialize the ssfdc_dev structure -+*/ -+static int ssfdc_init_device(ssfdc_dev *psm, int minor, unsigned long baseaddr) -+{ -+ int pid; -+ -+ // Establish ssfdc state -+ psm->XferState = xfer_idle; -+ psm->ErrCode = NO_ERROR; -+ psm->MediaChange = SUCCESS; -+ psm->SectCopyMode = COMPLETED; -+ psm->UseCount = 0; -+ psm->DataBuf_Valid = 0; -+ -+ // set minor number -+ psm->sm_minor = minor; -+ // io address -+ psm->address = baseaddr; -+ if (!request_region(psm->address, 3, "sm")) { -+ printk(KERN_ERR "sm: memory already in use!\n"); -+ return ERROR; -+ } -+ spin_lock_init(&psm->req_queue_lock); -+ -+ // thread related inititializations... -+ init_completion(&psm->thread_dead); -+ init_waitqueue_head(&psm->thread_wq); -+ -+ pid = kernel_thread(ssfdc_thread, psm, CLONE_KERNEL); -+ if (pid < 0) -+ printk("ssfdc: ERROR starting thread!\n"); -+ else -+ printk("ssfdc: started kernel thread sm%dd pid %d\n", psm->sm_minor, pid); -+ -+ // switch on power to device, and set basic attributes of card (no logical to phys mapping) -+ if ( ! CntPowerOn(psm) && ! CheckCardExist(psm) ) { -+ SetPhyFmtValue(psm); -+ } -+ else { -+ printk(KERN_ERR "ssfdc_init_device() unable to SetPhyFmtValue()\n"); -+ } -+ -+#if DEBUG_SSFDC -+ dump_ssfdc_state(psm); -+#endif -+ -+ return SUCCESS; -+} -+ -+static int ssfdc_dev_blk_size(ssfdc_dev *psm) -+{ -+ if (!psm) -+ return 0; -+ -+ // because of the physical to logical block mapping, not as many blocks -+ // as expected... -+ switch(psm->Model) { -+ case SSFDC1MB: -+ return (250 * 8 * 512) / SSFDC_BLKSIZE; -+ case SSFDC2MB: -+ return (500 * 8 * 512) / SSFDC_BLKSIZE; -+ case SSFDC4MB: -+ return (500 * 16 * 512) / SSFDC_BLKSIZE; -+ case SSFDC8MB: -+ return (1000 * 16 * 512) / SSFDC_BLKSIZE; -+ case SSFDC16MB: -+ return (1000 * 32 * 512) / SSFDC_BLKSIZE; -+ case SSFDC32MB: -+ return (2000 * 32 * 512) / SSFDC_BLKSIZE; -+ case SSFDC64MB: -+ return (4000 * 32 * 512) / SSFDC_BLKSIZE; -+ case SSFDC128MB: -+ return (8000 * 32 * 512) / SSFDC_BLKSIZE; -+ default: -+ return 0; -+ } -+} -+ -+inline int ssfdc_dev_sectors(ssfdc_dev *psm) { -+ return ssfdc_dev_blk_size(psm) * (SSFDC_BLKSIZE/SSFDC_SECTSIZE); -+} -+ -+static int ssfdc_open(struct inode *in, struct file *fptr) -+{ -+ int error_code=NO_ERROR; -+ ssfdc_dev *psm = in->i_bdev->bd_disk->private_data; -+ unsigned long flags; -+ -+#if DEBUG_SSFDC -+ printk(KERN_DEBUG "+ssfdc_open()\n"); -+#endif -+ -+ if (!fptr) { -+ return -EIO; -+ } -+ -+ spin_lock_irqsave(&psm->req_queue_lock,flags); -+ // bjm spin_lock(&psm->req_queue_lock); -+ // Power up smartmedia device, check for card, check media -+ if ((error_code=CntPowerOn(psm))) { -+ printk(KERN_ERR "%s PowerUP error\n", MAJOR_NAME); -+ } -+ else if ((error_code=CheckCardExist(psm))) {// Check the existence of a card -+ printk(KERN_ERR "%s No Card!\n", MAJOR_NAME); -+ } -+ else if ( ! psm->UseCount++ ) { -+ spin_unlock_irqrestore(&psm->req_queue_lock,flags); -+ // bjm spin_unlock(&psm->req_queue_lock); -+ check_disk_change(in->i_bdev); -+ spin_lock_irqsave(&psm->req_queue_lock,flags); -+ // bjm spin_lock(&psm->req_queue_lock); -+ } -+ -+ if ( ! psm->ErrCode ) { -+ // check our open mode against that of removable media's -+ if (WRITE_PROTECTED(psm)) { -+ printk(KERN_ERR "mount read only detected.\n"); -+ } -+ } -+ -+#if DEBUG_SSFDC -+ dump_ssfdc_state(psm); -+ printk(KERN_DEBUG "-ssfdc_open() error_code %d\n", error_code); -+#endif -+ -+ spin_unlock_irqrestore(&psm->req_queue_lock,flags); -+ -+#if DEBUG_SSFDC -+ printk("-ssfdc_open()\n"); -+#endif -+ -+ return ssfdc_maperror(error_code); -+} -+ -+static int ssfdc_release(struct inode *i_node, struct file *fptr) -+{ -+ int drive; -+ ssfdc_dev *psm=NULL; -+ unsigned long flags; -+ -+#if DEBUG_SSFDC -+ printk(KERN_DEBUG "+ssfdc_release("); -+#endif -+ -+ psm = (ssfdc_dev *) i_node->i_bdev->bd_disk->private_data; -+ drive = psm->sm_minor; -+ -+#if DEBUG_SSFDC -+ printk(KERN_DEBUG "%d)\n", drive); -+#endif -+ if (drive < 0 || drive >= MAX_SSFDC) -+ return -ENODEV; -+ -+ spin_lock_irqsave(&psm->req_queue_lock,flags); -+ // bjm spin_lock(&psm->req_queue_lock); -+ -+ if (!psm->UseCount) -+ printk(KERN_ERR "sm: Zero use count!\n"); -+ else { -+ --psm->UseCount; -+ } -+ -+#if DEBUG_SSFDC -+ dump_ssfdc_state(psm); -+#endif -+ -+#if DEBUG_SSFDC -+ printk(KERN_DEBUG "-ssfdc_release()\n"); -+#endif -+ -+ spin_unlock_irqrestore(&psm->req_queue_lock,flags); -+ // bjm spin_unlock(&psm->req_queue_lock); -+ -+ return 0; -+} -+ -+static int ssfdc_ioctl(struct inode *i_node, struct file *fptr, unsigned cmd, unsigned long arg) -+{ -+ int drive, int_val; -+ ssfdc_dev *psm; -+ -+#if DEBUG_SSFDC -+ printk(KERN_DEBUG "ssfdc_ioctl(%d)", cmd); -+#endif -+ -+ if (i_node == NULL) -+ return -EINVAL; -+ -+ psm = (ssfdc_dev *) i_node->i_bdev->bd_disk->private_data; -+ drive = psm->sm_minor; -+ -+ if (drive < 0 || drive >= MAX_SSFDC) -+ return -ENODEV; -+ switch(cmd) { -+ case BLKROSET: /* set device read-only (0 = read-write) */ -+ if (!capable(CAP_SYS_ADMIN)) -+ return -EACCES; -+ if (copy_from_user((void *) &int_val, (int *)arg, sizeof(int_val))) -+ return -EFAULT; -+ if (int_val) -+ psm->Attribute |= MWP; -+ else -+ psm->Attribute &= ~MWP; -+ return 0; -+ -+ case BLKROGET:/* get read-only status (0 = read_write) */ -+ int_val = psm->Attribute & MWP; -+ copy_to_user(arg, (void *) &int_val, sizeof(int_val)); -+ return 0; -+ -+ /* case BLKRRPART: */ /* re-read partition table */ -+ -+ case BLKGETSIZE: -+#if DEBUG_SSFDC -+ printk(KERN_DEBUG "BLKGETSIZE"); -+#else -+ printk(KERN_DEBUG "ssfdc_ioctl(BLKGETSIZE) not handled.\n"); -+#endif -+ break; -+ } -+ return -EINVAL; -+} -+ -+ -+static int ssfdc_getgeo(struct block_device *bdev, struct hd_geometry *geo) -+{ -+ unsigned char heads, sectors; -+ unsigned int cylinders; -+ struct gendisk *disk = bdev->bd_disk; -+ ssfdc_dev *psm = disk->private_data; -+ int drive = psm->sm_minor; -+ int err; -+ -+ if (drive < 0 || drive >= MAX_SSFDC) -+ return -ENODEV; -+ -+ err = CheckLogCHS(psm, &cylinders, &heads, §ors); -+ if (err) -+ return ssfdc_maperror(err); -+ -+ geo->heads = heads; -+ geo->sectors = sectors; -+ geo->cylinders = cylinders; -+ return 0; -+} -+ -+ -+static int ssfdc_revalidate(struct gendisk *disk) -+{ -+ unsigned int cis; -+ ssfdc_dev *psm=NULL; -+ int error_code=NO_ERROR; -+ unsigned long flags; -+ -+#if DEBUG_SSFDC -+ printk(KERN_DEBUG "ssfdc_revalidate()\n"); -+#endif -+ -+ psm = disk->private_data; -+ -+ spin_lock_irqsave(&psm->req_queue_lock,flags); -+ // bjm spin_lock(&psm->req_queue_lock); -+ -+ if ( ! psm->DataBuf_Valid ) { -+ if ((error_code=SetPhyFmtValue(psm))) -+ printk(KERN_ERR "ssfdc_revalidate() SetPhyFmtValue error\n"); -+ else if ((error_code=SearchCIS(psm,&cis))) -+ printk(KERN_ERR "ssfdc_revalidate() SearchCIS error\n"); -+ else if ((error_code=MakeLogTable(psm,cis+1))) -+ printk(KERN_ERR "ssfdc_revalidate() MakeLogTable error\n"); -+ } -+ spin_unlock_irqrestore(&psm->req_queue_lock,flags); -+ // bjm spin_unlock(&psm->req_queue_lock); -+ -+ return ssfdc_maperror(error_code); -+} -+ -+int __init ssfdc_init(void) -+{ -+ int i; -+ int err = 0; -+ -+#if DEBUG_SSFDC -+ printk(KERN_DEBUG "+ssfdc_init()\n"); -+#endif -+ -+ memset(disks, 0, sizeof(struct gendisk *) * MAX_SSFDC); -+ memset(ssfdc, 0, sizeof(struct ssfdc_dev *) * MAX_SSFDC); -+ for (i=0; imajor = SSFDC_MAJOR; -+ disks[i]->first_minor = i << SSFDC_PARTN_BITS; -+ disks[i]->fops = &ssfdc_fops; -+ sprintf(disks[i]->disk_name, "sm%d", i); -+ sprintf(disks[i]->devfs_name, "sm/%d", i); -+ disks[i]->private_data = ssfdc[i]; -+ ssfdc_init_device(ssfdc[i], i << SSFDC_PARTN_BITS, -+ CPLD_BASE_ADDRESS + SMART_MEDIA_ONE_OFFSET); -+ -+ disks[i]->queue = ssfdc[i]->req_queue = -+ blk_init_queue(do_ssfdc_request, &ssfdc[i]->req_queue_lock); -+ ssfdc[i]->req_queue->queuedata = ssfdc[i]; -+ -+ set_capacity(disks[i], ssfdc_dev_sectors(ssfdc[i])); -+ // bjm blk_queue_max_sectors(disks[i]->queue, 32); -+ // bjm blk_queue_max_phys_segments(disks[i]->queue, 4); -+ blk_queue_max_segment_size(disks[i]->queue, (ssfdc[i]->MaxSectors / 2) * K_BYTE); -+ add_disk(disks[i]); -+ } -+ -+#if 0 // bjm debug -+#ifndef CONFIG_SH_NIMBLE_MINI -+ mediachangetest(0L); -+#else -+ mediachangetest(1L); -+#endif -+#endif // bjm debug -+ -+#if DEBUG_SSFDC -+ printk(KERN_DEBUG "-ssfdc_init(0)\n"); -+#endif -+ return 0; -+ -+busy_error: -+no_memory_error: -+ for (i=0; i < MAX_SSFDC; ++i) { -+ if (disks[i] && disks[i]->queue) -+ kfree(disks[i]->queue); -+ put_disk(disks[i]); -+ if (ssfdc[i]) -+ kfree(ssfdc[i]); -+ } -+#if DEBUG_SSFDC -+ printk(KERN_DEBUG "-ssfdc_init(%d)\n", -ENOMEM); -+#endif -+ return -ENOMEM; -+} -+ -+void __init ssfdc_clean(void) -+{ -+ int i; -+ -+ printk(KERN_DEBUG "SSFDC exit code\n"); -+ -+ for (i=0; i < MAX_SSFDC; ++i) { -+ if (disks[i] != NULL) { -+ blk_cleanup_queue(disks[i]->queue); -+ del_gendisk(disks[i]); -+ put_disk(disks[i]); -+ } -+ -+ if (ssfdc[i]) { -+ // signal thread to exit... -+ ssfdc[i]->exiting = 1; -+ wake_up(&ssfdc[i]->thread_wq); -+ wait_for_completion(&ssfdc[i]->thread_dead); -+ -+ if (ssfdc[i]->address) -+ release_region(ssfdc[i]->address, 3); -+ kfree(ssfdc[i]); -+ } -+ } -+ -+ if (unregister_blkdev(SSFDC_MAJOR, "smartmedia")) -+ printk(KERN_WARNING "smartmedia: cannot unregister blkdev\n"); -+ devfs_remove("sm"); -+} -+ -+#if DEBUG_SSFDC -+void dump_request(struct request *req) -+{ -+#if DEBUG_SSFDC_REQUEST && DEBUG_SSFDC_REQUEST -+ printk(KERN_DEBUG "req->\n"); -+ /* int */ printk(KERN_DEBUG "\t req->cmd %x\n", req->cmd); /* READ or WRITE */ -+ /* int errors */ printk(KERN_DEBUG "\t req->errors %d\n", req->errors); -+ /* unsigned long */ printk(KERN_DEBUG "\t req->sector %d\n", req->sector); -+ /* unsigned long */ printk(KERN_DEBUG "\t req->nr_sectors %d\n",req->nr_sectors); -+ /* unsigned long */ printk(KERN_DEBUG "\t req->hard_sector %d\n", req->hard_sector); -+ /* unsigned int */ printk(KERN_DEBUG "\t req->nr_hw_segments %d\n",req->nr_hw_segments); -+ /* unsigned long */ printk(KERN_DEBUG "\t req->current_nr_sectors %d\n",req->current_nr_sectors); -+ -+#endif -+} -+#endif -+ -+void do_ssfdc_request(request_queue_t * rq) -+{ -+ ssfdc_dev *psm = rq->queuedata; -+ -+ if ( ! psm->waiting ) -+ wake_up(&psm->thread_wq); -+} -+ -+static struct request * ssfdc_get_request(ssfdc_dev *psm) -+{ -+ struct request *treq; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&psm->req_queue_lock, flags); -+ // bjm spin_lock(&psm->req_queue_lock); -+ treq = elv_next_request(psm->req_queue); -+ spin_unlock_irqrestore(&psm->req_queue_lock, flags); -+ // bjm spin_unlock(&psm->req_queue_lock); -+ -+ return treq; -+} -+ -+static void ssfdc_terminate_request(ssfdc_dev *psm, struct request *req) -+{ -+ unsigned long flags; -+ -+ if (psm && req) { -+ spin_lock_irqsave(&psm->req_queue_lock, flags); -+ // bjm spin_lock(&psm->req_queue_lock); -+ end_request(req,0); -+ spin_unlock_irqrestore(&psm->req_queue_lock, flags); -+ // bjm spin_unlock(&psm->req_queue_lock); -+ } -+} -+ -+ -+static int ssfdc_end_request(ssfdc_dev *psm, struct request *req, int status) -+{ -+ unsigned long flags; -+ -+ if (!psm || !req) { -+ printk(KERN_DEBUG "ssfdc_end_request() NULL psm or req!\n"); -+ return 0; -+ } -+ -+#if DEBUG_SSFDC_REQUEST -+ printk("ssfdc_end_request(%p)\n", req); -+#endif -+ -+ spin_lock_irqsave(&psm->req_queue_lock,flags); -+ // bjm spin_lock(&psm->req_queue_lock); -+ end_request(req,status); -+ spin_unlock_irqrestore(&psm->req_queue_lock,flags); -+ // bjm spin_unlock(&psm->req_queue_lock); -+ return 0; -+} -+ -+void initxfer(unsigned long dev_idx) -+{ -+ ssfdc_dev *psm = ssfdc[dev_idx]; -+ struct request *req; -+ int error_code; -+ unsigned int cis; -+ -+#if DEBUG_SSFDC -+ // printk(KERN_DEBUG "+initxfer(%d)", dev_idx); -+#endif -+ // get device lock, and check idle flag, setting if not busy -+ -+ req = ssfdc_get_request(psm); -+ -+ // if the device is idle, setup a read or write operation -+ if (psm->XferState == xfer_idle) { -+ // get the current request from our device's request list. -+ if (!req) { -+#if DEBUG_SSFDC -+// printk(KERN_DEBUG "initxfer() terminate, no schedule.\n"); -+#endif -+ } -+ // Absence of power indicates absence of card. -+ // terminate request and exit... -+ if ( ! _HwChkPower(psm) ) { -+ printk(KERN_DEBUG "initxfer() - Media power NOT!\n"); -+ ssfdc_terminate_request(psm,req); -+ return; -+ } -+ -+ // We have a request and we have a card. Is the Log2Phys mapping still valid? -+ if ( ! psm->DataBuf_Valid ) { -+ if ((error_code = SetPhyFmtValue(psm))) -+ printk(KERN_DEBUG "%s SetPhyFmtValue error\n", MAJOR_NAME); -+ else if ((error_code = SearchCIS(psm,&cis))) -+ printk(KERN_DEBUG "%s SearchCIS error\n", MAJOR_NAME); -+ else if ((error_code = MakeLogTable(psm,cis+1))) -+ printk(KERN_DEBUG "%s MakeLogTable error\n", MAJOR_NAME); -+ if (error_code) { -+ printk(KERN_DEBUG "%s error %d\n", MAJOR_NAME, error_code); -+ ssfdc_terminate_request(psm,req); -+ return; -+ } -+ } -+ -+ psm->XferState = xfer_busy; -+#if DEBUG_SSFDC -+ printk(KERN_DEBUG " initxfer() - do the request %x\n", req); -+#endif -+ ssfdc_rw_request(psm, req); -+ } -+#if DEBUG_SSFDC -+ else { -+ printk(KERN_DEBUG "initxfer(%d) dev is busy, no reschedule.\n", dev_idx); -+ } -+#endif -+ -+} -+ -+ -+void ssfdc_rw_request(ssfdc_dev *psm, struct request *req) -+{ -+ int (*rwsector)(ssfdc_dev *, struct request *, char *, long, int); -+ unsigned sector, count; -+ int rw_return=1; -+ -+ if (rq_data_dir(req) == WRITE) -+ rwsector = MediaWriteSector; -+ else if (rq_data_dir(req) == READ) -+ rwsector = MediaReadSector; -+ else { -+ printk(KERN_DEBUG "%s: command %d not implemented!\n", MAJOR_NAME, (int) rq_data_dir(req)); -+ goto terminal_error; -+ } -+ -+ /* -+ */ -+ sector = req->sector; -+ count = req->nr_sectors; -+ -+ // check that the request does not extend past ssfdc's max size -+ if ( (sector + count) > ssfdc_dev_sectors(psm) ) { -+ printk(KERN_ERR "Attempt to read past end of device!"); -+ goto terminal_error; -+ } -+ else { -+ -+ // for each segment in each bio_vec R/W from/to device. -+ -+ count = req->current_nr_sectors; -+ rw_return = rwsector(psm, req, req->buffer, sector, count); -+ -+ if (rq_data_dir(req) == READ) -+ ssfdc_end_request(psm, req, rw_return); -+ } -+ -+ // things appear OK... -+ return; -+ -+terminal_error: -+ ssfdc_terminate_request( psm, req); -+ psm->XferState = xfer_idle; -+} -+ -+module_init(ssfdc_init); -+module_exit(ssfdc_clean); -+ -+MODULE_LICENSE("GPL"); -+ -+/* End of Linux Driver Modifications */ -diff -duNr linux-2.6.16-orig/drivers/block/ssfdc.h linux-2.6.16/drivers/block/ssfdc.h ---- linux-2.6.16-orig/drivers/block/ssfdc.h 1970-01-01 10:00:00.000000000 +1000 -+++ linux-2.6.16/drivers/block/ssfdc.h 2006-06-29 16:13:27.000000000 +1000 -@@ -0,0 +1,372 @@ -+/* $id: $ */ -+#ifndef _SSFDC_H -+#define _SSFDC_H -+ -+/* -+ Linux related defines -+*/ -+ -+#ifdef CONFIG_SH_NIMBLE_MINI -+#define MAX_SSFDC 2 /* two drives */ -+#else -+#define MAX_SSFDC 1 /* only one drive */ -+#endif -+ -+#define SSFDC_MAJOR_NAME "sm" -+#define MAJOR_NAME SSFDC_MAJOR_NAME -+#define SSFDC_PARTN_BITS 4 /* number of minor dev bits for partitions */ -+#define PARTN_MASK ((1<address+0x00) /* R/W Data Reg */ -+#define STATUS(p) (p->address+0x02) /* R/- Status Reg */ -+#define MODE(p) (p->address+0x02) /* -/W Mode Reg */ -+ -+/* Controller Status Reg (Read Only) */ -+#define STS_BUSY 0x80 -+#define STS_VCC 0x10 -+#define STS_SCHG 0x08 -+#define STS_WP 0x01 -+#define STS_CENB 0x04 -+ -+#ifdef CONFIG_SH_TITAN -+/* Controller Mode Reg (Write Only) */ -+/* keep PCI clock running on bit 3 */ -+/* CE# on bit 2, CLE on bit 1 and ALE on bit 0 */ -+#define STANDBY (0x00 | 0x00 | 0x08) -+#define WR_DATA (0x00 | 0x04 | 0x08) -+#define WR_CMD (0x02 | 0x04 | 0x08) -+#define WR_ADR (0x01 | 0x04 | 0x08) -+#else -+/* Controller Mode Reg (Write Only) */ -+#define STANDBY 0x00 -+#define WR_DATA 0x10 -+#define WR_CMD 0x11 -+#define WR_ADR 0x12 -+#define PW_OFF 0x80 -+#define PW_ON 0x88 -+#endif -+ -+/***************************************************************************/ -+#define _HwSetData(p) ctrl_outb(WR_DATA,MODE(p)) -+#define _HwSetCmd(p) ctrl_outb(WR_CMD,MODE(p)) -+#define _HwSetAddr(p) ctrl_outb(WR_ADR,MODE(p)) -+#define _HwSetStandby(p) ctrl_outb(STANDBY,MODE(p)) -+ -+#define _HwInData(p) ctrl_inb(DATA(p)) -+#define _HwOutData(p,a) ctrl_outb((a),DATA(p)) -+ -+#ifdef CONFIG_SH_TITAN -+#define _HwVccOn(p) -+#define _HwVccOff(p) -+#else -+#define _HwVccOn(p) ctrl_outb(PW_ON,MODE(p)) -+#define _HwVccOff(p) ctrl_outb(PW_OFF,MODE(p)) -+#endif -+ -+#ifdef CONFIG_SH_TITAN -+#define _HwChkCardIn(p) (1) -+#define _HwChkStatus(p) (0) -+#define _HwChkWP(p) (0) -+#define _HwChkPower(p) (1) -+#define _HwChkBusy(p) (ctrl_inb(STATUS(p))&STS_BUSY) -+ -+#else -+ -+#define _HwChkCardIn(p) (ctrl_inb(STATUS(p))&STS_CENB) -+#define _HwChkStatus(p) (ctrl_inb(STATUS(p))&(STS_SCHG)) -+#define _HwChkWP(p) (ctrl_inb(STATUS(p))&(STS_WP)) -+#define _HwChkPower(p) (ctrl_inb(STATUS(p))&(STS_VCC)) -+#define _HwChkBusy(p) (ctrl_inb(STATUS(p))&STS_BUSY) -+ -+#endif -+ -+#define _HwRdStatus(p) (ctrl_inb(STATUS(p))) -+/***************************************************************************/ -+#ifdef CONFIG_SH_NIMBLE_MINI -+#define CPLD_BASE_ADDRESS 0xB4030000L -+#define SMART_MEDIA_ONE_OFFSET 0x08 // The "built-in" SmartMedia -+#define SMART_MEDIA_TWO_OFFSET 0x00 // The "removable" SmartMedia -+#elif CONFIG_SH_TITAN -+#define CPLD_BASE_ADDRESS 0xA4000000L -+#define SMART_MEDIA_ONE_OFFSET 0x00 -+#else -+#define CPLD_BASE_ADDRESS 0xB8030000L -+#define SMART_MEDIA_ONE_OFFSET 0x00 // The "built-in" SmartMedia -+#endif -+ -+/*************************************************************************** -+ Program & Macro for SmartMedia Controller -+ Rev 0.30('98-06-30) ***** BETA RELEASE ***** -+ Copyright (c) 1997-98, Toshiba Corporation. All rights reserved. -+ ***************************************************************************/ -+/*************************************************************************** -+ Define Definition -+ ***************************************************************************/ -+#define K_BYTE 1024 /* Kilo Byte */ -+#define SSFDC_SECTSIZE 512 /* Sector buffer size */ -+#define SSFDC_BLKSIZE (K_BYTE * 4) -+#define REDTSIZE 16 /* Redundant buffer size */ -+ -+/***************************************************************************/ -+#define DUMMY_DATA 0xFF /* No Assign Sector Read Data */ -+ -+/*************************************************************************** -+ Max Zone/Block/Sectors Data Definition -+ ***************************************************************************/ -+#define MAX_ZONENUM 0x08 /* Max Zone Numbers in a SmartMedia */ -+#define MAX_BLOCKNUM 0x0400 /* Max Block Numbers in a Zone */ -+#define MAX_SECTNUM 0x20 /* Max Sector Numbers in a Block */ -+#define MAX_LOGBLOCK 1000 /* Max Logical Block Numbers in a Zone */ -+ -+/*************************************************************************** -+ Logical to Physical Block Table Data Definition -+ ***************************************************************************/ -+#define NO_ASSIGN 0xFFFF /* No Assign Logical Block Address */ -+ -+/*************************************************************************** -+ 'SectCopyMode' Data -+ ***************************************************************************/ -+#define COMPLETED 0 /* Sector Copy Completed */ -+#define REQ_ERASE 1 /* Request Read Block Erase */ -+#define REQ_FAIL 2 /* Request Read Block Failed */ -+ -+/*************************************************************************** -+ Retry Counter Definition -+ ***************************************************************************/ -+#define RDERR_REASSIGN 1 /* Reassign with Read Error */ -+#define L2P_ERR_ERASE 1 /* BlockErase for Contradicted L2P Table */ -+ -+/*************************************************************************** -+ SmartMedia Command & Status Definition -+ ***************************************************************************/ -+/* SmartMedia Command */ -+#define SSFDC_WRDATA 0x80 -+#define SSFDC_READ 0x00 -+#define SSFDC_READ_REDT 0x50 -+#define SSFDC_READ1 0x00 -+#define SSFDC_READ2 0x01 -+#define SSFDC_READ3 0x50 -+#define SSFDC_RST_CHIP 0xFF -+#define SSFDC_WRITE 0x10 -+#define SSFDC_DUMMY_WRITE 0x11 -+#define SSFDC_MULTI_WRITE 0x15 -+#define SSFDC_ERASE1 0x60 -+#define SSFDC_ERASE2 0xD0 -+#define SSFDC_RDSTATUS 0x70 -+#define SSFDC_READ_ID 0x90 -+ -+/* SmartMedia Status */ -+#define WR_FAIL 0x01 /* 0:Pass, 1:Fail */ -+#define SUSPENDED 0x20 /* 0:Not Suspended, 1:Suspended */ -+#define READY 0x40 /* 0:Busy, 1:Ready */ -+#define WR_PRTCT 0x80 /* 0:Protect, 1:Not Protect */ -+ -+#define USEC 1 -+#define MSEC 1000 * USEC -+#define JIFFY_TICK_MS (MSEC / HZ) -+ -+// #define BUSY_PROG 20 * MSEC /* 200-1000us ----- Program Time */ -+#define BUSY_PROG 1000 * USEC /* 200-1000us ----- Program Time */ -+#define BUSY_DUMMY_WRITE 10 * USEC /* 2-10us dummy write */ -+#define BUSY_MULTI_WRITE 1000 * USEC /* 200 - 1000 usec */ -+#define BUSY_ERASE 10 * MSEC /* 2-10ms ----- Block Erase Time */ -+#define BUSY_READ 100 * USEC /* tR : 100us ----- Data transfer Time */ -+#define BUSY_RESET 10 * USEC /* tRST : 10us ----- Device Resetting Time */ -+#define BUSY_ADDR_SET 25 * USEC -+ -+#define TIME_PON 30 /* 300ms ------ Power On Wait Time */ -+#define TIME_CDCHK 2 /* 20ms ------ Card Check Interval Timer */ -+#define TIME_WPCHK 1 /* 5ms ------ WP Check Interval Timer */ -+ -+/* Power On Timeout */ -+#define POWER_ON_TIMEOUT (HZ*2) -+ -+/* Default retry limit for Read/Write */ -+#define RD_RETRY_LIMIT 3 -+#define WR_RETRY_LIMIT 4 -+#define BLOCK_READ_RETRY_LIMIT 2 -+#define BLOCK_WRITE_RETRY_LIMIT 3 -+#define REASSIGN_RETRY_LIMIT 4 -+ -+/*************************************************************************** -+ Redundant Data -+ ***************************************************************************/ -+#define REDT_DATA 0x04 -+#define REDT_BLOCK 0x05 -+ -+#define REDT_ADDR1H 0x06 -+#define REDT_ADDR1L 0x07 -+#define REDT_ADDR2H 0x0B -+#define REDT_ADDR2L 0x0C -+ -+#define REDT_ECC10 0x0D -+#define REDT_ECC11 0x0E -+#define REDT_ECC12 0x0F -+ -+#define REDT_ECC20 0x08 -+#define REDT_ECC21 0x09 -+#define REDT_ECC22 0x0A -+ -+/*************************************************************************** -+ SmartMedia Model & Attribute -+ ***************************************************************************/ -+/* SmartMedia Attribute */ -+#define NOWP 0x00 /* 0... .... No Write Protect */ -+#define WP 0x80 /* 1... .... Write Protected */ -+#define MASK 0x00 /* .00. .... NAND MASK ROM Model */ -+#define FLASH 0x20 /* .01. .... NAND Flash ROM Model */ -+#define AD3CYC 0x00 /* ...0 .... Address 3-cycle */ -+#define AD4CYC 0x10 /* ...1 .... Address 4-cycle */ -+#define BS16 0x00 /* .... 00.. 16page/block */ -+#define BS32 0x04 /* .... 01.. 32page/block */ -+#define PS256 0x00 /* .... ..00 256byte/page */ -+#define PS512 0x01 /* .... ..01 512byte/page */ -+ -+#define MWP 0x80 /* WriteProtect mask */ -+#define MFLASH 0x60 /* Flash Rom mask */ -+#define MADC 0x10 /* Address Cycle */ -+#define MBS 0x0C /* BlockSize mask */ -+#define MPS 0x03 /* PageSize mask */ -+ -+/* SmartMedia Model */ -+#define NOSSFDC 0x00 /* NO SmartMedia */ -+#define SSFDC1MB 0x01 /* 1MB SmartMedia */ -+#define SSFDC2MB 0x02 /* 2MB SmartMedia */ -+#define SSFDC4MB 0x03 /* 4MB SmartMedia */ -+#define SSFDC8MB 0x04 /* 8MB SmartMedia */ -+#define SSFDC16MB 0x05 /* 16MB SmartMedia */ -+#define SSFDC32MB 0x06 /* 32MB SmartMedia */ -+#define SSFDC64MB 0x07 /* 64MB SmartMedia */ -+#define SSFDC128MB 0x08 /*128MB SmartMedia */ -+ -+#define EVEN 0 /* Even Page for 256byte/page */ -+#define ODD 1 /* Odd Page for 256byte/page */ -+ -+/*************************************************************************** -+ Struct Definition -+ ***************************************************************************/ -+/* Linux kernel additions */ -+ -+/* device buffer xfer status */ -+typedef enum { xfer_idle, xfer_busy} xfer_states; -+ -+/* Smartmedia device structure */ -+typedef struct { -+ unsigned long address; -+ int sm_minor; -+ int sm_flags; -+ int busy; -+ int waiting; -+ -+ /* queue of io requests for the device */ -+ spinlock_t req_queue_lock; -+ request_queue_t *req_queue; -+ -+ /* our thread related parameters */ -+ struct completion thread_dead; -+ int exiting; -+ wait_queue_head_t thread_wq; -+ -+ /* accounting variables for each buffer io operation -+ each request may have a chain of buffers, each of -+ which may require I/O of multiple sectors */ -+ unsigned int ReqSectorSize; -+ unsigned int BufIndex; -+ unsigned int SectorWriteIndex; -+ -+ /* CHS parameters */ -+ unsigned int HostCyl; -+ unsigned char HostHead; -+ unsigned char HostSect; -+ -+ /* State Information */ -+ xfer_states XferState; -+ unsigned int UseCount; -+ unsigned int RetryCount; -+ unsigned int ErrCode; -+ unsigned int MediaChange; -+ unsigned int CardPresent; -+ unsigned int SectCopyMode; -+ -+ /* Working Databuf Area */ -+ unsigned char SectBuf[SSFDC_SECTSIZE]; -+ unsigned char WorkBuf[SSFDC_SECTSIZE]; -+ unsigned char Redundant[REDTSIZE]; -+ unsigned char WorkRedund[REDTSIZE]; -+ unsigned int DataBuf_Valid; -+ unsigned int Log2Phy[MAX_ZONENUM][MAX_LOGBLOCK]; -+ unsigned char Assign[MAX_ZONENUM][MAX_BLOCKNUM/8]; -+ unsigned int AssignStart[MAX_ZONENUM]; -+ unsigned int ReadBlock; -+ unsigned int WriteBlock; -+ -+ /* Card attributes */ -+ unsigned char Model; -+ unsigned char Attribute; -+ unsigned char MaxZones; -+ unsigned char MaxSectors; -+ unsigned int MaxBlocks; -+ unsigned int MaxLogBlocks; -+ -+ /* Address of current access (Media) */ -+ unsigned char Zone; /* Zone Number */ -+ unsigned char Sector; /* Sector(512byte) Number on Block */ -+ unsigned int PhyBlock; /* Physical Block Number on Zone */ -+ unsigned int LogBlock; /* Logical Block Number of Zone */ -+ -+ /* device statistics */ -+ unsigned int Sector_reads; -+ unsigned int Sector_writes; -+ unsigned int Sect_rd_errs_ttl; -+ unsigned int Sect_wr_errs_ttl; -+ unsigned int Bad_blks_rd; -+ unsigned int Bad_blks_wr; -+ unsigned int Bad_blks_erase; -+} ssfdc_dev; -+ -+ -+/****************************************************************************/ -+/* Handy defines */ -+/****************************************************************************/ -+#define WRITE_PROTECTED(p) (p->Attribute & WP) -+ -+/* End of Linux kernel additions */ -+#endif /* #ifndef _SSFDC_H */ diff --git a/packages/linux/linux-titan-sh4-2.6.17/.mtn2git_empty b/packages/linux/linux-titan-sh4-2.6.17/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/linux-titan-sh4-2.6.17/titan-config b/packages/linux/linux-titan-sh4-2.6.17/titan-config new file mode 100644 index 0000000000..c7a0fc9b8e --- /dev/null +++ b/packages/linux/linux-titan-sh4-2.6.17/titan-config @@ -0,0 +1,1551 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.17 +# Thu Jul 6 12:42:07 2006 +# +CONFIG_SUPERH=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_CALIBRATE_DELAY=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +# CONFIG_RELAY is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +CONFIG_SLAB=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=m + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Block layer +# +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" + +# +# System type +# +# CONFIG_SH_SOLUTION_ENGINE is not set +# CONFIG_SH_7751_SOLUTION_ENGINE is not set +# CONFIG_SH_7300_SOLUTION_ENGINE is not set +# CONFIG_SH_73180_SOLUTION_ENGINE is not set +# CONFIG_SH_7751_SYSTEMH is not set +# CONFIG_SH_STB1_HARP is not set +# CONFIG_SH_STB1_OVERDRIVE is not set +# CONFIG_SH_HP6XX is not set +# CONFIG_SH_CQREEK is not set +# CONFIG_SH_DMIDA is not set +# CONFIG_SH_EC3104 is not set +# CONFIG_SH_SATURN is not set +# CONFIG_SH_DREAMCAST is not set +# CONFIG_SH_CAT68701 is not set +# CONFIG_SH_BIGSUR is not set +# CONFIG_SH_SH2000 is not set +# CONFIG_SH_ADX is not set +# CONFIG_SH_MPC1211 is not set +# CONFIG_SH_SH03 is not set +# CONFIG_SH_SECUREEDGE5410 is not set +# CONFIG_SH_HS7751RVOIP is not set +# CONFIG_SH_RTS7751R2D is not set +# CONFIG_SH_R7780RP is not set +# CONFIG_SH_EDOSK7705 is not set +# CONFIG_SH_SH4202_MICRODEV is not set +# CONFIG_SH_LANDISK is not set +CONFIG_SH_TITAN=y +# CONFIG_SH_UNKNOWN is not set + +# +# Processor selection +# +CONFIG_CPU_SH4=y + +# +# SH-2 Processor Support +# +# CONFIG_CPU_SUBTYPE_SH7604 is not set + +# +# SH-3 Processor Support +# +# CONFIG_CPU_SUBTYPE_SH7300 is not set +# CONFIG_CPU_SUBTYPE_SH7705 is not set +# CONFIG_CPU_SUBTYPE_SH7707 is not set +# CONFIG_CPU_SUBTYPE_SH7708 is not set +# CONFIG_CPU_SUBTYPE_SH7709 is not set + +# +# SH-4 Processor Support +# +# CONFIG_CPU_SUBTYPE_SH7750 is not set +# CONFIG_CPU_SUBTYPE_SH7091 is not set +# CONFIG_CPU_SUBTYPE_SH7750R is not set +# CONFIG_CPU_SUBTYPE_SH7750S is not set +CONFIG_CPU_SUBTYPE_SH7751=y +CONFIG_CPU_SUBTYPE_SH7751R=y +# CONFIG_CPU_SUBTYPE_SH7760 is not set +# CONFIG_CPU_SUBTYPE_SH4_202 is not set + +# +# ST40 Processor Support +# +# CONFIG_CPU_SUBTYPE_ST40STB1 is not set +# CONFIG_CPU_SUBTYPE_ST40GX1 is not set + +# +# SH-4A Processor Support +# +# CONFIG_CPU_SUBTYPE_SH73180 is not set +# CONFIG_CPU_SUBTYPE_SH7770 is not set +# CONFIG_CPU_SUBTYPE_SH7780 is not set + +# +# Memory management options +# +CONFIG_MMU=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 + +# +# Cache configuration +# +# CONFIG_SH_DIRECT_MAPPED is not set +# CONFIG_SH_WRITETHROUGH is not set +# CONFIG_SH_OCRAM is not set +CONFIG_MEMORY_START=0x08030000 +CONFIG_MEMORY_SIZE=0x7fd0000 + +# +# Processor features +# +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_SH_RTC=y +CONFIG_SH_FPU=y +# CONFIG_SH_STORE_QUEUES is not set +CONFIG_CPU_HAS_INTEVT=y +CONFIG_CPU_HAS_SR_RB=y + +# +# Timer support +# +CONFIG_SH_TMU=y +CONFIG_SH_PCLK_FREQ=30000000 + +# +# CPU Frequency scaling +# +# CONFIG_CPU_FREQ is not set + +# +# DMA support +# +CONFIG_SH_DMA=y +CONFIG_NR_ONCHIP_DMA_CHANNELS=8 +# CONFIG_NR_DMA_CHANNELS_BOOL is not set + +# +# Companion Chips +# +# CONFIG_HD6446X_SERIES is not set + +# +# Kernel features +# +# CONFIG_KEXEC is not set +# CONFIG_PREEMPT is not set +# CONFIG_SMP is not set + +# +# Boot options +# +CONFIG_ZERO_PAGE_OFFSET=0x00001000 +CONFIG_BOOT_LINK_OFFSET=0x009e0000 +# CONFIG_UBC_WAKEUP is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="console=ttySC1,38400N81 root=/dev/sm0p2" + +# +# Bus options +# +CONFIG_PCI=y +CONFIG_SH_PCIDMA_NONCOHERENT=y +CONFIG_PCI_AUTO=y +CONFIG_PCI_AUTO_UPDATE_RESOURCES=y +# CONFIG_PCI_DEBUG is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PCI Hotplug Support +# +CONFIG_HOTPLUG_PCI=y +# CONFIG_HOTPLUG_PCI_FAKE is not set +# CONFIG_HOTPLUG_PCI_CPCI is not set +# CONFIG_HOTPLUG_PCI_SHPC is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_FLAT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Power management options (EXPERIMENTAL) +# +# CONFIG_PM is not set + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +CONFIG_NET_KEY=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +# CONFIG_IP_ROUTE_FWMARK is not set +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_MULTIPATH_CACHED=y +CONFIG_IP_ROUTE_MULTIPATH_RR=m +CONFIG_IP_ROUTE_MULTIPATH_RANDOM=m +CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=m +CONFIG_IP_ROUTE_MULTIPATH_DRR=m +# CONFIG_IP_ROUTE_VERBOSE is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=y +CONFIG_NET_IPGRE=y +CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_IP_MROUTE=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +# CONFIG_ARPD is not set +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=y +CONFIG_INET_ESP=y +CONFIG_INET_IPCOMP=y +CONFIG_INET_XFRM_TUNNEL=y +CONFIG_INET_TUNNEL=y +CONFIG_INET_DIAG=m +CONFIG_INET_TCP_DIAG=m +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_BIC=y + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_IPV6=y +CONFIG_IPV6_PRIVACY=y +# CONFIG_IPV6_ROUTER_PREF is not set +CONFIG_INET6_AH=y +CONFIG_INET6_ESP=y +CONFIG_INET6_IPCOMP=y +CONFIG_INET6_XFRM_TUNNEL=y +CONFIG_INET6_TUNNEL=y +CONFIG_IPV6_TUNNEL=y +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_BRIDGE_NETFILTER=y + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NETFILTER_XTABLES=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CONNTRACK_EVENTS=y +CONFIG_IP_NF_CONNTRACK_NETLINK=m +# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_NETBIOS_NS=m +CONFIG_IP_NF_TFTP=m +# CONFIG_IP_NF_AMANDA is not set +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_H323=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m + +# +# IPv6: Netfilter Configuration (EXPERIMENTAL) +# +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_RAW=m + +# +# Bridge: Netfilter Configuration +# +# CONFIG_BRIDGE_NF_EBTABLES is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +CONFIG_BRIDGE=y +CONFIG_VLAN_8021Q=y +# CONFIG_DECNET is not set +CONFIG_LLC=y +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CLK_JIFFIES=y +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +# CONFIG_NET_SCH_CLK_CPU is not set + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_INGRESS=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_STACK=32 +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_PEDIT=m +# CONFIG_NET_ACT_SIMP is not set +CONFIG_NET_CLS_IND=y +CONFIG_NET_ESTIMATOR=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_IEEE80211=y +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=y +CONFIG_IEEE80211_CRYPT_CCMP=y +CONFIG_IEEE80211_CRYPT_TKIP=y +CONFIG_IEEE80211_SOFTMAC=m +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +CONFIG_WIRELESS_EXT=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=m +# CONFIG_DEBUG_DRIVER is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +CONFIG_CONNECTOR=m + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=m +CONFIG_MTD_DEBUG=y +CONFIG_MTD_DEBUG_VERBOSE=0 +# CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_PARTITIONS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=m +CONFIG_MTD_BLOCK=m +# CONFIG_MTD_BLOCK_RO is not set +CONFIG_FTL=m +CONFIG_NFTL=m +# CONFIG_NFTL_RW is not set +CONFIG_INFTL=m +CONFIG_RFD_FTL=m + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=m +CONFIG_MTD_JEDECPROBE=m +CONFIG_MTD_GEN_PROBE=m +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_CFI_INTELEXT is not set +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_SOLUTIONENGINE is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +CONFIG_MTD_NAND=m +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +CONFIG_MTD_NAND_IDS=m +# CONFIG_MTD_NAND_DISKONCHIP is not set + +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +CONFIG_BLK_SSFDC=y +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_CRYPTOLOOP=m +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_CDROM_PKTCDVD is not set +CONFIG_ATA_OVER_ETH=m + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=m +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=m +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set + +# +# SCSI Transport Attributes +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set + +# +# SCSI low-level drivers +# +# CONFIG_ISCSI_TCP is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_SAS is not set +# CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_LPFC is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y +# CONFIG_IFB is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +CONFIG_TUN=m + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# PHY device support +# +CONFIG_PHYLIB=m + +# +# MII PHY device drivers +# +CONFIG_MARVELL_PHY=m +CONFIG_DAVICOM_PHY=m +CONFIG_QSEMI_PHY=m +CONFIG_LXT_PHY=m +CONFIG_CICADA_PHY=m + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_STNIC is not set +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_CASSINI is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_SMC91X is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +# CONFIG_NE2000 is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set +# CONFIG_EEPRO100 is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +CONFIG_8139TOO=y +# CONFIG_8139TOO_PIO is not set +CONFIG_8139TOO_TUNE_TWISTER=y +# CONFIG_8139TOO_8129 is not set +CONFIG_8139_OLD_RX_RESET=y +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +# CONFIG_VIA_RHINE is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SIS190 is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +# CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set +# CONFIG_TIGON3 is not set +# CONFIG_BNX2 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_CHELSIO_T1 is not set +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +CONFIG_NET_RADIO=y +CONFIG_NET_WIRELESS_RTNETLINK=y + +# +# Obsolete Wireless cards support (pre-802.11) +# +# CONFIG_STRIP is not set + +# +# Wireless 802.11b ISA/PCI cards support +# +# CONFIG_IPW2100 is not set +# CONFIG_IPW2200 is not set +# CONFIG_HERMES is not set +# CONFIG_ATMEL is not set + +# +# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support +# +CONFIG_PRISM54=m +# CONFIG_HOSTAP is not set +CONFIG_BCM43XX=m +CONFIG_BCM43XX_DEBUG=y +CONFIG_BCM43XX_DMA=y +CONFIG_BCM43XX_PIO=y +CONFIG_BCM43XX_DMA_AND_PIO_MODE=y +# CONFIG_BCM43XX_DMA_MODE is not set +# CONFIG_BCM43XX_PIO_MODE is not set +CONFIG_NET_WIRELESS=y + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +CONFIG_PPP=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +CONFIG_PPPOE=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +# CONFIG_SLIP_MODE_SLIP6 is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_SH_SCI=y +CONFIG_SERIAL_SH_SCI_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_SH_WDT=m + +# +# PCI-based Watchdog Cards +# +# CONFIG_PCIPCWATCHDOG is not set +# CONFIG_WDTPCI is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +# CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Misc devices +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_V4L2=y + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_SPLIT_ISO is not set +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Input Devices +# +# CONFIG_USB_HID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_ZD1201 is not set +CONFIG_USB_MON=y + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +# CONFIG_USB_SERIAL_AIRPRIME is not set +# CONFIG_USB_SERIAL_ANYDATA is not set +CONFIG_USB_SERIAL_ARK3116=m +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_CP2101 is not set +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +# CONFIG_USB_SERIAL_FTDI_SIO is not set +# CONFIG_USB_SERIAL_FUNSOFT is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +CONFIG_USB_SERIAL_PL2303=m +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OMNINET is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TEST is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# LED devices +# +# CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers +# + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) +# + +# +# Real Time Clock +# +# CONFIG_RTC_CLASS is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_RT is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +CONFIG_FUSE_FS=m + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=m +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +CONFIG_CONFIGFS_FS=m + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +# CONFIG_NFSD_V4 is not set +CONFIG_NFSD_TCP=y +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +CONFIG_9P_FS=m + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=m +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +# 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_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=m +# 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_9 is not set +# CONFIG_NLS_ISO8859_13 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_KOI8_U is not set +CONFIG_NLS_UTF8=m + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_KERNEL=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_DETECT_SOFTLOCKUP is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_FRAME_POINTER is not set +# CONFIG_FORCED_INLINING is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_SH_STANDARD_BIOS is not set +CONFIG_EARLY_SCIF_CONSOLE=y +# CONFIG_EARLY_PRINTK is not set +# CONFIG_KGDB is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_ARC4=y +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_MICHAEL_MIC=y +CONFIG_CRYPTO_CRC32C=m +# CONFIG_CRYPTO_TEST is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +CONFIG_CRC_CCITT=m +CONFIG_CRC16=m +CONFIG_CRC32=y +CONFIG_LIBCRC32C=m +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m diff --git a/packages/linux/linux-titan-sh4/.mtn2git_empty b/packages/linux/linux-titan-sh4/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/linux/linux-titan-sh4/titan-flash.patch b/packages/linux/linux-titan-sh4/titan-flash.patch new file mode 100644 index 0000000000..fc633f3e05 --- /dev/null +++ b/packages/linux/linux-titan-sh4/titan-flash.patch @@ -0,0 +1,3157 @@ + +Add the driver for onboard flash. +The quality of this driver means that it has not been included in the +upstream CVS. +This implements the block device translation layer to match what the +onboard firmware implements. + +diff -duNr linux-2.6.16-orig/drivers/block/Kconfig linux-2.6.16/drivers/block/Kconfig +--- linux-2.6.16-orig/drivers/block/Kconfig 2006-06-29 16:12:57.000000000 +1000 ++++ linux-2.6.16/drivers/block/Kconfig 2006-06-29 16:13:27.000000000 +1000 +@@ -190,6 +190,13 @@ + To compile this driver as a module, choose M here: the + module will be called DAC960. + ++config BLK_SSFDC ++ tristate "SmartMedia(TM) Driver (sm)" ++ depends on SH_TITAN ++ help ++ Say Y here if you want the SmartMedia chip enabled. ++ Otherwise say N. ++ + config BLK_DEV_UMEM + tristate "Micro Memory MM5415 Battery Backed RAM support (EXPERIMENTAL)" + depends on PCI && EXPERIMENTAL +diff -duNr linux-2.6.16-orig/drivers/block/Makefile linux-2.6.16/drivers/block/Makefile +--- linux-2.6.16-orig/drivers/block/Makefile 2006-06-29 16:12:57.000000000 +1000 ++++ linux-2.6.16/drivers/block/Makefile 2006-06-29 16:13:27.000000000 +1000 +@@ -21,6 +21,7 @@ + obj-$(CONFIG_BLK_CPQ_DA) += cpqarray.o + obj-$(CONFIG_BLK_CPQ_CISS_DA) += cciss.o + obj-$(CONFIG_BLK_DEV_DAC960) += DAC960.o ++obj-$(CONFIG_BLK_SSFDC) += ssfdc.o + obj-$(CONFIG_CDROM_PKTCDVD) += pktcdvd.o + + obj-$(CONFIG_BLK_DEV_UMEM) += umem.o +diff -duNr linux-2.6.16-orig/drivers/block/ssfdc.c linux-2.6.16/drivers/block/ssfdc.c +--- linux-2.6.16-orig/drivers/block/ssfdc.c 1970-01-01 10:00:00.000000000 +1000 ++++ linux-2.6.16/drivers/block/ssfdc.c 2006-06-29 16:13:50.000000000 +1000 +@@ -0,0 +1,2742 @@ ++/* $id: $ ++ssfdc.c - Solid State Flopyy Disk Card ++ ++Original source curtesy of Toshiba Corporation. ++ ++Modification for use by Linux provided by Nimble Microsystems Inc. ++ ++TODO: ++ ++Modification History: ++ ++ March 2001 - Initial port of Toshiba sources by Bill Mann ++ May 2001 - Debug of staticly linked ssfdc driver, Bill Mann ++ Nov 2001 - Reimplementation using tasklets and timers. ++ May 2002 - Partition support added. ++ Oct 2003 - Port to kernel 2.6.0 ++ Mar 2004 - Stabilization refinements... ++ ++Overview: The kernel interfaces to the device via the "block_device_operations ++ ssfdc_fops", the device's request handling function ++ "do_ssfdc_request(request_queue_t * q)", or by the ioctl interface ssfdc_ioctl(). ++ ++ do_ssfdc_request() purpose is to kickstart ssfdc_thread via a wake_up call. ssfdc_thread ++ then processes requests from the queue. ++ ++ Blocks are mapped logically. So a sector read/write results in the determination ++ of the logical block address of the block containing the desired sector and the ++ corresponding physical block being accessed. Note the use of ReadBlock, WriteBlock, ++ and PhyBlock, Log2Phy[] etc. ++ ++ This driver implements a wear leveling strategy where sector writes to the ++ SmartMedia causes the block which is the target of the write to be copied into a ++ new block, the new data written and the old block erased. This makes the driver ++ more complicated than a straightforward sector read/write. ++ ++*/ ++ ++/* Section device headers */ ++#define DEBUG_SSFDC 0 ++#define DEBUG_SSFDC_STRUCT 0 ++#define DEBUG_SSFDC_REQUEST 0 ++#define DEBUG_SSFDC_READREDT 0 ++#define DEBUG_SSFDC_WRITE 0 ++#define DEBUG_SSFDC_WRITESECT 0 ++#define DEBUG_SSFDC_WRITEBLKS 0 ++#define DEBUG_SSFDC_READ 0 ++#define DEBUG_SSFDC_ADDR 0 ++#define DEBUG_SSFDC_ASSIGNRELEASE 0 ++#define SSFDC_READINGTASKLET 0 ++/* Edition Compilation Mode */ ++ ++#include ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "ssfdc.h" ++ ++#define SSFDC_MAJOR 240 ++ ++static int static_ssfdc_debug = 0; ++ ++static DECLARE_WAIT_QUEUE_HEAD(ssfdc_wait); ++ ++static struct gendisk *disks[MAX_SSFDC]; ++static ssfdc_dev *ssfdc[MAX_SSFDC]; ++ ++static int ssfdc_open(struct inode *i_node, struct file *fptr); ++static int ssfdc_getgeo(struct block_device *bdev, struct hd_geometry *geo); ++static int ssfdc_release(struct inode *i_node, struct file *fptr); ++static int ssfdc_ioctl(struct inode *i_node, struct file *fptr, unsigned cmd, unsigned long arg); ++static int ssfdc_revalidate(struct gendisk *disk); ++void do_ssfdc_request(request_queue_t * q); ++ ++static struct block_device_operations ssfdc_fops = { ++ .owner = THIS_MODULE, ++ .open = ssfdc_open, ++ .getgeo = ssfdc_getgeo, ++ .release = ssfdc_release, ++ .ioctl = ssfdc_ioctl, ++ // bjm out .revalidate_disk = ssfdc_revalidate, ++}; ++ ++ ++/*************************************************************************** ++ BIT Control Macro ++ ***************************************************************************/ ++static char BitData[] = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80 }; ++#define SetBit(a,b) (a[(unsigned char)((b)/8)]|= BitData[(b)%8]) ++#define ClrBit(a,b) (a[(unsigned char)((b)/8)]&=~BitData[(b)%8]) ++#define ChkBit(a,b) (a[(unsigned char)((b)/8)] & BitData[(b)%8]) ++ ++/***************************************************************************/ ++static int MediaReadSector(ssfdc_dev *, struct request *, char *, long,int); ++static int MediaWriteSector(ssfdc_dev *, struct request *, char *, long,int); ++ ++/***************************************************************************/ ++static int CheckLogCHS(ssfdc_dev *,unsigned int *,unsigned char *,unsigned char *); ++static int CheckMediaWP(ssfdc_dev *); ++static int ConvMediaAddr(ssfdc_dev *,long); ++static int IncMediaAddr(ssfdc_dev *); ++static int WriteReqInCurrBlk(ssfdc_dev *, long, int *); ++/******************************************/ ++/******************************************/ ++static int AssignWriteBlock(ssfdc_dev *, int); ++/******************************************/ ++/******************************************/ ++static int SetPhyFmtValue(ssfdc_dev *); ++static int SearchCIS(ssfdc_dev *,unsigned int *); ++static int MakeLogTable(ssfdc_dev *,unsigned int); ++/******************************************/ ++static int MarkFailPhyOneBlock(ssfdc_dev *); ++ ++static void _ReadSsfdcBuf(ssfdc_dev *, unsigned char *databuf,unsigned char *redundant); ++static void _WriteSsfdcBuf(ssfdc_dev *,unsigned char *,unsigned char *); ++static void _ReadSsfdcWord(ssfdc_dev *,unsigned int *); ++static void _ReadRedtSsfdcBuf(ssfdc_dev *, unsigned char *redundant); ++static void _WriteRedtSsfdcBuf(ssfdc_dev*, unsigned char *redundant); ++ ++/***************************************************************************/ ++static void _SetSsfdcCmd(ssfdc_dev *, unsigned char); ++static void _SetSsfdcAddr(ssfdc_dev *, unsigned char); ++static void _SetSsfdcBlock(ssfdc_dev *); ++static void _SetSsfdcChip(ssfdc_dev *); ++static void _SetSsfdcStandby(ssfdc_dev *); ++static int _CheckSsfdcBusy(ssfdc_dev *, unsigned int); ++static int _CheckSsfdcStatus(ssfdc_dev *); ++static void _ResetSsfdcErr(ssfdc_dev *psm); ++static unsigned char _CheckDevCode(unsigned char); ++void SsfdcReset(ssfdc_dev *); ++void CntReset(ssfdc_dev *); ++ ++static char BitCount(unsigned char); ++static char BitCountWord(unsigned int); ++ ++static void _WaitTimer(long int); ++typedef void (*timeout_fn)(unsigned long); ++static void ssfdc_rw_request(ssfdc_dev *psm, struct request *req); ++static int ssfdc_end_request(ssfdc_dev *psm, struct request *req, int status); ++static void ssfdc_terminate_request(ssfdc_dev *psm, struct request *req); ++static struct request *ssfdc_get_request(ssfdc_dev *psm); ++ ++/* debugging utils etc. */ ++ ++#if DEBUG_SSFDC ++static void dump_ssfdc_state(ssfdc_dev * psm); ++#endif ++ ++/* end of debugging utils etc. */ ++ ++/* our tasklets */ ++/* top level R/W initiation tasklet */ ++static void initxfer(unsigned long); ++#if 0 // use thread and not a tasklet ++DECLARE_TASKLET(initxfer_tasklet0, initxfer, 0); ++#ifdef CONFIG_SH_NIMBLE_MINI ++DECLARE_TASKLET(initxfer_tasklet1, initxfer, 1); ++#endif ++#endif ++ ++/* Sector Write Tasklets, This group includes a readcopy tasklet for block copies...*/ ++ ++/* Tasklet to read a sector into a temporary buffer for later write */ ++ ++/* power is turned on, and then left on for TIMER_ON_TIMEOUT */ ++// bjm debug struct timer_list mediachange_timer; ++// bjm debug static void mediachangetest(unsigned long); ++ ++// bjm out ++// bjm out struct timer_list waiting_timer; ++static void waiting_timeout(unsigned long); ++ ++/******************************************************************************/ ++static void trans_result \ ++ (unsigned char,unsigned char,unsigned char *,unsigned char *); ++static void calculate_ecc \ ++ (unsigned char *,unsigned char *,unsigned char *,unsigned char *,unsigned char *); ++static unsigned char correct_data \ ++ (unsigned char *,unsigned char *,unsigned char,unsigned char,unsigned char); ++ ++ /* CP0-CP5 code table */ ++static unsigned char ecctable[256] = { ++ 0x00,0x55,0x56,0x03,0x59,0x0C,0x0F,0x5A,0x5A,0x0F,0x0C,0x59,0x03,0x56,0x55,0x00, ++ 0x65,0x30,0x33,0x66,0x3C,0x69,0x6A,0x3F,0x3F,0x6A,0x69,0x3C,0x66,0x33,0x30,0x65, ++ 0x66,0x33,0x30,0x65,0x3F,0x6A,0x69,0x3C,0x3C,0x69,0x6A,0x3F,0x65,0x30,0x33,0x66, ++ 0x03,0x56,0x55,0x00,0x5A,0x0F,0x0C,0x59,0x59,0x0C,0x0F,0x5A,0x00,0x55,0x56,0x03, ++ 0x69,0x3C,0x3F,0x6A,0x30,0x65,0x66,0x33,0x33,0x66,0x65,0x30,0x6A,0x3F,0x3C,0x69, ++ 0x0C,0x59,0x5A,0x0F,0x55,0x00,0x03,0x56,0x56,0x03,0x00,0x55,0x0F,0x5A,0x59,0x0C, ++ 0x0F,0x5A,0x59,0x0C,0x56,0x03,0x00,0x55,0x55,0x00,0x03,0x56,0x0C,0x59,0x5A,0x0F, ++ 0x6A,0x3F,0x3C,0x69,0x33,0x66,0x65,0x30,0x30,0x65,0x66,0x33,0x69,0x3C,0x3F,0x6A, ++ 0x6A,0x3F,0x3C,0x69,0x33,0x66,0x65,0x30,0x30,0x65,0x66,0x33,0x69,0x3C,0x3F,0x6A, ++ 0x0F,0x5A,0x59,0x0C,0x56,0x03,0x00,0x55,0x55,0x00,0x03,0x56,0x0C,0x59,0x5A,0x0F, ++ 0x0C,0x59,0x5A,0x0F,0x55,0x00,0x03,0x56,0x56,0x03,0x00,0x55,0x0F,0x5A,0x59,0x0C, ++ 0x69,0x3C,0x3F,0x6A,0x30,0x65,0x66,0x33,0x33,0x66,0x65,0x30,0x6A,0x3F,0x3C,0x69, ++ 0x03,0x56,0x55,0x00,0x5A,0x0F,0x0C,0x59,0x59,0x0C,0x0F,0x5A,0x00,0x55,0x56,0x03, ++ 0x66,0x33,0x30,0x65,0x3F,0x6A,0x69,0x3C,0x3C,0x69,0x6A,0x3F,0x65,0x30,0x33,0x66, ++ 0x65,0x30,0x33,0x66,0x3C,0x69,0x6A,0x3F,0x3F,0x6A,0x69,0x3C,0x66,0x33,0x30,0x65, ++ 0x00,0x55,0x56,0x03,0x59,0x0C,0x0F,0x5A,0x5A,0x0F,0x0C,0x59,0x03,0x56,0x55,0x00 ++}; ++ ++#define BIT7 0x80 ++#define BIT6 0x40 ++#define BIT5 0x20 ++#define BIT4 0x10 ++#define BIT3 0x08 ++#define BIT2 0x04 ++#define BIT1 0x02 ++#define BIT0 0x01 ++ ++#define BIT1BIT0 0x03 ++#define BIT23 0x00800000L ++#define MASK_CPS 0x3f ++#define CORRECTABLE 0x00555554L ++ ++/* ++ Transfer result ++ LP14,12,10,... & LP15,13,11,... -> LP15,14,13,... & LP7,6,5,.. ++*/ ++static void trans_result(reg2,reg3,ecc1,ecc2) ++unsigned char reg2; /* LP14,LP12,LP10,... */ ++unsigned char reg3; /* LP15,LP13,LP11,... */ ++unsigned char *ecc1; /* LP15,LP14,LP13,... */ ++unsigned char *ecc2; /* LP07,LP06,LP05,... */ ++{ ++ unsigned char a; /* Working for reg2,reg3 */ ++ unsigned char b; /* Working for ecc1,ecc2 */ ++ unsigned char i; /* For counting */ ++ ++ a=BIT7; b=BIT7; /* 80h=10000000b */ ++ *ecc1=*ecc2=0; /* Clear ecc1,ecc2 */ ++ for(i=0; i<4; ++i) { ++ if ((reg3&a)!=0) *ecc1|=b; /* LP15,13,11,9 -> ecc1 */ ++ b=b>>1; /* Right shift */ ++ if ((reg2&a)!=0) *ecc1|=b; /* LP14,12,10,8 -> ecc1 */ ++ b=b>>1; /* Right shift */ ++ a=a>>1; /* Right shift */ ++ } ++ b=BIT7; /* 80h=10000000b */ ++ for(i=0; i<4; ++i) { ++ if ((reg3&a)!=0) *ecc2|=b; /* LP7,5,3,1 -> ecc2 */ ++ b=b>>1; /* Right shift */ ++ if ((reg2&a)!=0) *ecc2|=b; /* LP6,4,2,0 -> ecc2 */ ++ b=b>>1; /* Right shift */ ++ a=a>>1; /* Right shift */ ++ } ++} ++ ++ ++/* ++ Calculating ECC ++ data[0-255] -> ecc1,ecc2,ecc3 using CP0-CP5 code table[0-255] ++*/ ++static void calculate_ecc(table,data,ecc1,ecc2,ecc3) ++unsigned char *table; /* CP0-CP5 code table */ ++unsigned char *data; /* DATA */ ++unsigned char *ecc1; /* LP15,LP14,LP13,... */ ++unsigned char *ecc2; /* LP07,LP06,LP05,... */ ++unsigned char *ecc3; /* CP5,CP4,CP3,...,"1","1" */ ++{ ++ unsigned int i; /* For counting */ ++ unsigned char a; /* Working for table */ ++ unsigned char reg1; /* D-all,CP5,CP4,CP3,... */ ++ unsigned char reg2; /* LP14,LP12,L10,... */ ++ unsigned char reg3; /* LP15,LP13,L11,... */ ++ ++ reg1=reg2=reg3=0; /* Clear parameter */ ++ ++ for(i=0; i<256; ++i) { ++ a=table[data[i]]; /* Get CP0-CP5 code from table */ ++ reg1^=(a&MASK_CPS); /* XOR with a */ ++ if ((a&BIT6)!=0) { /* If D_all(all bit XOR) = 1 */ ++ reg3^=(unsigned char)i; /* XOR with counter */ ++ reg2^=~((unsigned char)i); /* XOR with inv. of counter */ ++ } ++ } ++ ++ /* Trans LP14,12,10,... & LP15,13,11,... -> LP15,14,13,... & LP7,6,5,.. */ ++ trans_result(reg2,reg3,ecc1,ecc2); ++ ++ *ecc1=~(*ecc1); *ecc2=~(*ecc2); /* Inv. ecc2 & ecc3 */ ++ *ecc3=((~reg1)<<2)|BIT1BIT0; /* Make TEL format */ ++} ++ ++static unsigned char correct_data(data,eccdata,ecc1,ecc2,ecc3) ++unsigned char *data; /* DATA */ ++unsigned char *eccdata; /* ECC DATA */ ++unsigned char ecc1; /* LP15,LP14,LP13,... */ ++unsigned char ecc2; /* LP07,LP06,LP05,... */ ++unsigned char ecc3; /* CP5,CP4,CP3,...,"1","1" */ ++{ ++ unsigned long l; /* Working to check d */ ++ unsigned long d; /* Result of comparison */ ++ unsigned int i; /* For counting */ ++ unsigned char d1,d2,d3; /* Result of comparison */ ++ unsigned char a; /* Working for add */ ++ unsigned char add; /* Byte address of cor. DATA */ ++ unsigned char b; /* Working for bit */ ++ unsigned char bit; /* Bit address of cor. DATA */ ++ ++ d1=ecc1^eccdata[1]; d2=ecc2^eccdata[0]; /* Compare LP's */ ++ d3=ecc3^eccdata[2]; /* Comapre CP's */ ++ d=((unsigned long)d1<<16) /* Result of comparison */ ++ +((unsigned long)d2<<8) ++ +(unsigned long)d3; ++ ++ if (d==0) return(0); /* If No error, return */ ++ if (((d^(d>>1))&CORRECTABLE)==CORRECTABLE) { /* If correctable */ ++ l=BIT23; ++ add=0; /* Clear parameter */ ++ a=BIT7; ++ for(i=0; i<8; ++i) { /* Checking 8 bit */ ++ if ((d&l)!=0) add|=a; /* Make byte address from LP's */ ++ l>>=2; a>>=1; /* Right Shift */ ++ } ++ bit=0; /* Clear parameter */ ++ b=BIT2; ++ for(i=0; i<3; ++i) { /* Checking 3 bit */ ++ if ((d&l)!=0) bit|=b; /* Make bit address from CP's */ ++ l>>=2; b>>=1; /* Right shift */ ++ } ++ b=BIT0; ++ data[add]^=(b<>=1; /* Right shift */ ++ } ++ if (i==1) { /* If ECC error */ ++ eccdata[1]=ecc1; eccdata[0]=ecc2; /* Put right ECC code */ ++ eccdata[2]=ecc3; ++ return(2); ++ } ++ return(3); /* Uncorrectable error */ ++} ++/*************************************************************************** ++ Common Subroutine ++ ***************************************************************************/ ++char BitCount(unsigned char cdata) ++{ ++ char bitcount=0; ++ while(cdata) { ++ bitcount+=(cdata &0x01); ++ cdata /=2; ++ } ++ return(bitcount); ++} ++ ++char BitCountWord(unsigned int cdata) ++{ ++ char bitcount=0; ++ while(cdata) { ++ bitcount+=(cdata &0x01); ++ cdata /=2; ++ } ++ return(bitcount); ++} ++ ++/***************************************************************************/ ++void StringCopy(char *stringA, char *stringB, int count) ++{ ++ int i; ++ for(i=0; iRedundant+REDT_ADDR1H)*0x100+*(psm->Redundant+REDT_ADDR1L); ++ addr2=*(psm->Redundant+REDT_ADDR2H)*0x100+*(psm->Redundant+REDT_ADDR2L); ++ if(addr1==addr2) ++ if((addr1 &0xF000)==0x1000) ++ { psm->LogBlock=(addr1 &0x0FFF)/2; return(SUCCESS); } ++ if(BitCountWord(addr1^addr2)>1) return(ERROR); ++ if((addr1 &0xF000)==0x1000) ++ if(! (BitCountWord(addr1) &0x0001)) ++ { psm->LogBlock=(addr1 &0x0FFF)/2; return(SUCCESS); } ++ if((addr2 &0xF000)==0x1000) ++ if(! (BitCountWord(addr2) &0x0001)) ++ { psm->LogBlock=(addr2 &0x0FFF)/2; return(SUCCESS); } ++ return(ERROR); ++} ++/***************************************************************************/ ++void ClrRedundantData(unsigned char *redundant) ++{ ++ char i; ++ for(i=0; iLogBlock*2+0x1000; ++ if((BitCountWord(addr)%2)) addr++; ++ *(redundant+REDT_ADDR1H)=*(redundant+REDT_ADDR2H)=addr/0x100; ++ *(redundant+REDT_ADDR1L)=*(redundant+REDT_ADDR2L)=(unsigned char)addr; ++} ++ ++void SetFailBlock(unsigned char *redundant) ++{ ++ char i; ++ for(i=0; iZone,psm->LogBlock,psm->PhyBlock,psm->Sector); ++#endif ++ addr=(unsigned int)psm->Zone*psm->MaxBlocks+psm->PhyBlock; ++ addr=addr*(unsigned int)psm->MaxSectors+psm->Sector; ++ if((psm->Attribute &MPS)==PS256) /* for 256byte/page */ ++ addr=addr*2+(unsigned int)add; ++/*-----------------------------------------------*/ ++ _HwSetAddr(psm); ++ _HwOutData(psm,0x00); ++ _HwOutData(psm,(unsigned char)addr); ++ _HwOutData(psm,(unsigned char)(addr/0x0100)); ++ if((psm->Attribute &MADC)==AD4CYC) ++ _HwOutData(psm,(unsigned char)(psm->Zone/2)); /* Patch */ ++ _HwSetData(psm); ++} ++ ++static void _SetSsfdcBlock(ssfdc_dev *psm) ++{ ++ unsigned int addr; ++#if DEBUG_SSFDC_ASSIGNRELEASE ++ printk(KERN_DEBUG "_SetSsfdcBlock() set card addr to PhyBlock %d\n", psm->PhyBlock); ++#endif ++ addr=(unsigned int)psm->Zone*psm->MaxBlocks+psm->PhyBlock; ++ addr=addr*(unsigned int)psm->MaxSectors; ++ if((psm->Attribute &MPS)==PS256) /* for 256byte/page */ ++ addr=addr*2; ++/*-----------------------------------------------*/ ++ _HwSetAddr(psm); ++ _HwOutData(psm,(unsigned char)addr); ++ _HwOutData(psm,(unsigned char)(addr/0x0100)); ++ if((psm->Attribute &MADC)==AD4CYC) ++ _HwOutData(psm,(unsigned char)(psm->Zone/2)); /* Patch */ ++ _HwSetData(psm); ++} ++ ++static inline void _SetSsfdcStandby(ssfdc_dev *psm) ++{ ++ _HwSetStandby(psm); ++} ++ ++static int _CheckSsfdcStatus(ssfdc_dev *psm) ++{ ++ int status; ++ if((status=_HwInData(psm)) & WR_FAIL) { ++ printk(KERN_DEBUG "_CheckSsfdcStatus() error %x\n", status); ++ return(ERROR); ++ } ++ return(SUCCESS); ++} ++ ++static void _ResetSsfdcErr(ssfdc_dev *psm) ++{ ++ _HwSetCmd(psm); ++ _HwOutData(psm,SSFDC_RST_CHIP); ++ _HwSetData(psm); ++ while(1) { ++ udelay(30); ++ if(! _HwChkBusy(psm)) break; ++ } ++ _HwSetStandby(psm); ++} ++ ++static void waiting_timeout(unsigned long psm) ++{ ++ // enable the wakeup signal! ++ wake_up(&((ssfdc_dev *)psm)->thread_wq); ++} ++ ++/* ++ _CheckSsfdcBusy() ++ ++ set a timer in jiffies from int time x .1ms ++*/ ++ ++static int _CheckSsfdcBusy(ssfdc_dev *psm, unsigned int time) ++{ ++ unsigned long incr_div = 4; ++ unsigned long incr_us = time / incr_div, ++ jticks=time/(MSEC * JIFFY_TICK_MS); ++ unsigned long tick_retried=0, wrap_flag, expires; ++ ++ if (!jticks) { ++ // small delay first to test completion ++ do { ++ udelay(incr_us); ++ if (!_HwChkBusy(psm)) ++ return(SUCCESS); ++ } while (incr_div--); ++ return(ERROR); ++ } ++ ++ // Block the wakeup signal? ++ ++one_more_time: ++ expires = jiffies + jticks; ++ wrap_flag = ( expires < jiffies); ++ ++ do { ++ wait_event_interruptible_timeout(psm->thread_wq, 0, jticks); ++ if (!_HwChkBusy(psm)) { ++ return(SUCCESS); ++ } ++ } while (wrap_flag ? expires <= jiffies : expires >= jiffies); ++ ++#if 1 ++ // Is the chip not busy? If so its an ERROR ++ if (!_HwChkBusy(psm)) { ++ return(SUCCESS); ++ } ++ else { ++ // if we came back, give us one more tick/time ++ if (! tick_retried ) { ++ tick_retried = 1; ++ jticks = 0; ++ printk("."); ++ goto one_more_time; ++ } ++ return(ERROR); ++ } ++#endif ++} ++ ++static void _SetSsfdcChip(ssfdc_dev *psm) ++{ ++ _HwSetAddr(psm); ++ _HwOutData(psm,0x00); ++ _HwSetData(psm); ++} ++/*************************************************************************** ++ NAND Memory (SmartMedia) Buffer Data Xfer Subroutine ++ ***************************************************************************/ ++static void _ReadSsfdcBuf(ssfdc_dev *psm,unsigned char *databuf,unsigned char *redundant) ++{ ++ int i; ++ for(i=0x00;i<(((psm->Attribute &MPS)==PS256)?0x100:0x200);i++) ++ *databuf++ =_HwInData(psm); ++ for(i=0x00;i<(((psm->Attribute &MPS)==PS256)?0x08:0x10);i++) ++ *redundant++ =_HwInData(psm); ++} ++ ++static void _WriteSsfdcBuf(ssfdc_dev *psm, unsigned char *databuf,unsigned char *redundant) ++{ ++ int i; ++ for(i=0x00;i<(((psm->Attribute &MPS)==PS256)?0x100:0x200);i++) ++ _HwOutData(psm,*databuf++); ++ for(i=0x00;i<(((psm->Attribute &MPS)==PS256)?0x08:0x10);i++) ++ _HwOutData(psm,*redundant++); ++} ++ ++static void _ReadSsfdcWord(ssfdc_dev *psm, unsigned int *pdata) ++{ ++ *pdata =_HwInData(psm)*0x100; ++ *pdata|=(unsigned char)_HwInData(psm); ++} ++ ++static void _ReadRedtSsfdcBuf(ssfdc_dev *psm,unsigned char *redundant) ++{ ++ int i; ++ for(i=0x00;i<(((psm->Attribute &MPS)==PS256)?0x08:0x10);i++) ++ redundant[i] =_HwInData(psm); ++} ++ ++static void _WriteRedtSsfdcBuf(ssfdc_dev *psm, unsigned char *redundant) ++{ ++ char i; ++ for(i=0x00;i<(((psm->Attribute &MPS)==PS256)?0x08:0x10);i++) ++ _HwOutData(psm,*redundant++); ++} ++ ++/*************************************************************************** ++ Timer Control Subroutine ++ ***************************************************************************/ ++#define SHORT_DELAY 1 ++ ++ ++ ++ ++void _GetDateTime(char *date) ++{ ++} ++ ++/* ++_WaitTimer(long time) time is in ticks. ++*/ ++ ++static inline void _WaitTimer(long time) ++{ ++} ++ ++/*************************************************************************** ++ SmartMedia Function Command Subroutine ++ ***************************************************************************/ ++void SsfdcReset(ssfdc_dev *psm) ++{ ++ _SetSsfdcCmd(psm, SSFDC_RST_CHIP); ++ _CheckSsfdcBusy(psm,BUSY_RESET); ++ _SetSsfdcCmd(psm,SSFDC_READ); ++ _CheckSsfdcBusy(psm,BUSY_READ); ++ _SetSsfdcStandby(psm); ++} ++ ++void SsfdcWriteRedtMode(ssfdc_dev *psm) ++{ ++ _SetSsfdcCmd(psm,SSFDC_RST_CHIP); ++ _CheckSsfdcBusy(psm,BUSY_RESET); ++ _SetSsfdcCmd(psm,SSFDC_READ_REDT); ++ _CheckSsfdcBusy(psm,BUSY_READ); ++ _SetSsfdcStandby(psm); ++} ++ ++void SsfdcReadID(ssfdc_dev *psm, unsigned int *pid) ++{ ++ _SetSsfdcCmd(psm,SSFDC_READ_ID); ++ _SetSsfdcChip(psm); ++ _ReadSsfdcWord(psm,pid); ++ _SetSsfdcStandby(psm); ++} ++ ++int SsfdcCheckStatus(ssfdc_dev *psm) ++{ ++ _SetSsfdcCmd(psm,SSFDC_RDSTATUS); ++ if(_CheckSsfdcStatus(psm)) ++ { _SetSsfdcStandby(psm); return(ERROR); } ++ _SetSsfdcStandby(psm); ++ return(SUCCESS); ++} ++ ++int SsfdcReadSect(ssfdc_dev *psm, unsigned char *buf,unsigned char *redundant) ++{ ++#if DEBUG_SSFDC_READ ++ printk(KERN_DEBUG "SsfdcReadSect() - Zone %d LogBlock %d, PhyBlock %d, Sector %d\n", ++ psm->Zone, psm->LogBlock, psm->PhyBlock, psm->Sector); ++#endif ++ _SetSsfdcCmd(psm,SSFDC_READ); ++ _SetSsfdcAddr(psm, EVEN); ++ if(_CheckSsfdcBusy(psm,BUSY_READ)) ++ { _ResetSsfdcErr(psm); return(ERROR); } ++ _ReadSsfdcBuf(psm,buf,redundant); ++ if(_CheckSsfdcBusy(psm,BUSY_READ)) ++ { _ResetSsfdcErr(psm); return(ERROR); } ++ if((psm->Attribute &MPS)==PS256) { ++ _SetSsfdcCmd(psm,SSFDC_READ); ++ _SetSsfdcAddr(psm, ODD); ++ if(_CheckSsfdcBusy(psm,BUSY_READ)) ++ { _ResetSsfdcErr(psm); return(ERROR); } ++ _ReadSsfdcBuf(psm,buf+0x100,redundant+0x08); ++ if(_CheckSsfdcBusy(psm,BUSY_READ)) ++ { _ResetSsfdcErr(psm); return(ERROR); } ++ } ++ _SetSsfdcStandby(psm); ++ return(SUCCESS); ++} ++ ++int SsfdcWriteSect(ssfdc_dev *psm, unsigned char *buf, unsigned char *redundant) ++{ ++#if DEBUG_SSFDC_WRITESECT ++ printk(KERN_DEBUG "SsfdcWriteSect() - Zone %d LogBlock %d, PhyBlock %d, Sector %d\n", \ ++ psm->Zone, psm->LogBlock, psm->PhyBlock, psm->Sector); ++#endif ++ _SetSsfdcCmd(psm,SSFDC_WRDATA); ++ _SetSsfdcAddr(psm,EVEN); ++ _WriteSsfdcBuf(psm,buf,redundant); ++ _SetSsfdcCmd(psm,SSFDC_WRITE); ++ if(_CheckSsfdcBusy(psm,BUSY_PROG)) ++ { _ResetSsfdcErr(psm); ++#if DEBUG_SSFDC_WRITESECT ++ printk(KERN_DEBUG "SsfdcWriteSect() e 1\n"); ++#endif ++ return(ERROR); } ++ if((psm->Attribute &MPS)==PS256) { ++ _SetSsfdcCmd(psm,SSFDC_RDSTATUS); ++ if(_CheckSsfdcStatus(psm)) ++ { _SetSsfdcStandby(psm); return(SUCCESS); } ++ _SetSsfdcCmd(psm,SSFDC_WRDATA); ++ _SetSsfdcAddr(psm,ODD); ++ _WriteSsfdcBuf(psm,buf+0x100,redundant+0x08); ++ _SetSsfdcCmd(psm,SSFDC_WRITE); ++ if(_CheckSsfdcBusy(psm,BUSY_PROG)) ++ { _ResetSsfdcErr(psm); ++#if DEBUG_SSFDC_WRITESECT ++ printk(KERN_DEBUG "SsfdcWriteSect() e 2\n"); ++#endif ++ return(ERROR); } ++ } ++ _SetSsfdcStandby(psm); ++ return(SUCCESS); ++} ++ ++int SsfdcEraseBlock(ssfdc_dev *psm) ++{ ++ _SetSsfdcCmd(psm,SSFDC_ERASE1); ++ _SetSsfdcBlock(psm); ++ _SetSsfdcCmd(psm,SSFDC_ERASE2); ++ if(_CheckSsfdcBusy(psm,BUSY_ERASE) || SsfdcCheckStatus(psm)) { ++ _ResetSsfdcErr(psm); ++ return(ERROR); ++ } ++ _SetSsfdcStandby(psm); ++ return(SUCCESS); ++} ++ ++int SsfdcReadRedtData(ssfdc_dev *psm, unsigned char *redundant) ++{ ++#if DEBUG_SSFDC_READREDT ++ printk(KERN_DEBUG " +"); ++#endif ++ _SetSsfdcCmd(psm,SSFDC_READ_REDT); ++ _SetSsfdcAddr(psm,EVEN); ++ if(_CheckSsfdcBusy(psm,BUSY_READ)) ++ { _ResetSsfdcErr(psm); ++#if DEBUG_SSFDC_READREDT ++ printk(KERN_DEBUG " e 1\n"); ++#endif ++ return(ERROR); } ++ _ReadRedtSsfdcBuf(psm, redundant); ++ if(_CheckSsfdcBusy(psm,BUSY_READ)) ++ { _ResetSsfdcErr(psm); ++#if DEBUG_SSFDC_READREDT ++ printk(KERN_DEBUG " e 2\n"); ++#endif ++ return(ERROR); } ++ if((psm->Attribute &MPS)==PS256) { ++ _SetSsfdcCmd(psm,SSFDC_READ_REDT); ++ _SetSsfdcAddr(psm,ODD); ++ if(_CheckSsfdcBusy(psm,BUSY_READ)) ++ { _ResetSsfdcErr(psm); ++#if DEBUG_SSFDC_READREDT ++ printk(KERN_DEBUG " e 3\n"); ++#endif ++ ++ return(ERROR); } ++ _ReadRedtSsfdcBuf(psm, redundant+0x08); ++ if(_CheckSsfdcBusy(psm,BUSY_READ)) ++ { _ResetSsfdcErr(psm); ++#if DEBUG_SSFDC_READREDT ++ printk(KERN_DEBUG " e 4\n"); ++#endif ++ return(ERROR); } ++ } ++ _SetSsfdcStandby(psm); ++#if DEBUG_SSFDC_READREDT ++ printk(KERN_DEBUG " -\n"); ++#endif ++ return(SUCCESS); ++} ++ ++int SsfdcWriteRedtData(ssfdc_dev *psm, unsigned char *redundant) ++{ ++ _SetSsfdcCmd(psm,SSFDC_WRDATA); ++ _SetSsfdcAddr(psm,EVEN); ++ _WriteRedtSsfdcBuf(psm,redundant); ++ _SetSsfdcCmd(psm,SSFDC_WRITE); ++ if(_CheckSsfdcBusy(psm,BUSY_PROG)) ++ { _ResetSsfdcErr(psm); return(ERROR); } ++ if((psm->Attribute &MPS)==PS256) { ++ _SetSsfdcCmd(psm,SSFDC_RDSTATUS); ++ if(_CheckSsfdcStatus(psm)) ++ { _SetSsfdcStandby(psm); return(SUCCESS); } ++ _SetSsfdcCmd(psm,SSFDC_WRDATA); ++ _SetSsfdcAddr(psm,ODD); ++ _WriteRedtSsfdcBuf(psm,redundant+0x08); ++ _SetSsfdcCmd(psm,SSFDC_WRITE); ++ if(_CheckSsfdcBusy(psm,BUSY_PROG)) ++ { _ResetSsfdcErr(psm); return(ERROR); } ++ } ++ _SetSsfdcStandby(psm); ++ return(SUCCESS); ++} ++ ++/*************************************************************************** ++ SmartMedia ID Code Check & Mode Set Subroutine ++ ***************************************************************************/ ++int SetSsfdcModel(ssfdc_dev *psm, unsigned char dcode) ++{ ++ switch(_CheckDevCode(dcode)) { ++ case SSFDC1MB: ++ psm->Model = SSFDC1MB; ++ psm->Attribute = FLASH | AD3CYC | BS16 | PS256; ++ psm->MaxZones = 1; ++ psm->MaxBlocks = 256; ++ psm->MaxLogBlocks = 250; ++ psm->MaxSectors = 8; ++ break; ++ case SSFDC2MB: ++ psm->Model = SSFDC2MB; ++ psm->Attribute = FLASH | AD3CYC | BS16 | PS256; ++ psm->MaxZones = 1; ++ psm->MaxBlocks = 512; ++ psm->MaxLogBlocks = 500; ++ psm->MaxSectors = 8; ++ break; ++ case SSFDC4MB: ++ psm->Model = SSFDC4MB; ++ psm->Attribute = FLASH | AD3CYC | BS16 | PS512; ++ psm->MaxZones = 1; ++ psm->MaxBlocks = 512; ++ psm->MaxLogBlocks = 500; ++ psm->MaxSectors = 16; ++ break; ++ case SSFDC8MB: ++ psm->Model = SSFDC8MB; ++ psm->Attribute = FLASH | AD3CYC | BS16 | PS512; ++ psm->MaxZones = 1; ++ psm->MaxBlocks = 1024; ++ psm->MaxLogBlocks = 1000; ++ psm->MaxSectors = 16; ++ break; ++ case SSFDC16MB: ++ psm->Model = SSFDC16MB; ++ psm->Attribute = FLASH | AD3CYC | BS32 | PS512; ++ psm->MaxZones = 1; ++ psm->MaxBlocks = 1024; ++ psm->MaxLogBlocks = 1000; ++ psm->MaxSectors = 32; ++ break; ++ case SSFDC32MB: ++ psm->Model = SSFDC32MB; ++ psm->Attribute = FLASH | AD3CYC | BS32 | PS512; ++ psm->MaxZones = 2; ++ psm->MaxBlocks = 1024; ++ psm->MaxLogBlocks = 1000; ++ psm->MaxSectors = 32; ++ break; ++ case SSFDC64MB: ++ psm->Model = SSFDC64MB; ++ psm->Attribute = FLASH | AD4CYC | BS32 | PS512; ++ psm->MaxZones = 4; ++ psm->MaxBlocks = 1024; ++ psm->MaxLogBlocks = 1000; ++ psm->MaxSectors = 32; ++ break; ++ case SSFDC128MB: ++ psm->Model = SSFDC128MB; ++ psm->Attribute = FLASH | AD4CYC | BS32 | PS512; ++ psm->MaxZones = 8; ++ psm->MaxBlocks = 1024; ++ psm->MaxLogBlocks = 1000; ++ psm->MaxSectors = 32; ++ break; ++ default: ++ psm->Model = NOSSFDC; ++ return(ERROR); ++ } ++ return(SUCCESS); ++} ++ ++/***************************************************************************/ ++static unsigned char _CheckDevCode(unsigned char dcode) ++{ ++ switch(dcode){ ++ case 0x6E: ++ case 0xE8: ++ case 0xEC: return(SSFDC1MB); /* 8Mbit (1M) NAND */ ++ case 0x64: ++ case 0xEA: return(SSFDC2MB); /* 16Mbit (2M) NAND */ ++ case 0x6B: ++ case 0xE3: ++ case 0xE5: return(SSFDC4MB); /* 32Mbit (4M) NAND */ ++ case 0xE6: return(SSFDC8MB); /* 64Mbit (8M) NAND */ ++ case 0x73: return(SSFDC16MB); /*128Mbit (16M)NAND */ ++ case 0x75: return(SSFDC32MB); /*256Mbit (32M)NAND */ ++ case 0x76: return(SSFDC64MB); /*512Mbit (64M)NAND */ ++ case 0x79: return(SSFDC128MB); /* 1Gbit(128M)NAND */ ++ default: return(ERROR); ++ } ++} ++/*************************************************************************** ++ SmartMedia Power Control Subroutine ++ ***************************************************************************/ ++void CntReset(ssfdc_dev *psm) ++{ ++ _HwSetStandby(psm); ++ _HwVccOff(psm); ++} ++ ++int CntPowerOn(ssfdc_dev *psm) ++{ ++ _HwVccOn(psm); ++ _WaitTimer(TIME_PON); ++ if(_HwChkPower(psm)) ++ return(SUCCESS); ++ _HwVccOff(psm); ++ return(ERROR); ++} ++ ++#if 0 // remove for now ++static void mediachangetest(unsigned long dev_idx) ++{ ++ ssfdc_dev *psm = ssfdc[dev_idx]; ++ unsigned int cardpresent; ++ unsigned long flags; ++ ++ spin_lock_irqsave( &psm->req_queue_lock, flags ); ++ // bjm spin_lock( &psm->req_queue_lock); ++ ++ del_timer(&mediachange_timer); ++ ++ // check current card presence ++ if ( ! (cardpresent = CntPowerOn(psm)) && psm->CardPresent ) { ++ psm->MediaChange = 1; ++ psm->DataBuf_Valid = 0; ++ } ++ psm->CardPresent = cardpresent; ++ ++ // set up to run again... ++ mediachange_timer.function = mediachangetest; ++ mediachange_timer.expires = jiffies + (HZ / 2); ++ mediachange_timer.data = dev_idx; ++ add_timer(&mediachange_timer); ++ ++ spin_unlock_irqrestore( &psm->req_queue_lock, flags ); ++ // bjm spin_unlock( &psm->req_queue_lock); ++} ++#endif ++ ++int CheckCardExist(ssfdc_dev *psm) ++{ ++ char i,j,k; ++ if(! _HwChkStatus(psm)) /***** Not Status Change *****/ ++ if(_HwChkCardIn(psm)) return(SUCCESS); /* Card exist in Slot */ ++ for(i=0,j=0,k=0; i<0x10; i++) { ++ if(_HwChkCardIn(psm)) /***** Status Change *****/ ++ { j++; k=0; } ++ else { j=0; k++; } ++ if(j>3) return(SUCCESS); /* Card exist in Slot */ ++ if(k>3) return(ERROR); /* NO Card exist in Slot */ ++ _WaitTimer(TIME_CDCHK); ++ } ++ return(ERROR); ++} ++ ++int CheckSsfdcWP(ssfdc_dev *psm) ++{ /* ERROR: WP, SUCCESS: Not WP */ ++ char i; ++ for(i=0; i<0x08; i++) { ++ if(_HwChkWP(psm)) ++ return(ERROR); ++ _WaitTimer(TIME_WPCHK); ++ } ++ return(SUCCESS); ++} ++ ++/******************************************/ ++int CheckCISdata(unsigned char *buf,unsigned char *redundant) ++{ ++ static unsigned char cis[]={ 0x01,0x03,0xD9,0x01,0xFF,0x18,0x02,0xDF,0x01,0x20 }; ++ unsigned char ecc1,ecc2,ecc3; ++ unsigned int err; ++ calculate_ecc(ecctable,buf,&ecc1,&ecc2,&ecc3); ++ err=correct_data(buf,redundant+0x0D,ecc1,ecc2,ecc3); ++ if(err==0 || err==1 || err==2) ++ return(StringCmp(buf,cis,10)); ++ buf+=0x100; ++ calculate_ecc(ecctable,buf,&ecc1,&ecc2,&ecc3); ++ err=correct_data(buf,redundant+0x08,ecc1,ecc2,ecc3); ++ if(err==0 || err==1 || err==2) ++ return(StringCmp(buf,cis,10)); ++ return(ERROR); ++} ++ ++int CheckECCdata(unsigned char *buf,unsigned char *redundant) ++{ ++ unsigned char ecc1,ecc2,ecc3; ++ unsigned int err, corr=SUCCESS; ++ calculate_ecc(ecctable,buf,&ecc1,&ecc2,&ecc3); ++ err=correct_data(buf,redundant+0x0D,ecc1,ecc2,ecc3); ++ if(err==1 || err==2) corr=CORRECT; ++ else if(err) return(ERROR); ++ buf+=0x100; ++ calculate_ecc(ecctable,buf,&ecc1,&ecc2,&ecc3); ++ err=correct_data(buf,redundant+0x08,ecc1,ecc2,ecc3); ++ if(err==1 || err==2) corr=CORRECT; ++ else if(err) return(ERROR); ++ return(corr); ++} ++ ++void SetECCdata(unsigned char *buf,unsigned char *redundant) ++{ ++ calculate_ecc(ecctable,buf,redundant+0x0E,redundant+0x0D,redundant+0x0F); ++ buf+=0x100; ++ calculate_ecc(ecctable,buf,redundant+0x09,redundant+0x08,redundant+0x0A); ++} ++ ++/*************************************************************************** ++ Power Control & Media Exist Check Function ++ ***************************************************************************/ ++ ++/*************************************************************************** ++ SmartMedia Read/Write/Erase Function ++ ***************************************************************************/ ++static int MediaReadSector(ssfdc_dev *psm, struct request *req, ++ char * bbuf, long start,int count) ++{ ++ char *buf; ++ int i, err, request_complete, ++ PrevBlock = NO_ASSIGN; ++ int read_status=0; ++ ++ if (ConvMediaAddr(psm, start)) { ++ printk(KERN_ERR "MediaReadSector() - bad address conversion\n"); ++ goto read_exit; ++ } ++ ++ psm->ReqSectorSize = count; ++ psm->BufIndex = 0; ++ psm->RetryCount = 0; ++ ++#if DEBUG_SSFDC_READ ++ printk(KERN_DEBUG "MediaReadSector() - read %d sectors @ %d\n", psm->ReqSectorSize, start); ++#endif ++ while (psm->ReqSectorSize) { ++ // if this PhyBlock is not assigned, fill with dummy data and return ++ // An assigned block results in a card access and readsector schedule... ++ if (psm->PhyBlock == NO_ASSIGN) { ++#if DEBUG_SSFDC_READ ++ printk(KERN_DEBUG "Read NO_ASSIGN block %x\n", psm->PhyBlock); ++#endif ++ buf = bbuf + psm->BufIndex; ++ for(i=0; iPhyBlock) { ++#if DEBUG_SSFDC_READ ++ printk(KERN_DEBUG "Read block %x\n", psm->PhyBlock); ++#endif ++ PrevBlock = psm->PhyBlock; ++ _SetSsfdcCmd(psm,SSFDC_READ); ++ _SetSsfdcAddr(psm, EVEN); ++ for (i=0; i<5; ++i) { ++ if (!_HwChkBusy(psm)) ++ break; ++ udelay(10); ++ } ++ } ++ ++ ++ if ( _HwChkBusy(psm) ) { ++ ++psm->Sect_rd_errs_ttl; ++#if DEBUG_SSFDC_READ ++ printk(KERN_DEBUG "MediaReadSector() - Hardware busy!\n"); ++#endif ++ } ++ else { ++ ++psm->Sector_reads; ++ _ReadSsfdcBuf( psm, psm->SectBuf, psm->Redundant); ++ ++ // verify the integrity of what was read ++ if (CheckDataStatus(psm->Redundant)) { ++#if DEBUG_SSFDC_READ ++ printk(KERN_DEBUG "Bad Data Status\n"); ++#endif ++ goto error_state; ++ } ++ ++ switch (err = CheckECCdata(psm->SectBuf,psm->Redundant)) ++ { ++ case CORRECT: ++ // Correctable data, fix and copy like SUCCESS ++ SetECCdata(psm->SectBuf,psm->Redundant); ++ case SUCCESS: ++ memcpy(bbuf + psm->BufIndex, psm->SectBuf, SSFDC_SECTSIZE); ++ break; ++ ++ case ERROR: ++error_state: ++ ++psm->Sect_rd_errs_ttl; ++#if DEBUG_SSFDC_READ ++ printk(KERN_DEBUG "readsector() - err == ERROR\n"); ++#endif ++ _ResetSsfdcErr(psm); ++ if (++psm->RetryCount < RD_RETRY_LIMIT) { ++ continue; ++ } ++ break; ++ default: ++ ssfdc_terminate_request( psm, req); ++ break; ++ } ++ ++ } // if ( _HwChkBusy(psm) ) ++ } // if (psm->PhyBlock == NO_ASSIGN) ++ ++ // common req/buffer management code for either unassigned or assigned ++ // block from /dev/ssfdc ++ psm->RetryCount = 0; ++ psm->BufIndex += SSFDC_SECTSIZE; ++ request_complete = (--psm->ReqSectorSize == 0); ++ if (request_complete) { ++ // completed the read, req->buffer now has requested sector(s). ++ // End the request waking sleeping process and reschedule initxfer(). ++#if DEBUG_SSFDC_READ ++ printk(KERN_DEBUG "readsector() - req %x complete\n", req); ++#endif ++ read_status = 1; ++ } ++ else if (IncMediaAddr(psm)) { ++ printk(KERN_DEBUG "readsector() - IncMediaAddr() error.\n"); ++ goto read_exit; ++ } ++ } // while (psm->ReqSectorSize) ++ ++read_exit: ++ psm->XferState = xfer_idle; ++ ++ return read_status; ++ ++} ++ ++/* ++ ReadBlkCopy(ssfdc_dev *psm, unsigned char *buf) ++*/ ++int ReadBlkCopy(ssfdc_dev *psm, unsigned char *buf, char *rd_sector_status) ++{ ++ int err, read_error=0, rw_retry=0; ++ unsigned long PrevBlock=NO_ASSIGN; ++ ++ if ( ! buf ) { ++ printk(KERN_ERR "NULL buffer pointer\n"); ++ return ERROR; ++ } ++ ++ if (psm->PhyBlock == NO_ASSIGN) { ++ memset(buf, 0xff, psm->MaxSectors * SSFDC_SECTSIZE); ++ memset(rd_sector_status, 1, sizeof(char) * MAX_SECTNUM); ++ return SUCCESS; ++ } ++ ++#if 0 ++ printk(KERN_ERR "ReadBlkCopy() - LogBlk %d\n", psm->LogBlock); ++#endif ++ ++ for (psm->Sector = 0; ++ psm->PhyBlock != NO_ASSIGN && psm->Sector < psm->MaxSectors; ++ ++psm->Sector) ++ { ++ if (PrevBlock != psm->PhyBlock) { ++ _SetSsfdcCmd(psm,SSFDC_READ); ++ _SetSsfdcAddr(psm, EVEN); ++ PrevBlock = psm->PhyBlock; ++ _CheckSsfdcBusy(psm, BUSY_ADDR_SET); ++ } ++ ++ if ( _HwChkBusy(psm) ) { ++ printk(KERN_ERR "%s: HW busy during block copy!\n", MAJOR_NAME); ++ goto error_state; ++ } ++ ++ _ReadSsfdcBuf( psm, psm->SectBuf, psm->Redundant); ++ if (CheckDataStatus(psm->Redundant)) { ++ printk("KERN_ERR reading Block %d, sector %d\n", psm->PhyBlock, psm->Sector); ++ goto error_state; ++ } ++ ++ // Attempt to correct ++ switch (err = CheckECCdata(psm->SectBuf,psm->Redundant)) ++ { ++ case CORRECT: ++#if DEBUG_SSFDC_WRITE ++ printk(KERN_DEBUG "ReadBlkCopy() - err == CORRECT\n"); ++#endif ++ SetECCdata(psm->SectBuf,psm->Redundant); ++ case SUCCESS: ++ read_error = 0; ++ rw_retry = 0; ++ memcpy(buf + (psm->Sector * SSFDC_SECTSIZE), psm->SectBuf, SSFDC_SECTSIZE); ++ rd_sector_status[psm->Sector] = 1; ++ read_error = 0; ++ break; ++ ++ case ERROR: ++error_state: ++/*bjm*/ printk("ERR - ECC error reading Block %d, Sector %d\n", psm->PhyBlock,psm->Sector); ++#if DEBUG_SSFDC_WRITE ++ printk(KERN_DEBUG "ReadBlkCopy() - err == ERROR\n"); ++ printk("_ResetSsfdcErr(psm)\n"); ++#endif ++ _ResetSsfdcErr(psm); ++ PrevBlock = NO_ASSIGN; ++ if (++rw_retry < RD_RETRY_LIMIT) { ++ // retry current Sector/loop counter on next loop iteration. ++ --psm->Sector; ++ } ++ else { ++ // set sector data in copy buf to the unassigned value 0xFF ++ // next loop iteration will read next Sector, zero RetryCount ++ // for next sectors read ++ // map bad sector... ++ memset(buf + psm->Sector * SSFDC_SECTSIZE, 0xFF, SSFDC_SECTSIZE); ++ rw_retry = 0; ++ rd_sector_status[psm->Sector] = 0; ++ ++psm->Sect_rd_errs_ttl; ++ read_error = 1; ++ } ++#if DEBUG_SSFDC_WRITE ++ printk(KERN_DEBUG "Unable to read Blk %d Sector %d\n", psm->PhyBlock, psm->Sector); ++#endif ++ break; ++ } ++ } ++ if (!read_error) { ++ if (SsfdcEraseBlock(psm)) { ++ MarkFailPhyOneBlock(psm); ++ ++psm->Bad_blks_erase; ++ } ++ else { ++ ClrBit(psm->Assign[psm->Zone], psm->PhyBlock); ++ } ++ } ++ else { ++ printk("Read error block %d\n", psm->PhyBlock); ++ MarkFailPhyOneBlock(psm); ++ } ++ psm->Sector = 0; ++ return read_error ? ERROR : SUCCESS; ++} ++ ++/* ++ WriteBlock() ++*/ ++int WriteBlock(ssfdc_dev *psm, char *buf, char *wr_sector_status) ++{ ++ int write_error=0, reassign_retry=0; ++ ++ for ( reassign_retry = 0; reassign_retry < REASSIGN_RETRY_LIMIT; ++reassign_retry) ++ { ++ /* ++ assign new write block for write req ++ - set new write address ++ - write buffer to new block ++ */ ++#if DEBUG_SSFDC_WRITE ++ if (AssignWriteBlock(psm,1)) { ++#else ++ if (AssignWriteBlock(psm,0)) { ++#endif ++ write_error = 1; ++ printk(KERN_ERR "sm%dd Unable to assign new write block.\n", psm->sm_minor); ++ memset(wr_sector_status, 1, sizeof(char) * MAX_SECTNUM); ++ // ssfdc_terminate_request(psm, req); ++ return ERROR; ++ } ++ ++#if 0 ++ printk(KERN_ERR "WriteBlock() - LogBlock %d\n", psm->LogBlock); ++#endif ++ ++ for (psm->Sector = 0; psm->Sector < psm->MaxSectors; ++psm->Sector) ++ { ++ memcpy(psm->SectBuf,buf+psm->Sector*SSFDC_SECTSIZE,SSFDC_SECTSIZE); ++ ++ _SetSsfdcCmd(psm,SSFDC_WRDATA); ++ _SetSsfdcAddr(psm,EVEN); ++ ClrRedundantData(psm->Redundant); ++ SetLogBlockAddr(psm,psm->Redundant); ++ SetECCdata(psm->SectBuf,psm->Redundant); ++ _WriteSsfdcBuf(psm,psm->SectBuf,psm->Redundant); ++ ++#if DEBUG_SSFDC_WRITE ++ printk("%d ", psm->Sector); ++#endif ++ ++ _SetSsfdcCmd(psm, SSFDC_WRITE); ++ if ( ! _CheckSsfdcBusy(psm, BUSY_PROG) && !SsfdcCheckStatus(psm)) { ++#if DEBUG_SSFDC_WRITE ++ printk("\nMulti-Sector write OK!\n"); ++#endif ++ _SetSsfdcStandby(psm); ++ // mark status a success ++ wr_sector_status[psm->Sector] = 1; ++ ++#if 0 // bjm removed ++ { unsigned char parbuf[SSFDC_SECTSIZE]; ++ unsigned char redtpar[REDTSIZE]; ++ ++ _SetSsfdcCmd(psm,SSFDC_READ); ++ _SetSsfdcAddr(psm, EVEN); ++ ++ udelay(30); ++ if ( _HwChkBusy(psm) ) { ++ _ResetSsfdcErr(psm); ++ printk("paranoid read failure\n"); ++ } ++ else { ++ _ReadSsfdcBuf(psm, parbuf, redtpar); ++ if (CheckDataStatus(redtpar)) { ++ printk("paranoid read, bad data status\n"); ++ } ++ else { ++ switch( err = CheckECCdata(parbuf,redtpar)) ++ { ++ case CORRECT: ++ printk("paranoid correctable\n"); ++ SetECCdata(parbuf,redtpar); ++ case SUCCESS: ++ if (memcmp(parbuf,psm->SectBuf, SSFDC_SECTSIZE)) ++ write_error = 1; ++ else ++ write_error = 0; ++ break; ++ case ERROR: ++ MarkFailPhyOneBlock(psm); ++ write_error=1; ++ break; ++ } ++ } ++ } ++ } // bjm end of paranoid read back test... ++#endif ++ } ++ else { ++#if DEBUG_SSFDC_WRITE ++ printk("\nMulti-Sector write FAILED!\n"); ++#endif ++ // mark status a failure ++ wr_sector_status[psm->Sector] = 0; ++ _ResetSsfdcErr(psm); ++ write_error = 1; ++ break; ++ } // for (psm->Sector ...) ++ if (write_error) ++ break; ++ } ++ if ( ! write_error ) { ++ psm->Log2Phy[psm->Zone][psm->LogBlock] = psm->WriteBlock; ++ break; ++ } ++ } ++ psm->Sector = 0; ++ return write_error ? ERROR : SUCCESS; ++} ++ ++/* ++ MediaWriteSector() ++ ++*/ ++static int MediaWriteSector(ssfdc_dev *psm, struct request *req, char * bbuf, long start, int count) ++{ ++ int write_error=0, unwritten_block=0; ++ char *buf; ++ unsigned long curr_sector, blksize, PrevBlock; ++ unsigned long writebuf_index, readbio_index; ++ int i, sector, rw_retry=0; ++ int sectors_in_block; ++ char rd_sector_status[MAX_SECTNUM]; ++ char wr_sector_status[MAX_SECTNUM]; ++ ++ // optimized write, new vars ++ int bio_endios=0; ++ int bio_bvecs=0; ++ struct bio *bio; ++ // optimized for write ++ ++#if DEBUG_SSFDC_WRITE ++ printk(KERN_DEBUG "+MediaWriteSector()\n"); ++#endif ++ ++ if (!count) { ++ printk("MediaWriteSector() count == 0!\n"); ++ ssfdc_end_request(psm, req, 0); ++ return 1; ++ } ++ ++ if (CheckMediaWP(psm)) { ++ printk(KERN_DEBUG "%s: write protected media.\n", MAJOR_NAME); ++ ssfdc_terminate_request( psm, req); ++ psm->XferState = xfer_idle; ++ return -EIO; ++ } ++ ++ // allocate block size buffer ++ blksize = psm->MaxSectors * SSFDC_SECTSIZE; ++#if DEBUG_SSFDC_WRITE ++ printk(KERN_DEBUG "%s: Allocate %d sized block.\n", MAJOR_NAME, blksize); ++#endif ++ if ((buf = kmalloc(blksize, GFP_ATOMIC)) == NULL) { ++ printk(KERN_ERR "%s: Null buffer allocated!\n", MAJOR_NAME); ++ ssfdc_terminate_request( psm, req); ++ goto the_exit; ++ } ++ ++ /* ++ Loop to handle a request at the curr_sector of count sectors. ++ The write operation my encompas more than one phys block. ++ */ ++ curr_sector = start; ++ sectors_in_block = 0; ++ // zero out our sector R/W status array ++ memset(rd_sector_status, 1, sizeof(char) * MAX_SECTNUM); ++ memset(wr_sector_status, 1, sizeof(char) * MAX_SECTNUM); ++ ++ // rangecheck this sector within the device. ++ if (ConvMediaAddr(psm, curr_sector)) { ++ ssfdc_terminate_request(psm, req); ++ printk(KERN_ERR "WriteSector: ConvMediaAddr() error\n"); ++#if DEBUG_SSFDC_WRITE ++ printk(KERN_DEBUG "-MediaWriteSector()\n"); ++#endif ++ return 0; ++ } ++ ++#if DEBUG_SSFDC_WRITE ++ printk(KERN_DEBUG "MediaWriteSector() Zone %d, LogBlock %d PhyBlock %d, Sector %d\n", ++ psm->Zone,psm->LogBlock, psm->PhyBlock,psm->Sector); ++#endif ++ ++ PrevBlock = NO_ASSIGN; ++ rw_retry = 0; ++ ++#if DEBUG_SSFDC_WRITE ++ printk(KERN_DEBUG "Copy Zone %d, Phys %d\n", psm->Zone, psm->PhyBlock); ++#endif ++ // As a technique for wear leveling, a write to the SM results in the contents ++ // of the block to be copied into a blocksize buffer, the write data of the ++ // write request being overlayed onto the buffer containing the copied block, ++ // a new logical to physical mapping defined, and the buffer written into this ++ // newly mapped (logically) physical block. ++ ++ // read the physical block into the buffer. ++#if DEBUG_SSFDC_WRITE ++ printk(KERN_DEBUG "ReadBlock = %d LogBlock %d\n", psm->PhyBlock, psm->LogBlock); ++#endif ++ if (ReadBlkCopy(psm, buf, rd_sector_status) != SUCCESS) { ++ printk(KERN_ERR "Unable to read block.\n"); ++ goto the_exit; ++ } ++ ++#if DEBUG_SSFDC_WRITE ++ printk(KERN_DEBUG "Read from pending write request "); ++#endif ++ ++#if 0 ++ int bio_idx=0; ++#endif ++ rq_for_each_bio(bio, req) { ++ struct bio_vec *bvec; ++ int i, break_flag=0; ++#if 0 ++ int segment_idx; ++ printk(KERN_ERR "bio %d\n", bio_idx++); ++ ++ segment_idx = 0; ++#endif ++ // bio_bvecs = 0; ++ bio_for_each_segment(bvec, bio, i) { ++#if 0 ++ printk(KERN_ERR "segment %d\n", segment_idx++); ++#endif ++ // The conditions... ++ // bio fits within block ++ if (WriteReqInCurrBlk(psm,curr_sector + (bvec->bv_len >> 9) - 1,§or) ++ && WriteReqInCurrBlk(psm,curr_sector, §or)) ++ { ++#if 0 ++ printk(KERN_ERR "LogBlk %d: write at %d, %d sectors\n", ++ psm->LogBlock, curr_sector % psm->MaxSectors, bio_cur_sectors(bio)); ++#endif ++ // write bio into copied block ++ ++bio_bvecs; ++ writebuf_index = sector * SSFDC_SECTSIZE; ++#if 0 ++ printk(KERN_ERR "memcpy buf at 0x%x, 0x%x bytes\n", ++ writebuf_index, bvec->bv_len); ++#endif ++ memcpy(buf + writebuf_index, ++ page_address(bvec->bv_page) + bvec->bv_offset, bvec->bv_len); ++ unwritten_block = 1; ++ curr_sector += bvec->bv_len >> 9; ++ } ++ // bio fits partially within block ++ else if (WriteReqInCurrBlk(psm,curr_sector, §or)) ++ { ++ // put portion of bio in block ++ ++bio_bvecs; ++ writebuf_index = sector * SSFDC_SECTSIZE; ++ sectors_in_block = psm->MaxSectors - sector; ++ readbio_index = sectors_in_block * SSFDC_SECTSIZE; ++#if 0 ++ printk(KERN_ERR "memcpy buf at %x, %x bytes\n", ++ writebuf_index, readbio_index); ++#endif ++ memcpy(buf + writebuf_index, ++ page_address(bvec->bv_page) + bvec->bv_offset, readbio_index); ++#if 0 ++ printk(KERN_ERR "LogBlk %d: partial-write at %d, %d sectors first\n", ++ psm->LogBlock, curr_sector % psm->MaxSectors, sectors_in_block); ++#endif ++ // write block ++ unwritten_block = 0; ++ if (WriteBlock(psm, buf, wr_sector_status) != SUCCESS) { ++ printk(KERN_ERR "Unable to write block %d\n", psm->LogBlock); ++ // write_error - writing this block failed ++ break_flag = 1; ++ break; ++ } ++ // incr addr & read next block, ++ curr_sector += sectors_in_block; ++ if (ConvMediaAddr(psm,curr_sector) != SUCCESS) { ++ printk(KERN_ERR "MediaWriteSector() IncMediaAddr() error!\n"); ++ // write_error - address into next block is bogus ++ write_error = 1; ++ break_flag = 1; ++ break; ++ } ++ if (ReadBlkCopy(psm, buf, rd_sector_status) != SUCCESS) { ++ printk(KERN_ERR "MediaWriteSector() ReadBlkCopy() error!\n"); ++ // write error - next block read error ++ write_error = 1; ++ break_flag =1; ++ break; ++ } ++ // write remainder of bio into block ++#if 0 ++ printk(KERN_ERR "LogBlk %d: partial-write at %d, %d sectors, second write\n", ++ psm->LogBlock, curr_sector % psm->MaxSectors, (bvec->bv_len >> 9) - sectors_in_block); ++#endif ++#if 0 ++ printk(KERN_ERR "memcpy buf at 0x%x, from bio 0x%x, for 0x%x bytes\n", ++ 0, readbio_index, ((bvec->bv_len >> 9) - sectors_in_block) * SSFDC_SECTSIZE); ++#endif ++ memcpy(buf, (page_address(bvec->bv_page) + bvec->bv_offset) + readbio_index, ++ ((bvec->bv_len >> 9) - sectors_in_block) * SSFDC_SECTSIZE); ++ writebuf_index = ((bvec->bv_len >> 9) - sectors_in_block) * SSFDC_SECTSIZE; ++ unwritten_block = 1; ++ curr_sector += (bvec->bv_len >> 9) - sectors_in_block; ++ } ++ // bio is not in block at all. coplete unwritten block and exit loop. ++ else { ++ // write current block ++#if 0 ++ printk(KERN_ERR "bio no longer in block\n"); ++#endif ++ if (unwritten_block) { ++ if (WriteBlock(psm, buf, wr_sector_status) != SUCCESS) { ++ printk(KERN_ERR "MediaWriteSector() WriteBlock() error!\n"); ++ // write_error ++ } ++ unwritten_block = 0; ++ } ++ break_flag = 1; ++ break; ++ } ++ } ++ // bjm if (bio_bvecs) +bio_bvecs; ++ ++ if (break_flag) ++ break; ++ } ++ ++ if (unwritten_block) { ++ if (WriteBlock(psm, buf, wr_sector_status) != SUCCESS) { ++ printk(KERN_ERR "MediaWriteSector() WriteBlock() error!\n"); ++ write_error = 1; ++ } ++ } ++ ++ if (!(bio_endios=bio_bvecs)) { ++ if (static_ssfdc_debug) ++ printk("no bios from request!\n"); ++ ++bio_endios; ++ write_error = 0; ++ } ++ ++the_exit: ++ // log sector status for the copied/unmodified Sectors and flag any that have cpy errors ++ for (sector = 0; sector < psm->MaxSectors; ++sector) { ++ if ( ! rd_sector_status[sector] ) ++ printk(KERN_ERR "%s: READ sector %d invalid for block %d!\n", \ ++ MAJOR_NAME, sector, psm->LogBlock); ++ if ( ! wr_sector_status[sector]) ++ printk(KERN_ERR "%s: WRITTEN sector %d invalid for block %d!\n", \ ++ MAJOR_NAME, sector, psm->LogBlock); ++ } ++ ++ // free our prev allocated block for copy... ++ if (buf) ++ kfree(buf); ++ ++ psm->XferState = xfer_idle; ++ ++#if DEBUG_SSFDC_WRITE ++ printk(KERN_DEBUG "-MediaWriteSector()\n"); ++#endif ++ if (static_ssfdc_debug) ++ printk("end_request(%d) ", ! write_error); ++ for (i = 0; i < bio_endios; ++i) { ++ if (static_ssfdc_debug) ++ printk("%d ", i); ++ ssfdc_end_request(psm, req, ! write_error); ++ } ++ if (static_ssfdc_debug) ++ printk("\n"); ++ ++ return ! write_error; ++ ++} ++ ++ ++/*************************************************************************** ++ SmartMedia Logical Format Subroutine ++ ***************************************************************************/ ++int CheckLogCHS(ssfdc_dev *psm, unsigned int *c,unsigned char *h,unsigned char *s) ++{ ++ switch(psm->Model) { ++ case SSFDC1MB: *c=125; *h= 4; *s= 4; break; ++ case SSFDC2MB: *c=125; *h= 4; *s= 8; break; ++ case SSFDC4MB: *c=250; *h= 4; *s= 8; break; ++ case SSFDC8MB: *c=250; *h= 4; *s=16; break; ++ case SSFDC16MB: *c=500; *h= 4; *s=16; break; ++ case SSFDC32MB: *c=500; *h= 8; *s=16; break; ++ case SSFDC64MB: *c=500; *h= 8; *s=32; break; ++ case SSFDC128MB: *c=500; *h=16; *s=32; break; ++ default: ++ *c= 0; *h= 0; *s= 0; ++ psm->ErrCode=ERR_NoSmartMedia; ++ return(ERROR); ++ } ++ return(SUCCESS); ++} ++/*************************************************************************** ++ Power Control & Media Exist Check Subroutine ++ ***************************************************************************/ ++ ++int CheckMediaWP(ssfdc_dev *psm) ++{ ++ if(psm->Attribute &MWP) ++ { psm->ErrCode=ERR_WrtProtect; return(ERROR); } ++ return(SUCCESS); ++} ++ ++/*************************************************************************** ++ SmartMedia Physical Address Control Subroutine ++ ***************************************************************************/ ++int ConvMediaAddr(ssfdc_dev *psm, long addr) ++{ ++ long temp; ++ temp =addr/psm->MaxSectors; ++ psm->Sector =addr%psm->MaxSectors; ++ psm->LogBlock=temp%psm->MaxLogBlocks; ++ psm->Zone =temp/psm->MaxLogBlocks; ++ if(psm->ZoneMaxZones) { ++ ClrRedundantData(psm->Redundant); ++ SetLogBlockAddr(psm,psm->Redundant); ++ psm->PhyBlock=psm->Log2Phy[psm->Zone][psm->LogBlock]; ++#if DEBUG_SSFDC_ASSIGNRELEASE ++ printk(KERN_DEBUG "ConvMediaAddr() LogBlock %d -> PhyBlock %d\n", ++ psm->LogBlock, psm->PhyBlock); ++#endif ++ return(SUCCESS); ++ } ++ psm->ErrCode=ERR_OutOfLBA; ++ return(ERROR); ++} ++ ++int IncMediaAddr(ssfdc_dev *psm) ++{ ++ if(++psm->SectorMaxSectors) ++ return(SUCCESS); ++ psm->Sector=0; ++ if(++psm->LogBlockMaxLogBlocks) { ++ ClrRedundantData(psm->Redundant); ++ SetLogBlockAddr(psm,psm->Redundant); ++ psm->PhyBlock=psm->Log2Phy[psm->Zone][psm->LogBlock]; ++#if DEBUG_SSFDC_ASSIGNRELEASE ++ printk(KERN_DEBUG "IncMediaAddr() PhyBlock %d <- LogBlock %d\n", ++ psm->PhyBlock, psm->LogBlock); ++#endif ++ return(SUCCESS); ++ } ++ psm->LogBlock=0; ++ if(++psm->ZoneMaxZones) { ++ ClrRedundantData(psm->Redundant); ++ SetLogBlockAddr(psm,psm->Redundant); ++ psm->PhyBlock=psm->Log2Phy[psm->Zone][psm->LogBlock]; ++#if DEBUG_SSFDC_ASSIGNRELEASE ++ printk(KERN_DEBUG "IncMediaAddr() PhyBlock %d <- LogBlock %d\n", ++ psm->PhyBlock, psm->LogBlock); ++#endif ++ return(SUCCESS); ++ } ++ psm->Zone=0; ++ psm->ErrCode=ERR_OutOfLBA; ++ return(ERROR); ++} ++ ++/***************************************************************************/ ++ ++ ++static int WriteReqInCurrBlk(ssfdc_dev *psm, long sector, int *blksector) ++{ ++ long temp; ++ unsigned char Zone; /* Zone Number */ ++ unsigned int LogBlock; /* Logical Block Number of Zone */ ++ ++ if (!psm) ++ return 0; ++ ++ temp = sector / psm->MaxSectors; ++ *blksector = sector % psm->MaxSectors; ++ LogBlock = temp % psm->MaxLogBlocks; ++ Zone = temp / psm->MaxLogBlocks; ++ ++ return (psm->LogBlock == LogBlock && psm->Zone == Zone); ++} ++ ++/*************************************************************************** ++ SmartMedia Read/Write Subroutine with Retry ++ ***************************************************************************/ ++ ++/*************************************************************************** ++ SmartMedia Physical Block Assign/Release Subroutine ++ ***************************************************************************/ ++int AssignWriteBlock(ssfdc_dev *psm, int verbose_flag) ++{ ++ psm->ReadBlock=psm->PhyBlock; ++#if DEBUG_SSFDC_WRITE ++ int Zonesave=psm->Zone, ZoneIndex; ++#endif ++ ++#if DEBUG_SSFDC_WRITE ++ if (verbose_flag) { ++ printk("AssignWriteBlock() verbose mode. psm->Zone %d\n",psm->Zone); ++ for (psm->Zone = 0; psm->Zone < psm->MaxZones; psm->Zone++) { ++ int free_blk=0; ++ printk("\tZone %d, AssignStart %d and ", psm->Zone, psm->AssignStart[psm->Zone]); ++ for (psm->WriteBlock=0; psm->WriteBlock < psm->MaxLogBlocks; psm->WriteBlock++) ++ if (! ChkBit(psm->Assign[psm->Zone],psm->WriteBlock)) ++free_blk; ++ printk("%d free blocks.\n", free_blk); ++ } ++ psm->Zone = Zonesave; ++ } ++#endif ++ for(psm->WriteBlock=psm->AssignStart[psm->Zone]; psm->WriteBlockMaxBlocks; psm->WriteBlock++) ++ if(! ChkBit(psm->Assign[psm->Zone],psm->WriteBlock)) { ++ SetBit(psm->Assign[psm->Zone],psm->WriteBlock); ++ psm->AssignStart[psm->Zone]=psm->WriteBlock+1; ++ psm->PhyBlock=psm->WriteBlock; ++ psm->SectCopyMode=REQ_ERASE; ++#if DEBUG_SSFDC_ASSIGNRELEASE ++ printk(KERN_DEBUG "AssignWriteBlock() - WriteBlock %d ReadBlock %d LogBlock %d\n", ++ psm->WriteBlock, psm->ReadBlock, psm->LogBlock); ++#endif ++ return(SUCCESS); ++ } ++ for(psm->WriteBlock=0; psm->WriteBlockAssignStart[psm->Zone]; psm->WriteBlock++) ++ if(! ChkBit(psm->Assign[psm->Zone],psm->WriteBlock)) { ++ SetBit(psm->Assign[psm->Zone],psm->WriteBlock); ++ psm->AssignStart[psm->Zone]=psm->WriteBlock+1; ++ psm->PhyBlock=psm->WriteBlock; ++ psm->SectCopyMode=REQ_ERASE; ++#if DEBUG_SSFDC_ASSIGNRELEASE ++ printk(KERN_DEBUG "AssignWriteBlock() - WriteBlock %d PhyBlock %d LogBlock %d\n", ++ psm->WriteBlock, psm->PhyBlock, psm->LogBlock); ++#endif ++ return(SUCCESS); ++ } ++ psm->WriteBlock=NO_ASSIGN; ++ psm->ErrCode=ERR_WriteFault; ++ return(ERROR); ++} ++ ++/*************************************************************************** ++ SmartMedia Physical Format Check Local Subroutine ++ ***************************************************************************/ ++static int SetPhyFmtValue(ssfdc_dev *psm) ++{ ++ unsigned int idcode; ++ SsfdcReadID(psm, &idcode); ++ if(SetSsfdcModel(psm,(unsigned char)idcode)) ++ return(ERROR); ++ if(CheckSsfdcWP(psm)) ++ psm->Attribute|=WP; ++ return(SUCCESS); ++} ++ ++static int SearchCIS(ssfdc_dev *psm, unsigned int *pcis) ++{ ++ psm->Zone=0; psm->Sector=0; ++ for(psm->PhyBlock=0; psm->PhyBlock<(psm->MaxBlocks-psm->MaxLogBlocks-1); psm->PhyBlock++) { ++ if(SsfdcReadRedtData(psm, psm->Redundant)) ++ { SsfdcReset(psm); return(ERROR); } ++ if(! CheckFailBlock(psm->Redundant)) { ++ if(CheckCisBlock(psm->Redundant)) ++ { SsfdcReset(psm); return(ERROR); } ++ break; ++ } ++ } ++ while(psm->SectorMaxSectors) { ++ if(psm->Sector) ++ if(SsfdcReadRedtData(psm, psm->Redundant)) ++ { SsfdcReset(psm); return(ERROR); } ++ if(! CheckDataStatus(psm->Redundant)) { ++ if(SsfdcReadSect(psm,psm->WorkBuf,psm->Redundant)) ++ { SsfdcReset(psm); return(ERROR); } ++ if(CheckCISdata(psm->WorkBuf,psm->Redundant)) ++ { SsfdcReset(psm); return(ERROR); } ++ *pcis=psm->PhyBlock; ++ SsfdcReset(psm); ++ return(SUCCESS); ++ } ++ psm->Sector++; ++ } ++ SsfdcReset(psm); ++ return(ERROR); ++} ++ ++/***************************************************************************/ ++static int MakeLogTable(ssfdc_dev *psm, unsigned int start) ++{ ++ unsigned int block; ++ unsigned int blk_total=0, blk_blank=0, blk_nologaddr=0, ++ blk_fail=0, blk_assigned=0; ++ ++#if DEBUG_SSFDC ++ printk(KERN_DEBUG "MakeLogTable()\n"); ++#endif ++ psm->DataBuf_Valid = 1; ++ psm->Sector=0; ++ for(psm->Zone=0; psm->ZoneMaxZones; psm->Zone++) { ++ /* set all LogBlocks to NO_ASSIGN */ ++ for(psm->LogBlock=0; psm->LogBlockMaxLogBlocks; psm->LogBlock++) ++ psm->Log2Phy[psm->Zone][psm->LogBlock]=NO_ASSIGN; ++ /* for all Assigns[zone][PhyBlock] = 0x00 */ ++ for(psm->PhyBlock=0; psm->PhyBlock<(MAX_BLOCKNUM/8); psm->PhyBlock++) ++ psm->Assign[psm->Zone][psm->PhyBlock]=0x00; ++ /*******************************************************************/ ++ for(psm->PhyBlock=0; psm->PhyBlockMaxBlocks; psm->PhyBlock++) { ++ if((! psm->Zone) && (psm->PhyBlockAssign[psm->Zone],psm->PhyBlock); ++ continue; ++ } ++ ++blk_total; ++ if(SsfdcReadRedtData(psm,psm->Redundant)) { ++ SsfdcReset(psm); ++#if 0 ++ printk(KERN_ERR "error 1 PhyBlock %d\n", psm->PhyBlock); ++#endif ++ return(ERROR); ++ } ++ if(! CheckDataBlank(psm->Redundant)) { ++ ++blk_blank; ++ continue; ++ } ++ SetBit(psm->Assign[psm->Zone],psm->PhyBlock); ++ if(CheckFailBlock(psm->Redundant)) { ++#if 0 ++ printk("Zone %d, Block %d failed\n", psm->Zone, psm->PhyBlock); ++#endif ++ ++blk_fail; ++ continue; ++ } ++ if(LoadLogBlockAddr(psm)) { ++ ++blk_nologaddr; ++ continue; ++ } ++ if(psm->LogBlock>=psm->MaxLogBlocks) ++ continue; ++ ++blk_assigned; ++ if(psm->Log2Phy[psm->Zone][psm->LogBlock]==NO_ASSIGN) { ++#if DEBUG_SSFDC_ASSIGNRELEASE ++ if (psm->LogBlock == 0) ++ printk(KERN_DEBUG "MakeLogTable() LogBlock %d = PhyBlock %d\n", ++ psm->LogBlock, psm->PhyBlock); ++#endif ++ psm->Log2Phy[psm->Zone][psm->LogBlock]=psm->PhyBlock; ++ continue; ++ } ++ psm->Sector=psm->MaxSectors-1; ++ if(SsfdcReadRedtData(psm,psm->Redundant)) { ++ SsfdcReset(psm); ++#if 0 ++ printk(KERN_ERR "error 2\n"); ++#endif ++ return(ERROR); ++ } ++ psm->Sector=0; ++ block=psm->LogBlock; ++ if(! LoadLogBlockAddr(psm)) ++ if(psm->LogBlock==block) { ++#ifdef L2P_ERR_ERASE /***************************************************/ ++ block=psm->Log2Phy[psm->Zone][psm->LogBlock]; ++ psm->Log2Phy[psm->Zone][psm->LogBlock]=psm->PhyBlock; ++ psm->PhyBlock=block; ++ if(!(psm->Attribute &MWP)) { ++ SsfdcReset(psm); ++ if(SsfdcEraseBlock(psm)) { ++ printk(KERN_ERR "error 3\n"); ++ return(ERROR); ++ } ++ if(SsfdcCheckStatus(psm)) { ++ if(MarkFailPhyOneBlock(psm)) { ++ printk(KERN_ERR "error 4\n"); ++ return(ERROR); ++ } ++ } ++ else ClrBit(psm->Assign[psm->Zone],psm->PhyBlock); ++ } ++ psm->PhyBlock=psm->Log2Phy[psm->Zone][psm->LogBlock]; ++#else /*******************************************************************/ ++ psm->Log2Phy[psm->Zone][psm->LogBlock]=psm->PhyBlock; ++#endif /*******************************************************************/ ++ continue; ++ } ++#ifdef L2P_ERR_ERASE /***************************************************/ ++ if(!(psm->Attribute &MWP)) { ++ SsfdcReset(psm); ++ if(SsfdcEraseBlock(psm)) { ++ printk(KERN_ERR "error 5\n"); ++ return(ERROR); ++ } ++ if(SsfdcCheckStatus(psm)) { ++ if(MarkFailPhyOneBlock(psm)) { ++ printk(KERN_ERR "error 6\n"); ++ return(ERROR); ++ } ++ } ++ else ClrBit(psm->Assign[psm->Zone],psm->PhyBlock); ++ } ++#endif /*******************************************************************/ ++ } ++ psm->AssignStart[psm->Zone]=0; ++ } ++ SsfdcReset(psm); ++#if 0 ++ printk("MakeLogTable()\n"); ++ printk("\t%d failed\n", blk_fail); ++ printk("\t%d blank\n", blk_blank); ++ printk("\t%d assigned\n", blk_assigned); ++ printk("\t%d no logical addr\n", blk_nologaddr); ++ printk("\n\t%d total\n", blk_total); ++ printk("\t%d sum total\n", blk_fail + blk_blank + blk_assigned + blk_nologaddr); ++#endif ++ return(SUCCESS); ++} ++ ++/***************************************************************************/ ++static int MarkFailPhyOneBlock(ssfdc_dev *psm) ++{ ++ unsigned char sect; ++ sect=psm->Sector; ++ SetFailBlock(psm->WorkRedund); ++ SsfdcWriteRedtMode(psm); ++ for(psm->Sector=0; psm->SectorMaxSectors; psm->Sector++) ++ if(SsfdcWriteRedtData(psm,psm->WorkRedund)) { ++ SsfdcReset(psm); ++ psm->Sector=sect; ++ psm->ErrCode=ERR_HwError; ++ return(ERROR); ++ } /* NO Status Check */ ++ SsfdcReset(psm); ++ psm->Sector=sect; ++ return(SUCCESS); ++} ++ ++/*************************************************************************** ++ SmartMedia Control subroutine ++ Rev 0.30('98-06-30) ***** BETA RELEASE ***** ++ Copyright (c) 1997-98, Toshiba Corporation. All rights reserved. ++ ***************************************************************************/ ++ ++ ++/* Linux Driver Modifications */ ++/* ++dump_ssfdc_state ++*/ ++#if DEBUG_SSFDC ++void dump_ssfdc_state(ssfdc_dev * psm) ++{ ++#if DEBUG_SSFDC_STRUCT ++ // misc structure dump information ++ printk(KERN_DEBUG "psm->\n"); ++ /* unsigned long */ printk(KERN_DEBUG "\t address %x\n", psm->address); ++ /* int */ printk(KERN_DEBUG "\t sm_minor %d\n",psm->sm_minor); ++ /* struct dentry printk(KERN_DEBUG "\t *sm_dentry %x\n",psm->sm_dentry );*/ ++ /* kdev_t */ printk(KERN_DEBUG "\t sm_device %x\n",psm->sm_device); ++ /* int */ printk(KERN_DEBUG "\t sm_flags %x\n",psm->sm_flags); ++ /* unsigned int */ printk(KERN_DEBUG "\t UseCount %d\n",psm->UseCount); ++ /* unsigned int */ printk(KERN_DEBUG "\t ErrCode %d\n",psm->ErrCode); ++ /* unsigned int */ printk(KERN_DEBUG "\t MediaChange %d\n",psm->MediaChange); ++ /* unsigned int */ printk(KERN_DEBUG "\t SectCopyMode %d\n",psm->SectCopyMode); ++ /* unsigned int */ printk(KERN_DEBUG "\t HostCyl %d\n",psm->HostCyl ); ++ /* unsigned char */ printk(KERN_DEBUG "\t HostHead %d\n",psm->HostHead ); ++ /* unsigned char */ printk(KERN_DEBUG "\t HostSect %d\n",psm->HostSect ); ++ /* unsigned int */ printk(KERN_DEBUG "\t ReadBlock %d\n",psm->ReadBlock ); ++ /* unsigned int */ printk(KERN_DEBUG "\t WriteBlock %d\n",psm->WriteBlock ); ++ ++ /* Card attributes */ ++ /* unsigned char */ printk(KERN_DEBUG "\t Model %d\n",psm->Model ); ++ /* unsigned char */ printk(KERN_DEBUG "\t Attribute %x\n",psm->Attribute ); ++ /* unsigned char */ printk(KERN_DEBUG "\t MaxZones %d\n",psm->MaxZones ); ++ /* unsigned char */ printk(KERN_DEBUG "\t MaxSectors %d\n",psm->MaxSectors ); ++ /* unsigned int */ printk(KERN_DEBUG "\t MaxBlocks %d\n",psm->MaxBlocks ); ++ /* unsigned int */ printk(KERN_DEBUG "\t MaxLogBlocks %d\n",psm->MaxLogBlocks ); ++ /* unsigned char */ printk(KERN_DEBUG "\t Zone %d\n",psm->Zone ); ++ /* unsigned char */ printk(KERN_DEBUG "\t Sector %d\n",psm->Sector ); ++ /* unsigned int */ printk(KERN_DEBUG "\t PhyBlock %d\n",psm->PhyBlock ); ++ /* unsigned int */ printk(KERN_DEBUG "\t LogBlock %d\n",psm->LogBlock ); ++#endif ++} ++#endif ++ ++typedef struct { ++ int sm_error; ++ int lnx_error; ++ char *smerrstr; ++} errmap; ++ ++static errmap error_map_table [] = { ++ { NO_ERROR, 0x0000, ""}, ++ { ERR_WriteFault, EIO, "Peripheral Device Write Fault "}, ++ { ERR_HwError, EIO, "Hardware Error"}, ++ { ERR_DataStatus, EIO, "DataStatus Error"}, ++ { ERR_EccReadErr, EIO, "Unrecovered Read Error" }, ++ { ERR_CorReadErr, EIO, "Recovered Read Data with ECC" }, ++ { ERR_OutOfLBA, EIO, "Illegal Logical Block Address" }, ++ { ERR_WrtProtect, EROFS, "Write Protected" }, ++ { ERR_ChangedMedia, EIO, "Medium Changed" }, ++ { ERR_UnknownMedia, EIO, "Incompatible Medium Installed" }, ++ { ERR_IllegalFmt, EIO, "Medium Format Corrupted" }, ++ { ERR_NoSmartMedia, EIO, "Medium Not Present" } ++}; ++ ++static int ssfdc_maperror(int ssfdc_error) { ++ int loopus=0; ++ ++ if (!ssfdc_error) return 0; ++ ++ do { ++ if (error_map_table[loopus].sm_error == ssfdc_error) { ++ printk("%s\n", error_map_table[loopus].smerrstr); ++ return -error_map_table[loopus].lnx_error; ++ } ++ } while (++loopus < (sizeof(error_map_table) / (sizeof(errmap)))); ++ ++ printk(KERN_ERR "%s: error code %d is not mapped, EIO\n", MAJOR_NAME, ssfdc_error); ++ return -EIO; ++} ++ ++static int ssfdc_thread(void * arg) ++{ ++ ssfdc_dev *psm = arg; ++ unsigned long flags; ++ ++ daemonize("sm%dd",psm->sm_minor); ++ ++ spin_lock_irqsave(¤t->sighand->siglock,flags); // _irq ++ sigfillset(¤t->blocked); ++ recalc_sigpending(); ++ spin_unlock_irqrestore(¤t->sighand->siglock,flags); // _irq ++ ++ while (!psm->exiting) { ++ if ( ssfdc_get_request(psm) ) ++ initxfer(psm->sm_minor); ++ ++ spin_lock_irqsave(&psm->req_queue_lock,flags); // _irq ++ // bjm spin_lock(&psm->req_queue_lock); // _irq ++ psm->waiting = 0; ++ spin_unlock_irqrestore(&psm->req_queue_lock,flags); // _irq ++ // bjm spin_unlock(&psm->req_queue_lock); // _irq ++ if (wait_event_interruptible(psm->thread_wq,ssfdc_get_request(psm))) ++ printk("ssfdc_thread() interrupted\n"); ++ // wait_event(psm->thread_wq,ssfdc_get_request(psm)); ++ spin_lock_irqsave(&psm->req_queue_lock,flags); // _irq ++ // bjm spin_lock(&psm->req_queue_lock); // _irq ++ psm->waiting = 1; ++ spin_unlock_irqrestore(&psm->req_queue_lock,flags); // _irq ++ // bjm spin_unlock(&psm->req_queue_lock); // _irq ++ } ++ ++ printk("ssfdcd Exiting!\n"); ++ ++ complete_and_exit(&psm->thread_dead, 0); ++ ++} ++ ++/* ++ssfdc_init_device(ssfdc_dev *, int minor, unsigned long baseaddr, int removable) ++ reset and initialize the ssfdc_dev structure ++*/ ++static int ssfdc_init_device(ssfdc_dev *psm, int minor, unsigned long baseaddr) ++{ ++ int pid; ++ ++ // Establish ssfdc state ++ psm->XferState = xfer_idle; ++ psm->ErrCode = NO_ERROR; ++ psm->MediaChange = SUCCESS; ++ psm->SectCopyMode = COMPLETED; ++ psm->UseCount = 0; ++ psm->DataBuf_Valid = 0; ++ ++ // set minor number ++ psm->sm_minor = minor; ++ // io address ++ psm->address = baseaddr; ++ if (!request_region(psm->address, 3, "sm")) { ++ printk(KERN_ERR "sm: memory already in use!\n"); ++ return ERROR; ++ } ++ spin_lock_init(&psm->req_queue_lock); ++ ++ // thread related inititializations... ++ init_completion(&psm->thread_dead); ++ init_waitqueue_head(&psm->thread_wq); ++ ++ pid = kernel_thread(ssfdc_thread, psm, CLONE_KERNEL); ++ if (pid < 0) ++ printk("ssfdc: ERROR starting thread!\n"); ++ else ++ printk("ssfdc: started kernel thread sm%dd pid %d\n", psm->sm_minor, pid); ++ ++ // switch on power to device, and set basic attributes of card (no logical to phys mapping) ++ if ( ! CntPowerOn(psm) && ! CheckCardExist(psm) ) { ++ SetPhyFmtValue(psm); ++ } ++ else { ++ printk(KERN_ERR "ssfdc_init_device() unable to SetPhyFmtValue()\n"); ++ } ++ ++#if DEBUG_SSFDC ++ dump_ssfdc_state(psm); ++#endif ++ ++ return SUCCESS; ++} ++ ++static int ssfdc_dev_blk_size(ssfdc_dev *psm) ++{ ++ if (!psm) ++ return 0; ++ ++ // because of the physical to logical block mapping, not as many blocks ++ // as expected... ++ switch(psm->Model) { ++ case SSFDC1MB: ++ return (250 * 8 * 512) / SSFDC_BLKSIZE; ++ case SSFDC2MB: ++ return (500 * 8 * 512) / SSFDC_BLKSIZE; ++ case SSFDC4MB: ++ return (500 * 16 * 512) / SSFDC_BLKSIZE; ++ case SSFDC8MB: ++ return (1000 * 16 * 512) / SSFDC_BLKSIZE; ++ case SSFDC16MB: ++ return (1000 * 32 * 512) / SSFDC_BLKSIZE; ++ case SSFDC32MB: ++ return (2000 * 32 * 512) / SSFDC_BLKSIZE; ++ case SSFDC64MB: ++ return (4000 * 32 * 512) / SSFDC_BLKSIZE; ++ case SSFDC128MB: ++ return (8000 * 32 * 512) / SSFDC_BLKSIZE; ++ default: ++ return 0; ++ } ++} ++ ++inline int ssfdc_dev_sectors(ssfdc_dev *psm) { ++ return ssfdc_dev_blk_size(psm) * (SSFDC_BLKSIZE/SSFDC_SECTSIZE); ++} ++ ++static int ssfdc_open(struct inode *in, struct file *fptr) ++{ ++ int error_code=NO_ERROR; ++ ssfdc_dev *psm = in->i_bdev->bd_disk->private_data; ++ unsigned long flags; ++ ++#if DEBUG_SSFDC ++ printk(KERN_DEBUG "+ssfdc_open()\n"); ++#endif ++ ++ if (!fptr) { ++ return -EIO; ++ } ++ ++ spin_lock_irqsave(&psm->req_queue_lock,flags); ++ // bjm spin_lock(&psm->req_queue_lock); ++ // Power up smartmedia device, check for card, check media ++ if ((error_code=CntPowerOn(psm))) { ++ printk(KERN_ERR "%s PowerUP error\n", MAJOR_NAME); ++ } ++ else if ((error_code=CheckCardExist(psm))) {// Check the existence of a card ++ printk(KERN_ERR "%s No Card!\n", MAJOR_NAME); ++ } ++ else if ( ! psm->UseCount++ ) { ++ spin_unlock_irqrestore(&psm->req_queue_lock,flags); ++ // bjm spin_unlock(&psm->req_queue_lock); ++ check_disk_change(in->i_bdev); ++ spin_lock_irqsave(&psm->req_queue_lock,flags); ++ // bjm spin_lock(&psm->req_queue_lock); ++ } ++ ++ if ( ! psm->ErrCode ) { ++ // check our open mode against that of removable media's ++ if (WRITE_PROTECTED(psm)) { ++ printk(KERN_ERR "mount read only detected.\n"); ++ } ++ } ++ ++#if DEBUG_SSFDC ++ dump_ssfdc_state(psm); ++ printk(KERN_DEBUG "-ssfdc_open() error_code %d\n", error_code); ++#endif ++ ++ spin_unlock_irqrestore(&psm->req_queue_lock,flags); ++ ++#if DEBUG_SSFDC ++ printk("-ssfdc_open()\n"); ++#endif ++ ++ return ssfdc_maperror(error_code); ++} ++ ++static int ssfdc_release(struct inode *i_node, struct file *fptr) ++{ ++ int drive; ++ ssfdc_dev *psm=NULL; ++ unsigned long flags; ++ ++#if DEBUG_SSFDC ++ printk(KERN_DEBUG "+ssfdc_release("); ++#endif ++ ++ psm = (ssfdc_dev *) i_node->i_bdev->bd_disk->private_data; ++ drive = psm->sm_minor; ++ ++#if DEBUG_SSFDC ++ printk(KERN_DEBUG "%d)\n", drive); ++#endif ++ if (drive < 0 || drive >= MAX_SSFDC) ++ return -ENODEV; ++ ++ spin_lock_irqsave(&psm->req_queue_lock,flags); ++ // bjm spin_lock(&psm->req_queue_lock); ++ ++ if (!psm->UseCount) ++ printk(KERN_ERR "sm: Zero use count!\n"); ++ else { ++ --psm->UseCount; ++ } ++ ++#if DEBUG_SSFDC ++ dump_ssfdc_state(psm); ++#endif ++ ++#if DEBUG_SSFDC ++ printk(KERN_DEBUG "-ssfdc_release()\n"); ++#endif ++ ++ spin_unlock_irqrestore(&psm->req_queue_lock,flags); ++ // bjm spin_unlock(&psm->req_queue_lock); ++ ++ return 0; ++} ++ ++static int ssfdc_ioctl(struct inode *i_node, struct file *fptr, unsigned cmd, unsigned long arg) ++{ ++ int drive, int_val; ++ ssfdc_dev *psm; ++ ++#if DEBUG_SSFDC ++ printk(KERN_DEBUG "ssfdc_ioctl(%d)", cmd); ++#endif ++ ++ if (i_node == NULL) ++ return -EINVAL; ++ ++ psm = (ssfdc_dev *) i_node->i_bdev->bd_disk->private_data; ++ drive = psm->sm_minor; ++ ++ if (drive < 0 || drive >= MAX_SSFDC) ++ return -ENODEV; ++ switch(cmd) { ++ case BLKROSET: /* set device read-only (0 = read-write) */ ++ if (!capable(CAP_SYS_ADMIN)) ++ return -EACCES; ++ if (copy_from_user((void *) &int_val, (int *)arg, sizeof(int_val))) ++ return -EFAULT; ++ if (int_val) ++ psm->Attribute |= MWP; ++ else ++ psm->Attribute &= ~MWP; ++ return 0; ++ ++ case BLKROGET:/* get read-only status (0 = read_write) */ ++ int_val = psm->Attribute & MWP; ++ copy_to_user(arg, (void *) &int_val, sizeof(int_val)); ++ return 0; ++ ++ /* case BLKRRPART: */ /* re-read partition table */ ++ ++ case BLKGETSIZE: ++#if DEBUG_SSFDC ++ printk(KERN_DEBUG "BLKGETSIZE"); ++#else ++ printk(KERN_DEBUG "ssfdc_ioctl(BLKGETSIZE) not handled.\n"); ++#endif ++ break; ++ } ++ return -EINVAL; ++} ++ ++ ++static int ssfdc_getgeo(struct block_device *bdev, struct hd_geometry *geo) ++{ ++ unsigned char heads, sectors; ++ unsigned int cylinders; ++ struct gendisk *disk = bdev->bd_disk; ++ ssfdc_dev *psm = disk->private_data; ++ int drive = psm->sm_minor; ++ int err; ++ ++ if (drive < 0 || drive >= MAX_SSFDC) ++ return -ENODEV; ++ ++ err = CheckLogCHS(psm, &cylinders, &heads, §ors); ++ if (err) ++ return ssfdc_maperror(err); ++ ++ geo->heads = heads; ++ geo->sectors = sectors; ++ geo->cylinders = cylinders; ++ return 0; ++} ++ ++ ++static int ssfdc_revalidate(struct gendisk *disk) ++{ ++ unsigned int cis; ++ ssfdc_dev *psm=NULL; ++ int error_code=NO_ERROR; ++ unsigned long flags; ++ ++#if DEBUG_SSFDC ++ printk(KERN_DEBUG "ssfdc_revalidate()\n"); ++#endif ++ ++ psm = disk->private_data; ++ ++ spin_lock_irqsave(&psm->req_queue_lock,flags); ++ // bjm spin_lock(&psm->req_queue_lock); ++ ++ if ( ! psm->DataBuf_Valid ) { ++ if ((error_code=SetPhyFmtValue(psm))) ++ printk(KERN_ERR "ssfdc_revalidate() SetPhyFmtValue error\n"); ++ else if ((error_code=SearchCIS(psm,&cis))) ++ printk(KERN_ERR "ssfdc_revalidate() SearchCIS error\n"); ++ else if ((error_code=MakeLogTable(psm,cis+1))) ++ printk(KERN_ERR "ssfdc_revalidate() MakeLogTable error\n"); ++ } ++ spin_unlock_irqrestore(&psm->req_queue_lock,flags); ++ // bjm spin_unlock(&psm->req_queue_lock); ++ ++ return ssfdc_maperror(error_code); ++} ++ ++int __init ssfdc_init(void) ++{ ++ int i; ++ int err = 0; ++ ++#if DEBUG_SSFDC ++ printk(KERN_DEBUG "+ssfdc_init()\n"); ++#endif ++ ++ memset(disks, 0, sizeof(struct gendisk *) * MAX_SSFDC); ++ memset(ssfdc, 0, sizeof(struct ssfdc_dev *) * MAX_SSFDC); ++ for (i=0; imajor = SSFDC_MAJOR; ++ disks[i]->first_minor = i << SSFDC_PARTN_BITS; ++ disks[i]->fops = &ssfdc_fops; ++ sprintf(disks[i]->disk_name, "sm%d", i); ++ sprintf(disks[i]->devfs_name, "sm/%d", i); ++ disks[i]->private_data = ssfdc[i]; ++ ssfdc_init_device(ssfdc[i], i << SSFDC_PARTN_BITS, ++ CPLD_BASE_ADDRESS + SMART_MEDIA_ONE_OFFSET); ++ ++ disks[i]->queue = ssfdc[i]->req_queue = ++ blk_init_queue(do_ssfdc_request, &ssfdc[i]->req_queue_lock); ++ ssfdc[i]->req_queue->queuedata = ssfdc[i]; ++ ++ set_capacity(disks[i], ssfdc_dev_sectors(ssfdc[i])); ++ // bjm blk_queue_max_sectors(disks[i]->queue, 32); ++ // bjm blk_queue_max_phys_segments(disks[i]->queue, 4); ++ blk_queue_max_segment_size(disks[i]->queue, (ssfdc[i]->MaxSectors / 2) * K_BYTE); ++ add_disk(disks[i]); ++ } ++ ++#if 0 // bjm debug ++#ifndef CONFIG_SH_NIMBLE_MINI ++ mediachangetest(0L); ++#else ++ mediachangetest(1L); ++#endif ++#endif // bjm debug ++ ++#if DEBUG_SSFDC ++ printk(KERN_DEBUG "-ssfdc_init(0)\n"); ++#endif ++ return 0; ++ ++busy_error: ++no_memory_error: ++ for (i=0; i < MAX_SSFDC; ++i) { ++ if (disks[i] && disks[i]->queue) ++ kfree(disks[i]->queue); ++ put_disk(disks[i]); ++ if (ssfdc[i]) ++ kfree(ssfdc[i]); ++ } ++#if DEBUG_SSFDC ++ printk(KERN_DEBUG "-ssfdc_init(%d)\n", -ENOMEM); ++#endif ++ return -ENOMEM; ++} ++ ++void __init ssfdc_clean(void) ++{ ++ int i; ++ ++ printk(KERN_DEBUG "SSFDC exit code\n"); ++ ++ for (i=0; i < MAX_SSFDC; ++i) { ++ if (disks[i] != NULL) { ++ blk_cleanup_queue(disks[i]->queue); ++ del_gendisk(disks[i]); ++ put_disk(disks[i]); ++ } ++ ++ if (ssfdc[i]) { ++ // signal thread to exit... ++ ssfdc[i]->exiting = 1; ++ wake_up(&ssfdc[i]->thread_wq); ++ wait_for_completion(&ssfdc[i]->thread_dead); ++ ++ if (ssfdc[i]->address) ++ release_region(ssfdc[i]->address, 3); ++ kfree(ssfdc[i]); ++ } ++ } ++ ++ if (unregister_blkdev(SSFDC_MAJOR, "smartmedia")) ++ printk(KERN_WARNING "smartmedia: cannot unregister blkdev\n"); ++ devfs_remove("sm"); ++} ++ ++#if DEBUG_SSFDC ++void dump_request(struct request *req) ++{ ++#if DEBUG_SSFDC_REQUEST && DEBUG_SSFDC_REQUEST ++ printk(KERN_DEBUG "req->\n"); ++ /* int */ printk(KERN_DEBUG "\t req->cmd %x\n", req->cmd); /* READ or WRITE */ ++ /* int errors */ printk(KERN_DEBUG "\t req->errors %d\n", req->errors); ++ /* unsigned long */ printk(KERN_DEBUG "\t req->sector %d\n", req->sector); ++ /* unsigned long */ printk(KERN_DEBUG "\t req->nr_sectors %d\n",req->nr_sectors); ++ /* unsigned long */ printk(KERN_DEBUG "\t req->hard_sector %d\n", req->hard_sector); ++ /* unsigned int */ printk(KERN_DEBUG "\t req->nr_hw_segments %d\n",req->nr_hw_segments); ++ /* unsigned long */ printk(KERN_DEBUG "\t req->current_nr_sectors %d\n",req->current_nr_sectors); ++ ++#endif ++} ++#endif ++ ++void do_ssfdc_request(request_queue_t * rq) ++{ ++ ssfdc_dev *psm = rq->queuedata; ++ ++ if ( ! psm->waiting ) ++ wake_up(&psm->thread_wq); ++} ++ ++static struct request * ssfdc_get_request(ssfdc_dev *psm) ++{ ++ struct request *treq; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&psm->req_queue_lock, flags); ++ // bjm spin_lock(&psm->req_queue_lock); ++ treq = elv_next_request(psm->req_queue); ++ spin_unlock_irqrestore(&psm->req_queue_lock, flags); ++ // bjm spin_unlock(&psm->req_queue_lock); ++ ++ return treq; ++} ++ ++static void ssfdc_terminate_request(ssfdc_dev *psm, struct request *req) ++{ ++ unsigned long flags; ++ ++ if (psm && req) { ++ spin_lock_irqsave(&psm->req_queue_lock, flags); ++ // bjm spin_lock(&psm->req_queue_lock); ++ end_request(req,0); ++ spin_unlock_irqrestore(&psm->req_queue_lock, flags); ++ // bjm spin_unlock(&psm->req_queue_lock); ++ } ++} ++ ++ ++static int ssfdc_end_request(ssfdc_dev *psm, struct request *req, int status) ++{ ++ unsigned long flags; ++ ++ if (!psm || !req) { ++ printk(KERN_DEBUG "ssfdc_end_request() NULL psm or req!\n"); ++ return 0; ++ } ++ ++#if DEBUG_SSFDC_REQUEST ++ printk("ssfdc_end_request(%p)\n", req); ++#endif ++ ++ spin_lock_irqsave(&psm->req_queue_lock,flags); ++ // bjm spin_lock(&psm->req_queue_lock); ++ end_request(req,status); ++ spin_unlock_irqrestore(&psm->req_queue_lock,flags); ++ // bjm spin_unlock(&psm->req_queue_lock); ++ return 0; ++} ++ ++void initxfer(unsigned long dev_idx) ++{ ++ ssfdc_dev *psm = ssfdc[dev_idx]; ++ struct request *req; ++ int error_code; ++ unsigned int cis; ++ ++#if DEBUG_SSFDC ++ // printk(KERN_DEBUG "+initxfer(%d)", dev_idx); ++#endif ++ // get device lock, and check idle flag, setting if not busy ++ ++ req = ssfdc_get_request(psm); ++ ++ // if the device is idle, setup a read or write operation ++ if (psm->XferState == xfer_idle) { ++ // get the current request from our device's request list. ++ if (!req) { ++#if DEBUG_SSFDC ++// printk(KERN_DEBUG "initxfer() terminate, no schedule.\n"); ++#endif ++ } ++ // Absence of power indicates absence of card. ++ // terminate request and exit... ++ if ( ! _HwChkPower(psm) ) { ++ printk(KERN_DEBUG "initxfer() - Media power NOT!\n"); ++ ssfdc_terminate_request(psm,req); ++ return; ++ } ++ ++ // We have a request and we have a card. Is the Log2Phys mapping still valid? ++ if ( ! psm->DataBuf_Valid ) { ++ if ((error_code = SetPhyFmtValue(psm))) ++ printk(KERN_DEBUG "%s SetPhyFmtValue error\n", MAJOR_NAME); ++ else if ((error_code = SearchCIS(psm,&cis))) ++ printk(KERN_DEBUG "%s SearchCIS error\n", MAJOR_NAME); ++ else if ((error_code = MakeLogTable(psm,cis+1))) ++ printk(KERN_DEBUG "%s MakeLogTable error\n", MAJOR_NAME); ++ if (error_code) { ++ printk(KERN_DEBUG "%s error %d\n", MAJOR_NAME, error_code); ++ ssfdc_terminate_request(psm,req); ++ return; ++ } ++ } ++ ++ psm->XferState = xfer_busy; ++#if DEBUG_SSFDC ++ printk(KERN_DEBUG " initxfer() - do the request %x\n", req); ++#endif ++ ssfdc_rw_request(psm, req); ++ } ++#if DEBUG_SSFDC ++ else { ++ printk(KERN_DEBUG "initxfer(%d) dev is busy, no reschedule.\n", dev_idx); ++ } ++#endif ++ ++} ++ ++ ++void ssfdc_rw_request(ssfdc_dev *psm, struct request *req) ++{ ++ int (*rwsector)(ssfdc_dev *, struct request *, char *, long, int); ++ unsigned sector, count; ++ int rw_return=1; ++ ++ if (rq_data_dir(req) == WRITE) ++ rwsector = MediaWriteSector; ++ else if (rq_data_dir(req) == READ) ++ rwsector = MediaReadSector; ++ else { ++ printk(KERN_DEBUG "%s: command %d not implemented!\n", MAJOR_NAME, (int) rq_data_dir(req)); ++ goto terminal_error; ++ } ++ ++ /* ++ */ ++ sector = req->sector; ++ count = req->nr_sectors; ++ ++ // check that the request does not extend past ssfdc's max size ++ if ( (sector + count) > ssfdc_dev_sectors(psm) ) { ++ printk(KERN_ERR "Attempt to read past end of device!"); ++ goto terminal_error; ++ } ++ else { ++ ++ // for each segment in each bio_vec R/W from/to device. ++ ++ count = req->current_nr_sectors; ++ rw_return = rwsector(psm, req, req->buffer, sector, count); ++ ++ if (rq_data_dir(req) == READ) ++ ssfdc_end_request(psm, req, rw_return); ++ } ++ ++ // things appear OK... ++ return; ++ ++terminal_error: ++ ssfdc_terminate_request( psm, req); ++ psm->XferState = xfer_idle; ++} ++ ++module_init(ssfdc_init); ++module_exit(ssfdc_clean); ++ ++MODULE_LICENSE("GPL"); ++ ++/* End of Linux Driver Modifications */ +diff -duNr linux-2.6.16-orig/drivers/block/ssfdc.h linux-2.6.16/drivers/block/ssfdc.h +--- linux-2.6.16-orig/drivers/block/ssfdc.h 1970-01-01 10:00:00.000000000 +1000 ++++ linux-2.6.16/drivers/block/ssfdc.h 2006-06-29 16:13:27.000000000 +1000 +@@ -0,0 +1,372 @@ ++/* $id: $ */ ++#ifndef _SSFDC_H ++#define _SSFDC_H ++ ++/* ++ Linux related defines ++*/ ++ ++#ifdef CONFIG_SH_NIMBLE_MINI ++#define MAX_SSFDC 2 /* two drives */ ++#else ++#define MAX_SSFDC 1 /* only one drive */ ++#endif ++ ++#define SSFDC_MAJOR_NAME "sm" ++#define MAJOR_NAME SSFDC_MAJOR_NAME ++#define SSFDC_PARTN_BITS 4 /* number of minor dev bits for partitions */ ++#define PARTN_MASK ((1<address+0x00) /* R/W Data Reg */ ++#define STATUS(p) (p->address+0x02) /* R/- Status Reg */ ++#define MODE(p) (p->address+0x02) /* -/W Mode Reg */ ++ ++/* Controller Status Reg (Read Only) */ ++#define STS_BUSY 0x80 ++#define STS_VCC 0x10 ++#define STS_SCHG 0x08 ++#define STS_WP 0x01 ++#define STS_CENB 0x04 ++ ++#ifdef CONFIG_SH_TITAN ++/* Controller Mode Reg (Write Only) */ ++/* keep PCI clock running on bit 3 */ ++/* CE# on bit 2, CLE on bit 1 and ALE on bit 0 */ ++#define STANDBY (0x00 | 0x00 | 0x08) ++#define WR_DATA (0x00 | 0x04 | 0x08) ++#define WR_CMD (0x02 | 0x04 | 0x08) ++#define WR_ADR (0x01 | 0x04 | 0x08) ++#else ++/* Controller Mode Reg (Write Only) */ ++#define STANDBY 0x00 ++#define WR_DATA 0x10 ++#define WR_CMD 0x11 ++#define WR_ADR 0x12 ++#define PW_OFF 0x80 ++#define PW_ON 0x88 ++#endif ++ ++/***************************************************************************/ ++#define _HwSetData(p) ctrl_outb(WR_DATA,MODE(p)) ++#define _HwSetCmd(p) ctrl_outb(WR_CMD,MODE(p)) ++#define _HwSetAddr(p) ctrl_outb(WR_ADR,MODE(p)) ++#define _HwSetStandby(p) ctrl_outb(STANDBY,MODE(p)) ++ ++#define _HwInData(p) ctrl_inb(DATA(p)) ++#define _HwOutData(p,a) ctrl_outb((a),DATA(p)) ++ ++#ifdef CONFIG_SH_TITAN ++#define _HwVccOn(p) ++#define _HwVccOff(p) ++#else ++#define _HwVccOn(p) ctrl_outb(PW_ON,MODE(p)) ++#define _HwVccOff(p) ctrl_outb(PW_OFF,MODE(p)) ++#endif ++ ++#ifdef CONFIG_SH_TITAN ++#define _HwChkCardIn(p) (1) ++#define _HwChkStatus(p) (0) ++#define _HwChkWP(p) (0) ++#define _HwChkPower(p) (1) ++#define _HwChkBusy(p) (ctrl_inb(STATUS(p))&STS_BUSY) ++ ++#else ++ ++#define _HwChkCardIn(p) (ctrl_inb(STATUS(p))&STS_CENB) ++#define _HwChkStatus(p) (ctrl_inb(STATUS(p))&(STS_SCHG)) ++#define _HwChkWP(p) (ctrl_inb(STATUS(p))&(STS_WP)) ++#define _HwChkPower(p) (ctrl_inb(STATUS(p))&(STS_VCC)) ++#define _HwChkBusy(p) (ctrl_inb(STATUS(p))&STS_BUSY) ++ ++#endif ++ ++#define _HwRdStatus(p) (ctrl_inb(STATUS(p))) ++/***************************************************************************/ ++#ifdef CONFIG_SH_NIMBLE_MINI ++#define CPLD_BASE_ADDRESS 0xB4030000L ++#define SMART_MEDIA_ONE_OFFSET 0x08 // The "built-in" SmartMedia ++#define SMART_MEDIA_TWO_OFFSET 0x00 // The "removable" SmartMedia ++#elif CONFIG_SH_TITAN ++#define CPLD_BASE_ADDRESS 0xA4000000L ++#define SMART_MEDIA_ONE_OFFSET 0x00 ++#else ++#define CPLD_BASE_ADDRESS 0xB8030000L ++#define SMART_MEDIA_ONE_OFFSET 0x00 // The "built-in" SmartMedia ++#endif ++ ++/*************************************************************************** ++ Program & Macro for SmartMedia Controller ++ Rev 0.30('98-06-30) ***** BETA RELEASE ***** ++ Copyright (c) 1997-98, Toshiba Corporation. All rights reserved. ++ ***************************************************************************/ ++/*************************************************************************** ++ Define Definition ++ ***************************************************************************/ ++#define K_BYTE 1024 /* Kilo Byte */ ++#define SSFDC_SECTSIZE 512 /* Sector buffer size */ ++#define SSFDC_BLKSIZE (K_BYTE * 4) ++#define REDTSIZE 16 /* Redundant buffer size */ ++ ++/***************************************************************************/ ++#define DUMMY_DATA 0xFF /* No Assign Sector Read Data */ ++ ++/*************************************************************************** ++ Max Zone/Block/Sectors Data Definition ++ ***************************************************************************/ ++#define MAX_ZONENUM 0x08 /* Max Zone Numbers in a SmartMedia */ ++#define MAX_BLOCKNUM 0x0400 /* Max Block Numbers in a Zone */ ++#define MAX_SECTNUM 0x20 /* Max Sector Numbers in a Block */ ++#define MAX_LOGBLOCK 1000 /* Max Logical Block Numbers in a Zone */ ++ ++/*************************************************************************** ++ Logical to Physical Block Table Data Definition ++ ***************************************************************************/ ++#define NO_ASSIGN 0xFFFF /* No Assign Logical Block Address */ ++ ++/*************************************************************************** ++ 'SectCopyMode' Data ++ ***************************************************************************/ ++#define COMPLETED 0 /* Sector Copy Completed */ ++#define REQ_ERASE 1 /* Request Read Block Erase */ ++#define REQ_FAIL 2 /* Request Read Block Failed */ ++ ++/*************************************************************************** ++ Retry Counter Definition ++ ***************************************************************************/ ++#define RDERR_REASSIGN 1 /* Reassign with Read Error */ ++#define L2P_ERR_ERASE 1 /* BlockErase for Contradicted L2P Table */ ++ ++/*************************************************************************** ++ SmartMedia Command & Status Definition ++ ***************************************************************************/ ++/* SmartMedia Command */ ++#define SSFDC_WRDATA 0x80 ++#define SSFDC_READ 0x00 ++#define SSFDC_READ_REDT 0x50 ++#define SSFDC_READ1 0x00 ++#define SSFDC_READ2 0x01 ++#define SSFDC_READ3 0x50 ++#define SSFDC_RST_CHIP 0xFF ++#define SSFDC_WRITE 0x10 ++#define SSFDC_DUMMY_WRITE 0x11 ++#define SSFDC_MULTI_WRITE 0x15 ++#define SSFDC_ERASE1 0x60 ++#define SSFDC_ERASE2 0xD0 ++#define SSFDC_RDSTATUS 0x70 ++#define SSFDC_READ_ID 0x90 ++ ++/* SmartMedia Status */ ++#define WR_FAIL 0x01 /* 0:Pass, 1:Fail */ ++#define SUSPENDED 0x20 /* 0:Not Suspended, 1:Suspended */ ++#define READY 0x40 /* 0:Busy, 1:Ready */ ++#define WR_PRTCT 0x80 /* 0:Protect, 1:Not Protect */ ++ ++#define USEC 1 ++#define MSEC 1000 * USEC ++#define JIFFY_TICK_MS (MSEC / HZ) ++ ++// #define BUSY_PROG 20 * MSEC /* 200-1000us ----- Program Time */ ++#define BUSY_PROG 1000 * USEC /* 200-1000us ----- Program Time */ ++#define BUSY_DUMMY_WRITE 10 * USEC /* 2-10us dummy write */ ++#define BUSY_MULTI_WRITE 1000 * USEC /* 200 - 1000 usec */ ++#define BUSY_ERASE 10 * MSEC /* 2-10ms ----- Block Erase Time */ ++#define BUSY_READ 100 * USEC /* tR : 100us ----- Data transfer Time */ ++#define BUSY_RESET 10 * USEC /* tRST : 10us ----- Device Resetting Time */ ++#define BUSY_ADDR_SET 25 * USEC ++ ++#define TIME_PON 30 /* 300ms ------ Power On Wait Time */ ++#define TIME_CDCHK 2 /* 20ms ------ Card Check Interval Timer */ ++#define TIME_WPCHK 1 /* 5ms ------ WP Check Interval Timer */ ++ ++/* Power On Timeout */ ++#define POWER_ON_TIMEOUT (HZ*2) ++ ++/* Default retry limit for Read/Write */ ++#define RD_RETRY_LIMIT 3 ++#define WR_RETRY_LIMIT 4 ++#define BLOCK_READ_RETRY_LIMIT 2 ++#define BLOCK_WRITE_RETRY_LIMIT 3 ++#define REASSIGN_RETRY_LIMIT 4 ++ ++/*************************************************************************** ++ Redundant Data ++ ***************************************************************************/ ++#define REDT_DATA 0x04 ++#define REDT_BLOCK 0x05 ++ ++#define REDT_ADDR1H 0x06 ++#define REDT_ADDR1L 0x07 ++#define REDT_ADDR2H 0x0B ++#define REDT_ADDR2L 0x0C ++ ++#define REDT_ECC10 0x0D ++#define REDT_ECC11 0x0E ++#define REDT_ECC12 0x0F ++ ++#define REDT_ECC20 0x08 ++#define REDT_ECC21 0x09 ++#define REDT_ECC22 0x0A ++ ++/*************************************************************************** ++ SmartMedia Model & Attribute ++ ***************************************************************************/ ++/* SmartMedia Attribute */ ++#define NOWP 0x00 /* 0... .... No Write Protect */ ++#define WP 0x80 /* 1... .... Write Protected */ ++#define MASK 0x00 /* .00. .... NAND MASK ROM Model */ ++#define FLASH 0x20 /* .01. .... NAND Flash ROM Model */ ++#define AD3CYC 0x00 /* ...0 .... Address 3-cycle */ ++#define AD4CYC 0x10 /* ...1 .... Address 4-cycle */ ++#define BS16 0x00 /* .... 00.. 16page/block */ ++#define BS32 0x04 /* .... 01.. 32page/block */ ++#define PS256 0x00 /* .... ..00 256byte/page */ ++#define PS512 0x01 /* .... ..01 512byte/page */ ++ ++#define MWP 0x80 /* WriteProtect mask */ ++#define MFLASH 0x60 /* Flash Rom mask */ ++#define MADC 0x10 /* Address Cycle */ ++#define MBS 0x0C /* BlockSize mask */ ++#define MPS 0x03 /* PageSize mask */ ++ ++/* SmartMedia Model */ ++#define NOSSFDC 0x00 /* NO SmartMedia */ ++#define SSFDC1MB 0x01 /* 1MB SmartMedia */ ++#define SSFDC2MB 0x02 /* 2MB SmartMedia */ ++#define SSFDC4MB 0x03 /* 4MB SmartMedia */ ++#define SSFDC8MB 0x04 /* 8MB SmartMedia */ ++#define SSFDC16MB 0x05 /* 16MB SmartMedia */ ++#define SSFDC32MB 0x06 /* 32MB SmartMedia */ ++#define SSFDC64MB 0x07 /* 64MB SmartMedia */ ++#define SSFDC128MB 0x08 /*128MB SmartMedia */ ++ ++#define EVEN 0 /* Even Page for 256byte/page */ ++#define ODD 1 /* Odd Page for 256byte/page */ ++ ++/*************************************************************************** ++ Struct Definition ++ ***************************************************************************/ ++/* Linux kernel additions */ ++ ++/* device buffer xfer status */ ++typedef enum { xfer_idle, xfer_busy} xfer_states; ++ ++/* Smartmedia device structure */ ++typedef struct { ++ unsigned long address; ++ int sm_minor; ++ int sm_flags; ++ int busy; ++ int waiting; ++ ++ /* queue of io requests for the device */ ++ spinlock_t req_queue_lock; ++ request_queue_t *req_queue; ++ ++ /* our thread related parameters */ ++ struct completion thread_dead; ++ int exiting; ++ wait_queue_head_t thread_wq; ++ ++ /* accounting variables for each buffer io operation ++ each request may have a chain of buffers, each of ++ which may require I/O of multiple sectors */ ++ unsigned int ReqSectorSize; ++ unsigned int BufIndex; ++ unsigned int SectorWriteIndex; ++ ++ /* CHS parameters */ ++ unsigned int HostCyl; ++ unsigned char HostHead; ++ unsigned char HostSect; ++ ++ /* State Information */ ++ xfer_states XferState; ++ unsigned int UseCount; ++ unsigned int RetryCount; ++ unsigned int ErrCode; ++ unsigned int MediaChange; ++ unsigned int CardPresent; ++ unsigned int SectCopyMode; ++ ++ /* Working Databuf Area */ ++ unsigned char SectBuf[SSFDC_SECTSIZE]; ++ unsigned char WorkBuf[SSFDC_SECTSIZE]; ++ unsigned char Redundant[REDTSIZE]; ++ unsigned char WorkRedund[REDTSIZE]; ++ unsigned int DataBuf_Valid; ++ unsigned int Log2Phy[MAX_ZONENUM][MAX_LOGBLOCK]; ++ unsigned char Assign[MAX_ZONENUM][MAX_BLOCKNUM/8]; ++ unsigned int AssignStart[MAX_ZONENUM]; ++ unsigned int ReadBlock; ++ unsigned int WriteBlock; ++ ++ /* Card attributes */ ++ unsigned char Model; ++ unsigned char Attribute; ++ unsigned char MaxZones; ++ unsigned char MaxSectors; ++ unsigned int MaxBlocks; ++ unsigned int MaxLogBlocks; ++ ++ /* Address of current access (Media) */ ++ unsigned char Zone; /* Zone Number */ ++ unsigned char Sector; /* Sector(512byte) Number on Block */ ++ unsigned int PhyBlock; /* Physical Block Number on Zone */ ++ unsigned int LogBlock; /* Logical Block Number of Zone */ ++ ++ /* device statistics */ ++ unsigned int Sector_reads; ++ unsigned int Sector_writes; ++ unsigned int Sect_rd_errs_ttl; ++ unsigned int Sect_wr_errs_ttl; ++ unsigned int Bad_blks_rd; ++ unsigned int Bad_blks_wr; ++ unsigned int Bad_blks_erase; ++} ssfdc_dev; ++ ++ ++/****************************************************************************/ ++/* Handy defines */ ++/****************************************************************************/ ++#define WRITE_PROTECTED(p) (p->Attribute & WP) ++ ++/* End of Linux kernel additions */ ++#endif /* #ifndef _SSFDC_H */ diff --git a/packages/linux/linux-titan-sh4_2.6.16.bb b/packages/linux/linux-titan-sh4_2.6.16.bb deleted file mode 100644 index da10945447..0000000000 --- a/packages/linux/linux-titan-sh4_2.6.16.bb +++ /dev/null @@ -1,52 +0,0 @@ -SECTION = "kernel" -DESCRIPTION = "Linux kernel for SH4 based TITAN router appliance" -LICENSE = "GPL" -MAINTAINER = "Jamie Lenehan -PR = "r0" - -# The "date=20060328" should be changed to "tag=linux-2_6_16" - but the -# tag won't exit till 2.6.17 is released -SRC_URI = "ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \ -cvs://anonymous@linuxsh.cvs.sourceforge.net/cvsroot/linuxsh;module=linux;date=20060331 \ - file://titan-flash.patch;patch=1 \ - file://titan-config" -S = "${WORKDIR}/linux-${PV}" - -COMPATIBLE_HOST = 'sh4.*-linux' - -inherit kernel - -ARCH = "sh" -KERNEL_IMAGETYPE = "zImage" -KERNEL_OUTPUT = "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}" - -# Fix up kernel version - sh kernels get -sh added automatically -KERNEL_RELEASE = "${KERNEL_VERSION}" - -# -# The linux-sh cvs tree is a "drop in source tree" and needs to be copied -# over the top of the normal linux source since it only includes modified -# files. -# -do_unpack_extra(){ - cp -pPR ${WORKDIR}/linux/* ${S} -} -addtask unpack_extra after do_unpack before do_patch - -# -# Use an updated defconfig which includes the flash driver -# The flash driver quality doesn't allow it to be a part of the main kernel -# -do_configure_prepend() { - install -m 0644 ${WORKDIR}/titan-config ${S}/arch/sh/configs/titan_defconfig - yes '' | oe_runmake titan_defconfig -} - -# -# Should I make the nfs boot image? -# -#do_deploy_titan() { -# To NFS boot you need to objcopy the image... -# ${HOST_PREFIX}objcopy -O binary -R .note -R .comment -S arch/sh/boot/compressed/vmlinux ${DEPLOY_DIR}/linux.bin -#} -#addtask deploy before do_build after do_compile diff --git a/packages/linux/linux-titan-sh4_2.6.17.bb b/packages/linux/linux-titan-sh4_2.6.17.bb new file mode 100644 index 0000000000..7d59400723 --- /dev/null +++ b/packages/linux/linux-titan-sh4_2.6.17.bb @@ -0,0 +1,50 @@ +SECTION = "kernel" +DESCRIPTION = "Linux kernel for SH4 based TITAN router appliance" +LICENSE = "GPL" +MAINTAINER = "Jamie Lenehan +PR = "r0" + +SRC_URI = "ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \ + cvs://anonymous@linuxsh.cvs.sourceforge.net/cvsroot/linuxsh;module=linux;date=20060706 \ + file://titan-flash.patch;patch=1 \ + file://titan-config" +S = "${WORKDIR}/linux-${PV}" + +COMPATIBLE_HOST = 'sh4.*-linux' + +inherit kernel + +ARCH = "sh" +KERNEL_IMAGETYPE = "zImage" +KERNEL_OUTPUT = "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}" + +# Fix up kernel version - sh kernels get -sh added automatically +KERNEL_RELEASE = "${KERNEL_VERSION}" + +# +# The linux-sh cvs tree is a "drop in source tree" and needs to be copied +# over the top of the normal linux source since it only includes modified +# files. +# +do_unpack_extra(){ + cp -pPR ${WORKDIR}/linux/* ${S} +} +addtask unpack_extra after do_unpack before do_patch + +# +# Use an updated defconfig which includes the flash driver +# The flash driver quality doesn't allow it to be a part of the main kernel +# +do_configure_prepend() { + install -m 0644 ${WORKDIR}/titan-config ${S}/arch/sh/configs/titan_defconfig + yes '' | oe_runmake titan_defconfig +} + +# +# Should I make the nfs boot image? +# +#do_deploy_titan() { +# To NFS boot you need to objcopy the image... +# ${HOST_PREFIX}objcopy -O binary -R .note -R .comment -S arch/sh/boot/compressed/vmlinux ${DEPLOY_DIR}/linux.bin +#} +#addtask deploy before do_build after do_compile -- cgit v1.2.3 From d9b77064129417d1800c7aca13fa255cbdec8c2c Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Thu, 6 Jul 2006 14:46:06 +0000 Subject: glibc 2.4: Remove the workaround from CVS changes. This isn't a CVS version so the workaround shouldn't be needed. Also this work around breaks glibc 2.4 for all targets that are no in ports (x86, sh, sparc, powerpc). --- packages/glibc/glibc_2.4.bb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'packages') diff --git a/packages/glibc/glibc_2.4.bb b/packages/glibc/glibc_2.4.bb index 45174d0551..b8163012ec 100644 --- a/packages/glibc/glibc_2.4.bb +++ b/packages/glibc/glibc_2.4.bb @@ -114,14 +114,6 @@ do_munge() { rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/fenv.h # Obsoleted by sysdeps/gnu/bits/utmp.h rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/utmp.h - - # http://www.handhelds.org/hypermail/oe/51/5135.html - # Some files were moved around between directories on - # 2005-12-21, which means that any attempt to check out - # from CVS using a datestamp older than that will be doomed. - # - # This is a workaround for that problem. - rm -rf ${S}/bits } addtask munge before do_patch after do_unpack -- cgit v1.2.3 From d2ff879f1ef977b4aa9204f73c22af345ecdd737 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Thu, 6 Jul 2006 14:55:19 +0000 Subject: ssmtp 2.61: Dont use -s to install so it doesn't attemp to use the host strip during do_install. OE will take care of running the target strip during packaging. --- packages/ssmtp/ssmtp-2.61/dont-strip.patch | 14 ++++++++++++++ packages/ssmtp/ssmtp_2.61.bb | 1 + 2 files changed, 15 insertions(+) create mode 100644 packages/ssmtp/ssmtp-2.61/dont-strip.patch (limited to 'packages') diff --git a/packages/ssmtp/ssmtp-2.61/dont-strip.patch b/packages/ssmtp/ssmtp-2.61/dont-strip.patch new file mode 100644 index 0000000000..5071633ad8 --- /dev/null +++ b/packages/ssmtp/ssmtp-2.61/dont-strip.patch @@ -0,0 +1,14 @@ +Don't try and strip ssmtp during install as this tries to run the native +strip rather than strip for the target platform. + +--- ssmtp-2.61/Makefile.in 2006/07/04 04:43:06 1.1 ++++ ssmtp-2.61/Makefile.in 2006/07/04 04:43:17 +@@ -48,7 +48,7 @@ + .PHONY: install + install: ssmtp $(GEN_CONFIG) + $(INSTALL) -d -m 755 $(bindir) +- $(INSTALL) -s -m 755 ssmtp $(bindir)/ssmtp ++ $(INSTALL) -m 755 ssmtp $(bindir)/ssmtp + $(INSTALL) -d -m 755 $(mandir) + $(INSTALL) -m 644 $(srcdir)/ssmtp.8 $(mandir)/ssmtp.8 + $(INSTALL) -d -m 755 $(SSMTPCONFDIR) diff --git a/packages/ssmtp/ssmtp_2.61.bb b/packages/ssmtp/ssmtp_2.61.bb index 0f208da2df..6a4a94a0e3 100644 --- a/packages/ssmtp/ssmtp_2.61.bb +++ b/packages/ssmtp/ssmtp_2.61.bb @@ -9,6 +9,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/s/ssmtp/ssmtp_${PV}.orig.tar.gz \ file://ldflags.patch;patch=1 \ file://configure.patch;patch=1 \ file://libs-lcrypto.patch;patch=1 \ + file://dont-strip.patch;patch=1 \ file://ssmtp.conf" S = "${WORKDIR}/${PN}-2.61" LICENSE = "GPL" -- cgit v1.2.3 From 4fb67e9bbd384d86e3fb66bb8ac1ae665c0fac6a Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Thu, 6 Jul 2006 16:06:09 +0000 Subject: gpe-timesheet: Add missing dependency for latest release. --- packages/gpe-timesheet/gpe-timesheet_0.30.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/gpe-timesheet/gpe-timesheet_0.30.bb b/packages/gpe-timesheet/gpe-timesheet_0.30.bb index c23c963446..ba97388877 100644 --- a/packages/gpe-timesheet/gpe-timesheet_0.30.bb +++ b/packages/gpe-timesheet/gpe-timesheet_0.30.bb @@ -4,7 +4,7 @@ inherit autotools gpe DESCRIPTION = "GPE time tracker" GPE_TARBALL_SUFFIX = "bz2" MAINTAINER = "Florian Boor " -DEPENDS = "libgpewidget gtk+ sqlite" +DEPENDS = "libgpewidget gtk+ sqlite libtododb" SECTION = "gpe" RDEPENDS = "gpe-icons" - \ No newline at end of file +PR = "r1" -- cgit v1.2.3 From 69a036d33297839393fb3949f56de23f5ab97b34 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 6 Jul 2006 16:31:14 +0000 Subject: busybox 1.2.0: add it, closes #745 --- packages/busybox/busybox-1.2.0/.mtn2git_empty | 0 .../busybox/busybox-1.2.0/add-getkey-applet.patch | 167 ++++++ packages/busybox/busybox-1.2.0/below.patch | 46 ++ packages/busybox/busybox-1.2.0/defconfig | 597 +++++++++++++++++++++ packages/busybox/busybox-1.2.0/dhcp-hostname.patch | 30 ++ packages/busybox/busybox-1.2.0/dhcpretrytime.patch | 85 +++ packages/busybox/busybox-1.2.0/fbset.patch | 24 + packages/busybox/busybox-1.2.0/hdparm_M.patch | 47 ++ .../busybox-1.2.0/ifupdown-spurious-environ.patch | 12 + .../busybox-1.2.0/iproute-flush-cache.patch | 23 + .../busybox/busybox-1.2.0/mount-all-type.patch | 84 +++ .../busybox/busybox-1.2.0/nylon/.mtn2git_empty | 0 packages/busybox/busybox-1.2.0/nylon/defconfig | 458 ++++++++++++++++ .../busybox/busybox-1.2.0/openmn/.mtn2git_empty | 0 packages/busybox/busybox-1.2.0/openmn/defconfig | 475 ++++++++++++++++ .../busybox/busybox-1.2.0/openslug/.mtn2git_empty | 0 packages/busybox/busybox-1.2.0/openslug/defconfig | 461 ++++++++++++++++ .../busybox-1.2.0/openslug/udhcpscript.patch | 133 +++++ packages/busybox/busybox-1.2.0/readlink.patch | 85 +++ packages/busybox/busybox-1.2.0/rmmod.patch | 40 ++ .../busybox/busybox-1.2.0/sparc/.mtn2git_empty | 0 packages/busybox/busybox-1.2.0/sparc/defconfig | 467 ++++++++++++++++ .../busybox-1.2.0/udhcppidfile-breakage.patch | 57 ++ packages/busybox/busybox-1.2.0/udhcppidfile.patch | 274 ++++++++++ packages/busybox/busybox-1.2.0/udhcpscript.patch | 17 + .../busybox/busybox-1.2.0/wrt54/.mtn2git_empty | 0 packages/busybox/busybox-1.2.0/wrt54/defconfig | 476 ++++++++++++++++ packages/busybox/busybox_1.2.0.bb | 162 ++++++ 28 files changed, 4220 insertions(+) create mode 100644 packages/busybox/busybox-1.2.0/.mtn2git_empty create mode 100644 packages/busybox/busybox-1.2.0/add-getkey-applet.patch create mode 100644 packages/busybox/busybox-1.2.0/below.patch create mode 100644 packages/busybox/busybox-1.2.0/defconfig create mode 100644 packages/busybox/busybox-1.2.0/dhcp-hostname.patch create mode 100644 packages/busybox/busybox-1.2.0/dhcpretrytime.patch create mode 100644 packages/busybox/busybox-1.2.0/fbset.patch create mode 100644 packages/busybox/busybox-1.2.0/hdparm_M.patch create mode 100644 packages/busybox/busybox-1.2.0/ifupdown-spurious-environ.patch create mode 100644 packages/busybox/busybox-1.2.0/iproute-flush-cache.patch create mode 100644 packages/busybox/busybox-1.2.0/mount-all-type.patch create mode 100644 packages/busybox/busybox-1.2.0/nylon/.mtn2git_empty create mode 100644 packages/busybox/busybox-1.2.0/nylon/defconfig create mode 100644 packages/busybox/busybox-1.2.0/openmn/.mtn2git_empty create mode 100644 packages/busybox/busybox-1.2.0/openmn/defconfig create mode 100644 packages/busybox/busybox-1.2.0/openslug/.mtn2git_empty create mode 100644 packages/busybox/busybox-1.2.0/openslug/defconfig create mode 100644 packages/busybox/busybox-1.2.0/openslug/udhcpscript.patch create mode 100644 packages/busybox/busybox-1.2.0/readlink.patch create mode 100644 packages/busybox/busybox-1.2.0/rmmod.patch create mode 100644 packages/busybox/busybox-1.2.0/sparc/.mtn2git_empty create mode 100644 packages/busybox/busybox-1.2.0/sparc/defconfig create mode 100644 packages/busybox/busybox-1.2.0/udhcppidfile-breakage.patch create mode 100644 packages/busybox/busybox-1.2.0/udhcppidfile.patch create mode 100644 packages/busybox/busybox-1.2.0/udhcpscript.patch create mode 100644 packages/busybox/busybox-1.2.0/wrt54/.mtn2git_empty create mode 100644 packages/busybox/busybox-1.2.0/wrt54/defconfig create mode 100644 packages/busybox/busybox_1.2.0.bb (limited to 'packages') diff --git a/packages/busybox/busybox-1.2.0/.mtn2git_empty b/packages/busybox/busybox-1.2.0/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/busybox/busybox-1.2.0/add-getkey-applet.patch b/packages/busybox/busybox-1.2.0/add-getkey-applet.patch new file mode 100644 index 0000000000..a75cf823c7 --- /dev/null +++ b/packages/busybox/busybox-1.2.0/add-getkey-applet.patch @@ -0,0 +1,167 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +Index: busybox-1.1.0/console-tools/getkey.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ busybox-1.1.0/console-tools/getkey.c 2006-03-14 17:17:28.000000000 +0100 +@@ -0,0 +1,94 @@ ++/* vi: set sw=4 ts=4: */ ++/* ++ * getkey.c - Michael 'Mickey' Lauer ++ * ++ * Version 0.1 ++ * ++ * A simple keygrapper. Displays a configurable message and waits a dedicated number ++ * of seconds for a keypress. Sets the exit code accordingly (SUCCESS on keypress). ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "busybox.h" ++ ++extern int getkey_main(int argc, char **argv) ++{ ++ int status = EXIT_FAILURE; ++ ++ if ( argc < 2 ) ++ { ++ bb_show_usage(); ++ } ++ ++ /* ++ * If no terminal is attached it is quite useless ++ * to treat it like one. ++ */ ++ if( !isatty(STDIN_FILENO) ) ++ { ++ goto error_hard; ++ } ++ ++ //bb_printf( "DEBUG: time = '%s'\n", argv[1] ); ++ //bb_printf( "DEBUG: mesg = '%s'\n", argv[2] ); ++ ++ struct termios orig; ++ struct termios attr; ++ ++ if ( tcgetattr(STDIN_FILENO, &orig) == -1 ) ++ { ++ goto error_hard; ++ } ++ ++ attr = orig; ++ attr.c_cc[VMIN] = 0; ++ attr.c_cc[VTIME] = 0; ++ attr.c_iflag |= INLCR; ++ attr.c_oflag |= OPOST|ONLCR; ++ attr.c_cflag &= ~PARENB; ++ attr.c_lflag &= ~(ICANON/*|ECHO*/); ++ if ( tcsetattr(STDIN_FILENO,TCSANOW,&attr) == -1 ) ++ { ++ goto error_hard; ++ } ++ ++ fd_set rfds; ++ struct timeval tv; ++ int retval; ++ ++ FD_ZERO(&rfds); ++ FD_SET(0, &rfds); ++ ++ tv.tv_sec = atoi( argv[1] ); ++ tv.tv_usec = 0; ++ ++ if ( argc == 3 ) ++ { ++ bb_printf( argv[2], tv.tv_sec ); ++ bb_printf( "\n" ); ++ fflush(stdout); ++ } ++ retval = select(1, &rfds, NULL, NULL, &tv); ++ if (retval > 0) ++ { ++ status = EXIT_SUCCESS; ++ } ++ ++ if (tcsetattr(STDIN_FILENO,TCSANOW,&orig) == -1 ) ++ { ++ goto error_hard; ++ } ++ ++ return status; ++ ++error_hard : ++ return EXIT_FAILURE; ++}; ++ +Index: busybox-1.1.0/console-tools/Makefile.in +=================================================================== +--- busybox-1.1.0.orig/console-tools/Makefile.in 2006-01-11 06:43:57.000000000 +0100 ++++ busybox-1.1.0/console-tools/Makefile.in 2006-03-14 17:18:18.000000000 +0100 +@@ -21,6 +21,7 @@ + CONSOLETOOLS_DIR-$(CONFIG_OPENVT) += openvt.o + CONSOLETOOLS_DIR-$(CONFIG_RESET) += reset.o + CONSOLETOOLS_DIR-$(CONFIG_SETKEYCODES) += setkeycodes.o ++CONSOLETOOLS_DIR-$(CONFIG_GETKEY) += getkey.o + + libraries-y+=$(CONSOLETOOLS_DIR)$(CONSOLETOOLS_AR) + +Index: busybox-1.1.0/console-tools/Config.in +=================================================================== +--- busybox-1.1.0.orig/console-tools/Config.in 2006-01-11 06:43:57.000000000 +0100 ++++ busybox-1.1.0/console-tools/Config.in 2006-03-14 17:17:28.000000000 +0100 +@@ -31,6 +31,14 @@ + This program dumps the kernel's keyboard translation table to + stdout, in binary format. You can then use loadkmap to load it. + ++config CONFIG_GETKEY ++ bool "getkey" ++ default n ++ help ++ This program displays a configurable message and waits ++ a dedicated number of seconds for a keypress. It sets ++ the exit code accordingly, i.e. SUCCESS if there was a keypress. ++ + config CONFIG_LOADFONT + bool "loadfont" + default n +Index: busybox-1.1.0/include/applets.h +=================================================================== +--- busybox-1.1.0.orig/include/applets.h 2006-01-11 06:44:14.000000000 +0100 ++++ busybox-1.1.0/include/applets.h 2006-03-14 17:17:28.000000000 +0100 +@@ -261,6 +261,9 @@ + #ifdef CONFIG_FUSER + APPLET(fuser, fuser_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) + #endif ++#ifdef CONFIG_GETKEY ++ APPLET(getkey, getkey_main, _BB_DIR_SBIN, _BB_SUID_NEVER) ++#endif + #ifdef CONFIG_GETOPT + APPLET(getopt, getopt_main, _BB_DIR_BIN, _BB_SUID_NEVER) + #endif +Index: busybox-1.1.0/include/usage.h +=================================================================== +--- busybox-1.1.0.orig/include/usage.h 2006-01-11 06:44:14.000000000 +0100 ++++ busybox-1.1.0/include/usage.h 2006-03-14 17:19:11.000000000 +0100 +@@ -841,6 +841,13 @@ + "\t-p, --password Password to be used\n" \ + "\t-P, --port Port number to be used" + ++#define getkey_trivial_usage \ ++ "time [message]" ++#define getkey_full_usage \ ++ "Display a message and wait for a keypress." ++#define getkey_example_usage \ ++ "$ getkey 5 'Press a key within %d seconds to interrupt autoboot.'" ++ + #define fuser_trivial_usage \ + "[options] file OR port/proto" + #define fuser_full_usage \ diff --git a/packages/busybox/busybox-1.2.0/below.patch b/packages/busybox/busybox-1.2.0/below.patch new file mode 100644 index 0000000000..95e8376e46 --- /dev/null +++ b/packages/busybox/busybox-1.2.0/below.patch @@ -0,0 +1,46 @@ +Index: busybox-1.1.0/modutils/modprobe.c +=================================================================== +--- busybox-1.1.0.orig/modutils/modprobe.c 2006-01-11 06:43:56.000000000 +0100 ++++ busybox-1.1.0/modutils/modprobe.c 2006-03-14 16:36:54.000000000 +0100 +@@ -509,6 +509,41 @@ + } + } + } ++ else if ((strncmp (buffer, "below", 5) == 0) && isspace (buffer[5])) { ++ char *mod, *deps; ++ if (parse_tag_value (buffer + 6, &mod, &deps)) { ++ struct dep_t *dt; ++ ++ for (dt = first; dt; dt = dt->m_next) { ++ if (strcmp (dt->m_name, mod) == 0) ++ break; ++ } ++ if (dt) { ++ char *pp; ++ char *name; ++ ++ pp = name = deps; ++ ++ for (;;) { ++ while (*pp != 0 && !isspace (*pp)) ++ pp++; ++ if (isspace (*pp)) ++ *(pp++) = 0; ++ ++ dt->m_depcnt++; ++ dt->m_deparr = (char **) xrealloc (dt->m_deparr, ++ sizeof (char *) * dt->m_depcnt); ++ dt->m_deparr[dt->m_depcnt - 1] = bb_xstrdup (name); ++ ++ while (isspace (*pp)) ++ pp++; ++ name = pp; ++ if (*pp == 0) ++ break; ++ } ++ } ++ } ++ } + } + } + close ( fd ); diff --git a/packages/busybox/busybox-1.2.0/defconfig b/packages/busybox/busybox-1.2.0/defconfig new file mode 100644 index 0000000000..017e9d274c --- /dev/null +++ b/packages/busybox/busybox-1.2.0/defconfig @@ -0,0 +1,597 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +# CONFIG_FEATURE_VERBOSE_USAGE is not set +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +# CONFIG_FEATURE_DEVFS is not set +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_SUID is not set +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +CONFIG_LFS=y +# USING_CROSS_COMPILER is not set +CROSS_COMPILER_PREFIX="" +EXTRA_CFLAGS_OPTIONS="" +CONFIG_FEATURE_SUSv2=y +CONFIG_FEATURE_SUSv2_OBSOLETE=y + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +PREFIX="./_install" + +# +# Archival Utilities +# +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_BUNZIP2=y +CONFIG_CPIO=y +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GUNZIP=y +# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNZIP=y + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set +# CONFIG_FEATURE_DEB_TAR_GZ is not set +# CONFIG_FEATURE_DEB_TAR_BZ2 is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +# CONFIG_CMP is not set +# CONFIG_COMM is not set +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y + +# +# date (forced enabled for use with watch) +# +# CONFIG_FEATURE_DATE_ISOFMT is not set +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +# CONFIG_UNIX2DOS is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_EXPR=y +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +CONFIG_ID=y +# CONFIG_INSTALL is not set +# CONFIG_LENGTH is not set +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +# CONFIG_FEATURE_LS_RECURSIVE is not set +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +# CONFIG_NICE is not set +# CONFIG_NOHUP is not set +CONFIG_OD=y +# CONFIG_PRINTENV is not set +CONFIG_PRINTF=y +CONFIG_PWD=y +# CONFIG_REALPATH is not set +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +# CONFIG_STAT is not set +# CONFIG_FEATURE_STAT_FORMAT is not set +CONFIG_STTY=y +# CONFIG_SUM is not set +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +CONFIG_TEST=y + +# +# test (forced enabled for use with shell) +# +# CONFIG_FEATURE_TEST_64 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +# CONFIG_FEATURE_TR_CLASSES is not set +# CONFIG_FEATURE_TR_EQUIV is not set +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +CONFIG_WATCH=y +CONFIG_WC=y +CONFIG_WHO=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_SETCONSOLE=y +# CONFIG_SETKEYCODES is not set + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_RUN_PARTS=y +CONFIG_START_STOP_DAEMON=y +CONFIG_WHICH=y + +# +# Linux Ext2 FS Progs +# +# CONFIG_CHATTR is not set +CONFIG_E2FSCK=y +CONFIG_FSCK=y +# CONFIG_LSATTR is not set +CONFIG_MKE2FS=y +# CONFIG_TUNE2FS is not set +# CONFIG_E2LABEL is not set +# CONFIG_FINDFS is not set + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +# CONFIG_PATCH is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_NEWER=y +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set +# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set +# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set + +# +# Init Utilities +# +# CONFIG_INIT is not set +# CONFIG_FEATURE_USE_INITTAB is not set +# CONFIG_FEATURE_INITRD is not set +# CONFIG_FEATURE_INIT_COREDUMPS is not set +# CONFIG_FEATURE_INIT_SCTTY is not set +# CONFIG_FEATURE_EXTRA_QUIET is not set +# CONFIG_HALT is not set +# CONFIG_MESG is not set +# CONFIG_POWEROFF is not set +# CONFIG_REBOOT is not set + +# +# Login/Password Management Utilities +# +# CONFIG_FEATURE_SHADOWPASSWDS is not set +# CONFIG_USE_BB_SHADOW is not set +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_ADDGROUP is not set +# CONFIG_DELGROUP is not set +# CONFIG_ADDUSER is not set +# CONFIG_DELUSER is not set +# CONFIG_GETTY is not set +CONFIG_FEATURE_UTMP=y +# CONFIG_FEATURE_WTMP is not set +# CONFIG_LOGIN is not set +# CONFIG_FEATURE_SECURETTY is not set +# CONFIG_PASSWD is not set +# CONFIG_SU is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_CROND is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +# CONFIG_CRONTAB is not set +CONFIG_DC=y +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_EJECT is not set +# CONFIG_LAST is not set +CONFIG_LESS=y +CONFIG_FEATURE_LESS_BRACKETS=y +CONFIG_FEATURE_LESS_FLAGS=y +# CONFIG_FEATURE_LESS_FLAGCS is not set +# CONFIG_FEATURE_LESS_MARKS is not set +# CONFIG_FEATURE_LESS_REGEXP is not set +# CONFIG_HDPARM is not set +# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +# CONFIG_FEATURE_MAKEDEVS_TABLE is not set +# CONFIG_MOUNTPOINT is not set +# CONFIG_MT is not set +# BB_APPLET_RUNLEVEL is not set +# CONFIG_RX is not set +CONFIG_STRINGS=y +# CONFIG_SETSID is not set +# CONFIG_TIME is not set +# CONFIG_WATCHDOG is not set + +# +# Linux Module Utilities +# +CONFIG_INSMOD=y +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS=y +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +CONFIG_FEATURE_INSMOD_LOAD_MAP=y +CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL=y +CONFIG_RMMOD=y +CONFIG_LSMOD=y +# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set +CONFIG_MODPROBE=y +CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y + +# +# Options common to multiple modutils +# +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y +CONFIG_FEATURE_2_4_MODULES=y +CONFIG_FEATURE_2_6_MODULES=y +# CONFIG_FEATURE_QUERY_MODULE_INTERFACE is not set + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +# CONFIG_ARPING is not set +# CONFIG_ETHER_WAKE is not set +# CONFIG_FAKEIDENTD is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +CONFIG_IFUPDOWN=y +# CONFIG_FEATURE_IFUPDOWN_IP is not set +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +# CONFIG_INETD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO is not set +# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN is not set +# CONFIG_FEATURE_INETD_RPC is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_NAMEIF is not set +CONFIG_NC=y +# CONFIG_NC_GAPING_SECURITY_HOLE is not set +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING6=y +CONFIG_ROUTE=y +CONFIG_TELNET=y +# CONFIG_FEATURE_TELNET_TTYPE is not set +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_INETD is not set +CONFIG_TFTP=y +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set +# CONFIG_FEATURE_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_VCONFIG is not set +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_IP6_LITERAL=y + +# +# udhcp Server/Client +# +CONFIG_UDHCPD=y +CONFIG_UDHCPC=y +# CONFIG_DUMPLEASES is not set +CONFIG_FEATURE_UDHCP_SYSLOG=y +# CONFIG_FEATURE_UDHCP_DEBUG is not set +# CONFIG_ZCIP is not set + +# +# Process Utilities +# +CONFIG_FREE=y +# CONFIG_FUSER is not set +CONFIG_KILL=y +CONFIG_KILLALL=y +# CONFIG_PIDOF is not set +# CONFIG_FEATURE_PIDOF_SINGLE is not set +# CONFIG_FEATURE_PIDOF_OMIT is not set +CONFIG_PS=y +# CONFIG_FEATURE_PS_WIDE is not set +CONFIG_RENICE=y +# CONFIG_BB_SYSCTL is not set +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y + +# +# Shells +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_JOB_CONTROL=y +# CONFIG_ASH_READ_NCHARS is not set +# CONFIG_ASH_READ_TIMEOUT is not set +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_MATH_SUPPORT_64 is not set +CONFIG_ASH_GETOPTS=y +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_BUILTIN_ECHO is not set +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_ASH_EXPAND_PRMT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +CONFIG_FEATURE_COMMAND_EDITING=y +# CONFIG_FEATURE_COMMAND_EDITING_VI is not set +CONFIG_FEATURE_COMMAND_HISTORY=63 +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +CONFIG_FEATURE_SH_FANCY_PROMPT=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +# CONFIG_FEATURE_FBSET_READMODE is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FREERAMDISK is not set +CONFIG_FSCK_MINIX=y +CONFIG_MKFS_MINIX=y + +# +# Minix filesystem support +# +CONFIG_FEATURE_MINIX2=y +# CONFIG_GETOPT is not set +CONFIG_HEXDUMP=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONGOPTIONS=y +CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y +# CONFIG_IPCRM is not set +# CONFIG_IPCS is not set +CONFIG_LOSETUP=y +# CONFIG_MDEV is not set +# CONFIG_FEATURE_MDEV_CONF is not set +CONFIG_MKSWAP=y +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_PIVOT_ROOT=y +# CONFIG_SWITCH_ROOT is not set +CONFIG_RDATE=y +# CONFIG_READPROFILE is not set +CONFIG_SWAPONOFF=y +CONFIG_MOUNT=y +# CONFIG_FEATURE_MOUNT_NFS is not set +CONFIG_UMOUNT=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_NO_DEBUG_LIB is not set +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set diff --git a/packages/busybox/busybox-1.2.0/dhcp-hostname.patch b/packages/busybox/busybox-1.2.0/dhcp-hostname.patch new file mode 100644 index 0000000000..e0adea662e --- /dev/null +++ b/packages/busybox/busybox-1.2.0/dhcp-hostname.patch @@ -0,0 +1,30 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- busybox-1.01/networking/udhcp/dhcpc.c~dhcp-hostname ++++ busybox-1.01/networking/udhcp/dhcpc.c +@@ -193,6 +193,7 @@ + int max_fd; + int sig; + int no_clientid = 0; ++ char hostbuf[256]; /* SUSv2: hostnames are <= 255 bytes */ + + static const struct option arg_options[] = { + {"clientid", required_argument, 0, 'c'}, +@@ -211,6 +212,14 @@ + {0, 0, 0, 0} + }; + ++ if (gethostname (hostbuf, sizeof (hostbuf)) == 0) { ++ len = strlen (hostbuf); ++ client_config.hostname = xmalloc (len + 2); ++ client_config.hostname[OPT_CODE] = DHCP_HOST_NAME; ++ client_config.hostname[OPT_LEN] = len; ++ strncpy(client_config.hostname + 2, hostbuf, len); ++ } ++ + /* get options */ + while (1) { + int option_index = 0; diff --git a/packages/busybox/busybox-1.2.0/dhcpretrytime.patch b/packages/busybox/busybox-1.2.0/dhcpretrytime.patch new file mode 100644 index 0000000000..893e346acf --- /dev/null +++ b/packages/busybox/busybox-1.2.0/dhcpretrytime.patch @@ -0,0 +1,85 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +Index: busybox-1.1.0/networking/udhcp/dhcpc.c +=================================================================== +--- busybox-1.1.0.orig/networking/udhcp/dhcpc.c 2006-03-14 17:19:31.000000000 +0100 ++++ busybox-1.1.0/networking/udhcp/dhcpc.c 2006-03-14 17:20:45.000000000 +0100 +@@ -48,6 +48,7 @@ + static unsigned long requested_ip; /* = 0 */ + static unsigned long server_addr; + static unsigned long timeout; ++static unsigned long retrytime = 60; + static int packet_num; /* = 0 */ + static int fd = -1; + +@@ -95,6 +96,7 @@ + " -r, --request=IP IP address to request (default: none)\n" + " -s, --script=file Run file at dhcp events (default:\n" + " " DEFAULT_SCRIPT ")\n" ++" -t, --retrytime time to retry DHCP request (default 60s)\n") + " -v, --version Display version\n" + ); + exit(0); +@@ -214,6 +216,7 @@ + {"quit", no_argument, 0, 'q'}, + {"request", required_argument, 0, 'r'}, + {"script", required_argument, 0, 's'}, ++ {"retrytime", required_argument, 0, 't'}, + {"version", no_argument, 0, 'v'}, + {0, 0, 0, 0} + }; +@@ -229,7 +232,7 @@ + /* get options */ + while (1) { + int option_index = 0; +- c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qr:s:v", arg_options, &option_index); ++ c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qr:s:t:v", arg_options, &option_index); + if (c == -1) break; + + switch (c) { +@@ -305,6 +308,9 @@ + case 's': + client_config.script = optarg; + break; ++ case 't': ++ retrytime = atol(optarg); ++ break; + case 'v': + printf("udhcpcd, version %s\n\n", VERSION); + return 0; +@@ -394,7 +400,7 @@ + } + /* wait to try again */ + packet_num = 0; +- timeout = now + 60; ++ timeout = now + retrytime; + } + break; + case RENEW_REQUESTED: +Index: busybox-1.1.0/networking/ifupdown.c +=================================================================== +--- busybox-1.1.0.orig/networking/ifupdown.c 2006-01-11 06:43:51.000000000 +0100 ++++ busybox-1.1.0/networking/ifupdown.c 2006-03-14 17:19:41.000000000 +0100 +@@ -506,7 +506,7 @@ + static int dhcp_up(struct interface_defn_t *ifd, execfn *exec) + { + if (execable("/sbin/udhcpc")) { +- return( execute("udhcpc -n -p /var/run/udhcpc.%iface%.pid -i " ++ return( execute("udhcpc -b -p /var/run/udhcpc.%iface%.pid -i " + "%iface% [[-H %hostname%]] [[-c %clientid%]]", ifd, exec)); + } else if (execable("/sbin/pump")) { + return( execute("pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]]", ifd, exec)); +@@ -526,8 +526,8 @@ + /* SIGUSR2 forces udhcpc to release the current lease and go inactive, + * and SIGTERM causes udhcpc to exit. Signals are queued and processed + * sequentially so we don't need to sleep */ +- result = execute("kill -USR2 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec); +- result += execute("kill -TERM `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec); ++ result = execute("kill -USR2 `cat /var/run/udhcpc.%iface%.pid 2>/dev/null` 2>/dev/null", ifd, exec); ++ result += execute("kill -TERM `cat /var/run/udhcpc.%iface%.pid 2>/dev/null` 2>/dev/null", ifd, exec); + } else if (execable("/sbin/pump")) { + result = execute("pump -i %iface% -k", ifd, exec); + } else if (execable("/sbin/dhclient")) { diff --git a/packages/busybox/busybox-1.2.0/fbset.patch b/packages/busybox/busybox-1.2.0/fbset.patch new file mode 100644 index 0000000000..d0609ce6f7 --- /dev/null +++ b/packages/busybox/busybox-1.2.0/fbset.patch @@ -0,0 +1,24 @@ +--- busybox/util-linux/fbset.c~ 2004-07-03 16:24:23.000000000 +0100 ++++ busybox/util-linux/fbset.c 2004-12-30 20:09:26.000000000 +0000 +@@ -337,7 +337,7 @@ + { + struct fb_var_screeninfo var, varset; + int fh, i; +- char *fbdev = DEFAULTFBDEV; ++ char *fbdev = NULL; + char *modefile = DEFAULTFBMODE; + char *thisarg, *mode = NULL; + +@@ -404,7 +404,12 @@ + } + } + ++ if (fbdev == NULL) ++ fbdev = DEFAULTFBDEV; + if ((fh = open(fbdev, O_RDONLY)) < 0) ++#ifdef CONFIG_FEATURE_DEVFS ++ if ((fh = open("/dev/fb0", O_RDONLY)) < 0) ++#endif + bb_perror_msg_and_die("fbset(open)"); + if (ioctl(fh, FBIOGET_VSCREENINFO, &var)) + bb_perror_msg_and_die("fbset(ioctl)"); diff --git a/packages/busybox/busybox-1.2.0/hdparm_M.patch b/packages/busybox/busybox-1.2.0/hdparm_M.patch new file mode 100644 index 0000000000..9adcd36f92 --- /dev/null +++ b/packages/busybox/busybox-1.2.0/hdparm_M.patch @@ -0,0 +1,47 @@ +Index: busybox-1.1.0/miscutils/hdparm.c +=================================================================== +--- busybox-1.1.0.orig/miscutils/hdparm.c 2006-01-11 06:44:13.000000000 +0100 ++++ busybox-1.1.0/miscutils/hdparm.c 2006-03-14 17:22:22.000000000 +0100 +@@ -1255,6 +1255,7 @@ + static unsigned long set_sleepnow, get_sleepnow; + static unsigned long get_powermode; + static unsigned long set_apmmode, get_apmmode, apmmode; ++static unsigned long set_acoustic = 0, get_acoustic = 0, acoustic = 0; + #endif + #ifdef CONFIG_FEATURE_HDPARM_GET_IDENTITY + static int get_IDentity; +@@ -2124,6 +2125,20 @@ + } + bb_ioctl(fd, HDIO_DRIVE_CMD, &args,"HDIO_DRIVE_CMD"); + } ++ if (set_acoustic) ++ { ++ no_scsi(); ++ acoustic=check_if_min_and_set_val(acoustic,0); ++ acoustic=check_if_maj_and_set_val(acoustic,254); ++ if_printf(get_acoustic," setting AAM level to 0x%02lX (%ld)\n", acoustic, acoustic); ++ bb_ioctl(fd, HDIO_SET_ACOUSTIC, (int*)acoustic,"HDIO_SET_ACOUSTIC"); ++ } ++ if (get_acoustic) ++ { ++ no_scsi(); ++ bb_ioctl(fd, HDIO_GET_ACOUSTIC, (unsigned long*)&parm,"HDIO_GET_ACOUSTIC"); ++ printf(" acoustic = %2ld (128=quiet ... 254=fast)\n", parm); ++ } + if (set_wcache) + { + #ifdef DO_FLUSHCACHE +@@ -2832,6 +2847,13 @@ + p = *argv++, --argc; + p=GET_NUMBER(p,&set_readahead,&Xreadahead); + break; ++ case 'M': ++ get_acoustic = noisy; ++ noisy = 1; ++ if (!*p && argc && isalnum(**argv)) ++ p = *argv++, --argc; ++ p=GET_NUMBER(p,&set_acoustic,&acoustic); ++ break; + case 'B': + get_apmmode = noisy; + noisy = 1; diff --git a/packages/busybox/busybox-1.2.0/ifupdown-spurious-environ.patch b/packages/busybox/busybox-1.2.0/ifupdown-spurious-environ.patch new file mode 100644 index 0000000000..8753315f2c --- /dev/null +++ b/packages/busybox/busybox-1.2.0/ifupdown-spurious-environ.patch @@ -0,0 +1,12 @@ +--- busybox-1.00/networking/ifupdown.c.old 2005-06-11 19:51:59.000000000 +0100 ++++ busybox-1.00/networking/ifupdown.c 2005-06-11 19:52:19.000000000 +0100 +@@ -148,6 +148,9 @@ + struct mapping_defn_t *mappings; + }; + ++/* XXX */ ++#define environ local_environ ++ + static char no_act = 0; + static char verbose = 0; + static char **environ = NULL; diff --git a/packages/busybox/busybox-1.2.0/iproute-flush-cache.patch b/packages/busybox/busybox-1.2.0/iproute-flush-cache.patch new file mode 100644 index 0000000000..f8becc3390 --- /dev/null +++ b/packages/busybox/busybox-1.2.0/iproute-flush-cache.patch @@ -0,0 +1,23 @@ +Index: networking/libiproute/iproute.c +=================================================================== +RCS file: /var/cvs/busybox/networking/libiproute/iproute.c,v +retrieving revision 1.14 +diff -u -r1.14 iproute.c +--- networking/libiproute/iproute.c 11 Aug 2004 08:10:58 -0000 1.14 ++++ networking/libiproute/iproute.c 30 Nov 2004 20:43:44 -0000 +@@ -537,6 +537,15 @@ + } else if (matches(*argv, "match") == 0) { + NEXT_ARG(); + get_prefix(&filter.mdst, *argv, do_ipv6); ++ } else if (matches(*argv, "table") == 0) { ++ NEXT_ARG(); ++ if (matches(*argv, "cache") == 0) { ++ filter.tb = -1; ++ } else if (matches(*argv, "main") != 0) { ++ invarg("invalid \"table\"", *argv); ++ } ++ } else if (matches(*argv, "cache") == 0) { ++ filter.tb = -1; + } else { + if (matches(*argv, "exact") == 0) { + NEXT_ARG(); diff --git a/packages/busybox/busybox-1.2.0/mount-all-type.patch b/packages/busybox/busybox-1.2.0/mount-all-type.patch new file mode 100644 index 0000000000..476094a804 --- /dev/null +++ b/packages/busybox/busybox-1.2.0/mount-all-type.patch @@ -0,0 +1,84 @@ +--- busybox-1.00/.pc/mount-all-type.patch/util-linux/mount.c 2004-08-02 17:14:02.000000000 -0700 ++++ busybox-1.00/util-linux/mount.c 2005-05-13 00:17:19.054232796 -0700 +@@ -364,6 +364,56 @@ + exit(EXIT_SUCCESS); + } + ++/* Does this file system type, from /etc/fstab, match the given ++ * -t option value? ++ */ ++static int match_fs(const char *option, const char *type) ++{ ++ const int len = strlen(type); ++ const int no = option[0] == 'n' && option[1] == 'o'; ++ const char *optp = option; ++ ++ if (len > 0) do { ++ const char *match = strstr(optp, type); ++ ++ if (match == NULL) { ++ /* No match, but if the option string starts 'no' no match ++ * means yes. ++ */ ++ return no; ++ } ++ ++ /* Match, may be partial, check for end-of-type in option string. */ ++ if (match[len] == 0 || match[len] == ',') { ++ /* Ok, check for type or notype. */ ++ if (match == option) { ++ /* Exact match at start (can't be 'no') */ ++ return 1; ++ } ++ if (match > option+1) { ++ if (match[-1] == ',') { ++ /* Exact match in middle, might be 'no' */ ++ return !no; ++ } ++ if (match == option+2 && no) { ++ /* Exact match to 'notype' at start. */ ++ return 0; ++ } ++ if (match > option+2 && match[-3] == ',' && ++ match[-2] == 'n' && match[-1] == 'o') { ++ return 0; ++ } ++ } ++ } ++ ++ /* Look for another match. */ ++ optp = match+1; ++ } while (1); ++ ++ /* zero length type in fstab (impossible?), don't match it. */ ++ return 0; ++} ++ + extern int mount_main(int argc, char **argv) + { + struct stat statbuf; +@@ -371,6 +421,7 @@ + char *extra_opts; + int flags = 0; + char *filesystemType = "auto"; ++ char *filesystemOption = 0; + int got_filesystemType = 0; + char *device = xmalloc(PATH_MAX); + char *directory = xmalloc(PATH_MAX); +@@ -393,6 +444,7 @@ + break; + case 't': + filesystemType = optarg; ++ filesystemOption = optarg; + got_filesystemType = 1; + break; + case 'w': +@@ -460,6 +512,8 @@ + + strcpy(device, m->mnt_fsname); + strcpy(directory, m->mnt_dir); ++ if (all && filesystemOption != 0 && !match_fs(filesystemOption, m->mnt_type)) ++ continue; + filesystemType = bb_xstrdup(m->mnt_type); + singlemount: + extra_opts = string_flags; diff --git a/packages/busybox/busybox-1.2.0/nylon/.mtn2git_empty b/packages/busybox/busybox-1.2.0/nylon/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/busybox/busybox-1.2.0/nylon/defconfig b/packages/busybox/busybox-1.2.0/nylon/defconfig new file mode 100644 index 0000000000..599051bafb --- /dev/null +++ b/packages/busybox/busybox-1.2.0/nylon/defconfig @@ -0,0 +1,458 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_FEATURE_DEVFS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +CONFIG_FEATURE_SUID=y +CONFIG_FEATURE_SUID_CONFIG=y +CONFIG_FEATURE_SUID_CONFIG_QUIET=y +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_LFS is not set +# USING_CROSS_COMPILER is not set +EXTRA_CFLAGS_OPTIONS="" + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +PREFIX="./_install" + +# +# Archival Utilities +# +CONFIG_AR=y +CONFIG_FEATURE_AR_LONG_FILENAMES=y +CONFIG_BUNZIP2=y +CONFIG_CPIO=y +CONFIG_DPKG=y +CONFIG_DPKG_DEB=y +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GUNZIP=y +CONFIG_FEATURE_GUNZIP_UNCOMPRESS=y +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +CONFIG_FEATURE_TAR_COMPRESS=y +CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_UNCOMPRESS=y +CONFIG_UNZIP=y + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set + +# +# Common options for dpkg and dpkg_deb +# +CONFIG_FEATURE_DEB_TAR_GZ=y +CONFIG_FEATURE_DEB_TAR_BZ2=y + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAL=y +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +CONFIG_CMP=y +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y + +# +# date (forced enabled for use with watch) +# +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_EXPR=y +CONFIG_FALSE=y +CONFIG_FOLD=y +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_HOSTID=y +CONFIG_ID=y +CONFIG_INSTALL=y +CONFIG_LENGTH=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_OD=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_SORT=y +CONFIG_STTY=y +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +# CONFIG_TEST is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +CONFIG_USLEEP=y +CONFIG_UUDECODE=y +CONFIG_UUENCODE=y +CONFIG_WATCH=y +CONFIG_WC=y +CONFIG_WHO=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +# CONFIG_CHVT is not set +CONFIG_CLEAR=y +# CONFIG_DEALLOCVT is not set +CONFIG_DUMPKMAP=y +CONFIG_GETKEY=y +# CONFIG_LOADFONT is not set +CONFIG_LOADKMAP=y +# CONFIG_OPENVT is not set +CONFIG_RESET=y +CONFIG_SETKEYCODES=y + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +CONFIG_PIPE_PROGRESS=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_RUN_PARTS=y +CONFIG_START_STOP_DAEMON=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +CONFIG_PATCH=y +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_NEWER=y +CONFIG_FEATURE_FIND_INUM=y +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +# CONFIG_INIT is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +# CONFIG_REBOOT is not set +# CONFIG_MESG is not set + +# +# Login/Password Management Utilities +# +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_ADDGROUP is not set +# CONFIG_DELGROUP is not set +# CONFIG_ADDUSER is not set +# CONFIG_DELUSER is not set +# CONFIG_GETTY is not set +CONFIG_FEATURE_U_W_TMP=y +# CONFIG_LOGIN is not set +# CONFIG_PASSWD is not set +# CONFIG_SU is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +CONFIG_CROND=y +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_CRONTAB=y +CONFIG_DC=y +# CONFIG_DEVFSD is not set +# CONFIG_LAST is not set +# CONFIG_HDPARM is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_MT is not set +# CONFIG_RX is not set +CONFIG_STRINGS=y +CONFIG_TIME=y +CONFIG_WATCHDOG=y + +# +# Linux Module Utilities +# +# CONFIG_INSMOD is not set +# CONFIG_LSMOD is not set +# CONFIG_MODPROBE is not set +# CONFIG_RMMOD is not set + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +CONFIG_ARPING=y +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +CONFIG_HOSTNAME=y +CONFIG_HTTPD=y +# CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY is not set +CONFIG_FEATURE_HTTPD_BASIC_AUTH=y +CONFIG_FEATURE_HTTPD_AUTH_MD5=y +CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP=y +CONFIG_FEATURE_HTTPD_SETUID=y +CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES=y +CONFIG_FEATURE_HTTPD_CGI=y +CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y +CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y +CONFIG_FEATURE_IFCONFIG_HW=y +CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y +CONFIG_IFUPDOWN=y +# CONFIG_FEATURE_IFUPDOWN_IP is not set +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +CONFIG_INETD=y +CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO=y +CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD=y +CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME=y +CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME=y +CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN=y +# CONFIG_IP is not set +CONFIG_IPCALC=y +CONFIG_FEATURE_IPCALC_FANCY=y +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +CONFIG_NAMEIF=y +CONFIG_NC=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING6=y +CONFIG_ROUTE=y +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +CONFIG_TFTP=y +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +CONFIG_FEATURE_TFTP_BLOCKSIZE=y +# CONFIG_FEATURE_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +CONFIG_FEATURE_TRACEROUTE_VERBOSE=y +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_IP6_LITERAL=y + +# +# udhcp Server/Client +# +CONFIG_UDHCPD=y +CONFIG_UDHCPC=y +CONFIG_DUMPLEASES=y +CONFIG_FEATURE_UDHCP_SYSLOG=y +# CONFIG_FEATURE_UDHCP_DEBUG is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_PIDOF=y +CONFIG_PS=y +CONFIG_RENICE=y +CONFIG_TOP=y +FEATURE_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y +CONFIG_SYSCTL=y + +# +# Another Bourne-like Shell +# +# CONFIG_FEATURE_SH_IS_ASH is not set +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +CONFIG_FEATURE_SH_IS_NONE=y +# CONFIG_ASH is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +CONFIG_FEATURE_FBSET_READMODE=y +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +CONFIG_FREERAMDISK=y +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_GETOPT is not set +CONFIG_HEXDUMP=y +# CONFIG_HWCLOCK is not set +CONFIG_LOSETUP=y +CONFIG_MKSWAP=y +# CONFIG_MORE is not set +CONFIG_PIVOT_ROOT=y +# CONFIG_RDATE is not set +CONFIG_SWAPONOFF=y +CONFIG_MOUNT=y +CONFIG_NFSMOUNT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_MOUNT_FORCE=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/packages/busybox/busybox-1.2.0/openmn/.mtn2git_empty b/packages/busybox/busybox-1.2.0/openmn/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/busybox/busybox-1.2.0/openmn/defconfig b/packages/busybox/busybox-1.2.0/openmn/defconfig new file mode 100644 index 0000000000..f98af91853 --- /dev/null +++ b/packages/busybox/busybox-1.2.0/openmn/defconfig @@ -0,0 +1,475 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +# CONFIG_FEATURE_VERBOSE_USAGE is not set +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_FEATURE_DEVFS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_SUID is not set +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_LFS is not set +# USING_CROSS_COMPILER is not set +EXTRA_CFLAGS_OPTIONS="" + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +PREFIX="./_install" + +# +# Archival Utilities +# +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_BUNZIP2=y +CONFIG_CPIO=y +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +CONFIG_GUNZIP=y +# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNZIP=y + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +CONFIG_CMP=y +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y + +# +# date (forced enabled for use with watch) +# +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_EXPR=y +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +CONFIG_ID=y +# CONFIG_INSTALL is not set +# CONFIG_LENGTH is not set +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +# CONFIG_FEATURE_LS_COLOR is not set +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_OD=y +CONFIG_PRINTF=y +CONFIG_PWD=y +# CONFIG_REALPATH is not set +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +CONFIG_SORT=y +CONFIG_STTY=y +CONFIG_SYNC=y +CONFIG_TAIL=y +# CONFIG_FEATURE_FANCY_TAIL is not set +CONFIG_TEE=y +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +CONFIG_TEST=y + +# +# test (forced enabled for use with shell) +# +# CONFIG_FEATURE_TEST_64 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +CONFIG_USLEEP=y +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +CONFIG_WATCH=y +CONFIG_WC=y +CONFIG_WHO=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_GETKEY=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_SETKEYCODES=y + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_RUN_PARTS=y +CONFIG_START_STOP_DAEMON=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +# CONFIG_PATCH is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_NEWER=y +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set +# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +# CONFIG_INIT is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +# CONFIG_REBOOT is not set +# CONFIG_MESG is not set + +# +# Login/Password Management Utilities +# +# CONFIG_USE_BB_PWD_GRP is not set +CONFIG_ADDGROUP=y +CONFIG_DELGROUP=y +CONFIG_ADDUSER=y +CONFIG_DELUSER=y +CONFIG_GETTY=y +CONFIG_FEATURE_U_W_TMP=y +CONFIG_LOGIN=y +# CONFIG_FEATURE_SECURETTY is not set +CONFIG_PASSWD=y +CONFIG_SU=y +CONFIG_SULOGIN=y +CONFIG_VLOCK=y + +# +# Common options for adduser, deluser, login, su +# +CONFIG_FEATURE_SHADOWPASSWDS=y + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_CROND is not set +# CONFIG_CRONTAB is not set +CONFIG_DC=y +# CONFIG_DEVFSD is not set +# CONFIG_LAST is not set +# CONFIG_HDPARM is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_MT is not set +# CONFIG_RX is not set +CONFIG_STRINGS=y +CONFIG_TIME=y +# CONFIG_WATCHDOG is not set + +# +# Linux Module Utilities +# +CONFIG_INSMOD=y +CONFIG_FEATURE_2_4_MODULES=y +CONFIG_FEATURE_2_6_MODULES=y +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS=y +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +CONFIG_FEATURE_INSMOD_LOAD_MAP=y +CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL=y +CONFIG_LSMOD=y +CONFIG_MODPROBE=y +CONFIG_RMMOD=y +# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set + +# +# Networking Utilities +# +# CONFIG_FEATURE_IPV6 is not set +CONFIG_ARPING=y +# CONFIG_FTPGET is not set +CONFIG_FTPPUT=y +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +CONFIG_IFUPDOWN=y +# CONFIG_FEATURE_IFUPDOWN_IP is not set +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_INETD is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +# CONFIG_FEATURE_IP_TUNNEL is not set +# CONFIG_IPCALC is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_NAMEIF is not set +CONFIG_NC=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_ROUTE=y +CONFIG_TELNET=y +# CONFIG_FEATURE_TELNET_TTYPE is not set +# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set +# CONFIG_TELNETD is not set +# CONFIG_TFTP is not set +CONFIG_TRACEROUTE=y +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_VCONFIG is not set +CONFIG_WGET=y +# CONFIG_FEATURE_WGET_STATUSBAR is not set +CONFIG_FEATURE_WGET_AUTHENTICATION=y +# CONFIG_FEATURE_WGET_IP6_LITERAL is not set + +# +# udhcp Server/Client +# +# CONFIG_UDHCPD is not set +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCP_SYSLOG=y +# CONFIG_FEATURE_UDHCP_DEBUG is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_KILL=y +CONFIG_KILLALL=y +# CONFIG_PIDOF is not set +CONFIG_PS=y +CONFIG_RENICE=y +CONFIG_TOP=y +FEATURE_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y +# CONFIG_SYSCTL is not set + +# +# Another Bourne-like Shell +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_MATH_SUPPORT_64 is not set +CONFIG_ASH_GETOPTS=y +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +CONFIG_FEATURE_COMMAND_EDITING=y +CONFIG_FEATURE_COMMAND_HISTORY=31 +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +CONFIG_FEATURE_SH_FANCY_PROMPT=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +# CONFIG_FEATURE_REMOTE_LOG is not set +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +# CONFIG_FBSET is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +# FDISK_SUPPORT_LARGE_DISKS is not set +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_MINIX is not set +CONFIG_GETOPT=y +CONFIG_HEXDUMP=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONGOPTIONS=y +CONFIG_LOSETUP=y +CONFIG_MKSWAP=y +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_PIVOT_ROOT=y +# CONFIG_RDATE is not set +# CONFIG_SWAPONOFF is not set +CONFIG_MOUNT=y +CONFIG_NFSMOUNT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_MOUNT_FORCE=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/packages/busybox/busybox-1.2.0/openslug/.mtn2git_empty b/packages/busybox/busybox-1.2.0/openslug/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/busybox/busybox-1.2.0/openslug/defconfig b/packages/busybox/busybox-1.2.0/openslug/defconfig new file mode 100644 index 0000000000..7debaeced2 --- /dev/null +++ b/packages/busybox/busybox-1.2.0/openslug/defconfig @@ -0,0 +1,461 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set +CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_FEATURE_DEVFS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_SUID is not set +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +CONFIG_LFS=y +# USING_CROSS_COMPILER is not set +EXTRA_CFLAGS_OPTIONS="" + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +PREFIX="./_install" + +# +# Archival Utilities +# +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_BUNZIP2=y +# CONFIG_CPIO is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +CONFIG_GUNZIP=y +# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNZIP=y + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +# CONFIG_CMP is not set +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y + +# +# date (forced enabled for use with watch) +# +# CONFIG_FEATURE_DATE_ISOFMT is not set +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_EXPR=y +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +CONFIG_ID=y +# CONFIG_INSTALL is not set +# CONFIG_LENGTH is not set +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_OD=y +CONFIG_PRINTF=y +CONFIG_PWD=y +# CONFIG_REALPATH is not set +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +CONFIG_SORT=y +CONFIG_STTY=y +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +CONFIG_TEST=y + +# +# test (forced enabled for use with shell) +# +# CONFIG_FEATURE_TEST_64 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +CONFIG_WATCH=y +CONFIG_WC=y +CONFIG_WHO=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_GETKEY=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +# CONFIG_SETKEYCODES is not set + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_RUN_PARTS=y +CONFIG_START_STOP_DAEMON=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +# CONFIG_PATCH is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +# CONFIG_FIND is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +# CONFIG_XARGS is not set + +# +# Init Utilities +# +# CONFIG_INIT is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +# CONFIG_REBOOT is not set +# CONFIG_MESG is not set + +# +# Login/Password Management Utilities +# +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_ADDGROUP is not set +# CONFIG_DELGROUP is not set +# CONFIG_ADDUSER is not set +# CONFIG_DELUSER is not set +# CONFIG_GETTY is not set +CONFIG_FEATURE_U_W_TMP=y +# CONFIG_LOGIN is not set +# CONFIG_PASSWD is not set +# CONFIG_SU is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_CROND is not set +# CONFIG_CRONTAB is not set +CONFIG_DC=y +# CONFIG_DEVFSD is not set +# CONFIG_LAST is not set +# CONFIG_HDPARM is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_MT is not set +# CONFIG_RX is not set +CONFIG_STRINGS=y +CONFIG_TIME=y +# CONFIG_WATCHDOG is not set + +# +# Linux Module Utilities +# +# CONFIG_INSMOD is not set +# CONFIG_LSMOD is not set +# CONFIG_MODPROBE is not set +# CONFIG_RMMOD is not set + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +# CONFIG_ARPING is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +CONFIG_IFUPDOWN=y +# CONFIG_FEATURE_IFUPDOWN_IP is not set +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_INETD is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +# CONFIG_IPCALC is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_NAMEIF is not set +CONFIG_NC=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING6=y +CONFIG_ROUTE=y +CONFIG_TELNET=y +# CONFIG_FEATURE_TELNET_TTYPE is not set +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +CONFIG_TFTP=y +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set +# CONFIG_FEATURE_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_VCONFIG is not set +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_IP6_LITERAL=y + +# +# udhcp Server/Client +# +# CONFIG_UDHCPD is not set +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCP_SYSLOG=y +# CONFIG_FEATURE_UDHCP_DEBUG is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_PIDOF=y +CONFIG_PS=y +CONFIG_RENICE=y +CONFIG_TOP=y +FEATURE_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y +# CONFIG_SYSCTL is not set + +# +# Another Bourne-like Shell +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_PIPE_OPTIMIZATION=y +CONFIG_FEATURE_BUILTIN_TEST=y +CONFIG_FEATURE_BUILTIN_ECHO=y +CONFIG_FEATURE_BUILTIN_PIDOF=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_MATH_SUPPORT_64 is not set +CONFIG_ASH_GETOPTS=y +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +CONFIG_FEATURE_COMMAND_EDITING=y +CONFIG_FEATURE_COMMAND_HISTORY=63 +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +CONFIG_FEATURE_SH_FANCY_PROMPT=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +# CONFIG_FEATURE_FBSET_READMODE is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_GETOPT is not set +CONFIG_HEXDUMP=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONGOPTIONS=y +CONFIG_LOSETUP=y +CONFIG_MKSWAP=y +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_PIVOT_ROOT=y +# CONFIG_RDATE is not set +CONFIG_SWAPONOFF=y +CONFIG_MOUNT=y +CONFIG_NFSMOUNT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_MOUNT_FORCE=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/packages/busybox/busybox-1.2.0/openslug/udhcpscript.patch b/packages/busybox/busybox-1.2.0/openslug/udhcpscript.patch new file mode 100644 index 0000000000..010f64a53f --- /dev/null +++ b/packages/busybox/busybox-1.2.0/openslug/udhcpscript.patch @@ -0,0 +1,133 @@ +--- busybox-1.00/.pc/udhcpscript.patch/examples/udhcp/simple.script 2004-10-13 00:18:05.000000000 -0700 ++++ busybox-1.00/examples/udhcp/simple.script 2005-06-05 15:08:28.432605118 -0700 +@@ -1,40 +1,101 @@ + #!/bin/sh ++# openslug UDHCP client script ++# this must set the HW address (MAC) on the interface ++# ++. /etc/default/functions + +-# udhcpc script edited by Tim Riker + +-[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 ++echodns(){ ++ local dns ++ if test $# -gt 0 ++ then ++ for dns in "$@" ++ do ++ echo "nameserver $dns" ++ done ++ fi ++} ++ ++# Output the correct contents for resolv.conf ++mkresolv() { ++ test -n "$domain" && echo "search $domain" ++ echodns $dns ++} ++ ++# checksum of a file (or stdin if -) ++md5strm() { ++ md5sum $1 2>/dev/null | sed -n 's/^\([0-9A-Za-z]*\).*$/\1/p' ++} ++ ++bind() { ++ local B N metric i olddomain ++ B= ++ test -n "$broadcast" && B="broadcast $broadcast" ++ N= ++ test -n "$subnet" && N="netmask $subnet" ++ ifconfig "$interface" "$ip" $B $N up ++ ++ # If given router information delete the old information and ++ # enter new stuff, routers get metrics incremented by 1 ++ # between each (this is somewhat arbitrary) ++ if test -n "$router" ++ then ++ while route del default gw 0.0.0.0 dev $interface 2>/dev/null ++ do ++ : ++ done + +-RESOLV_CONF="/etc/resolv.conf" +-[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" +-[ -n "$subnet" ] && NETMASK="netmask $subnet" ++ metric=0 ++ for i in $router ++ do ++ route add default gw "$i" dev "$interface" metric $((metric++)) ++ done ++ fi ++ ++ olddomain= ++ test -r /etc/defaultdomain && olddomain="$(cat /etc/defaultdomain)" ++ if test -n "$domain" -a "$domain" != "$olddomain" ++ then ++ echo "$domain" >/etc/defaultdomain ++ # and update the kernel view too ++ echo "$domain" >/proc/sys/kernel/domainname ++ fi ++ ++ # Update /etc/resolv.conf to reflect domain and dns information, ++ # this always clears resolv.conf if none is given ++ md5old="$(md5strm /etc/resolv.conf)" ++ md5new="$(mkresolv | md5strm -)" ++ test "$md5old" != "$md5new" && mkresolv >/etc/resolv.conf ++} + + case "$1" in +- deconfig) +- /sbin/ifconfig $interface 0.0.0.0 +- ;; +- +- renew|bound) +- /sbin/ifconfig $interface $ip $BROADCAST $NETMASK +- +- if [ -n "$router" ] ; then +- echo "deleting routers" +- while route del default gw 0.0.0.0 dev $interface ; do +- : +- done +- +- metric=0 +- for i in $router ; do +- route add default gw $i dev $interface metric $((metric++)) +- done ++deconfig) ++ # Bring the interface up (without inet at this point) ++ ifconfig "$interface" up;; ++ ++renew|bound) ++ bind;; ++ ++leasefail) ++ # Pull the values from the config data if (only only if) this ++ # is the config interface ++ if test "$interface" = "$(config iface)" ++ then ++ ip="$(config ip)" ++ if test -n "$ip" ++ then ++ router="$(config gateway)" ++ subnet="$(config netmask)" ++ broadcast="$(config broadcast)" ++ domain="$(config domain)" ++ dns="$(config dns)" ++ ++ bind + fi ++ fi;; + +- echo -n > $RESOLV_CONF +- [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF +- for i in $dns ; do +- echo adding dns $i +- echo nameserver $i >> $RESOLV_CONF +- done +- ;; ++*) echo "udhcpc: $*: unknown command" >&2 ++ exit 1;; + esac + + exit 0 diff --git a/packages/busybox/busybox-1.2.0/readlink.patch b/packages/busybox/busybox-1.2.0/readlink.patch new file mode 100644 index 0000000000..0c5431085a --- /dev/null +++ b/packages/busybox/busybox-1.2.0/readlink.patch @@ -0,0 +1,85 @@ +diff -p -u -r1.7 Config.in +--- busybox-1.00/debianutils/Config.in 15 Mar 2004 08:28:24 -0000 1.7 ++++ busybox-1.00-patched/debianutils/Config.in 16 Nov 2004 11:46:41 -0000 +@@ -24,6 +24,13 @@ config CONFIG_READLINK + This program reads a symbolic link and returns the name + of the file it points to + ++config CONFIG_FEATURE_READLINK_FOLLOW ++ bool " Enable canonicalization by following all symlinks (-f)" ++ default n ++ depends on CONFIG_READLINK ++ help ++ Enable the readlink option (-f). ++ + config CONFIG_RUN_PARTS + bool "run-parts" + default n +diff -p -u -r1.2 readlink.c +--- busybox-1.00/debianutils/readlink.c 19 Mar 2003 09:11:41 -0000 1.2 ++++ busybox-1.00-patched/debianutils/readlink.c 16 Nov 2004 11:46:41 -0000 +@@ -23,18 +23,38 @@ + #include + #include + #include ++#include + #include "busybox.h" + ++#ifdef CONFIG_FEATURE_READLINK_FOLLOW ++# define READLINK_FOLLOW "f" ++# define READLINK_FLAG_f (1 << 0) ++#else ++# define READLINK_FOLLOW "" ++#endif ++ ++static const char readlink_options[] = READLINK_FOLLOW; ++ + int readlink_main(int argc, char **argv) + { + char *buf = NULL; ++ unsigned long opt = bb_getopt_ulflags(argc, argv, readlink_options); ++#ifdef CONFIG_FEATURE_READLINK_FOLLOW ++ RESERVE_CONFIG_BUFFER(resolved_path, PATH_MAX); ++#endif + + /* no options, no getopt */ + +- if (argc != 2) ++ if (optind + 1 != argc) + bb_show_usage(); + +- buf = xreadlink(argv[1]); ++#ifdef CONFIG_FEATURE_READLINK_FOLLOW ++ if (opt & READLINK_FLAG_f) { ++ buf = realpath(argv[optind], resolved_path); ++ } else ++#endif ++ buf = xreadlink(argv[optind]); ++ + if (!buf) + return EXIT_FAILURE; + puts(buf); +diff -p -u -r1.222 usage.h +--- busybox-1.00/include/usage.h 14 Sep 2004 16:23:56 -0000 1.222 ++++ busybox-1.00-patched/include/usage.h 16 Nov 2004 11:46:42 -0000 +@@ -1985,10 +1985,18 @@ + "\t-s\tSet the system date and time (default).\n" \ + "\t-p\tPrint the date and time." + ++#ifdef CONFIG_FEATURE_READLINK_FOLLOW ++#define USAGE_READLINK_FOLLOW(a) a ++#else ++#define USAGE_READLINK_FOLLOW(a) ++#endif ++ + #define readlink_trivial_usage \ +- "" ++ USAGE_READLINK_FOLLOW("[-f] ") "FILE" + #define readlink_full_usage \ +- "Displays the value of a symbolic link." ++ "Displays the value of a symbolic link." \ ++ USAGE_READLINK_FOLLOW("\n\nOptions:\n" \ ++ "\t-f\tcanonicalize by following all symlinks") + + #define realpath_trivial_usage \ + "pathname ..." diff --git a/packages/busybox/busybox-1.2.0/rmmod.patch b/packages/busybox/busybox-1.2.0/rmmod.patch new file mode 100644 index 0000000000..20770e0dc4 --- /dev/null +++ b/packages/busybox/busybox-1.2.0/rmmod.patch @@ -0,0 +1,40 @@ +Index: busybox-1.1.0/modutils/rmmod.c +=================================================================== +--- busybox-1.1.0.orig/modutils/rmmod.c 2006-01-11 06:43:56.000000000 +0100 ++++ busybox-1.1.0/modutils/rmmod.c 2006-03-14 16:42:14.000000000 +0100 +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include "busybox.h" + + #ifdef CONFIG_FEATURE_2_6_MODULES +@@ -64,6 +65,16 @@ + but must get */ + size_t bufsize = sizeof(bb_common_bufsiz1); + #endif ++#ifdef CONFIG_FEATURE_2_6_MODULES ++ int k_version = 0; ++ struct utsname myuname; ++ ++ if (uname(&myuname) == 0) { ++ if (myuname.release[0] == '2') { ++ k_version = myuname.release[2] - '0'; ++ } ++ } ++#endif + + /* Parse command line. */ + n = bb_getopt_ulflags(argc, argv, "wfa"); +@@ -109,6 +120,10 @@ + afterslash++; + module_name = alloca(strlen(afterslash) + 1); + filename2modname(module_name, afterslash); ++ if (k_version != 4) ++ filename2modname(module_name, afterslash); ++ else ++ strcpy(module_name, afterslash); + #else + #define module_name argv[n] + #endif diff --git a/packages/busybox/busybox-1.2.0/sparc/.mtn2git_empty b/packages/busybox/busybox-1.2.0/sparc/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/busybox/busybox-1.2.0/sparc/defconfig b/packages/busybox/busybox-1.2.0/sparc/defconfig new file mode 100644 index 0000000000..8b8cbfc839 --- /dev/null +++ b/packages/busybox/busybox-1.2.0/sparc/defconfig @@ -0,0 +1,467 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +# CONFIG_FEATURE_VERBOSE_USAGE is not set +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_FEATURE_DEVFS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_SUID is not set +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_LFS is not set +# USING_CROSS_COMPILER is not set +EXTRA_CFLAGS_OPTIONS="" + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +PREFIX="./_install" + +# +# Archival Utilities +# +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_BUNZIP2=y +CONFIG_CPIO=y +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +CONFIG_GUNZIP=y +# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +CONFIG_UNZIP=y + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +# CONFIG_CMP is not set +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y + +# +# date (forced enabled for use with watch) +# +# CONFIG_FEATURE_DATE_ISOFMT is not set +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_EXPR=y +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +CONFIG_ID=y +# CONFIG_INSTALL is not set +# CONFIG_LENGTH is not set +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +# CONFIG_FEATURE_LS_RECURSIVE is not set +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_OD=y +CONFIG_PRINTF=y +CONFIG_PWD=y +# CONFIG_REALPATH is not set +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +CONFIG_SORT=y +CONFIG_STTY=y +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +CONFIG_TEST=y + +# +# test (forced enabled for use with shell) +# +# CONFIG_FEATURE_TEST_64 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +CONFIG_WATCH=y +CONFIG_WC=y +CONFIG_WHO=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_GETKEY=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +# CONFIG_SETKEYCODES is not set + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +CONFIG_READLINK=y +CONFIG_RUN_PARTS=y +CONFIG_START_STOP_DAEMON=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +# CONFIG_PATCH is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_NEWER=y +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set +# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set +# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set + +# +# Init Utilities +# +# CONFIG_INIT is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +# CONFIG_REBOOT is not set +# CONFIG_MESG is not set + +# +# Login/Password Management Utilities +# +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_ADDGROUP is not set +# CONFIG_DELGROUP is not set +# CONFIG_ADDUSER is not set +# CONFIG_DELUSER is not set +# CONFIG_GETTY is not set +CONFIG_FEATURE_U_W_TMP=y +# CONFIG_LOGIN is not set +# CONFIG_PASSWD is not set +# CONFIG_SU is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_CROND is not set +# CONFIG_CRONTAB is not set +CONFIG_DC=y +# CONFIG_DEVFSD is not set +# CONFIG_LAST is not set +# CONFIG_HDPARM is not set +CONFIG_MAKEDEVS=y +# CONFIG_MT is not set +# CONFIG_RX is not set +CONFIG_STRINGS=y +# CONFIG_TIME is not set +# CONFIG_WATCHDOG is not set + +# +# Linux Module Utilities +# +# CONFIG_INSMOD is not set +# CONFIG_LSMOD is not set +# CONFIG_MODPROBE is not set +# CONFIG_RMMOD is not set + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +# CONFIG_ARPING is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +CONFIG_IFUPDOWN=y +# CONFIG_FEATURE_IFUPDOWN_IP is not set +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_INETD is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +# CONFIG_IPCALC is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_NAMEIF is not set +CONFIG_NC=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING6=y +CONFIG_ROUTE=y +CONFIG_TELNET=y +# CONFIG_FEATURE_TELNET_TTYPE is not set +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +# CONFIG_TFTP is not set +CONFIG_TRACEROUTE=y +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_VCONFIG is not set +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_IP6_LITERAL=y + +# +# udhcp Server/Client +# +# CONFIG_UDHCPD is not set +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCP_SYSLOG=y +# CONFIG_FEATURE_UDHCP_DEBUG is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_PIDOF=y +CONFIG_PS=y +CONFIG_RENICE=y +CONFIG_TOP=y +FEATURE_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y +# CONFIG_SYSCTL is not set + +# +# Another Bourne-like Shell +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_MATH_SUPPORT_64 is not set +CONFIG_ASH_GETOPTS=y +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +CONFIG_FEATURE_COMMAND_EDITING=y +CONFIG_FEATURE_COMMAND_HISTORY=63 +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +CONFIG_FEATURE_SH_FANCY_PROMPT=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +# CONFIG_FEATURE_FBSET_READMODE is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FREERAMDISK is not set +CONFIG_FSCK_MINIX=y +CONFIG_MKFS_MINIX=y + +# +# Minix filesystem support +# +CONFIG_FEATURE_MINIX2=y +# CONFIG_GETOPT is not set +CONFIG_HEXDUMP=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONGOPTIONS=y +# CONFIG_LOSETUP is not set +CONFIG_MKSWAP=y +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_PIVOT_ROOT=y +# CONFIG_RDATE is not set +CONFIG_SWAPONOFF=y +CONFIG_MOUNT=y +CONFIG_NFSMOUNT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_MOUNT_FORCE=y + +# +# Common options for mount/umount +# +# CONFIG_FEATURE_MOUNT_LOOP is not set +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/packages/busybox/busybox-1.2.0/udhcppidfile-breakage.patch b/packages/busybox/busybox-1.2.0/udhcppidfile-breakage.patch new file mode 100644 index 0000000000..031274908b --- /dev/null +++ b/packages/busybox/busybox-1.2.0/udhcppidfile-breakage.patch @@ -0,0 +1,57 @@ +--- busybox-1.00/networking/udhcp/common.c~udhcppidfile2 ++++ busybox-1.00/networking/udhcp/common.c +@@ -74,7 +74,7 @@ + + if (pid > 0) { + /* parent */ +- if (pidfile_reassign(pidfile, pid) < 0) { ++ if (pidfile != NULL && pidfile_reassign(pidfile, pid) < 0) { + (void)kill(pid, SIGKILL); + exit(1); + } else +@@ -119,7 +119,7 @@ + sanitize_fds(); + + /* do some other misc startup stuff while we are here to save bytes */ +- if (pidfile_acquire(pidfile) < 0) ++ if (pidfile != NULL && pidfile_acquire(pidfile) < 0) + exit(1); + + /* equivelent of doing a fflush after every \n */ +@@ -166,7 +166,7 @@ + sanitize_fds(); + + /* do some other misc startup stuff while we are here to save bytes */ +- if (pidfile_acquire(pidfile) < 0) ++ if (pidfile != NULL && pidfile_acquire(pidfile) < 0) + exit(1); + + /* equivelent of doing a fflush after every \n */ +--- busybox-1.00/networking/udhcp/pidfile.c~udhcppidfile2 ++++ busybox-1.00/networking/udhcp/pidfile.c +@@ -141,7 +141,11 @@ + int pidfile_acquire(const char *pidfile) + { + int fd, result; +- if (!pidfile) return (-1); ++ ++ if (pidfile == NULL) { ++ LOG(LOG_ERR, "pidfile_acquire: filename is NULL\n"); ++ return (-1); ++ } + + if ((fd = pidfile_open(pidfile)) < 0) + return (-1); +@@ -170,7 +174,11 @@ + int pidfile_reassign(const char *pidfile, int pid) + { + int fd, result; +- if (!pidfile) return (-1); ++ ++ if (pidfile == NULL) { ++ LOG(LOG_ERR, "pidfile_reassign: filename is NULL\n"); ++ return (-1); ++ } + + if ((fd = pidfile_open(pidfile)) < 0) + return (-1); diff --git a/packages/busybox/busybox-1.2.0/udhcppidfile.patch b/packages/busybox/busybox-1.2.0/udhcppidfile.patch new file mode 100644 index 0000000000..b4b86b8775 --- /dev/null +++ b/packages/busybox/busybox-1.2.0/udhcppidfile.patch @@ -0,0 +1,274 @@ +Index: busybox-1.1.0/networking/udhcp/pidfile.h +=================================================================== +--- busybox-1.1.0.orig/networking/udhcp/pidfile.h 2006-01-11 06:43:50.000000000 +0100 ++++ busybox-1.1.0/networking/udhcp/pidfile.h 2006-03-14 17:15:45.000000000 +0100 +@@ -21,5 +21,5 @@ + + + int pidfile_acquire(const char *pidfile); +-void pidfile_write_release(int pid_fd); ++int pidfile_reassign(const char *pidfile, int newpid); + +Index: busybox-1.1.0/networking/udhcp/pidfile.c +=================================================================== +--- busybox-1.1.0.orig/networking/udhcp/pidfile.c 2006-01-11 06:43:50.000000000 +0100 ++++ busybox-1.1.0/networking/udhcp/pidfile.c 2006-03-14 17:15:45.000000000 +0100 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include "pidfile.h" + #include "common.h" +@@ -37,39 +38,146 @@ + } + + +-int pidfile_acquire(const char *pidfile) ++static int pidfile_open(const char *pidfile) + { +- int pid_fd; +- if (!pidfile) return -1; ++ int fd; + +- pid_fd = open(pidfile, O_CREAT | O_WRONLY, 0644); +- if (pid_fd < 0) { +- LOG(LOG_ERR, "Unable to open pidfile %s: %m\n", pidfile); +- } else { +- lockf(pid_fd, F_LOCK, 0); +- if (!saved_pidfile) +- atexit(pidfile_delete); +- saved_pidfile = (char *) pidfile; ++ if ((fd = open(pidfile, O_CREAT | O_RDWR, 0644)) < 0) { ++ LOG(LOG_ERR, "pidfile_open: open %s failed: %m\n", pidfile); ++ return (-1); ++ } ++ ++ /* NOTE: lockf is not inherited by child after fork */ ++ if (lockf(fd, F_LOCK, 0) < 0) { ++ LOG(LOG_ERR, "pidfile_open: lock %s failed: %m\n", pidfile); ++ close(fd); ++ return (-1); ++ } ++ ++ return (fd); ++} ++ ++ ++static int pidfile_check(int fd, const char *pidfile) ++{ ++ int len, pid; ++ char buf[20]; ++ ++ if (lseek(fd, 0L, SEEK_SET) < 0) { ++ LOG(LOG_ERR, "pidfile_check: lseek %s failed: %m\n", pidfile); ++ return (-1); ++ } ++ ++ if ((len = read(fd, buf, sizeof buf - 1)) < 0) { ++ LOG(LOG_ERR, "pidfile_check: read %s failed: %m\n", pidfile); ++ return (-1); ++ } ++ ++ if (len == 0) ++ return (0); ++ ++ buf[len] = '\0'; ++ ++ if ((pid = atoi(buf)) <= 1) { ++ LOG(LOG_WARNING, ++ "pidfile_check: ignoring bogus pid (%s) in %s\n", ++ buf, pidfile); ++ return (0); ++ } ++ ++ if (kill((pid_t)pid, 0) == 0) { ++ LOG(LOG_ERR, "pidfile_check: process %d exists (%s)\n", ++ pid, pidfile); ++ return (-1); ++ } ++ ++ if (errno != ESRCH) { ++ LOG(LOG_ERR, "pidfile_check: kill %d failed (%s): %m\n", ++ pid, pidfile); ++ return (-1); ++ } ++ ++ return (0); ++} ++ ++ ++static int pidfile_store(int fd, const char *pidfile, int pid) ++{ ++ int len; ++ char buf[20]; ++ ++ if (lseek(fd, 0L, SEEK_SET) < 0) { ++ LOG(LOG_ERR, "pidfile_store: lseek %s failed: %m\n", pidfile); ++ return (-1); ++ } ++ ++ len = snprintf(buf, sizeof buf - 1, "%d\n", pid); ++ buf[len] = '\0'; ++ ++ if (write(fd, buf, len) < 0) { ++ LOG(LOG_ERR, "pidfile_store: write %s failed: %m\n", ++ pidfile); ++ return (-1); ++ } ++ ++ if (ftruncate(fd, len) < 0) { ++ LOG(LOG_ERR, "pidfile_store: ftruncate %d failed (%s): %m\n", ++ len, pidfile); ++ return (-1); + } + +- return pid_fd; ++ return (0); + } + + +-void pidfile_write_release(int pid_fd) ++static void pidfile_close(int fd) + { +- FILE *out; ++ (void)lseek(fd, 0L, SEEK_SET); ++ (void)lockf(fd, F_ULOCK, 0); ++ (void)close(fd); ++} + +- if (pid_fd < 0) return; + +- if ((out = fdopen(pid_fd, "w")) != NULL) { +- fprintf(out, "%d\n", getpid()); +- fclose(out); ++int pidfile_acquire(const char *pidfile) ++{ ++ int fd, result; ++ if (!pidfile) return (-1); ++ ++ if ((fd = pidfile_open(pidfile)) < 0) ++ return (-1); ++ ++ if ((result = pidfile_check(fd, pidfile)) == 0) ++ result = pidfile_store(fd, pidfile, getpid()); ++ ++ pidfile_close(fd); ++ ++ if (result == 0) { ++ saved_pidfile = (char *) pidfile; ++ atexit(pidfile_delete); + } +- lockf(pid_fd, F_UNLCK, 0); +- close(pid_fd); ++ ++ return (result); + } + + ++/* ++ * reassign the pid in a pidfile - used just after a fork so a parent ++ * can store the pid of its child into the file without any window ++ * where the pid in the file is a dead process (which might let another ++ * instance of the program start). Note the parent must use _exit() to ++ * avoid triggering the unlink scheduled above in pidfile_acquire() ++ */ ++int pidfile_reassign(const char *pidfile, int pid) ++{ ++ int fd, result; ++ if (!pidfile) return (-1); ++ ++ if ((fd = pidfile_open(pidfile)) < 0) ++ return (-1); + ++ result = pidfile_store(fd, pidfile, pid); + ++ pidfile_close(fd); ++ ++ return (result); ++} +Index: busybox-1.1.0/networking/udhcp/common.c +=================================================================== +--- busybox-1.1.0.orig/networking/udhcp/common.c 2006-01-11 06:43:50.000000000 +0100 ++++ busybox-1.1.0/networking/udhcp/common.c 2006-03-14 17:15:45.000000000 +0100 +@@ -64,16 +64,34 @@ + #ifdef __uClinux__ + LOG(LOG_ERR, "Cannot background in uclinux (yet)"); + #else /* __uClinux__ */ +- int pid_fd; ++ int pid, fd; + +- /* hold lock during fork. */ +- pid_fd = pidfile_acquire(pidfile); +- if (daemon(0, 0) == -1) { ++ /* NOTE: lockf is not inherited by the child after fork */ ++ if ((pid = fork()) < 0) { + perror("fork"); + exit(1); + } ++ ++ if (pid > 0) { ++ /* parent */ ++ if (pidfile_reassign(pidfile, pid) < 0) { ++ (void)kill(pid, SIGKILL); ++ exit(1); ++ } else ++ _exit(0); ++ } ++ ++ /* child */ ++ (void)chdir("/"); ++ if ((fd = open("/dev/null", O_RDWR)) >= 0) { ++ (void)dup2(fd, 0); ++ (void)dup2(fd, 1); ++ (void)dup2(fd, 2); ++ (void)close(fd); ++ } ++ (void)setsid(); ++ + daemonized++; +- pidfile_write_release(pid_fd); + #endif /* __uClinux__ */ + } + +@@ -97,14 +115,12 @@ + + void start_log_and_pid(const char *client_server, const char *pidfile) + { +- int pid_fd; +- + /* Make sure our syslog fd isn't overwritten */ + sanitize_fds(); + + /* do some other misc startup stuff while we are here to save bytes */ +- pid_fd = pidfile_acquire(pidfile); +- pidfile_write_release(pid_fd); ++ if (pidfile_acquire(pidfile) < 0) ++ exit(1); + + /* equivelent of doing a fflush after every \n */ + setlinebuf(stdout); +@@ -150,8 +166,8 @@ + sanitize_fds(); + + /* do some other misc startup stuff while we are here to save bytes */ +- pid_fd = pidfile_acquire(pidfile); +- pidfile_write_release(pid_fd); ++ if (pidfile_acquire(pidfile) < 0) ++ exit(1); + + /* equivelent of doing a fflush after every \n */ + setlinebuf(stdout); +Index: busybox-1.1.0/networking/udhcp/script.c +=================================================================== +--- busybox-1.1.0.orig/networking/udhcp/script.c 2006-01-11 06:43:50.000000000 +0100 ++++ busybox-1.1.0/networking/udhcp/script.c 2006-03-14 17:15:45.000000000 +0100 +@@ -229,6 +229,6 @@ + execle(client_config.script, client_config.script, + name, NULL, envp); + LOG(LOG_ERR, "script %s failed: %m", client_config.script); +- exit(1); ++ _exit(1); + } + } diff --git a/packages/busybox/busybox-1.2.0/udhcpscript.patch b/packages/busybox/busybox-1.2.0/udhcpscript.patch new file mode 100644 index 0000000000..fc21d440cd --- /dev/null +++ b/packages/busybox/busybox-1.2.0/udhcpscript.patch @@ -0,0 +1,17 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- busybox-1.00-rc3/examples/udhcp/simple.script~udhcpscript ++++ busybox-1.00-rc3/examples/udhcp/simple.script +@@ -17,8 +17,7 @@ + /sbin/ifconfig $interface $ip $BROADCAST $NETMASK + + if [ -n "$router" ] ; then +- echo "deleting routers" +- while route del default gw 0.0.0.0 dev $interface ; do ++ while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do + : + done + diff --git a/packages/busybox/busybox-1.2.0/wrt54/.mtn2git_empty b/packages/busybox/busybox-1.2.0/wrt54/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/busybox/busybox-1.2.0/wrt54/defconfig b/packages/busybox/busybox-1.2.0/wrt54/defconfig new file mode 100644 index 0000000000..7f1aef4ef9 --- /dev/null +++ b/packages/busybox/busybox-1.2.0/wrt54/defconfig @@ -0,0 +1,476 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# General Configuration +# +# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set +CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +CONFIG_FEATURE_DEVFS=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +CONFIG_FEATURE_SUID=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +CONFIG_LFS=y +USING_CROSS_COMPILER=y +CROSS_COMPILER_PREFIX="mipsel-uclibc-" +EXTRA_CFLAGS_OPTIONS="-Os " + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +PREFIX="./_install" + +# +# Archival Utilities +# +# CONFIG_AR is not set +CONFIG_BUNZIP2=y +# CONFIG_CPIO is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +CONFIG_GUNZIP=y +CONFIG_FEATURE_GUNZIP_UNCOMPRESS=y +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +# CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY is not set +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +# CONFIG_UNZIP is not set + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +# CONFIG_CMP is not set +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_EXPR=y +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_HOSTID=y +CONFIG_ID=y +# CONFIG_INSTALL is not set +CONFIG_LENGTH=y +CONFIG_LN=y +# CONFIG_LOGNAME is not set +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_MKFIFO=y +# CONFIG_MKNOD is not set +CONFIG_MV=y +# CONFIG_OD is not set +# CONFIG_PRINTF is not set +CONFIG_PWD=y +# CONFIG_REALPATH is not set +CONFIG_RM=y +CONFIG_RMDIR=y +# CONFIG_SEQ is not set +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_SORT=y +# CONFIG_STTY is not set +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TEST=y + +# +# test (forced enabled for use with shell) +# +# CONFIG_FEATURE_TEST_64 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_TRUE=y +# CONFIG_TTY is not set +CONFIG_UNAME=y +CONFIG_UNIQ=y +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +# CONFIG_WATCH is not set +CONFIG_WC=y +# CONFIG_WHO is not set +# CONFIG_WHOAMI is not set +CONFIG_YES=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls and more +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +# CONFIG_CHVT is not set +CONFIG_CLEAR=y +# CONFIG_DEALLOCVT is not set +# CONFIG_DUMPKMAP is not set +# CONFIG_GETKEY is not set +# CONFIG_LOADFONT is not set +# CONFIG_LOADKMAP is not set +# CONFIG_OPENVT is not set +CONFIG_RESET=y +# CONFIG_SETKEYCODES is not set + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +# CONFIG_READLINK is not set +CONFIG_RUN_PARTS=y +CONFIG_START_STOP_DAEMON=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +# CONFIG_PATCH is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +CONFIG_FIND=y +# CONFIG_FEATURE_FIND_MTIME is not set +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +# CONFIG_FEATURE_FIND_NEWER is not set +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +CONFIG_INIT=y +CONFIG_FEATURE_USE_INITTAB=y +# CONFIG_FEATURE_INITRD is not set +# CONFIG_FEATURE_INIT_COREDUMPS is not set +# CONFIG_FEATURE_EXTRA_QUIET is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +CONFIG_REBOOT=y +CONFIG_MESG=y + +# +# Login/Password Management Utilities +# +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_ADDGROUP is not set +# CONFIG_DELGROUP is not set +# CONFIG_ADDUSER is not set +# CONFIG_DELUSER is not set +# CONFIG_GETTY is not set +# CONFIG_FEATURE_U_W_TMP is not set +CONFIG_LOGIN=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +# CONFIG_SU is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Common options for adduser, deluser, login, su +# +# CONFIG_FEATURE_SHADOWPASSWDS is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +CONFIG_CROND=y +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_CRONTAB=y +# CONFIG_DC is not set +# CONFIG_DEVFSD is not set +# CONFIG_LAST is not set +# CONFIG_HDPARM is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_MT is not set +# CONFIG_RX is not set +CONFIG_STRINGS=y +CONFIG_TIME=y +# CONFIG_WATCHDOG is not set + +# +# Linux Module Utilities +# +CONFIG_INSMOD=y +CONFIG_FEATURE_2_4_MODULES=y +# CONFIG_FEATURE_2_6_MODULES is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +CONFIG_LSMOD=y +CONFIG_FEATURE_QUERY_MODULE_INTERFACE=y +# CONFIG_MODPROBE is not set +CONFIG_RMMOD=y +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +CONFIG_ARPING=y +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_HOSTNAME is not set +CONFIG_HTTPD=y +# CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY is not set +CONFIG_FEATURE_HTTPD_BASIC_AUTH=y +CONFIG_FEATURE_HTTPD_AUTH_MD5=y +CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP=y +# CONFIG_FEATURE_HTTPD_SETUID is not set +CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES=y +CONFIG_FEATURE_HTTPD_CGI=y +CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y +CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y +CONFIG_IFUPDOWN=y +# CONFIG_FEATURE_IFUPDOWN_IP is not set +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_INETD is not set +# CONFIG_IP is not set +CONFIG_IPCALC=y +CONFIG_FEATURE_IPCALC_FANCY=y +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_NAMEIF is not set +CONFIG_NC=y +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING6=y +CONFIG_ROUTE=y +# CONFIG_TELNET is not set +# CONFIG_TELNETD is not set +# CONFIG_TFTP is not set +CONFIG_TRACEROUTE=y +CONFIG_FEATURE_TRACEROUTE_VERBOSE=y +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_IP6_LITERAL=y + +# +# udhcp Server/Client +# +# CONFIG_UDHCPD is not set +CONFIG_UDHCPC=y +# CONFIG_FEATURE_UDHCP_SYSLOG is not set +# CONFIG_FEATURE_UDHCP_DEBUG is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_PIDOF=y +CONFIG_PS=y +# CONFIG_RENICE is not set +CONFIG_TOP=y +FEATURE_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y +CONFIG_SYSCTL=y + +# +# Another Bourne-like Shell +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_PIPE_OPTIMIZATION=y +CONFIG_FEATURE_BUILTIN_TEST=y +CONFIG_FEATURE_BUILTIN_ECHO=y +CONFIG_FEATURE_BUILTIN_PIDOF=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_MATH_SUPPORT_64 is not set +CONFIG_ASH_GETOPTS=y +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +# CONFIG_FEATURE_SH_EXTRA_QUIET is not set +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +CONFIG_FEATURE_COMMAND_EDITING=y +CONFIG_FEATURE_COMMAND_HISTORY=15 +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +CONFIG_FEATURE_SH_FANCY_PROMPT=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_KLOGD=y +CONFIG_LOGGER=y + +# +# Linux System Utilities +# +CONFIG_DMESG=y +# CONFIG_FBSET is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +# CONFIG_FDISK is not set +FDISK_SUPPORT_LARGE_DISKS=y +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_GETOPT is not set +CONFIG_HEXDUMP=y +# CONFIG_HWCLOCK is not set +# CONFIG_LOSETUP is not set +# CONFIG_MKSWAP is not set +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +# CONFIG_SWAPONOFF is not set +CONFIG_MOUNT=y +CONFIG_NFSMOUNT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_MOUNT_FORCE=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/packages/busybox/busybox_1.2.0.bb b/packages/busybox/busybox_1.2.0.bb new file mode 100644 index 0000000000..798998c8e1 --- /dev/null +++ b/packages/busybox/busybox_1.2.0.bb @@ -0,0 +1,162 @@ +DESCRIPTION = "BusyBox combines tiny versions of many common UNIX utilities into a single \ +small executable. It provides minimalist replacements for most of the \ +utilities you usually find in GNU fileutils, shellutils, etc. The utilities \ +in BusyBox generally have fewer options than their full-featured GNU \ +cousins; however, the options that are included provide the expected \ +functionality and behave very much like their GNU counterparts. BusyBox \ +provides a fairly complete POSIX environment for any small or embedded \ +system." +HOMEPAGE = "http://www.busybox.net" +LICENSE = "GPL" +SECTION = "base" +PRIORITY = "required" + +DEFAULT_PREFERENCE = "-1" + +SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \ +# file://udhcppidfile.patch;patch=1 \ +# file://udhcppidfile-breakage.patch;patch=1 \ +# file://below.patch;patch=1 \ + file://dhcp-hostname.patch;patch=1 \ +# file://fbset.patch;patch=1 \ +# file://hdparm_M.patch;patch=1 \ + file://ifupdown-spurious-environ.patch;patch=1 \ +# file://mount-all-type.patch;patch=1 \ +# file://readlink.patch;patch=1 \ +# file://rmmod.patch;patch=1 \ + file://udhcpscript.patch;patch=1 \ + file://defconfig \ + file://busybox-cron \ + file://busybox-httpd \ + file://busybox-udhcpd \ + file://syslog \ + file://hwclock.sh \ + file://default.script \ + file://syslog.conf \ + file://mount.busybox \ + file://umount.busybox" + +#S = "${WORKDIR}/busybox-1.1.0-pre1" + +export EXTRA_CFLAGS = "${CFLAGS}" +EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}" +PACKAGES =+ "${PN}-httpd ${PN}-udhcpd" + +FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" +FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" + +FILES_${PN} += " ${datadir}/udhcpc" + +INITSCRIPT_PACKAGES = "${PN} ${PN}-httpd ${PN}-udhcpd" +INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" +INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" +INITSCRIPT_NAME_${PN} = "syslog" +CONFFILES_${PN} = "${sysconfdir}/syslog.conf" + +# This disables the syslog startup links in openslug (see openslug-init) +INITSCRIPT_PARAMS_${PN}_openslug = "start 20 ." + +inherit cml1 update-rc.d + +do_configure () { + install -m 0644 ${WORKDIR}/defconfig ${S}/.config + cml1_do_configure +} + +do_compile () { + unset CFLAGS + base_do_compile +} + +do_install () { + install -d ${D}${sysconfdir}/init.d + oe_runmake "PREFIX=${D}" install + cp -pPR ${S}/_install/* ${D}/ + + # Move everything to /busybox (not supposed to end up in any package) + install -d ${D}/busybox + ls ${D} -R + + mv ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ${D}/busybox/ + # Move the busybox binary back to /bin + install -d ${D}${base_bindir} + mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/ + # Move back the sh symlink + mv ${D}/busybox${base_bindir}/sh ${D}${base_bindir}/ + + install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/ + install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/ + if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then + # Move crond back to /usr/sbin/crond + install -d ${D}${sbindir} + mv ${D}/busybox${sbindir}/crond ${D}${sbindir}/ + + install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ + fi + if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then + # Move httpd back to /usr/sbin/httpd + install -d ${D}${sbindir} + mv ${D}/busybox${sbindir}/httpd ${D}${sbindir}/ + + install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/ + install -d ${D}/srv/www + fi + if grep "CONFIG_UDHCPD=y" ${WORKDIR}/defconfig; then + # Move udhcpd back to /usr/sbin/udhcpd + install -d ${D}${sbindir} + mv ${D}/busybox${sbindir}/udhcpd ${D}${sbindir}/ + + install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/ + fi + if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then + # Move hwclock back to /sbin/hwclock + install -d ${D}${base_sbindir} + mv ${D}/busybox${base_sbindir}/hwclock ${D}${base_sbindir}/ + + install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/ + fi + if grep "CONFIG_UDHCPC=y" ${WORKDIR}/defconfig; then + # Move dhcpc back to /usr/sbin/udhcpc + install -d ${D}${base_sbindir} + mv ${D}/busybox${base_sbindir}/udhcpc ${D}${base_sbindir}/ + + install -d ${D}${sysconfdir}/udhcpc.d + install -d ${D}${datadir}/udhcpc + install -m 0755 ${S}/examples/udhcp/simple.script ${D}${sysconfdir}/udhcpc.d/50default + install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script + fi + + install -m 0644 ${S}/busybox.links ${D}${sysconfdir} +} + +pkg_postinst_${PN} () { + # If we are not making an image we create links for the utilities that doesn't exist + # so the update-alternatives script will get the utilities it needs + # (update-alternatives have no problem replacing links later anyway) + test -n 2> /dev/null || alias test='busybox test' + if test "x$D" = "x"; then while read link; do if test ! -h "$link"; then case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; busybox ln -s $to $link; fi; done Date: Thu, 6 Jul 2006 17:07:53 +0000 Subject: busybox 1.2.0 fix packaging due to changed CONFIG_ options WARNING: Need to review ALL defconfigs before setting this version as default --- packages/busybox/busybox-1.2.0/defconfig | 4 ++-- packages/busybox/busybox-1.2.0/nylon/defconfig | 4 ++-- packages/busybox/busybox-1.2.0/openmn/defconfig | 4 ++-- packages/busybox/busybox-1.2.0/openslug/defconfig | 2 +- packages/busybox/busybox-1.2.0/sparc/defconfig | 2 +- packages/busybox/busybox-1.2.0/wrt54/defconfig | 2 +- packages/busybox/busybox_1.2.0.bb | 7 +++---- 7 files changed, 12 insertions(+), 13 deletions(-) (limited to 'packages') diff --git a/packages/busybox/busybox-1.2.0/defconfig b/packages/busybox/busybox-1.2.0/defconfig index 017e9d274c..dfd594f747 100644 --- a/packages/busybox/busybox-1.2.0/defconfig +++ b/packages/busybox/busybox-1.2.0/defconfig @@ -454,8 +454,8 @@ CONFIG_FEATURE_WGET_IP6_LITERAL=y # # udhcp Server/Client # -CONFIG_UDHCPD=y -CONFIG_UDHCPC=y +CONFIG_APP_UDHCPD=y +CONFIG_APP_UDHCPC=y # CONFIG_DUMPLEASES is not set CONFIG_FEATURE_UDHCP_SYSLOG=y # CONFIG_FEATURE_UDHCP_DEBUG is not set diff --git a/packages/busybox/busybox-1.2.0/nylon/defconfig b/packages/busybox/busybox-1.2.0/nylon/defconfig index 599051bafb..866b8ec94d 100644 --- a/packages/busybox/busybox-1.2.0/nylon/defconfig +++ b/packages/busybox/busybox-1.2.0/nylon/defconfig @@ -366,8 +366,8 @@ CONFIG_FEATURE_WGET_IP6_LITERAL=y # # udhcp Server/Client # -CONFIG_UDHCPD=y -CONFIG_UDHCPC=y +CONFIG_APP_UDHCPD=y +CONFIG_APP_UDHCPC=y CONFIG_DUMPLEASES=y CONFIG_FEATURE_UDHCP_SYSLOG=y # CONFIG_FEATURE_UDHCP_DEBUG is not set diff --git a/packages/busybox/busybox-1.2.0/openmn/defconfig b/packages/busybox/busybox-1.2.0/openmn/defconfig index f98af91853..007f3a69b1 100644 --- a/packages/busybox/busybox-1.2.0/openmn/defconfig +++ b/packages/busybox/busybox-1.2.0/openmn/defconfig @@ -359,8 +359,8 @@ CONFIG_FEATURE_WGET_AUTHENTICATION=y # # udhcp Server/Client # -# CONFIG_UDHCPD is not set -CONFIG_UDHCPC=y +# CONFIG_APP_UDHCPD is not set +CONFIG_APP_UDHCPC=y CONFIG_FEATURE_UDHCP_SYSLOG=y # CONFIG_FEATURE_UDHCP_DEBUG is not set diff --git a/packages/busybox/busybox-1.2.0/openslug/defconfig b/packages/busybox/busybox-1.2.0/openslug/defconfig index 7debaeced2..011e5c896f 100644 --- a/packages/busybox/busybox-1.2.0/openslug/defconfig +++ b/packages/busybox/busybox-1.2.0/openslug/defconfig @@ -340,7 +340,7 @@ CONFIG_FEATURE_WGET_IP6_LITERAL=y # udhcp Server/Client # # CONFIG_UDHCPD is not set -CONFIG_UDHCPC=y +CONFIG_APP_UDHCPC=y CONFIG_FEATURE_UDHCP_SYSLOG=y # CONFIG_FEATURE_UDHCP_DEBUG is not set diff --git a/packages/busybox/busybox-1.2.0/sparc/defconfig b/packages/busybox/busybox-1.2.0/sparc/defconfig index 8b8cbfc839..329c7796fd 100644 --- a/packages/busybox/busybox-1.2.0/sparc/defconfig +++ b/packages/busybox/busybox-1.2.0/sparc/defconfig @@ -345,7 +345,7 @@ CONFIG_FEATURE_WGET_IP6_LITERAL=y # udhcp Server/Client # # CONFIG_UDHCPD is not set -CONFIG_UDHCPC=y +CONFIG_APP_UDHCPC=y CONFIG_FEATURE_UDHCP_SYSLOG=y # CONFIG_FEATURE_UDHCP_DEBUG is not set diff --git a/packages/busybox/busybox-1.2.0/wrt54/defconfig b/packages/busybox/busybox-1.2.0/wrt54/defconfig index 7f1aef4ef9..60a8883069 100644 --- a/packages/busybox/busybox-1.2.0/wrt54/defconfig +++ b/packages/busybox/busybox-1.2.0/wrt54/defconfig @@ -365,7 +365,7 @@ CONFIG_FEATURE_WGET_IP6_LITERAL=y # udhcp Server/Client # # CONFIG_UDHCPD is not set -CONFIG_UDHCPC=y +CONFIG_APP_UDHCPC=y # CONFIG_FEATURE_UDHCP_SYSLOG is not set # CONFIG_FEATURE_UDHCP_DEBUG is not set diff --git a/packages/busybox/busybox_1.2.0.bb b/packages/busybox/busybox_1.2.0.bb index 798998c8e1..f386304d90 100644 --- a/packages/busybox/busybox_1.2.0.bb +++ b/packages/busybox/busybox_1.2.0.bb @@ -35,8 +35,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \ file://syslog.conf \ file://mount.busybox \ file://umount.busybox" - -#S = "${WORKDIR}/busybox-1.1.0-pre1" +S = "${WORKDIR}/busybox-1.2.0" export EXTRA_CFLAGS = "${CFLAGS}" EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}" @@ -101,7 +100,7 @@ do_install () { install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/ install -d ${D}/srv/www fi - if grep "CONFIG_UDHCPD=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_APP_UDHCPD=y" ${WORKDIR}/defconfig; then # Move udhcpd back to /usr/sbin/udhcpd install -d ${D}${sbindir} mv ${D}/busybox${sbindir}/udhcpd ${D}${sbindir}/ @@ -115,7 +114,7 @@ do_install () { install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/ fi - if grep "CONFIG_UDHCPC=y" ${WORKDIR}/defconfig; then + if grep "CONFIG_APP_UDHCPC=y" ${WORKDIR}/defconfig; then # Move dhcpc back to /usr/sbin/udhcpc install -d ${D}${base_sbindir} mv ${D}/busybox${base_sbindir}/udhcpc ${D}${base_sbindir}/ -- cgit v1.2.3 From 223a9b86ab9a787a57a96e64a7f0d710ea08aac8 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 6 Jul 2006 17:31:52 +0000 Subject: busybox 1.2.0: add initial defconfig for angstrom --- .../busybox/busybox-1.2.0/angstrom/.mtn2git_empty | 0 packages/busybox/busybox-1.2.0/angstrom/defconfig | 647 +++++++++++++++++++++ 2 files changed, 647 insertions(+) create mode 100644 packages/busybox/busybox-1.2.0/angstrom/.mtn2git_empty create mode 100644 packages/busybox/busybox-1.2.0/angstrom/defconfig (limited to 'packages') diff --git a/packages/busybox/busybox-1.2.0/angstrom/.mtn2git_empty b/packages/busybox/busybox-1.2.0/angstrom/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/busybox/busybox-1.2.0/angstrom/defconfig b/packages/busybox/busybox-1.2.0/angstrom/defconfig new file mode 100644 index 0000000000..d7f95af2cf --- /dev/null +++ b/packages/busybox/busybox-1.2.0/angstrom/defconfig @@ -0,0 +1,647 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +# CONFIG_NITPICK is not set +# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +# CONFIG_FEATURE_VERBOSE_USAGE is not set +# CONFIG_FEATURE_COMPRESS_USAGE is not set +# CONFIG_FEATURE_INSTALLER is not set +CONFIG_LOCALE_SUPPORT=y +CONFIG_GETOPT_LONG=y +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_SUID is not set +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_SELINUX is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_FULL_LIBBUSYBOX is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_LFS=y +# USING_CROSS_COMPILER is not set +CROSS_COMPILER_PREFIX="" +CONFIG_BUILD_AT_ONCE=y + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_NO_DEBUG_LIB is not set +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set +CONFIG_DEBUG_YANK_SUSv2=y + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +PREFIX="./_install" + +# +# Busybox Library Tuning +# +CONFIG_MD5_SIZE_VS_SPEED=2 + +# +# Applets +# + +# +# Archival Utilities +# +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_BUNZIP2=y +CONFIG_CPIO=y +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GUNZIP=y +# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +CONFIG_FEATURE_TAR_BZIP2=y +# CONFIG_FEATURE_TAR_LZMA is not set +CONFIG_FEATURE_TAR_FROM=y +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +# CONFIG_UNLZMA is not set +# CONFIG_FEATURE_LZMA_FAST is not set +CONFIG_UNZIP=y + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set +# CONFIG_FEATURE_DEB_TAR_GZ is not set +# CONFIG_FEATURE_DEB_TAR_BZ2 is not set +# CONFIG_FEATURE_DEB_TAR_LZMA is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +# CONFIG_CATV is not set +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +# CONFIG_CKSUM is not set +# CONFIG_CMP is not set +# CONFIG_COMM is not set +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y +# CONFIG_FEATURE_DATE_ISOFMT is not set +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +# CONFIG_FEATURE_DD_IBS_OBS is not set +CONFIG_DF=y +CONFIG_DIFF=y +CONFIG_FEATURE_DIFF_BINARY=y +CONFIG_FEATURE_DIFF_DIR=y +# CONFIG_FEATURE_DIFF_MINIMAL is not set +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +# CONFIG_UNIX2DOS is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +CONFIG_FEATURE_ENV_LONG_OPTIONS=y +CONFIG_EXPR=y +# CONFIG_EXPR_MATH_SUPPORT_64 is not set +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +CONFIG_ID=y +# CONFIG_INSTALL is not set +# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set +# CONFIG_LENGTH is not set +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +# CONFIG_FEATURE_MV_LONG_OPTIONS is not set +# CONFIG_NICE is not set +# CONFIG_NOHUP is not set +CONFIG_OD=y +# CONFIG_PRINTENV is not set +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +# CONFIG_STAT is not set +# CONFIG_FEATURE_STAT_FORMAT is not set +CONFIG_STTY=y +# CONFIG_SUM is not set +CONFIG_SYNC=y +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +CONFIG_TEST=y +# CONFIG_FEATURE_TEST_64 is not set +CONFIG_TOUCH=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +# CONFIG_FEATURE_TR_EQUIV is not set +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +CONFIG_USLEEP=y +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +CONFIG_WATCH=y +CONFIG_WC=y +CONFIG_WHO=y +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +CONFIG_CHVT=y +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_SETCONSOLE=y +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +# CONFIG_SETKEYCODES is not set +# CONFIG_SETLOGCONS is not set + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_RUN_PARTS=y +# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set +CONFIG_START_STOP_DAEMON=y +CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +CONFIG_FEATURE_AWK_MATH=y +# CONFIG_ED is not set +CONFIG_PATCH=y +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_MMIN=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_NEWER=y +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set +# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set +# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set + +# +# Init Utilities +# +# CONFIG_INIT is not set +# CONFIG_DEBUG_INIT is not set +# CONFIG_FEATURE_USE_INITTAB is not set +# CONFIG_FEATURE_INIT_SCTTY is not set +# CONFIG_FEATURE_EXTRA_QUIET is not set +# CONFIG_FEATURE_INIT_COREDUMPS is not set +# CONFIG_FEATURE_INITRD is not set +# CONFIG_HALT is not set +# CONFIG_MESG is not set + +# +# Login/Password Management Utilities +# +# CONFIG_FEATURE_SHADOWPASSWDS is not set +# CONFIG_USE_BB_SHADOW is not set +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_ADDGROUP is not set +# CONFIG_DELGROUP is not set +# CONFIG_ADDUSER is not set +# CONFIG_DELUSER is not set +# CONFIG_GETTY is not set +CONFIG_FEATURE_UTMP=y +# CONFIG_FEATURE_WTMP is not set +# CONFIG_LOGIN is not set +# CONFIG_FEATURE_SECURETTY is not set +# CONFIG_PASSWD is not set +# CONFIG_SU is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Linux Ext2 FS Progs +# +CONFIG_CHATTR=y +CONFIG_E2FSCK=y +CONFIG_FSCK=y +# CONFIG_LSATTR is not set +CONFIG_MKE2FS=y +# CONFIG_TUNE2FS is not set +# CONFIG_E2LABEL is not set +# CONFIG_FINDFS is not set + +# +# Linux Module Utilities +# +CONFIG_INSMOD=y +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +CONFIG_RMMOD=y +CONFIG_LSMOD=y +# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set +CONFIG_MODPROBE=y +CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y + +# +# Options common to multiple modutils +# +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y +# CONFIG_FEATURE_2_4_MODULES is not set +CONFIG_FEATURE_2_6_MODULES=y +# CONFIG_FEATURE_QUERY_MODULE_INTERFACE is not set + +# +# Linux System Utilities +# +CONFIG_DMESG=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +CONFIG_FEATURE_FBSET_READMODE=y +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FREERAMDISK is not set +CONFIG_FSCK_MINIX=y +CONFIG_MKFS_MINIX=y + +# +# Minix filesystem support +# +CONFIG_FEATURE_MINIX2=y +# CONFIG_GETOPT is not set +CONFIG_HEXDUMP=y +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y +CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y +# CONFIG_IPCRM is not set +# CONFIG_IPCS is not set +CONFIG_LOSETUP=y +# CONFIG_MDEV is not set +# CONFIG_FEATURE_MDEV_CONF is not set +# CONFIG_FEATURE_MDEV_EXEC is not set +CONFIG_MKSWAP=y +# CONFIG_FEATURE_MKSWAP_V0 is not set +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_MOUNT=y +CONFIG_FEATURE_MOUNT_NFS=y +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +# CONFIG_READPROFILE is not set +# CONFIG_SETARCH is not set +CONFIG_SWAPONOFF=y +# CONFIG_SWITCH_ROOT is not set +CONFIG_UMOUNT=y +# CONFIG_FEATURE_UMOUNT_ALL is not set + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_CROND is not set +# CONFIG_DEBUG_CROND_OPTION is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +# CONFIG_CRONTAB is not set +CONFIG_DC=y +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +# CONFIG_EJECT is not set +# CONFIG_LAST is not set +CONFIG_LESS=y +CONFIG_FEATURE_LESS_BRACKETS=y +CONFIG_FEATURE_LESS_FLAGS=y +# CONFIG_FEATURE_LESS_FLAGCS is not set +# CONFIG_FEATURE_LESS_MARKS is not set +# CONFIG_FEATURE_LESS_REGEXP is not set +# CONFIG_HDPARM is not set +# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +# CONFIG_FEATURE_MAKEDEVS_TABLE is not set +# CONFIG_MOUNTPOINT is not set +# CONFIG_MT is not set +# CONFIG_RUNLEVEL is not set +# CONFIG_RX is not set +CONFIG_STRINGS=y +# CONFIG_SETSID is not set +# CONFIG_TASKSET is not set +CONFIG_TIME=y +# CONFIG_WATCHDOG is not set + +# +# Networking Utilities +# +CONFIG_FEATURE_IPV6=y +# CONFIG_ARPING is not set +# CONFIG_DNSD is not set +# CONFIG_ETHER_WAKE is not set +# CONFIG_FAKEIDENTD is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +CONFIG_HOSTNAME=y +CONFIG_HTTPD=y +CONFIG_FEATURE_HTTPD_WITHOUT_INETD=y +CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP=y +# CONFIG_FEATURE_HTTPD_SETUID is not set +CONFIG_FEATURE_HTTPD_BASIC_AUTH=y +CONFIG_FEATURE_HTTPD_AUTH_MD5=y +CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES=y +CONFIG_FEATURE_HTTPD_CGI=y +CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y +CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y +CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +CONFIG_IFUPDOWN=y +# CONFIG_FEATURE_IFUPDOWN_IP is not set +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +# CONFIG_INETD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set +# CONFIG_FEATURE_INETD_RPC is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +# CONFIG_FEATURE_IP_SHORT_FORMS is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +# CONFIG_NAMEIF is not set +CONFIG_NC=y +# CONFIG_NC_GAPING_SECURITY_HOLE is not set +CONFIG_NETSTAT=y +CONFIG_NSLOOKUP=y +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +CONFIG_PING6=y +CONFIG_FEATURE_FANCY_PING6=y +CONFIG_ROUTE=y +CONFIG_TELNET=y +# CONFIG_FEATURE_TELNET_TTYPE is not set +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_INETD is not set +CONFIG_TFTP=y +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set +# CONFIG_DEBUG_TFTP is not set +CONFIG_TRACEROUTE=y +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set + +# +# udhcp Server/Client +# +CONFIG_APP_UDHCPD=y +CONFIG_APP_UDHCPC=y +CONFIG_APP_DUMPLEASES=y +CONFIG_FEATURE_UDHCP_SYSLOG=y +# CONFIG_FEATURE_UDHCP_DEBUG is not set +# CONFIG_VCONFIG is not set +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_IP6_LITERAL=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y +# CONFIG_ZCIP is not set + +# +# Process Utilities +# +CONFIG_FREE=y +CONFIG_FUSER=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_PIDOF=y +# CONFIG_FEATURE_PIDOF_SINGLE is not set +# CONFIG_FEATURE_PIDOF_OMIT is not set +CONFIG_PS=y +CONFIG_FEATURE_PS_WIDE=y +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_UPTIME=y + +# +# Shells +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_JOB_CONTROL=y +# CONFIG_ASH_READ_NCHARS is not set +# CONFIG_ASH_READ_TIMEOUT is not set +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_MATH_SUPPORT_64 is not set +CONFIG_ASH_GETOPTS=y +# CONFIG_ASH_BUILTIN_ECHO is not set +CONFIG_ASH_BUILTIN_TEST=y +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +# CONFIG_ASH_RANDOM_SUPPORT is not set +CONFIG_ASH_EXPAND_PRMT=y +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +CONFIG_FEATURE_COMMAND_EDITING=y +# CONFIG_FEATURE_COMMAND_EDITING_VI is not set +CONFIG_FEATURE_COMMAND_HISTORY=63 +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +CONFIG_FEATURE_SH_FANCY_PROMPT=y + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y +CONFIG_KLOGD=y +CONFIG_LOGGER=y -- cgit v1.2.3 From 9180d3c84d4df82e6f322f86b27bb2483fe8d946 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 6 Jul 2006 17:48:37 +0000 Subject: angstrom: some more tweaks to images and tasks --- packages/angstrom/angstrom-gpe-image.bb | 8 ++++---- packages/angstrom/task-angstrom.bb | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/angstrom/angstrom-gpe-image.bb b/packages/angstrom/angstrom-gpe-image.bb index 67947b89b0..e6dc88dffb 100644 --- a/packages/angstrom/angstrom-gpe-image.bb +++ b/packages/angstrom/angstrom-gpe-image.bb @@ -3,10 +3,10 @@ LICENSE = MIT MAINTAINER = "Koen Kooi " PR = "r1" -PREFERRED_PROVIDER_libgpewidget = "libgpewidget" -PREFERRED_PROVIDER_tslib = "tslib" -PREFERRED_PROVIDER_virtual/libsdl = "libsdl-x11" -PREFERRED_PROVIDER_virtual/libxine = "libxine-x11" +PREFERRED_PROVIDER_libgpewidget ?= "libgpewidget" +PREFERRED_PROVIDER_tslib ?= "tslib" +PREFERRED_PROVIDER_virtual/libsdl ?= "libsdl-x11" +PREFERRED_PROVIDER_virtual/libxine ?= "libxine-x11" ANGSTROM_EXTRA_INSTALL ?= "" XSERVER ?= "xserver-kdrive-fbdev" diff --git a/packages/angstrom/task-angstrom.bb b/packages/angstrom/task-angstrom.bb index ec989659f1..6c9224aca6 100644 --- a/packages/angstrom/task-angstrom.bb +++ b/packages/angstrom/task-angstrom.bb @@ -1,9 +1,12 @@ DESCRIPTION = "Task packages for the Angstrom distribution" -PR = "r0" +PR = "r2" ALLOW_EMPTY = "1" +BOOTMODULES_RRECOMMENDS ?= "" + PACKAGES = "\ angstrom-base-depends \ + angstrom-base-wifi \ angstrom-x11-base-depends \ angsgrom-gpe-task-base \ angstrom-gpe-task-settings \ @@ -15,19 +18,29 @@ PACKAGES = "\ angstrom-task-sectest" RDEPENDS_angstrom-base-depends = "\ - base-files \ + base-files keymaps \ base-passwd tinylogin \ busybox \ udev \ sysvinit initscripts sysvinit-pidof \ netbase \ - angstrom-version \ + angstrom-version \ + ipkg \ " RRECOMMENDS_angstrom-base-depends = "\ ${BOOTMODULES_RRECOMMENDS} \ " +RDEPENDS_angstrom-base-wifi = "\ + hostap-utils \ + hostap-conf \ + prism3-support \ + prism3-firmware \ + acx-firmware \ + wireless-tools \ + wpa-supplicant \ + " RDEPENDS_angstrom-x11-base-depends := "\ diet-x11 \ -- cgit v1.2.3 From a64033ce2a9d11b1336f7dee39203bbcee43f579 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 6 Jul 2006 17:58:49 +0000 Subject: task-angstrom: D'oh, somehow I forgot to add dropbear --- packages/angstrom/task-angstrom.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/angstrom/task-angstrom.bb b/packages/angstrom/task-angstrom.bb index 6c9224aca6..8174e173be 100644 --- a/packages/angstrom/task-angstrom.bb +++ b/packages/angstrom/task-angstrom.bb @@ -1,5 +1,5 @@ DESCRIPTION = "Task packages for the Angstrom distribution" -PR = "r2" +PR = "r3" ALLOW_EMPTY = "1" BOOTMODULES_RRECOMMENDS ?= "" @@ -23,7 +23,7 @@ RDEPENDS_angstrom-base-depends = "\ busybox \ udev \ sysvinit initscripts sysvinit-pidof \ - netbase \ + netbase dropbear \ angstrom-version \ ipkg \ " -- cgit v1.2.3