Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHi LiangYi,
> Now I can run u-boot in sdram Great! :-) > but how can I know the hardware in my system are being initialized proper. Test it ... this is your responsibility ;-) u-boot only initializes what it uses: serial, timer, epcs. If you have custom logic or other devices you want to initialize, you can define CONFIG_BOARD_EARLY_INIT_F and implement the routine board_early_init_f() -- which gets called very ... well ... early ... in the init sequence. > 2. I have build vmlinux.bin. I want to run it in sdram through u-boot, how to do? If you want to compress: $ gzip --best -c vmlinux.bin > vmlinux.gz $ mkimage -A nios2 -O linux -T kernel -C gzip -n "Microtronix uClinux 1.4" -d vmlinux.img -a <whatever> -e <whatever> Then put the vmlinux.img file in flash somewhere (e.g. 0x200000) and from u-boot run: ==> bootm 200000 > (I find mkimage can not be used in my u-boot directory.) You have two choices: port it to cygwin or get it from the psyent download page. -- I'll just send mkimage to you via email. > detail of the nios2 application execution(for example--helloworld). u-boot has something similiar to the hal ... since you can write what u-boot refers to as "standalone applications" or "mini-applications". You need to read the top level README file and docs/README.standalone. I tested hello world and it works fine (now that several bugs are fixed). As for the whole u-boot startup sequence, you'll have to use the force here ;-) Life starts in cpu/nios2/start.S and quickly jumps into lib_nios2/board.c. I hope this was helpful. Regards, --Scott