I’m trying to build a boot-able custom Linux for Sifive Hifive Unleashed.
Here is what I did:
Got riscv linux from https://github.com/riscv/riscv-linux
Got GNU tool chain from https://github.com/riscv/riscv-gnu-toolchain
Followed instruction in RISC-V GNU compiler Toolchain in riscv-gnu-toolchain and built GNU cross-compiler.
Built riscv linux on X86 amd64 Ubuntu 16.04 host machine using generated GNU cross-compiler.
Other than configuring the linux to include my driver as built in (not as module) which was some work, I was able to build the linux and have vmlinux and everything else.
I want to build boot-able image out of this linux and create file system so I can boot Hifive with SD card. I downloaded SiFive U Freedem SDK to get the boot loader builder and other tools that are needed to create bbl.bin.
If I follow the instruction on GitHub Sifive freedom-u-sdk it clones every thing including linux and configure it for busybox. So bbl.bin generated is not with the linux I have. I tried to replace the linux with my version, but make fails each time I tried.
My question is, how can I replace the linux in U Freedom SDK and build boot-able image off of my version of linux?