QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1004|回复: 5

2.6内核的vesa镇缓冲无法用-O3参数编译

[复制链接]
发表于 2003-12-19 21:43:18 | 显示全部楼层 |阅读模式
fedora core 1+kernel 2.6.0
2.6内核的vesa镇缓冲无法用-O3参数编译,用-Os可以
如果在grub.conf里添加vga=xxx参数,在刚加载内核的时候(此时屏幕还无任何显示)就会自动重起,不带vga=xxx参数就一切正常(同一个内核).
以前2.4的时候用-O3时没问题的.

对我使用来说,个人觉得2.6的内核问题不少,可能是太新了吧
#
# Graphics support
#
CONFIG_FB=y
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set
CONFIG_FB_VESA=y
CONFIG_VIDEO_SELECT=y
# CONFIG_FB_HGA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_I810 is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_VIRTUAL is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_MDA_CONSOLE=m
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_PCI_CONSOLE=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y

#
# Logo configuration
#
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y
 楼主| 发表于 2003-12-19 23:32:06 | 显示全部楼层
在我的机器上2.4的-O3确实没问题
2.6.0的makefile,改了3处,就是把所有的-O2改成了-O3
# SHELL used by kbuild
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
          else if [ -x /bin/bash ]; then echo /bin/bash; \
          else echo sh; fi ; fi)

HOSTCC          = gcc
HOSTCXX          = g++
HOSTCFLAGS        = -Wall -Wstrict-prototypes -O3 -fomit-frame-pointer
HOSTCXXFLAGS        = -O3

#         Decide whether to build built-in, modular, or both.
#        Normally, just do built-in.

KBUILD_MODULES :=
KBUILD_BUILTIN := 1

#        If we have only "make modules", don't compile built-in objects.
#        When we're building modules with modversions, we need to consider
#        the built-in objects during the descend as well, in order to
#        make sure the checksums are uptodate before we record them.

ifeq ($(MAKECMDGOALS),modules)
  KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1)
endif

#        If we have "make <whatever> modules", compile modules
#        in addition to whatever we do anyway.
#        Just "make" or "make all" shall build modules as well

ifneq ($(filter all modules,$(MAKECMDGOALS)),)
  KBUILD_MODULES := 1
endif

ifeq ($(MAKECMDGOALS),)
  KBUILD_MODULES := 1
endif

export KBUILD_MODULES KBUILD_BUILTIN KBUILD_VERBOSE
export KBUILD_CHECKSRC KBUILD_SRC

# Beautify output
# ---------------------------------------------------------------------------
#
# Normally, we echo the whole command before executing it. By making
# that echo $($(quiet)$(cmd)), we now have the possibility to set
# $(quiet) to choose other forms of output instead, e.g.
#
#         quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@
#         cmd_cc_o_c       = $(CC) $(c_flags) -c -o $@ $<
#
# If $(quiet) is empty, the whole command will be printed.
# If it is set to "quiet_", only the short version will be printed.
# If it is set to "silent_", nothing wil be printed at all, since
# the variable $(silent_cmd_cc_o_c) doesn't exist.
#
# A simple variant is to prefix commands with $(Q) - that's usefull
# for commands that shall be hidden in non-verbose mode.
#
#        $(Q)ln $@ :<
#
# If KBUILD_VERBOSE equals 0 then the above command will be hidden.
# If KBUILD_VERBOSE equals 1 then the above command is displayed.

ifeq ($(KBUILD_VERBOSE),1)
  quiet =
  Q =
else
  quiet=quiet_
  Q = @
endif

# If the user is running make -s (silent mode), suppress echoing of
# commands

ifneq ($(findstring s,$(MAKEFLAGS)),)
  quiet=silent_
endif

check_gcc = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)

export quiet Q KBUILD_VERBOSE check_gcc

# Look for make include files relative to root of kernel src
MAKEFLAGS += --include-dir=$(srctree)

# For maximum performance (+ possibly random breakage, uncomment
# the following)

#MAKEFLAGS += -rR

# Make variables (CC, etc...)

AS                = $(CROSS_COMPILE)as
LD                = $(CROSS_COMPILE)ld
CC                = $(CROSS_COMPILE)gcc
CPP                = $(CC) -E
AR                = $(CROSS_COMPILE)ar
NM                = $(CROSS_COMPILE)nm
STRIP                = $(CROSS_COMPILE)strip
OBJCOPY                = $(CROSS_COMPILE)objcopy
OBJDUMP                = $(CROSS_COMPILE)objdump
AWK                = awk
RPM                 := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
                            else echo rpm; fi)
GENKSYMS        = scripts/genksyms/genksyms
DEPMOD                = /sbin/depmod
KALLSYMS        = scripts/kallsyms
PERL                = perl
CHECK                = sparse
MODFLAGS        = -DMODULE
CFLAGS_MODULE   = $(MODFLAGS)
AFLAGS_MODULE   = $(MODFLAGS)
LDFLAGS_MODULE  = -r
CFLAGS_KERNEL        =
AFLAGS_KERNEL        =

NOSTDINC_FLAGS  = -nostdinc -iwithprefix include

CPPFLAGS        := -D__KERNEL__ -Iinclude \
                   $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include)

CFLAGS                 := -Wall -Wstrict-prototypes -Wno-trigraphs -O3 \
                     -fno-strict-aliasing -fno-common
AFLAGS                := -D__ASSEMBLY__
回复

使用道具 举报

发表于 2003-12-21 00:13:34 | 显示全部楼层
如果在grub.conf里添加vga=xxx参数,在刚加载内核的时候(此时屏幕还无任何显示)就会自动重起,不带vga=xxx参数就一切正常(同一个内核)
我也遇到了,真奇怪!!
回复

使用道具 举报

发表于 2003-12-23 12:23:23 | 显示全部楼层
知道了,只要把Frame Buffer编译进内核,不要编译成模块就解决了.
回复

使用道具 举报

 楼主| 发表于 2003-12-23 14:23:42 | 显示全部楼层
我就是编译进内核的,一样无法起动
回复

使用道具 举报

 楼主| 发表于 2003-12-23 22:12:14 | 显示全部楼层
以前的2.4我也是,什么标志都用上了,可就是不出错
我现在只是把O2改成O3就不行了 :-(
那一篇帖子我已经看了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 14:26 , Processed in 0.046352 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表