Commit 78c72fc2 authored by Sam Ravnborg's avatar Sam Ravnborg

Merge mars.ravnborg.org:/home/sam/bk/linux-2.6

into mars.ravnborg.org:/home/sam/bk/to-akpm
parents 0a266a89 242ee420
...@@ -6,7 +6,7 @@ This document describes the Linux kernel Makefiles. ...@@ -6,7 +6,7 @@ This document describes the Linux kernel Makefiles.
=== 1 Overview === 1 Overview
=== 2 Who does what === 2 Who does what
=== 3 The kbuild Makefiles === 3 The kbuild files
--- 3.1 Goal definitions --- 3.1 Goal definitions
--- 3.2 Built-in object goals - obj-y --- 3.2 Built-in object goals - obj-y
--- 3.3 Loadable module goals - obj-m --- 3.3 Loadable module goals - obj-m
...@@ -101,11 +101,14 @@ These people need to know about all aspects of the kernel Makefiles. ...@@ -101,11 +101,14 @@ These people need to know about all aspects of the kernel Makefiles.
This document is aimed towards normal developers and arch developers. This document is aimed towards normal developers and arch developers.
=== 3 The kbuild Makefiles === 3 The kbuild files
Most Makefiles within the kernel are kbuild Makefiles that use the Most Makefiles within the kernel are kbuild Makefiles that use the
kbuild infrastructure. This chapter introduce the syntax used in the kbuild infrastructure. This chapter introduce the syntax used in the
kbuild makefiles. kbuild makefiles.
The preferred name for the kbuild files is 'Kbuild' but 'Makefile' will
continue to be supported. All new developmen is expected to use the
Kbuild filename.
Section 3.1 "Goal definitions" is a quick intro, further chapters provide Section 3.1 "Goal definitions" is a quick intro, further chapters provide
more details, with real examples. more details, with real examples.
...@@ -707,15 +710,17 @@ When kbuild executes the following steps are followed (roughly): ...@@ -707,15 +710,17 @@ When kbuild executes the following steps are followed (roughly):
probe supported options: probe supported options:
#arch/i386/Makefile #arch/i386/Makefile
check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc \
/dev/null\ > /dev/null 2>&1; then echo "$(1)"; \
else echo "$(2)"; fi)
cflags-$(CONFIG_MCYRIXIII) += $(call check_gcc,\
-march=c3,-march=i486)
CFLAGS += $(cflags-y) ...
cflags-$(CONFIG_MPENTIUMII) += $(call cc-option,\
-march=pentium2,-march=i686)
...
# Disable unit-at-a-time mode ...
CFLAGS += $(call cc-option,-fno-unit-at-a-time)
...
The above examples both utilise the trick that a config option expands The first examples utilises the trick that a config option expands
to 'y' when selected. to 'y' when selected.
CFLAGS_KERNEL $(CC) options specific for built-in CFLAGS_KERNEL $(CC) options specific for built-in
......
...@@ -440,6 +440,12 @@ ifeq ($(config-targets),1) ...@@ -440,6 +440,12 @@ ifeq ($(config-targets),1)
# *config targets only - make sure prerequisites are updated, and descend # *config targets only - make sure prerequisites are updated, and descend
# in scripts/kconfig to make the *config target # in scripts/kconfig to make the *config target
# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
# KBUILD_DEFCONFIG may point out an alternative default configuration
# used for 'make defconfig'
include $(srctree)/arch/$(ARCH)/Makefile
export KBUILD_DEFCONFIG
config: scripts_basic outputmakefile FORCE config: scripts_basic outputmakefile FORCE
$(Q)$(MAKE) $(build)=scripts/kconfig $@ $(Q)$(MAKE) $(build)=scripts/kconfig $@
%config: scripts_basic outputmakefile FORCE %config: scripts_basic outputmakefile FORCE
......
...@@ -13,6 +13,10 @@ OBJCOPYFLAGS :=-O binary -R .note -R .comment -S ...@@ -13,6 +13,10 @@ OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
GZFLAGS :=-9 GZFLAGS :=-9
#CFLAGS +=-pipe #CFLAGS +=-pipe
# Do not use arch/arm/defconfig - it's always outdated.
# Select a platform tht is kept up-to-date
KBUILD_DEFCONFIG := versatile_defconfig
ifeq ($(CONFIG_FRAME_POINTER),y) ifeq ($(CONFIG_FRAME_POINTER),y)
CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
endif endif
......
#
# Automatically generated make config: don't edit
#
CONFIG_ARM=y
# CONFIG_EISA is not set
# CONFIG_SBUS is not set
# CONFIG_MCA is not set
CONFIG_UID16=y
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
# CONFIG_OBSOLETE is not set
#
# Loadable module support
#
# CONFIG_MODULES is not set
#
# System Type
#
# CONFIG_ARCH_ARCA5K is not set
# CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CO285 is not set
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_FOOTBRIDGE is not set
CONFIG_ARCH_INTEGRATOR=y
# CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_CLPS711X is not set
#
# Archimedes/A5000 Implementations
#
#
# Footbridge Implementations
#
#
# SA11x0 Implementations
#
#
# CLPS711X/EP721X Implementations
#
# CONFIG_ARCH_ACORN is not set
# CONFIG_FOOTBRIDGE is not set
# CONFIG_FOOTBRIDGE_HOST is not set
# CONFIG_FOOTBRIDGE_ADDIN is not set
CONFIG_CPU_32=y
# CONFIG_CPU_26 is not set
#
# Processor Type
#
CONFIG_CPU_32v4=y
CONFIG_CPU_ARM720=y
CONFIG_CPU_ARM920=y
CONFIG_CPU_ARM920_CPU_IDLE=y
CONFIG_CPU_ARM920_I_CACHE_ON=y
CONFIG_CPU_ARM920_D_CACHE_ON=y
# CONFIG_CPU_ARM920_WRITETHROUGH is not set
# CONFIG_DISCONTIGMEM is not set
#
# General setup
#
# CONFIG_ANGELBOOT is not set
CONFIG_PCI_INTEGRATOR=y
CONFIG_PCI=y
# CONFIG_ISA is not set
# CONFIG_ISA_DMA is not set
CONFIG_PCI_NAMES=y
# CONFIG_HOTPLUG is not set
# CONFIG_PCMCIA is not set
CONFIG_NET=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
CONFIG_NWFPE=y
CONFIG_KCORE_ELF=y
# CONFIG_KCORE_AOUT is not set
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_PM is not set
# CONFIG_ARTHUR is not set
CONFIG_CMDLINE="root=1f04 mem=32M"
CONFIG_LEDS=y
CONFIG_LEDS_TIMER=y
CONFIG_LEDS_CPU=y
CONFIG_ALIGNMENT_TRAP=y
#
# Parallel port support
#
# CONFIG_PARPORT is not set
#
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
# CONFIG_MTD_DOC1000 is not set
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
# CONFIG_MTD_DOCPROBE is not set
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_MTDRAM is not set
#
# MTD drivers for mapped chips
#
CONFIG_MTD_CFI=y
CONFIG_MTD_CFI_INTELEXT=y
# CONFIG_MTD_CFI_AMDSTD is not set
# CONFIG_MTD_JEDEC is not set
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_PHYSMAP is not set
#
# Drivers for chip mappings
#
# CONFIG_MTD_MIXMEM is not set
# CONFIG_MTD_NORA is not set
# CONFIG_MTD_OCTAGON is not set
# CONFIG_MTD_PNC2000 is not set
# CONFIG_MTD_RPXLITE is not set
# CONFIG_MTD_VMAX is not set
#
# User modules and translation layers for MTD devices
#
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
CONFIG_MTD_ARM=y
#
# Plug and Play configuration
#
# CONFIG_PNP is not set
# CONFIG_ISAPNP is not set
#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
# CONFIG_BLK_DEV_INITRD is not set
#
# Networking options
#
# CONFIG_PACKET is not set
# CONFIG_NETLINK is not set
# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_PNP=y
CONFIG_IP_PNP_BOOTP=y
# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_IPV6 is not set
# CONFIG_KHTTPD is not set
# CONFIG_ATM is not set
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_LLC is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
#
# Network device support
#
CONFIG_NETDEVICES=y
#
# ARCnet devices
#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_NET_SB1000 is not set
#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
# CONFIG_HP100 is not set
# CONFIG_NET_ISA is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_APRICOT is not set
# CONFIG_CS89x0 is not set
CONFIG_TULIP=y
# CONFIG_DE4X5 is not set
# CONFIG_DGRS is not set
# CONFIG_DM9102 is not set
CONFIG_EEPRO100=y
CONFIG_EEPRO100_PM=y
# CONFIG_LNE390 is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_NE3210 is not set
# CONFIG_ES3210 is not set
# CONFIG_8139TOO is not set
# CONFIG_RTL8129 is not set
# 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
# CONFIG_WINBOND_840 is not set
# CONFIG_HAPPYMEAL is not set
# CONFIG_NET_POCKET is not set
#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_SK98LIN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set
#
# Token Ring devices
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# IrDA (infrared) support
#
# CONFIG_IRDA is not set
#
# ATA/IDE/MFM/RLL support
#
# CONFIG_IDE is not set
# CONFIG_BLK_DEV_HD is not set
#
# SCSI support
#
# CONFIG_SCSI is not set
#
# IEEE 1394 (FireWire) support
#
# CONFIG_IEEE1394 is not set
#
# I2O device support
#
# CONFIG_I2O is not set
# CONFIG_I2O_PCI is not set
# CONFIG_I2O_BLOCK is not set
# CONFIG_I2O_LAN is not set
# CONFIG_I2O_SCSI is not set
# CONFIG_I2O_PROC is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# Input core support
#
# CONFIG_INPUT is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
# CONFIG_SERIAL is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_SERIAL_AMBA=y
CONFIG_SERIAL_INTEGRATOR=y
CONFIG_SERIAL_AMBA_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
#
# I2C support
#
# CONFIG_I2C is not set
#
# Mice
#
# CONFIG_BUSMOUSE is not set
CONFIG_MOUSE=y
CONFIG_PSMOUSE=y
# CONFIG_82C710_MOUSE is not set
# CONFIG_PC110_PAD is not set
#
# Joysticks
#
# CONFIG_JOYSTICK is not set
#
# Input core support is needed for joysticks
#
# CONFIG_QIC02_TAPE is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_INTEL_RNG is not set
# CONFIG_NVRAM is not set
# CONFIG_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_FTAPE is not set
# CONFIG_AGP is not set
# CONFIG_DRM is not set
#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
#
# File systems
#
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_ADFS_FS is not set
# CONFIG_ADFS_FS_RW is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS is not set
# CONFIG_UMSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_RAMFS is not set
# CONFIG_ISO9660_FS is not set
# CONFIG_JOLIET is not set
# CONFIG_MINIX_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_DEVFS_MOUNT is not set
# CONFIG_DEVFS_DEBUG is not set
CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX4FS_RW is not set
CONFIG_ROMFS_FS=y
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_SYSV_FS_WRITE is not set
# CONFIG_UDF_FS is not set
# CONFIG_UDF_RW is not set
# CONFIG_UFS_FS is not set
# CONFIG_UFS_FS_WRITE is not set
#
# Network File Systems
#
# CONFIG_CODA_FS is not set
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
CONFIG_ROOT_NFS=y
# CONFIG_NFSD is not set
# CONFIG_NFSD_V3 is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
# CONFIG_NCPFS_PACKET_SIGNING is not set
# CONFIG_NCPFS_IOCTL_LOCKING is not set
# CONFIG_NCPFS_STRONG is not set
# CONFIG_NCPFS_NFS_NS is not set
# CONFIG_NCPFS_OS2_NS is not set
# CONFIG_NCPFS_SMALLDOS is not set
# CONFIG_NCPFS_MOUNT_SUBDIR is not set
# CONFIG_NCPFS_NDS_DOMAINS is not set
# CONFIG_NCPFS_NLS is not set
# CONFIG_NCPFS_EXTRAS is not set
#
# 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 is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_NLS is not set
#
# Console drivers
#
CONFIG_KMI_KEYB=y
CONFIG_PC_KEYMAP=y
CONFIG_VGA_CONSOLE=y
# CONFIG_FB is not set
#
# Frame-buffer support
#
# CONFIG_FB is not set
#
# Sound
#
# CONFIG_SOUND is not set
#
# USB support
#
# CONFIG_USB is not set
#
# Kernel hacking
#
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_INFO is not set
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_LL=y
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <linux/a.out.h> #include <linux/a.out.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/config.h> #include <linux/config.h>
#include <linux/version.h> #include <linux/utsname.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/reboot.h> #include <linux/reboot.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -230,7 +230,8 @@ void show_regs(struct pt_regs * regs) ...@@ -230,7 +230,8 @@ void show_regs(struct pt_regs * regs)
if (regs->xcs & 3) if (regs->xcs & 3)
printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
printk(" EFLAGS: %08lx %s (%s)\n",regs->eflags, print_tainted(),UTS_RELEASE); printk(" EFLAGS: %08lx %s (%s)\n",
regs->eflags, print_tainted(), system_utsname.release);
printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
regs->eax,regs->ebx,regs->ecx,regs->edx); regs->eax,regs->ebx,regs->ecx,regs->edx);
printk("ESI: %08lx EDI: %08lx EBP: %08lx", printk("ESI: %08lx EDI: %08lx EBP: %08lx",
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <linux/highmem.h> #include <linux/highmem.h>
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/version.h> #include <linux/utsname.h>
#include <linux/kprobes.h> #include <linux/kprobes.h>
#ifdef CONFIG_EISA #ifdef CONFIG_EISA
...@@ -218,7 +218,7 @@ void show_registers(struct pt_regs *regs) ...@@ -218,7 +218,7 @@ void show_registers(struct pt_regs *regs)
printk("CPU: %d\nEIP: %04x:[<%08lx>] %s VLI\nEFLAGS: %08lx" printk("CPU: %d\nEIP: %04x:[<%08lx>] %s VLI\nEFLAGS: %08lx"
" (%s) \n", " (%s) \n",
smp_processor_id(), 0xffff & regs->xcs, regs->eip, smp_processor_id(), 0xffff & regs->xcs, regs->eip,
print_tainted(), regs->eflags, UTS_RELEASE); print_tainted(), regs->eflags, system_utsname.release);
print_symbol("EIP is at %s\n", regs->eip); print_symbol("EIP is at %s\n", regs->eip);
printk("eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", printk("eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n",
regs->eax, regs->ebx, regs->ecx, regs->edx); regs->eax, regs->ebx, regs->ecx, regs->edx);
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
LDFLAGS := LDFLAGS :=
OBJCOPYFLAGS := -O binary -R .note -R .comment -S OBJCOPYFLAGS := -O binary -R .note -R .comment -S
LDFLAGS_vmlinux := -e startup_32 LDFLAGS_vmlinux := -e startup_32
LDFLAGS_BLOB := --format binary --oformat elf32-m32r
CFLAGS += -pipe -fno-schedule-insns CFLAGS += -pipe -fno-schedule-insns
CFLAGS_KERNEL += -mmodel=medium CFLAGS_KERNEL += -mmodel=medium
......
...@@ -28,9 +28,6 @@ $(obj)/vmlinux.bin: vmlinux FORCE ...@@ -28,9 +28,6 @@ $(obj)/vmlinux.bin: vmlinux FORCE
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
$(call if_changed,gzip) $(call if_changed,gzip)
$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.S FORCE
$(CPP) $(EXTRA_AFLAGS) -C -P -I include $< >$@
LDFLAGS_piggy.o := -r --format binary --oformat elf32-m32r-linux -T LDFLAGS_piggy.o := -r --format binary --oformat elf32-m32r-linux -T
OBJCOPYFLAGS += -R .empty_zero_page OBJCOPYFLAGS += -R .empty_zero_page
......
...@@ -2,9 +2,22 @@ ...@@ -2,9 +2,22 @@
# Makefile for some libs needed by zImage. # Makefile for some libs needed by zImage.
# #
CFLAGS_kbd.o += -Idrivers/char CFLAGS_kbd.o := -Idrivers/char
CFLAGS_vreset.o := -I$(srctree)/arch/ppc/boot/include
lib-y := $(addprefix ../../../../lib/zlib_inflate/, \ zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c
infblock.o infcodes.o inffast.o inflate.o inftrees.o infutil.o)
lib-y += div64.o lib-y += $(zlib:.c=.o) div64.o
lib-$(CONFIG_VGA_CONSOLE) += vreset.o kbd.o lib-$(CONFIG_VGA_CONSOLE) += vreset.o kbd.o
# zlib files needs header from their original place
EXTRA_CFLAGS += -Ilib/zlib_inflate
quiet_cmd_copy_zlib = COPY $@
cmd_copy_zlib = cat $< > $@
$(addprefix $(obj)/,$(zlib)): $(obj)/%: $(srctree)/lib/zlib_inflate/%
$(call cmd,copy_zlib)
clean-files := $(zlib)
...@@ -118,6 +118,6 @@ $(obj)/imagesize.c: vmlinux.strip ...@@ -118,6 +118,6 @@ $(obj)/imagesize.c: vmlinux.strip
>> $(obj)/imagesize.c >> $(obj)/imagesize.c
install: $(CONFIGURE) $(obj)/$(BOOTIMAGE) install: $(CONFIGURE) $(obj)/$(BOOTIMAGE)
sh -x $(src)/install.sh "$(KERNELRELEASE)" "$(obj)/$(BOOTIMAGE)" "$(INSTALL_PATH)" sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" "$(obj)/$(BOOTIMAGE)" "$(INSTALL_PATH)"
clean-files := $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip) clean-files := $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip)
...@@ -86,8 +86,8 @@ config SMP ...@@ -86,8 +86,8 @@ config SMP
depends on BROKEN depends on BROKEN
---help--- ---help---
This enables support for systems with more than one CPU. If you have This enables support for systems with more than one CPU. If you have
a system with only one CPU, like most personal computers, say N. If a system with only one CPU, say N. If you have a system with more
you have a system with more than one CPU, say Y. than one CPU, say Y.
If you say N here, the kernel will run on single and multiprocessor If you say N here, the kernel will run on single and multiprocessor
machines, but will use only one CPU of a multiprocessor machine. If machines, but will use only one CPU of a multiprocessor machine. If
...@@ -95,17 +95,11 @@ config SMP ...@@ -95,17 +95,11 @@ config SMP
singleprocessor machines. On a singleprocessor machine, the kernel singleprocessor machines. On a singleprocessor machine, the kernel
will run faster if you say N here. will run faster if you say N here.
Note that if you say Y here and choose architecture "586" or
"Pentium" under "Processor family", the kernel will not work on 486
architectures. Similarly, multiprocessor kernels for the "PPro"
architecture may not work on all Pentium based boards.
People using multiprocessor machines who say Y here should also say People using multiprocessor machines who say Y here should also say
Y to "Enhanced Real Time Clock Support", below. The "Advanced Power Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
Management" code will be disabled if you say Y here. Management" code will be disabled if you say Y here.
See also the <file:Documentation/smp.txt>, See also the <file:Documentation/smp.txt>,
<file:Documentation/i386/IO-APIC.txt>,
<file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
<http://www.tldp.org/docs.html#howto>. <http://www.tldp.org/docs.html#howto>.
...@@ -189,10 +183,10 @@ config SERIAL_CONSOLE ...@@ -189,10 +183,10 @@ config SERIAL_CONSOLE
(/dev/tty0) will still be used as the system console by default, but (/dev/tty0) will still be used as the system console by default, but
you can alter that using a kernel command line option such as you can alter that using a kernel command line option such as
"console=ttyS1". (Try "man bootparam" or see the documentation of "console=ttyS1". (Try "man bootparam" or see the documentation of
your boot loader (lilo or loadlin) about how to pass options to the your boot loader (silo) about how to pass options to the kernel at
kernel at boot time.) boot time.)
If you don't have a VGA card installed and you say Y here, the If you don't have a graphics card installed and you say Y here, the
kernel will automatically use the first serial line, /dev/ttyS0, as kernel will automatically use the first serial line, /dev/ttyS0, as
system console. system console.
...@@ -223,6 +217,7 @@ config SUN_PM ...@@ -223,6 +217,7 @@ config SUN_PM
config SUN4 config SUN4
bool "Support for SUN4 machines (disables SUN4[CDM] support)" bool "Support for SUN4 machines (disables SUN4[CDM] support)"
depends on !SMP depends on !SMP
default n
help help
Say Y here if, and only if, your machine is a sun4. Note that Say Y here if, and only if, your machine is a sun4. Note that
a kernel compiled with this option will run only on sun4. a kernel compiled with this option will run only on sun4.
...@@ -249,7 +244,10 @@ config SUN_OPENPROMFS ...@@ -249,7 +244,10 @@ config SUN_OPENPROMFS
-t openpromfs none /proc/openprom". -t openpromfs none /proc/openprom".
To compile the /proc/openprom support as a module, choose M here: the To compile the /proc/openprom support as a module, choose M here: the
module will be called openpromfs. If unsure, choose M. module will be called openpromfs.
Only choose N if you know in advance that you will not need to modify
OpenPROM settings on the running system.
source "fs/Kconfig.binfmt" source "fs/Kconfig.binfmt"
...@@ -282,9 +280,9 @@ config PRINTER ...@@ -282,9 +280,9 @@ config PRINTER
If you have several parallel ports, you can specify which ports to If you have several parallel ports, you can specify which ports to
use with the "lp" kernel command line option. (Try "man bootparam" use with the "lp" kernel command line option. (Try "man bootparam"
or see the documentation of your boot loader (lilo or loadlin) about or see the documentation of your boot loader (silo) about how to pass
how to pass options to the kernel at boot time.) The syntax of the options to the kernel at boot time.) The syntax of the "lp" command
"lp" command line option can be found in <file:drivers/char/lp.c>. line option can be found in <file:drivers/char/lp.c>.
If you have more than 8 printers, you need to increase the LP_NO If you have more than 8 printers, you need to increase the LP_NO
macro in lp.c and the PARPORT_MAX macro in parport.h. macro in lp.c and the PARPORT_MAX macro in parport.h.
......
...@@ -10,7 +10,7 @@ __build: ...@@ -10,7 +10,7 @@ __build:
# Read .config if it exist, otherwise ignore # Read .config if it exist, otherwise ignore
-include .config -include .config
include $(obj)/Makefile include $(if $(wildcard $(obj)/Kbuild), $(obj)/Kbuild, $(obj)/Makefile)
include scripts/Makefile.lib include scripts/Makefile.lib
......
...@@ -7,7 +7,7 @@ src := $(obj) ...@@ -7,7 +7,7 @@ src := $(obj)
.PHONY: __clean .PHONY: __clean
__clean: __clean:
include $(obj)/Makefile include $(if $(wildcard $(obj)/Kbuild), $(obj)/Kbuild, $(obj)/Makefile)
# Figure out what we need to build from the various variables # Figure out what we need to build from the various variables
# ========================================================================== # ==========================================================================
......
...@@ -225,10 +225,10 @@ void parse_config_file(signed char *map, size_t len) ...@@ -225,10 +225,10 @@ void parse_config_file(signed char *map, size_t len)
signed char *p, *q; signed char *p, *q;
for (; m < end; m++) { for (; m < end; m++) {
if (*m == INT_CONF) { p = (char *) m ; goto conf; } if (*m == INT_CONF) { p = (signed char *) m ; goto conf; }
if (*m == INT_ONFI) { p = (char *) m-1; goto conf; } if (*m == INT_ONFI) { p = (signed char *) m-1; goto conf; }
if (*m == INT_NFIG) { p = (char *) m-2; goto conf; } if (*m == INT_NFIG) { p = (signed char *) m-2; goto conf; }
if (*m == INT_FIG_) { p = (char *) m-3; goto conf; } if (*m == INT_FIG_) { p = (signed char *) m-3; goto conf; }
continue; continue;
conf: conf:
if (p > map + len - 7) if (p > map + len - 7)
......
...@@ -37,6 +37,18 @@ filetype() { ...@@ -37,6 +37,18 @@ filetype() {
return 0 return 0
} }
print_mtime() {
local argv1="$1"
local my_mtime="0"
if [ -e "${argv1}" ]; then
my_mtime=$(find "${argv1}" -printf "%T@\n" | sort -r | head -n 1)
fi
echo "# Last modified: ${my_mtime}"
echo
}
parse() { parse() {
local location="$1" local location="$1"
local name="${location/${srcdir}//}" local name="${location/${srcdir}//}"
...@@ -77,16 +89,19 @@ parse() { ...@@ -77,16 +89,19 @@ parse() {
return 0 return 0
} }
if [ -z $1 ]; then if [ -z "$1" ]; then
simple_initramfs simple_initramfs
elif [ -f $1 ]; then elif [ -f "$1" ]; then
cat $1 print_mtime "$1"
elif [ -d $1 ]; then cat "$1"
elif [ -d "$1" ]; then
srcdir=$(echo "$1" | sed -e 's://*:/:g') srcdir=$(echo "$1" | sed -e 's://*:/:g')
dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" 2>/dev/null) dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" 2>/dev/null)
# If $dirlist is only one line, then the directory is empty # If $dirlist is only one line, then the directory is empty
if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then
print_mtime "$1"
echo "${dirlist}" | \ echo "${dirlist}" | \
while read x; do while read x; do
parse ${x} parse ${x}
......
...@@ -132,7 +132,17 @@ read_symbol(FILE *in, struct sym_entry *s) ...@@ -132,7 +132,17 @@ read_symbol(FILE *in, struct sym_entry *s)
_sinittext = s->addr; _sinittext = s->addr;
else if (strcmp(str, "_einittext") == 0) else if (strcmp(str, "_einittext") == 0)
_einittext = s->addr; _einittext = s->addr;
else if (toupper(s->type) == 'A' || toupper(s->type) == 'U' || else if (toupper(s->type) == 'A')
{
/* Keep these useful absolute symbols */
if (strcmp(str, "__kernel_syscall_via_break") &&
strcmp(str, "__kernel_syscall_via_epc") &&
strcmp(str, "__kernel_sigtramp") &&
strcmp(str, "__gp"))
return -1;
}
else if (toupper(s->type) == 'U' ||
is_arm_mapping_symbol(str)) is_arm_mapping_symbol(str))
return -1; return -1;
......
...@@ -38,7 +38,12 @@ allmodconfig: $(obj)/conf ...@@ -38,7 +38,12 @@ allmodconfig: $(obj)/conf
$< -m arch/$(ARCH)/Kconfig $< -m arch/$(ARCH)/Kconfig
defconfig: $(obj)/conf defconfig: $(obj)/conf
ifeq ($(KBUILD_DEFCONFIG),)
$< -d arch/$(ARCH)/Kconfig $< -d arch/$(ARCH)/Kconfig
else
@echo *** Default configuration is based on '$(KBUILD_DEFCONFIG)'
$(Q)$< -D arch/$(ARCH)/configs/$(KBUILD_DEFCONFIG) arch/$(ARCH)/Kconfig
endif
%_defconfig: $(obj)/conf %_defconfig: $(obj)/conf
$(Q)$< -D arch/$(ARCH)/configs/$@ arch/$(ARCH)/Kconfig $(Q)$< -D arch/$(ARCH)/configs/$@ arch/$(ARCH)/Kconfig
...@@ -65,11 +70,9 @@ help: ...@@ -65,11 +70,9 @@ help:
# Based on GTK which needs to be installed to compile it # Based on GTK which needs to be installed to compile it
# object files used by all kconfig flavours # object files used by all kconfig flavours
libkconfig-objs := zconf.tab.o
hostprogs-y := conf mconf qconf gconf hostprogs-y := conf mconf qconf gconf
conf-objs := conf.o libkconfig.so conf-objs := conf.o zconf.tab.o
mconf-objs := mconf.o libkconfig.so mconf-objs := mconf.o zconf.tab.o
ifeq ($(MAKECMDGOALS),xconfig) ifeq ($(MAKECMDGOALS),xconfig)
qconf-target := 1 qconf-target := 1
...@@ -88,7 +91,7 @@ ifeq ($(gconf-target),1) ...@@ -88,7 +91,7 @@ ifeq ($(gconf-target),1)
gconf-objs := gconf.o kconfig_load.o gconf-objs := gconf.o kconfig_load.o
endif endif
clean-files := libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \ clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
.tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
# generated files seem to need this to find local include files # generated files seem to need this to find local include files
......
...@@ -105,10 +105,7 @@ use strict; ...@@ -105,10 +105,7 @@ use strict;
# enums and typedefs. Instead of the function name you must write the name # enums and typedefs. Instead of the function name you must write the name
# of the declaration; the struct/union/enum/typedef must always precede # of the declaration; the struct/union/enum/typedef must always precede
# the name. Nesting of declarations is not supported. # the name. Nesting of declarations is not supported.
# Use the argument mechanism to document members or constants. In # Use the argument mechanism to document members or constants.
# structs and unions you must declare one member per declaration
# (comma-separated members are not allowed - the parser does not support
# this).
# e.g. # e.g.
# /** # /**
# * struct my_struct - short description # * struct my_struct - short description
...@@ -455,7 +452,10 @@ sub output_struct_html(%) { ...@@ -455,7 +452,10 @@ sub output_struct_html(%) {
print "<h2>".$args{'type'}." ".$args{'struct'}."</h2>\n"; print "<h2>".$args{'type'}." ".$args{'struct'}."</h2>\n";
print "<b>".$args{'type'}." ".$args{'struct'}."</b> {<br>\n"; print "<b>".$args{'type'}." ".$args{'struct'}."</b> {<br>\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
($args{'parameterdescs'}{$parameter} ne $undescribed) || next; my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
$type = $args{'parametertypes'}{$parameter}; $type = $args{'parametertypes'}{$parameter};
if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) { if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) {
# pointer-to-function # pointer-to-function
...@@ -471,10 +471,13 @@ sub output_struct_html(%) { ...@@ -471,10 +471,13 @@ sub output_struct_html(%) {
print "<h3>Members</h3>\n"; print "<h3>Members</h3>\n";
print "<dl>\n"; print "<dl>\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
($args{'parameterdescs'}{$parameter} ne $undescribed) || next; my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
print "<dt><b>".$parameter."</b>\n"; print "<dt><b>".$parameter."</b>\n";
print "<dd>"; print "<dd>";
output_highlight($args{'parameterdescs'}{$parameter}); output_highlight($args{'parameterdescs'}{$parameter_name});
} }
print "</dl>\n"; print "</dl>\n";
output_section_html(@_); output_section_html(@_);
...@@ -510,10 +513,13 @@ sub output_function_html(%) { ...@@ -510,10 +513,13 @@ sub output_function_html(%) {
print "<h3>Arguments</h3>\n"; print "<h3>Arguments</h3>\n";
print "<dl>\n"; print "<dl>\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
($args{'parameterdescs'}{$parameter} ne $undescribed) || next; my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
print "<dt><b>".$parameter."</b>\n"; print "<dt><b>".$parameter."</b>\n";
print "<dd>"; print "<dd>";
output_highlight($args{'parameterdescs'}{$parameter}); output_highlight($args{'parameterdescs'}{$parameter_name});
} }
print "</dl>\n"; print "</dl>\n";
output_section_html(@_); output_section_html(@_);
...@@ -605,10 +611,13 @@ sub output_function_sgml(%) { ...@@ -605,10 +611,13 @@ sub output_function_sgml(%) {
if ($#{$args{'parameterlist'}} >= 0) { if ($#{$args{'parameterlist'}} >= 0) {
print " <variablelist>\n"; print " <variablelist>\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
print " <varlistentry>\n <term><parameter>$parameter</parameter></term>\n"; print " <varlistentry>\n <term><parameter>$parameter</parameter></term>\n";
print " <listitem>\n <para>\n"; print " <listitem>\n <para>\n";
$lineprefix=" "; $lineprefix=" ";
output_highlight($args{'parameterdescs'}{$parameter}); output_highlight($args{'parameterdescs'}{$parameter_name});
print " </para>\n </listitem>\n </varlistentry>\n"; print " </para>\n </listitem>\n </varlistentry>\n";
} }
print " </variablelist>\n"; print " </variablelist>\n";
...@@ -647,8 +656,11 @@ sub output_struct_sgml(%) { ...@@ -647,8 +656,11 @@ sub output_struct_sgml(%) {
print " <programlisting>\n"; print " <programlisting>\n";
print $args{'type'}." ".$args{'struct'}." {\n"; print $args{'type'}." ".$args{'struct'}." {\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
defined($args{'parameterdescs'}{$parameter}) || next; my $parameter_name = $parameter;
($args{'parameterdescs'}{$parameter} ne $undescribed) || next; $parameter_name =~ s/\[.*//;
defined($args{'parameterdescs'}{$parameter_name}) || next;
($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
$type = $args{'parametertypes'}{$parameter}; $type = $args{'parametertypes'}{$parameter};
if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) { if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) {
# pointer-to-function # pointer-to-function
...@@ -668,12 +680,15 @@ sub output_struct_sgml(%) { ...@@ -668,12 +680,15 @@ sub output_struct_sgml(%) {
print " <variablelist>\n"; print " <variablelist>\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
defined($args{'parameterdescs'}{$parameter}) || next; my $parameter_name = $parameter;
($args{'parameterdescs'}{$parameter} ne $undescribed) || next; $parameter_name =~ s/\[.*//;
defined($args{'parameterdescs'}{$parameter_name}) || next;
($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
print " <varlistentry>"; print " <varlistentry>";
print " <term>$parameter</term>\n"; print " <term>$parameter</term>\n";
print " <listitem><para>\n"; print " <listitem><para>\n";
output_highlight($args{'parameterdescs'}{$parameter}); output_highlight($args{'parameterdescs'}{$parameter_name});
print " </para></listitem>\n"; print " </para></listitem>\n";
print " </varlistentry>\n"; print " </varlistentry>\n";
} }
...@@ -728,10 +743,13 @@ sub output_enum_sgml(%) { ...@@ -728,10 +743,13 @@ sub output_enum_sgml(%) {
print " <title>Constants</title>\n"; print " <title>Constants</title>\n";
print " <variablelist>\n"; print " <variablelist>\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
print " <varlistentry>"; print " <varlistentry>";
print " <term>$parameter</term>\n"; print " <term>$parameter</term>\n";
print " <listitem><para>\n"; print " <listitem><para>\n";
output_highlight($args{'parameterdescs'}{$parameter}); output_highlight($args{'parameterdescs'}{$parameter_name});
print " </para></listitem>\n"; print " </para></listitem>\n";
print " </varlistentry>\n"; print " </varlistentry>\n";
} }
...@@ -842,10 +860,13 @@ sub output_function_gnome { ...@@ -842,10 +860,13 @@ sub output_function_gnome {
print "<colspec colwidth=\"8*\">\n"; print "<colspec colwidth=\"8*\">\n";
print "<tbody>\n"; print "<tbody>\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
print " <row><entry align=\"right\"><parameter>$parameter</parameter></entry>\n"; print " <row><entry align=\"right\"><parameter>$parameter</parameter></entry>\n";
print " <entry>\n"; print " <entry>\n";
$lineprefix=" "; $lineprefix=" ";
output_highlight($args{'parameterdescs'}{$parameter}); output_highlight($args{'parameterdescs'}{$parameter_name});
print " </entry></row>\n"; print " </entry></row>\n";
} }
print " </tbody></tgroup></informaltable>\n"; print " </tbody></tgroup></informaltable>\n";
...@@ -909,8 +930,11 @@ sub output_function_man(%) { ...@@ -909,8 +930,11 @@ sub output_function_man(%) {
print ".SH ARGUMENTS\n"; print ".SH ARGUMENTS\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
print ".IP \"".$parameter."\" 12\n"; print ".IP \"".$parameter."\" 12\n";
output_highlight($args{'parameterdescs'}{$parameter}); output_highlight($args{'parameterdescs'}{$parameter_name});
} }
foreach $section (@{$args{'sectionlist'}}) { foreach $section (@{$args{'sectionlist'}}) {
print ".SH \"", uc $section, "\"\n"; print ".SH \"", uc $section, "\"\n";
...@@ -947,8 +971,11 @@ sub output_enum_man(%) { ...@@ -947,8 +971,11 @@ sub output_enum_man(%) {
print ".SH Constants\n"; print ".SH Constants\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
print ".IP \"".$parameter."\" 12\n"; print ".IP \"".$parameter."\" 12\n";
output_highlight($args{'parameterdescs'}{$parameter}); output_highlight($args{'parameterdescs'}{$parameter_name});
} }
foreach $section (@{$args{'sectionlist'}}) { foreach $section (@{$args{'sectionlist'}}) {
print ".SH \"$section\"\n"; print ".SH \"$section\"\n";
...@@ -971,7 +998,10 @@ sub output_struct_man(%) { ...@@ -971,7 +998,10 @@ sub output_struct_man(%) {
print $args{'type'}." ".$args{'struct'}." {\n"; print $args{'type'}." ".$args{'struct'}." {\n";
foreach my $parameter (@{$args{'parameterlist'}}) { foreach my $parameter (@{$args{'parameterlist'}}) {
($args{'parameterdescs'}{$parameter} ne $undescribed) || next; my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
print "\n.br\n"; print "\n.br\n";
$type = $args{'parametertypes'}{$parameter}; $type = $args{'parametertypes'}{$parameter};
if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) { if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) {
...@@ -989,9 +1019,12 @@ sub output_struct_man(%) { ...@@ -989,9 +1019,12 @@ sub output_struct_man(%) {
print ".SH Arguments\n"; print ".SH Arguments\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
($args{'parameterdescs'}{$parameter} ne $undescribed) || next; my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
print ".IP \"".$parameter."\" 12\n"; print ".IP \"".$parameter."\" 12\n";
output_highlight($args{'parameterdescs'}{$parameter}); output_highlight($args{'parameterdescs'}{$parameter_name});
} }
foreach $section (@{$args{'sectionlist'}}) { foreach $section (@{$args{'sectionlist'}}) {
print ".SH \"$section\"\n"; print ".SH \"$section\"\n";
...@@ -1058,7 +1091,10 @@ sub output_function_text(%) { ...@@ -1058,7 +1091,10 @@ sub output_function_text(%) {
print "Arguments:\n\n"; print "Arguments:\n\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
print $parameter."\n\t".$args{'parameterdescs'}{$parameter}."\n"; my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
print $parameter."\n\t".$args{'parameterdescs'}{$parameter_name}."\n";
} }
output_section_text(@_); output_section_text(@_);
} }
...@@ -1123,7 +1159,10 @@ sub output_struct_text(%) { ...@@ -1123,7 +1159,10 @@ sub output_struct_text(%) {
print $args{'type'}." ".$args{'struct'}.":\n\n"; print $args{'type'}." ".$args{'struct'}.":\n\n";
print $args{'type'}." ".$args{'struct'}." {\n"; print $args{'type'}." ".$args{'struct'}." {\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
($args{'parameterdescs'}{$parameter} ne $undescribed) || next; my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
$type = $args{'parametertypes'}{$parameter}; $type = $args{'parametertypes'}{$parameter};
if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) { if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) {
# pointer-to-function # pointer-to-function
...@@ -1138,9 +1177,12 @@ sub output_struct_text(%) { ...@@ -1138,9 +1177,12 @@ sub output_struct_text(%) {
print "Members:\n\n"; print "Members:\n\n";
foreach $parameter (@{$args{'parameterlist'}}) { foreach $parameter (@{$args{'parameterlist'}}) {
($args{'parameterdescs'}{$parameter} ne $undescribed) || next; my $parameter_name = $parameter;
$parameter_name =~ s/\[.*//;
($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
print "$parameter\n\t"; print "$parameter\n\t";
print $args{'parameterdescs'}{$parameter}."\n"; print $args{'parameterdescs'}{$parameter_name}."\n";
} }
print "\n"; print "\n";
output_section_text(@_); output_section_text(@_);
...@@ -1318,26 +1360,45 @@ sub create_parameterlist($$$) { ...@@ -1318,26 +1360,45 @@ sub create_parameterlist($$$) {
$param = $1; $param = $1;
$type = $arg; $type = $arg;
$type =~ s/([^\(]+\(\*)$param/$1/; $type =~ s/([^\(]+\(\*)$param/$1/;
push_parameter($param, $type, $file);
} else { } else {
# evil magic to get fixed array parameters to work $arg =~ s/\s*:\s*/:/g;
$arg =~ s/(.+\s+)(.+)\[.*/$1* $2/; $arg =~ s/\s*\[/\[/g;
my @args = split('\s', $arg);
$param = pop @args; my @args = split('\s*,\s*', $arg);
if ($param =~ m/^(\*+)(.*)/) { if ($args[0] =~ m/\*/) {
$param = $2; $args[0] =~ s/(\*+)\s*/ $1/;
push @args, $1;
} }
elsif ($param =~ m/(.*?)\s*:\s*(\d+)/) { my @first_arg = split('\s+', shift @args);
$param = $1; unshift(@args, pop @first_arg);
push @args, ":$2"; $type = join " ", @first_arg;
foreach $param (@args) {
if ($param =~ m/^(\*+)\s*(.*)/) {
push_parameter($2, "$type $1", $file);
} }
$type = join " ", @args; elsif ($param =~ m/(.*?):(\d+)/) {
push_parameter($1, "$type:$2", $file)
}
else {
push_parameter($param, $type, $file);
} }
}
}
}
}
sub push_parameter($$$) {
my $param = shift;
my $type = shift;
my $file = shift;
my $param_name = $param;
$param_name =~ s/\[.*//;
if ($type eq "" && $param eq "...") if ($type eq "" && $param eq "...")
{ {
$type="..."; $type="";
$param="..."; $param="...";
$parameterdescs{"..."} = "variable arguments"; $parameterdescs{"..."} = "variable arguments";
} }
...@@ -1347,8 +1408,8 @@ sub create_parameterlist($$$) { ...@@ -1347,8 +1408,8 @@ sub create_parameterlist($$$) {
$param="void"; $param="void";
$parameterdescs{void} = "no arguments"; $parameterdescs{void} = "no arguments";
} }
if (defined $type && $type && !defined $parameterdescs{$param}) { if (defined $type && $type && !defined $parameterdescs{$param_name}) {
$parameterdescs{$param} = $undescribed; $parameterdescs{$param_name} = $undescribed;
if (($type eq 'function') || ($type eq 'enum')) { if (($type eq 'function') || ($type eq 'enum')) {
print STDERR "Warning(${file}:$.): Function parameter ". print STDERR "Warning(${file}:$.): Function parameter ".
...@@ -1362,7 +1423,6 @@ sub create_parameterlist($$$) { ...@@ -1362,7 +1423,6 @@ sub create_parameterlist($$$) {
push @parameterlist, $param; push @parameterlist, $param;
$parametertypes{$param} = $type; $parametertypes{$param} = $type;
}
} }
## ##
......
HOST_EXTRACFLAGS := -DLOCALE HOST_EXTRACFLAGS := -DLOCALE
ifeq ($(shell uname),SunOS)
HOST_LOADLIBES := -lcurses
else
HOST_LOADLIBES := -lncurses HOST_LOADLIBES := -lncurses
endif
ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>" HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
......
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#ifdef __sun__
#define CURS_MACROS
#endif
#include CURSES_LOC #include CURSES_LOC
/* /*
......
...@@ -219,7 +219,7 @@ get_next_line(unsigned long *pos, void *file, unsigned long size) ...@@ -219,7 +219,7 @@ get_next_line(unsigned long *pos, void *file, unsigned long size)
static char line[4096]; static char line[4096];
int skip = 1; int skip = 1;
size_t len = 0; size_t len = 0;
signed char *p = (char *)file + *pos; signed char *p = (signed char *)file + *pos;
char *s = line; char *s = line;
for (; *pos < size ; (*pos)++) for (; *pos < size ; (*pos)++)
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <sound/core.h> #include <sound/core.h>
#include <sound/minors.h> #include <sound/minors.h>
#include <sound/info.h> #include <sound/info.h>
#include <sound/version.h> #include <sound/utsname.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/devfs_fs_kernel.h> #include <linux/devfs_fs_kernel.h>
#include <stdarg.h> #include <stdarg.h>
...@@ -959,7 +959,7 @@ static snd_info_entry_t *snd_info_version_entry = NULL; ...@@ -959,7 +959,7 @@ static snd_info_entry_t *snd_info_version_entry = NULL;
static void snd_info_version_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) static void snd_info_version_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer)
{ {
static char *kernel_version = UTS_RELEASE; static char *kernel_version = system_utsname.release;
snd_iprintf(buffer, snd_iprintf(buffer,
"Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n" "Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment