[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] kernel image in SDRAM but not booting










Hi all

 I am trying to boot uClinux(using MicroBlaze..on a memec spartan 2e board) after moving the image from FLASH to SDRAM.I am using the 'trivial' bootloader provided in the mbvanilla_net package available at john's website...

 The image is getting copied correctly from FLASH to RAM..I printed the first few bytes of SDRAM using the ddr_start pointer(and xil_printf ofcourse)..and cross checked these few bytes with those on the FLASH chip(using the TCL script xmdflash.tcl/flashdow.tcl)..they were exactly the same..just to be doubly sure abt the image in FLASH...i also observed the hexdump of the kernel image(image.bin) on emacs..the bytes at the locations matched exactly...

 by this..i concluded that the image is not corrupted..yes..i checked only the first few bytes..50-100 maybe..and they matched in all three places...

 but some how even after the image is getting copied to RAM..the kernel is not getting executed..it just prints
"jumping to the kernel startup...." to the console and stops...i am sure that the kernel code is not getting executed because..i have also placed a couple of microblaze_gpio_write()...and the onboard led status does not change...here is the main() of my bootloader :

--------------------start--------------------------------
main()
{
        unsigned int *ddr_ptr = ddr_start;
        unsigned int *flash_ptr = flash_start;
        reset_uarts();
        flash_set_base((unsigned int *)FLASH_BASEADDR);
        flash_read_reset();

/* Ensure cmdline defaults to null (zero-length) string */
        cmdline[0]='\0';

    /* Copy Image from FLASH to RAM*/
       copy_image(flash_ptr, ddr_ptr, (gImageLen)/4);

        /*Verify the IMAGE*/
        verify_image(flash_ptr, ddr_ptr, (gImageLen)/4);

        /*Jump to starting address in RAM*/
        print("Jumping to kernel startup...\n\r\n\r");
        kernel_start = (void_fn)ddr_start;
        kernel_start(cmdline);
        print("this line should not get printed");
}

----------------------end--------------------------------


can anyone tell me what could be going wrong?..I am guessing that either mdm/xmd is for some reasons placing a breakpoint  because of which the kernel image is not getting executed..
..if anyone has faced this problem before..please let me know as to how exactly does xmd/mdm work?...the docs don't have much information on such details..i am especially interested in knowing more abt the xmd command "rst"..the doc just mentions "rst=target reset" ..but i feel this problem could be related to that..

thanks a bunch in advance for any help..

cheers

V.Anand
(www.tenet.res.in)









****************************************

-----
  Trouble with windows? Re boot.... 
  Trouble with Linux? Be root....
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/