http://www.denx.de/wiki/UBoot http://www.psyent.com/download Das u-boot is a fancy bootloader with net support and scripting capabilities. ********************************************************* This is a new approach to port u-boot for nios2 boards. We can generate base address and driver declaraiotn from the sopc file, instead of input them by hand. It works with both mmu or nommu. You will need to install the perl-XML-LibXML package. yum install perl-XML-LibXML Get the source You can clone the git from denx server and create the branch, git clone -n git://git.denx.de/u-boot.git cd u-boot
Or if you installed from the nios2-linux tarball as InstallNios2Linux, The default compiler is nios2-elf-gcc, which comes with nios2eds. If you want to use nios2-linux-gnu-gcc to build u-boot, you may set, export CROSS_COMPILE=nios2-linux-gnu- Or if you want to use nios2-linux-uclibc-gcc to build u-boot, you may set, export CROSS_COMPILE=nios2-linux-uclibc- 1. add an target entry to the top Makefile after the list, like this my_nios2, # nios2 generic boards 2. generate the fpga parameter file from sopc file, and copy it to u-boot board dir.If you installed from nios2-linux tarball, the script is available at nios2-linux/toolchain-build/tools. Otherwise you can download from the link and chmod +x. If you have more than one timer in your system, keep only one and remove other timers in the generated header file. If you system uses older ptf file (quartus 7.1 or earlier), you can convert the ptf to sopc with sopc builder of quartus v8.1 or later. You don't need to regenerate or synthesis the hardware. sopc-create-config-files my_nios2_sopc.sopc my_nios2_fpga.h cp my_nios2_fpga.h nios2-linux/u-boot/board/altera/nios2-generic/ 3. in the include/configs dir, copy nios2-generic.h to my_nios2.h . Modify my_nios2.h to include your generated header. -#include "../board/altera/nios2-generic/custom_fpga.h" make clean make my_nios2_config make Test You should configure sof first. Please
note, the u-boot's networking is active only when you run a network
command. So you cannot ping u-boot, but u-boot can ping out. At first, the env is empty. You should set ethaddr (MAC), ipaddr, serverip and saveenv. Extreme guide to kill NEEK with u-boot Addressing for devices : very Important ! All
the devices you referred, must be properly virtual addressed. The cache
bypassing macro, ldbio/stbio, may NOT be used for some drivers. Kernel region, cached : only for sdram (sdram | 0x0) for nommu, (sdram | 0xc0000000) for mmu. IO region, uncached: all the others, including cfi flash, epcs/spi flash, uart, jtaguart, timer, lan, cf ,etc. (port | 0x80000000) for nommu, (port | 0xe0000000) for mmu. For
exmaple, if the cfi flash is located at physical address 0x04000000,
now you should refer to address 0x84000000 for nommu or 0xe4000000 for
mmu. eg,
Manual
nios2-generic : a new approach to nios2 u-boot
cd nios2-linux/toolchain-build
git pull origin
cd nios2-linux/u-boot
git fetch origin
git checkout -b my_nios2 origin/master
NIOS2_GENERIC = nios2-generic my_nios2
-#define CONFIG_BOARD_NAME "nios2-generic"
+#include "../board/altera/nios2-generic/my_nios2_fpga.h"
+#define CONFIG_BOARD_NAME "my_nios2"
4. configure and build,nios2-configure-sof my_nios2.sof
nios2-download -g u-boot
nios2-terminal
| File | Size | Date | Attached by | |||
|---|---|---|---|---|---|---|
| bitrev.c bit reversal in a byte | 335 bytes | 06:49, 15 Mar 2010 | hippo | Actions | ||
| Intel_P30 (2).c Flash file for Intel StrataFlash P30 found on EP3C25 Embedded Evaluation Kit | 8.12 kB | 12:31, 22 May 2009 | drazen | Actions | ||
| u-boot-1.1.5-nios2-01.diff.gz No description | 2.82 kB | 06:00, 6 Dec 2008 | Admin | Actions | ||
| u-boot-nios2-src-050811.zip No description | 1550.31 kB | 06:00, 6 Dec 2008 | Admin | Actions | ||