[lkml]   [2002]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [BK PATCH] console changes 1
    Andrew Morton <> writes:

    > I think what we need James is just the low-level hook in printk.c which
    > the various platforms and boards can plug into. The one in Martin's
    > patch (module some cleanups, docco, conversion to C, etc) looks
    > suitable to me. The actual early console drivers don't appear to have
    > much relationship at all to the console layer really. They're just
    > minimal-code busy-wait port banging.

    The hook already exists and it is called register_console. Has been there
    for years. early_printk on x86-64 uses that. Originally I used the hackish
    printk hook way, but Linus put me on the right track.

    Your arch code just does a register_console very early which does the low level

    Actually you need one new hook for cosmetic reason: when the real console
    starts you want to disable the early console, otherwise you get duplicated
    output when they go to the same output device. This can be done with a
    straight forward function call in console_init.

    BTW the x86-64 early console should just work fine on i386 too, with minor

    All you need to do is:

    - cp arch/x86_64/kernel/early_printk.c arch/i386/kernel/early_printk.c
    - edit arch/i386/kernel/early_printk.c and replace VGABASE with
    - add it to arch/i386/kernel/Makefile
    - (optional - if you don't do it will be only initialised after setup_arch when
    __setup arguments are parsed)
    add something like
    if (c == ' ' && !memcmp(from,"earlyprintk=",12)) {
    extern int setup_early_printk(char *opt)
    to the comand line parsing in arch/i386/kernel/setup.c
    - Enable CONFIG_EARLY_PRINTK so that console_init disables it.
    - Boot with earlyprintk=vga (for vga output)
    or earlyprintk=serial,ttySx,baud for serial output.
    Add ,keep when you want to keep it even after console_init


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:30    [W:0.022 / U:42.308 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site