Skip to content

jdkoftinoff/mb-linux-msli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uClinux distribution for MicroBlaze.
====================================
Initially configured for Meyer Sound D-Mitri I/O and DGPIO modules.

Kernel 2.6.30 (modifications by Petalogix and Meyer Sound).
uClibc 0.9.30.1 (modifications by Meyer Sound).

Directory structure:
====================

The build environment should contain the following directories:

mb_gnu (from mb-gcc4-msli repository) is a gcc4 toolchain (from
git.xilinx.com, patched to compile on modern Linux distributions).

microblaze-toolchain-sources (from mb-gcc3-msli repository) is a gcc3
toolchain (from Petalogix sources, patched to compile on modern Linux
distributions).

* mbbl-mkbootimage (from mbbl repository) is the boot image maker.

* dtc is Jon Loeliger's device tree compiler (same as the one supplied
  with the kernel).

* mcsbin is a binary <-> MCS converter similar to Xilinx promgen.

* uClinux-dist is current uClinux, except:

 1. uClinux-dist/uClibc is updated to uClibc 0.9.30.1 with Microblaze
    support (current uClibc release with local patches),

 2. uClinux-dist/linux-2.6.x is based on
    git://developer.petalogix.com/linux-2.6-microblaze.git + local
    patches,

 3. build procedure is updated to accommodate those changes and by
    default produce a kernel + directory tree for Meyer Sound D-Mitri
    I/O and DGPIO modules.

* local contains the device tree and script for building the image
  from compiled kernel and filesystem tree.

buildtools.sh is a script that builds all of the above.


This initial version builds a non-MMU kernel and userspace.


Build procedure:
================

To build the toolchain:

./buildtools.sh


To add the compilers' directories to the path:

. prepare.sh


To build the kernel and filesystem tree:

cd uClinux-dist
make config
make


To prepare the boot image:

cd ../local
./makeimage.sh


Installation procedure:
=======================

To load Linux on D-Mitri:

NEW FLASH INSTALLATION PROCEDURE:

Build a bitstream and software in XPS, initialize BRAM in bitstream
with mbbl binary (you may have to change the paths in the files,
currently /home/alexb is still hardcoded in some of them). Use iMPACT
to flash two MCS files -- download.mcs generated by Xilinx tools
(promgen or interactive prom file formatter in iMPACT) from
download.bit bitstream file, and bootimage.mcs located in "local"
directory, generated by Linux image build procedure.

Use a terminal connected to the serial port (115200, 8N1) to monitor the boot progress and log in at the console.

FLASH UPDATE PROCEDURE:

Convert download.mcs file into raw binary:

../mcsbin/mcsbin -b -y download.mcs download.bin

Upload bootimage.bin and download.bin to /tmp using ftp or lrz (zmodem).

On FPGA (over telnet or serial console) run:
flashw -u -f /tmp/download.bin /dev/mtd0
flashw -u -o 3145728 -f /tmp/bootimage.bin /dev/mtd0

Power-cycle the device.

OLD/DEBUGGING PROCEDURE:

Build a bitstream and software in XPS, initialize BRAM in bitstream
with mbbl binary (you may have to change the paths in the files,
currently /home/alexb is still hardcoded in some of them).

Program flash or FPGA with the bitstream, have a terminal connected to
the serial port (115200, 8N1), confirm that mbbl started and given the
error message about missing kernel or device tree. If mbbl is loading
an old kernel that is already in flash, press Ctrl-C twice while it's
loading.

Run XMD, wait for error message, stop the processor, record the stop
address, load:

local/dt.dtb at 0x90800000

continue from the stop address, after another error message stop the
processor, record the stop address, load:

uClinux-dist/linux-2.6.x/arch/microblaze/boot/linux.bin at 0x90000000
local/romfs.bin.gz at 0x97c00000

Continue from the stop address. Linux will boot from those images.

Once Linux is booted, log in at the serial console, upload bootimage.bin
to /tmp using ftp or lrz (zmodem).

On FPGA (over telnet or serial console) run:
flashw -u -o 3145728 -f /tmp/bootimage.bin /dev/mtd0

Reset and re-program FPGA or power-cycle the device (if FPGA bitstream
is already programmed in flash) -- Linux will boot from the images in flash.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published