Forum Discussion
Altera_Forum
Honored Contributor
21 years agoHow to porting u-boot to my own board?
Hello, everyone I want to use u-boot on my board. I have two questions. 1. Before I use u-boot on my board, I just try to compile u-boot first. So, I follow the readme file. I use ...
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