Forum Discussion
Altera_Forum
Honored Contributor
20 years agokernel image in SDRAM but not booting?
Hello:
I have used the u-boot successully coping the uclinux kernel image from flash to sdram .I verified the contents at and near the start address of the sdram , same with the kernel image.bin using the ultraedit,md.b command.But the kernel stop .I see the file nios_linux.c I don't know what is the function kernel() ,also I can't find source file . Let me know why if you have any more ideas on this... Thank you ! Best Regards jigdo12 Replies
- Altera_Forum
Honored Contributor
Hi, Scott
I boot uClinux sucessfully by u-boot . Thank you again. My steps: 1. Modify <u-boot>/include/configs/PK1C20.h to meet my custom board 2. make PK1C20_config 3. make 4. Start HyperTerminal with the following settings: baudrate : 115200 parity : None data bits : 8 stop bits : 1 flow cntl : None 5. nios2-download -g u-boot I saw the command promt "==>". :-) =================================================== TODO: My custom board using Davicom's DM9000A(DM9000X serials). I'd like to using tftp by U-boot. So: 1. copy dm9000x.c dm9000x.h from original u-boot 1.3.1 2. modify some codes to remove some errors and meeting my custom board 3. make 4. nios2-download -g u-boot 5. in the terminal: ==> ping 218.192.171.46 dm9000 not found at 0x00200920 id: 0xffffffff MAC: ff:ff:ff:ff:ff:ff operating at unknown: 15 mode transmission timeout transmission timeout ping failed; host 218.192.171.46 is not alive * Maybe IO routes doesn't work well. * Another questions, I using MTD patitions over Flash. How can I access patitions in u-boot ? and How in uClinux? * I need egrep in cygwin, but this version of cygwin dose not provide egrep. I copy egrep from redhat, but not worked. what's your suggestions? regards, Will - Altera_Forum
Honored Contributor
Hi Will,
> 1. copy dm9000x.c dm9000x.h from original u-boot 1.3.1 Yes, there was lots of driver code that was removed from the u-boot sources at psyent.com, mostly to keep the tarball size reasonable. But you should always be able to grab the latest driver code from the main u-boot source tree and just copy it into your local sources. > dm9000 not found at 0x00200920 id: 0xffffffff Perhaps, you might also want to define the CONFIG_DM9000_BASE macro using cache bypass (if you are using data cache). E.g. # define CONFIG_DM9000_BASE 0x80200920 Also, you must correctly define CONFIG_DM9000_USE_xxBIT (for the bus width). E.g.: # define CONFIG_DM9000_USE_32BIT If your bus width is not 32-bit, make sure you are using native alignment rather than the memory/dynamic alignment. I have never used this driver in u-boot ... you may need to define CONFIG_DM9000_DEBUG to track down any issues. > I using MTD patitions over Flash. How can I access patitions in u-boot ? and How in uClinux? This has recently changed in u-boot ... but I believe the following should still work: - CFG_CMD_JFFS2 to CONFIG_COMMANDS - define CFG_JFFS_CUSTOM_PART - the in one of your board-specific modules, something like this:
Then you should be able to use the u-boot ls, fsload, etc. commands. To switch between the active partition, use the chpart command. BTW: in u-boot you can define a partition in ram/sdram to test your images prior to performing any flash programming. For linux, you will have to write your own mapping driver. Regards, --Scott#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CFG_JFFS_CUSTOM_PART) static struct part_info parts = { { /* system partition */ .size = 0x00600000, .offset = (char *)(CFG_FLASH_BASE + 0x00200000), }, { /* /usr/local partition */ .size = 0x00040000, .offset = (char *)(CFG_FLASH_BASE + 0x00800000), } }; static int numparts = sizeof(parts)/sizeof(struct part_info); struct part_info *jffs2_part_info (int part_num) { struct part_info *info = NULL; if (part_num < numparts) info = &parts; return (info); } # endif /* (CONFIG_COMMANDS & CFG_CMD_JFFS2) */