Open
Conversation
Contributor
|
There's a printf along with the small libc in litedram/gen-src/sdram_init. This is similar to the one I put in simple_random. Let's not add yet another one :) I'm thinking moving a bunch of that stuff to a sw/ directory, we shall see.. |
Collaborator
|
Joel, were you going to update this? I thought you were going to lose the printf and just use explicit print_string and print_hex calls (to reduce the object code size), and also remove the row of dots being printed. |
Contributor
Author
|
We can now load Linux directly from flash on the Arty now that Ben's flash controller is implemented. I can update this so it can be used from the flash if we think that would be useful? |
Contributor
|
On Sun, 2020-06-14 at 20:55 -0700, Joel Stanley wrote:
We can now load Linux directly from flash on the Arty now that Ben's
flash controller is implemented.
I can update this so it can be used from the flash if we think that
would be useful?
Ideally we want a loader that can generate the right device-tree for
the board based on the board type and syscon setup bits.
It can then load a secondary payload from flash, ethernet or serial...
In fact, it could also provide a little OPAL blob :-) We'll probably
want that for XICS unless we add native ICS support to Linux.
Cheers,
Ben.
|
Signed-off-by: Joel Stanley <joel@jms.id.au>
This privdes just enough firmware to load Linux. The loader is linked to run from the aliased BRAM address. This means you should configure your SoC with BRAM (ie, don't pass --no_bram). It can load a raw kernel (vmlinux.bin) or a wrapper that embeds the device tree (dtbImage.microwatt). The printf comes from https://github.com/mpredfearn/simple-printf 1. Build Linux for microwatt objcopy -O binary microwatt/vmlinux vmlinux.bin 2. Build a dtb 3. Set MW_DEBUG to point to a copy of mw_debug and type `make load` to load the loader into BRAM. 4. Press 'RESET' 5. Follow the instructions: Microwatt Loader (Jun 22 2020 16:44:59 Load binaries into SDRAM and select option to start: vmlinux.bin and dtb: mw_debug -b jtag stop load vmlinux.bin load microwatt.dtb 0x1000000 start press 'l' to start' dtbImage.microwatt: mw_debug -b jtag stop load dtbImage.microwatt 0x500000 start press 'w' to start' Flash: To boot a binary from flash, write it to 0000000000300000 press 'f' to start' If you want to test other software, such as MicroPython, you can also load it to the start of SDRAM and the loader will jump to it with 'l'. Signed-off-by: Joel Stanley <joel@jms.id.au>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This privdes just enough firmware to load Linux. The loader is linked to
run from the aliased BRAM address.
It can load a raw kernel (vmlinux.bin) or a wrapper that embeds the
device tree (dtbImage.microwatt).
The printf comes from https://github.com/mpredfearn/simple-printf
Build Linux for microwatt
objcopy -O binary microwatt/vmlinux vmlinux.bin
Build a dtb
Set MW_DEBUG to point to a copy of mw_debug and type
make loadtoload the loader into BRAM.
Press 'RESET'
Follow the instructions:
Microwatt Loader (Jun 2 2020 21:31:16)
Load binaries into SDRAM and select option to start:
vmlinux.bin and dtb:
mw_debug -b jtag stop load vmlinux.bin load microwatt.dtb 1000000 start
press 'l' to start'
dtbImage.microwatt:
mw_debug -b jtag stop load dtbImage.microwatt 500000 start
press 'w' to start'
If you want to test other software, such as MicroPython, you can also
load it to the start of SDRAM and the loader will jump to it with 'l'.
Signed-off-by: Joel Stanley joel@jms.id.au