(1)
[kyon@SEP4020 kernel-6410]$ make scripts/kconfig/conf -s arch/arm/Kconfig CHK include/linux/version.h make[1]: “include/asm-arm/mach-types.h”是最新的。 CHK include/linux/utsrelease.h CC kernel/bounds.s GEN include/linux/bounds.h CC arch/arm/kernel/asm-offsets.s In file included from include/linux/irqflags.h:57, from /home/kyon/kernel-6410/arch/arm/include/asm/system.h:65, from /home/kyon/kernel-6410/arch/arm/include/asm/bitops.h:27, from include/linux/bitops.h:17, from include/linux/kernel.h:15, from include/linux/sched.h:52, from arch/arm/kernel/asm-offsets.c:13: /home/kyon/kernel-6410/arch/arm/include/asm/irqflags.h:11:5: warning: "__LINUX_ARM_ARCH__" is not defined In file included from /home/kyon/kernel-6410/arch/arm/include/asm/bitops.h:27, from include/linux/bitops.h:17, from include/linux/kernel.h:15, from include/linux/sched.h:52, from arch/arm/kernel/asm-offsets.c:13: /home/kyon/kernel-6410/arch/arm/include/asm/system.h:167:5: warning: "__LINUX_ARM_ARCH__" is not defined /home/kyon/kernel-6410/arch/arm/include/asm/system.h:173:5: warning: "__LINUX_ARM_ARCH__" is not defined /home/kyon/kernel-6410/arch/arm/include/asm/system.h:177:35: warning: "__LINUX_ARM_ARCH__" is not defined /home/kyon/kernel-6410/arch/arm/include/asm/system.h:297:5: warning: "__LINUX_ARM_ARCH__" is not defined /home/kyon/kernel-6410/arch/arm/include/asm/system.h:302:5: warning: "__LINUX_ARM_ARCH__" is not defined In file included from include/linux/bitops.h:17, from include/linux/kernel.h:15, from include/linux/sched.h:52, from arch/arm/kernel/asm-offsets.c:13: /home/kyon/kernel-6410/arch/arm/include/asm/bitops.h:237:5: warning: "__LINUX_ARM_ARCH__" is not defined In file included from /home/kyon/kernel-6410/arch/arm/include/asm/thread_info.h:16, from include/linux/thread_info.h:47, from include/linux/preempt.h:9, from include/linux/spinlock.h:50, from include/linux/seqlock.h:29, from include/linux/time.h:8, from include/linux/timex.h:57, from include/linux/sched.h:54, from arch/arm/kernel/asm-offsets.c:13: /home/kyon/kernel-6410/arch/arm/include/asm/fpstate.h:32:5: warning: "__LINUX_ARM_ARCH__" is not defined In file included from include/linux/prefetch.h:14, from include/linux/list.h:6, from include/linux/preempt.h:11, from include/linux/spinlock.h:50, from include/linux/seqlock.h:29, from include/linux/time.h:8, from include/linux/timex.h:57, from include/linux/sched.h:54, from arch/arm/kernel/asm-offsets.c:13: /home/kyon/kernel-6410/arch/arm/include/asm/processor.h:109:5: warning: "__LINUX_ARM_ARCH__" is not defined In file included from include/linux/spinlock.h:348, from include/linux/seqlock.h:29, from include/linux/time.h:8, from include/linux/timex.h:57, from include/linux/sched.h:54, from arch/arm/kernel/asm-offsets.c:13: /home/kyon/kernel-6410/arch/arm/include/asm/atomic.h:25:5: warning: "__LINUX_ARM_ARCH__" is not defined In file included from include/linux/time.h:9, from include/linux/timex.h:57, from include/linux/sched.h:54, from arch/arm/kernel/asm-offsets.c:13: include/linux/math64.h: In function 'div_u64_rem': include/linux/math64.h:43: error: '__LINUX_ARM_ARCH__' undeclared (first use in this function) include/linux/math64.h:43: error: (Each undeclared identifier is reported only once include/linux/math64.h:43: error: for each function it appears in.) In file included from include/linux/timex.h:195, from include/linux/sched.h:54, from arch/arm/kernel/asm-offsets.c:13: /home/kyon/kernel-6410/arch/arm/include/asm/timex.h:15:24: error: mach/timex.h: No such file or directory In file included from include/linux/sched.h:55, from arch/arm/kernel/asm-offsets.c:13: include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: warning: "CLOCK_TICK_RATE" is not defined include/linux/jiffies.h:247:31: error: division by zero in #if include/linux/jiffies.h:247:31: error: division by zero in #if In file included from /home/kyon/kernel-6410/arch/arm/include/asm/page.h:26, from include/linux/mm_types.h:14, from include/linux/sched.h:61, from arch/arm/kernel/asm-offsets.c:13: /home/kyon/kernel-6410/arch/arm/include/asm/glue.h:119:2: error: #error Unknown data abort handler type /home/kyon/kernel-6410/arch/arm/include/asm/glue.h:146:2: error: #error Unknown prefetch abort handler type In file included from include/linux/mm_types.h:14, from include/linux/sched.h:61, from arch/arm/kernel/asm-offsets.c:13: /home/kyon/kernel-6410/arch/arm/include/asm/page.h:108:2: error: #error Unknown user operations model In file included from include/linux/mm.h:39, from arch/arm/kernel/asm-offsets.c:14: /home/kyon/kernel-6410/arch/arm/include/asm/pgtable.h:23:26: error: mach/vmalloc.h: No such file or directory In file included from arch/arm/kernel/asm-offsets.c:14: include/linux/mm.h: In function 'is_vmalloc_addr': include/linux/mm.h:275: error: 'VMALLOC_END' undeclared (first use in this function) make[1]: *** [arch/arm/kernel/asm-offsets.s] 错误 1 make: *** [prepare0] 错误 2 [kyon@SEP4020 kernel-6410]$ make menuconfig scripts/kconfig/mconf arch/arm/Kconfig # # configuration written to .config
# ARMv6 config CPU_V6 bool "Support ARM V6 processor" depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 || ARCH_MX3 || ARCH_MSM7X00A || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || ARCH_S3C64XX default y if ARCH_MX3 default y if ARCH_MSM7X00A default y if ARCH_S3C64XX select CPU_32v6 select CPU_ABRT_EV6 select CPU_PABRT_NOIFAR select CPU_CACHE_V6 select CPU_CACHE_VIPT select CPU_CP15_MMU select CPU_HAS_ASID if MMU select CPU_COPY_V6 if MMU select CPU_TLB_V6 if MMU
(2) CC arch/arm/mm/iomap.o arch/arm/mm/iomap.c: In function 'ioport_map': arch/arm/mm/iomap.c:16: error: implicit declaration of function '__typesafe_io' arch/arm/mm/iomap.c:16: warning: return makes pointer from integer without a cast make[1]: *** [arch/arm/mm/iomap.o] 错误 1 make: *** [arch/arm/mm] 错误 2
io.h中line83添加 //add by kyon from 2.6.29 static inline void __iomem *__typesafe_io(unsigned long addr) { return (void __iomem *)addr; }
(3)串口控制台出错 CC arch/arm/plat-s3c/init.o arch/arm/plat-s3c/init.c:94: error: 'CONFIG_SERIAL_SAMSUNG_UARTS' undeclared here (not in a function) make[1]: *** [arch/arm/plat-s3c/init.o] 错误 1 make: *** [arch/arm/plat-s3c] 错误 2 [kyon@SEP4020 kernel-6410]$
console错误 修改/drivers/serial/kconfig
将 config SERIAL_SAMSUNG tristate "Samsung SoC serial support" depends on ARM && PLAT_S3C24XX select SERIAL_CORE help Support for the on-chip UARTs on the Samsung S3C24XX series CPUs, providing /dev/ttySAC0, 1 and 2 (note, some machines may not provide all of these ports, depending on how the serial port pins are configured.
config SERIAL_SAMSUNG_DEBUG bool "Samsung SoC serial debug" depends on SERIAL_SAMSUNG help Add support for debugging the serial driver. Since this is generally being used as a console, we use our own output routines that go via the low-level debug printascii() function.
config SERIAL_SAMSUNG_CONSOLE bool "Support for console on Samsung SoC serial port" depends on SERIAL_SAMSUNG=y select SERIAL_CORE_CONSOLE help Allow selection of the S3C24XX on-board serial ports for use as an virtual console.
Even if you say Y here, the currently visible virtual console (/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 "console=ttySACx". (Try "man bootparam" or see the documentation of your boot loader about how to pass options to the kernel at boot time.)
config SERIAL_S3C2400 tristate "Samsung S3C2410 Serial port support" depends on ARM && SERIAL_SAMSUNG && CPU_S3C2400 default y if CPU_S3C2400 help Serial port support for the Samsung S3C2400 SoC
config SERIAL_S3C2410 tristate "Samsung S3C2410 Serial port support" depends on SERIAL_SAMSUNG && CPU_S3C2410 default y if CPU_S3C2410 help Serial port support for the Samsung S3C2410 SoC
config SERIAL_S3C2412 tristate "Samsung S3C2412/S3C2413 Serial port support" depends on SERIAL_SAMSUNG && CPU_S3C2412 default y if CPU_S3C2412 help Serial port support for the Samsung S3C2412 and S3C2413 SoC
config SERIAL_S3C2440 tristate "Samsung S3C2440/S3C2442 Serial port support" depends on SERIAL_SAMSUNG && (CPU_S3C2440 || CPU_S3C2442) default y if CPU_S3C2440 default y if CPU_S3C2442 help Serial port support for the Samsung S3C2440 and S3C2442 SoC
用以下替换 config SERIAL_SAMSUNG tristate "Samsung SoC serial support" depends on ARM && PLAT_S3C select SERIAL_CORE help Support for the on-chip UARTs on the Samsung S3C24XX series CPUs, providing /dev/ttySAC0, 1 and 2 (note, some machines may not provide all of these ports, depending on how the serial port pins are configured.
config SERIAL_SAMSUNG_UARTS int depends on ARM && PLAT_S3C default 2 if ARCH_S3C2400 default 4 if ARCH_S3C64XX || CPU_S3C2443 default 3 help Select the number of available UART ports for the Samsung S3C serial driver config SERIAL_SAMSUNG_DEBUG bool "Samsung SoC serial debug" depends on SERIAL_SAMSUNG && DEBUG_LL help Add support for debugging the serial driver. Since this is generally being used as a console, we use our own output routines that go via the low-level debug printascii() function.
config SERIAL_SAMSUNG_CONSOLE bool "Support for console on Samsung SoC serial port" depends on SERIAL_SAMSUNG=y select SERIAL_CORE_CONSOLE help Allow selection of the S3C24XX on-board serial ports for use as an virtual console.
Even if you say Y here, the currently visible virtual console (/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 "console=ttySACx". (Try "man bootparam" or see the documentation of your boot loader about how to pass options to the kernel at boot time.)
config SERIAL_S3C2400 tristate "Samsung S3C2410 Serial port support" depends on ARM && SERIAL_SAMSUNG && CPU_S3C2400 default y if CPU_S3C2400 help Serial port support for the Samsung S3C2400 SoC
config SERIAL_S3C2410 tristate "Samsung S3C2410 Serial port support" depends on SERIAL_SAMSUNG && CPU_S3C2410 default y if CPU_S3C2410 help Serial port support for the Samsung S3C2410 SoC
config SERIAL_S3C2412 tristate "Samsung S3C2412/S3C2413 Serial port support" depends on SERIAL_SAMSUNG && CPU_S3C2412 default y if CPU_S3C2412 help Serial port support for the Samsung S3C2412 and S3C2413 SoC
config SERIAL_S3C2440 tristate "Samsung S3C2440/S3C2442 Serial port support" depends on SERIAL_SAMSUNG && (CPU_S3C2440 || CPU_S3C2442) default y if CPU_S3C2440 default y if CPU_S3C2442 help Serial port support for the Samsung S3C2440 and S3C2442 SoC
config SERIAL_S3C24A0 tristate "Samsung S3C24A0 Serial port support" depends on SERIAL_SAMSUNG && CPU_S3C24A0 default y if CPU_S3C24A0 help Serial port support for the Samsung S3C24A0 SoC
config SERIAL_S3C6400 tristate "Samsung S3C6400/S3C6410 Serial port support" depends on SERIAL_SAMSUNG && (CPU_S3C600 || CPU_S3C6410) default y help Serial port support for the Samsung S3C6400 and S3C6410 SoCs
复制s3c6400.c
修改makefile obj-$(CONFIG_SERIAL_S3C6400) += s3c6400.o
重新make menuconfig <*> Samsung SoC serial support │ │ │ │ [*] Support for console on Samsung SoC serial port │ │ │ │ <*> Samsung S3C6400/S3C6410 Serial port support (NEW)
(4) CC drivers/gpio/gpiolib.o drivers/gpio/gpiolib.c: In function 'gpiolib_dbg_show': drivers/gpio/gpiolib.c:1060: error: implicit declaration of function '__gpio_to_irq' make[2]: *** [drivers/gpio/gpiolib.o] 错误 1 make[1]: *** [drivers/gpio] 错误 2 make: *** [drivers] 错误 2
gpiolib.c变化貌似还蛮大的
由于有 #ifdef CONFIG_DEBUG_FS
竟然发现这个CONFIG无聊如何都去不掉,郁闷 暂时注释 int irq = 0//gpio_to_irq(gpio);
这个问题没有解决
(5) drivers/serial/samsung.c:50:38: error: asm/plat-s3c/regs-serial.h: No such file or directory drivers/serial/samsung.c:51:28: error: mach/regs-gpio.h: No such file or directory In file included from drivers/serial/samsung.c:53: drivers/serial/samsung.h:26: warning: 'struct s3c24xx_uart_clksrc' declared inside parameter list
samsung.c文件不兼容,用2.6.29替换
(6) CC drivers/serial/samsung.o drivers/serial/samsung.c: In function 's3c24xx_serial_stop_tx': drivers/serial/samsung.c:130: error: 'struct s3c24xx_uart_port' has no member named 'tx_irq' drivers/serial/samsung.c: In function 's3c24xx_serial_start_tx': drivers/serial/samsung.c:145: error: 'struct s3c24xx_uart_port' has no member named 'tx_irq' drivers/serial/samsung.c: In function 's3c24xx_serial_stop_rx': drivers/serial/samsung.c:157: error: 'struct s3c24xx_uart_port' has no member named 'rx_irq' drivers/serial/samsung.c: In function 's3c24xx_serial_shutdown': drivers/serial/samsung.c:381: error: 'struct s3c24xx_uart_port' has no member named 'tx_irq' drivers/serial/samsung.c:387: error: 'struct s3c24xx_uart_port' has no member named 'rx_irq' drivers/serial/samsung.c: In function 's3c24xx_serial_startup': drivers/serial/samsung.c:404: error: 'struct s3c24xx_uart_port' has no member named 'rx_irq' drivers/serial/samsung.c:408: error: 'struct s3c24xx_uart_port' has no member named 'rx_irq' drivers/serial/samsung.c:418: error: 'struct s3c24xx_uart_port' has no member named 'tx_irq' drivers/serial/samsung.c:422: error: 'struct s3c24xx_uart_port' has no member named 'tx_irq' drivers/serial/samsung.c: In function 's3c24xx_serial_pm': drivers/serial/samsung.c:447: error: 'struct s3c24xx_uart_port' has no member named 'pm_level' drivers/serial/samsung.c: In function 's3c24xx_serial_set_termios': drivers/serial/samsung.c:658: error: 'struct s3c24xx_uart_port' has no member named 'baudclk_rate' drivers/serial/samsung.c: In function 's3c24xx_serial_type': drivers/serial/samsung.c:750: error: 'PORT_S3C6400' undeclared (first use in this function) drivers/serial/samsung.c:750: error: (Each undeclared identifier is reported only once drivers/serial/samsung.c:750: error: for each function it appears in.) drivers/serial/samsung.c: In function 's3c24xx_serial_init_port': drivers/serial/samsung.c:1050: error: 'struct s3c24xx_uart_port' has no member named 'rx_irq' drivers/serial/samsung.c:1051: error: 'struct s3c24xx_uart_port' has no member named 'tx_irq' drivers/serial/samsung.c:1056: error: 'struct s3c24xx_uart_port' has no member named 'tx_irq' make[2]: *** [drivers/serial/samsung.o] 错误 1 make[1]: *** [drivers/serial] 错误 2 make: *** [drivers] 错误 2 [kyon@SEP4020 kernel-6410]$
samsung.h文件也不兼容,替换
(7) drivers/serial/samsung.c: In function 's3c24xx_serial_type': drivers/serial/samsung.c:750: error: 'PORT_S3C6400' undeclared (first use in this function) drivers/serial/samsung.c:750: error: (Each undeclared identifier is reported only once drivers/serial/samsung.c:750: error: for each function it appears in.) make[2]: *** [drivers/serial/samsung.o] 错误 1 make[1]: *** [drivers/serial] 错误 2 make: *** [drivers] 错误 2 [kyon@SEP4020 kernel-6410]$
修改/include/linux/serial_core.h
line158 添加 #define PORT_S3C6400 84
(8) 用mkimage做的uimage无法加载
但是竟然可以直接加载zimage!奇怪,而且能够传参???
U-Boot 1.1.6 (Jul 8 2009 - 11:31:24) for SMDK6410
**************************************** ** UT-S3C6410 Nand boot v0.18 ** ** ShenZhen Urbetter Technology ** ** Http://www.urbetter.com ** ****************************************
CPU: S3C6410@532MHz Fclk = 532MHz, Hclk = 133MHz, Pclk = 66MHz, Serial = CLKUART (SYNC Mode) Board: SMDK6410 DRAM: 128 MB Flash: 0 kB NAND: 256 MB In: serial Out: serial Err: serial Hit any key to stop autoboot: 0 kyon6410 # tftp c0008000 zimage6 dm9000 i/o: 0x18000300, id: 0x90000a46 MAC: 00:40:5c:26:0a:5b operating at 100M full duplex mode TFTP from server 192.168.0.1; our IP address is 192.168.0.4 Filename 'zimage6'. Load address: 0xc0008000 Loading: T T T T ################################################################# ################################################################# ################ done Bytes transferred = 742884 (b55e4 hex) kyon6410 # bootm Boot with zImage
Starting kernel ...
Uncompressing Linux.................................................. done, booting the kernel. Linux version 2.6.27 (kyon@SEP4020.Linux) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #15 Thu Jul 9 16:49:54 CST 2009 CPU: ARMv6-compatible processor [410fb766] revision 6 (ARMv7), cr=00c5387f Machine: SMDK6410 Memory policy: ECC disabled, Data cache writeback CPU S3C6410 (id 0x36410101) S3C24XX Clocks, (c) 2004 Simtec Electronics S3C64XX: PLL settings, A=532000000, M=532000000, E=24000000 S3C64XX: HCLK2=266000000, HCLK=133000000, PCLK=66500000 mout_apll: source is fout_apll (1), rate is 532000000 mout_epll: source is fout_epll (1), rate is 24000000 mout_mpll: source is mpll (1), rate is 532000000 mmc_bus: source is mout_epll (0), rate is 24000000 mmc_bus: source is mout_epll (0), rate is 24000000 mmc_bus: source is mout_epll (0), rate is 24000000 usb-bus-host: source is clk_48m (0), rate is 48000000 uclk1: source is dout_mpll (1), rate is 66500000 spi-bus: source is mout_epll (0), rate is 24000000 spi-bus: source is mout_epll (0), rate is 24000000 audio-bus: source is mout_epll (0), rate is 24000000 audio-bus: source is mout_epll (0), rate is 24000000 irda-bus: source is mout_epll (0), rate is 24000000 CPU0: D VIPT write-back cache CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 Kernel command line: root=/dev/mtdblock2 rootfstype=yaffs2 init=/init console=ttySAC0,115200 PID hash table entries: 512 (order: 9, 2048 bytes) Console: colour dummy device 80x30 console [ttySAC0] enabled Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 128MB = 128MB total Memory: 128056KB available (1332K code, 282K data, 80K init) Calibrating delay loop... 530.84 BogoMIPS (lpj=2654208) Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok S3C6410: Initialising architecture S3C DMA-pl080 Controller Driver, (c) 2006-2007 Samsung Electronics Total 32 DMA channels will be initialized. NetWinder Floating Point Emulator V0.97 (double precision) ashmem: initialized msgmni has been set to 250 io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) s3c6400-uart.0: s3c2410_serial0 at MMIO 0x7f005000 (irq = 16) is a S3C6400/10 s3c6400-uart.1: s3c2410_serial1 at MMIO 0x7f005400 (irq = 20) is a S3C6400/10 mice: PS/2 mouse device common for all mice VFS: Cannot open root device "mtdblock2" or unknown-block(0,0) Please append a correct "root=" boot option; here are the available partitions: Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) |