Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== Bring up FreeBSD on MicroBlaze ===== * Student: estaszuk at %%FreeBSD%% dot org * Mentor: gber at %%FreeBSD%% dot org ===== Project description ===== This project is about porting %%FreeBSD%% for %%MicroBlaze%% architecture. %%MicroBlaze%% is a soft-processor which could be embedded as part of FPGA project. It is highly configurable and extensible making good alternative for adding a external CPU core in embedded systems based on FPGA chips. Current aim is to make bootable version of %%FreeBSD%% for %%MicroBlaze%% with ability to use console by serial interface. ===== Approach to solving the problem ===== I would like to prepare full bootstrap and kernel loader for %%MicroBlaze%% architecture. Current approach assumes using GNU toolchain for building kernel (as it support %%MicroBlaze%% target), using CLang is long run goal but not within %%GSoC%%. I chose QEMU emulator as test platform. Later real FPGA with embedded %%MicroBlaze%% will be used (after kernel loading will be done). First aim is to load minimal kernel with only basic necessary parts and stubs, next goal is to build necessary drivers. ===== Deliverables ===== ==== Midterm ==== * Bootstrap * Kernel loader * Other architecture dependent parts of %%FreeBSD%% code needed to load kernel * Stripped kernel configuration proved to proper building ==== Final ==== * GENERIC/DEFAULT kernel configurations * Drivers necessary to provide working console ===== Milestones ===== Proposed milestones: * 17 June: Start of coding * 23 June - 27 June: Mid-term submission * 3 July: Loading and running custom code into Microblaze (by Das U-Boot) * ( 4 - 7 July: I will not be available ) * 11 July: Core initializations (locore.S file) * 13 July: Cleanup microblaze code and preparation for further work (sync with head), combining kernel with Das U-Boot * 22 July: Fill rest of necessary arch dependent code (including synchronizations and context switching) and UART driver * 28 July: Main tests * 5 August: Loading rootfs * 11 August: 'Pencils down' date * 18 August: hard deadline ===== Status of work ===== | Figure out toolchain | DONE | There is a script for preparing cross toolchain | | Compile striped kernel for microblaze | DONE | Build steps in BUILDING_MICROBLAZE | | Prepare Das U-Boot for microblaze | TODO | Blocked by EDK (fpga related tool) files generation | | Core initializations | TODO | | | Making rest of necessary arch dependent code | TODO | | | Writting UART driver | TODO | | | Kernel code and sample confs cleanup | TODO | | | Working on buildworld and rootfs loading | TODO | | ===== Building kernel ===== At the moment kernel is not able to run. However it can be built and this is the base for future work. Code can be fetched from here: [[https://socsvn.freebsd.org/socsvn/soc2014/estaszuk/microblaze-head/head/]] Building steps are: This file contains most recent instructions about building current version of %%FreeBSD%% for microblaze target To begin a proper toolchain will be needed. Currently the easiest way to obtain a toolchain is using a bash script './microblaze-gcc/build-toolchain.sh'. You can then put created install dir whatever you want it. Next edit './src.conf' file and change 'MB-TOOLCHAIN' value to the path where toolchain has been moved (remember about 'bin' subdirectory). After that type 'make kernel-toolchain' and wait to complete. This step currently does not build microblaze toolchain, but will make some necessary tools for next steps (config, etc.). Now it's time to set env value 'TARGET_ARCH' to 'microblaze'. You can change the MAKEOBJDIRPREFIX env if you do not want to use default directory (/usr/obj/microblaze.microblaze). And finally this can be executed: ''%%make SRCCONF=${PWD}/src.conf buildkernel%%'' ===== Useful Links ===== summerofcode2014/microblazebringup.txt Last modified: 2018/03/14 04:55by MarkLinimon