- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi all,
I wish to update my entire system from a running Linux by changing Flash content : changing bitstream and kernel. My flash is partitioned with 2 area : bitstream (4MB ) and kernel (4MB ). My main issue is that using altera tools to convert sof2flash and elf2flash I do not have intermediary files : raw binary files that I can write to my flash usingcp <file> /dev/mtdX
I only get srec files that are not usable from Linux to Flash my external memory (as far as I know, but maybe there is a tool to write srec files from nios2-linux) Ok I have already binary file : the .sof and my zImage but : - sof2flash adds (or remove) some headers and configure bitstream loading mode : in my case active parallel
- elf2flash adds a bootloader before my zImage
- Flash my board using Altera tools (elf2flash, sof2flash and nios2-flash-programmer)
- Read back partitions from flash using
nios2-flash-programmer -B <ADD>+<SIZE> -R zImage.tmp --base=0x08000000
- use srec_cat
srec_cat -output zImage.bin -binary zImage.tmp
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
You can use nios2-elf-objcopy on the SREC like so:
elf2flash --base=0xc1000000 --end=0xc1FFFFFF --reset=0xc1540020 --input=zImage --output=zImage.flash --boot=/opt/altera/nios2eds/components/altera_nios2/boot_loader_cfi.srec && nios2-elf-objcopy -I srec -O binary zImage.flash /data/nios/nios2-linux/zImage.bin

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page