Skip to contentSkip to conversation

Linux Image

DISCUSSION Aman 3 participants 4 messages Aug 20, 2002 – Nov 3, 2002 1 message not in the archive

lore
Share & tools
lore

Aman

author
#0 lore raw

Hi All

I have an rom monitor code without ethernet support running on PPC440GP. Is it possible to download a linux image to the board using the Kermit protocol. If so what type of linux image has to build for that.

Thanking you in advance
Regards
Aman

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 2 lines · In message <001701c247e1$af6bb380$370da8c0@aman> you wrote:

I have an rom monitor code without ethernet support running on PPC440GP. Is

Install PPCBoot.

Quoted 2 lines

it possible to download a linux image to the board using the Kermit protocol. If so what type of linux image has to build for that.

Yes, this is possible. PPCBoot supports kermit binary protocol (use the "loadb" command). Umm... but PPCBoot also supports download over ethernet, so you probably will not use "loadb".

Best regards,

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Testing can show the presense of bugs, but not their absence.
-- Edsger Dijkstra

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

author
#2 lore raw

Base Baud Calculation

Hi

How is the base_baud in linux calculated?.

Thanking you in advance

Regards
Aman

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#4 lore raw

Re: Base Baud Calculation

In reply to a message not in the archive

Aman,

Quoted 1 line · you

How is the base_baud in linux for PPC 440GP calculated?.

Here is the piece of code I use on our custom 440GP board (works also on Ebony):

static void __init XXXXXXX_serial_init(void){

    struct serial_struct serial_req;
    int baud_base;

    /* Determine baud base */
    unsigned long cpc0_cr0 = mfdcr(DCRN_CPC0_CR0);

    if (cpc0_cr0 & 0x00400000){
        /* External UART0 clock (eval board uses 6*1.8432 MHz clock) */
        baud_base = (6 * 1843200) / 16;
    }
    else {
        /* Internal UART0 clock */
       int uart_div = ((cpc0_cr0 & 0x001f0000) >> 16) + 1;
        baud_base = (XXXXXX_clocks.plb * 1000000) / uart_div / 16;
    }

    /* Setup ioremapped serial port access */
    memset(&serial_req, 0, sizeof(serial_req));
    serial_req.line = 0;
    serial_req.baud_base = baud_base;
    serial_req.port = 0;
    serial_req.irq = UART0_INT;
    serial_req.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
    serial_req.io_type = SERIAL_IO_MEM;
    serial_req.iomem_base = ioremap64(PPC440GP_UART0_ADDR, 8);
    serial_req.iomem_reg_shift = 0;

    if (early_serial_setup(&serial_req) != 0) {
        printk(KERN_ALERT"Early serial init of port 0 failed\n");
    }
}

One comment, XXXXXX_clocks - structure that holds different clocks in MHz. For example, XXXXXX_clocks.plb is equal to 133.

Usually, this value can be hardcoded, but I find this way more convenient, especially when running the same image on different boards with different clock setup.

Regards,

Eugene Surovegin <mailto:[email protected]>

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/