cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jmgrn
Adventurer
Adventurer
7,427 Views
Registered: ‎08-20-2014

How to deal with U-boot if I want to port Linux on Microblaze?

I have a ML605 evaluation board.

I have ISE13.4 on my Windows PC, and I installed ISE Webpack 14.7 on my Ubuntu laptop.

What I want to do is to run a simple linux OS on microblaze.

 

First, I use XPS and SDK on my Windoes PC to generate ise_top.bit and xilinx.dts.

Then, I download a linux-xlnx on my ubuntu computer. After copying my xilinx.dts to /arch/microblaze/boot/..., I use the following to commands to add the path:

 

export CROSS_COMPILE = microblazeel-xilinx-linux-gnu-

export PATH=/opt/Xilinx/14.7/ISE_DS/EDK/gnu/microblaze/linux-toolchain/lin64_le/bin:$PATH

 

Then, I followed some online manual to peform:

make ARCH=microblaze sp605_le_defconfig   (This sp605 file did not exist in the linux folder, I downloaded it)

make ARCH=microblaze menuconfig   (I checked the platform options)

make ARCH=microblaze  simpleImage.xilinx   (When I came accross some errors about "mkimage", I simpley use sudo apt-get install u-boot-tools to get around that, which I guess is not very safe)

 

Finally, I got 2 files ready:  simpleImage.xilinx (4.5MB) and simpleImage.xilinx.unstrip (5.5MB).

Do you think the size looks right? What is the .unstrip file used for?

 

The above operations are all I did to generate simpleImage.xilinx.

However, when I went back to my Windows PC to open Xilinx tools->Launch shell ..... fpga -f ise_top.bit... connect mb mdm...dow simpleImage.xilinx...con...., I saw nothing displayed on my serial port terminal (TeraTerm).

 

Is there any important step that I probably missed?  Maybe it is about U-boot, if so could you please me some suggestions on how to finish the "U-boot step" of this experiment?

 

0 Kudos
4 Replies
guillaumebres
Scholar
Scholar
7,421 Views
Registered: ‎03-27-2014

well first of all,

if a prompt does not show up it means uboot is not properly cross-compiled or the SD card is corrupted.

The Linux kernel will come later.

 

Here is how I generally cross-compile Uboot myself (I'd rather be using some environment like Buildroot, Poky or PetaLinux ):

 

git clone https://github.com/Xilinx/u-boot-xlnx
cd u-boot-xlnx

cp /ISE-Vivado/[...]/ps7_init.{c,h} board/xilinx/zynq make CROSS_COMPILE=/toolchain/xx-gnueabi- ARCH=arm O=my_build my_defconfig make CROSS_COMPILE=/toolchain/xx-gnueabi- ARCH=arm O=my_build

maybe avoid the

export PATH=/opt/Xilinx/14.7/ISE_DS/EDK/gnu/microblaze/linux-toolchain/lin64_le/bin:$PATH

for that session.

 

Uboot builds right away as long as your cross-compiler works fine but it does not mean it's going to work properly.

I am not familiar with Microblaze but for Zynq you need to add two proprietary files (bootloader) generated by the Xilinx SDK: you may need an extra step.

 

Proper partition table:

sudo fdisk /dev/sdb1
p n
t 1 => FAT32
a 1 => bootable
w

sudo fdisk /dev/sdb
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 206847 102400 b W95 FAT32
mount /dev/sdb1 /mnt cp u-boot-xlnx/my_build/{u-boot.img,boot.bin} /mnt

 

gw.
Embedded Systems, DSP, cyber
0 Kudos
jmgrn
Adventurer
Adventurer
7,407 Views
Registered: ‎08-20-2014

Thank you so much, Sir !
Do you think the size of my simpleImage.xilinx normal?

I was following the steps:
https://www.scribd.com/doc/63732567/Microblaze-Linux-on-Xilinx-ML605

On page 6, I stoped before "Creation of Compact Flash image". Is it possible something wrong here?

Because I am a newbie with very little experience and there are so many steps, I got totally lost when the final result is bad and do not know which step to debug :P
0 Kudos
jmgrn
Adventurer
Adventurer
7,387 Views
Registered: ‎08-20-2014

I followed the instructions in http://xilinx.wikidot.com/mb-uboot to compile U-boot

 

linux-host> export BUILD_DIR=$PWD/build

linux-host> make microblaze-generic_config

linux-host> make

 

And I got the following error:

  CHK     include/config.h
  UPD     include/config.h
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
  GEN     spl/include/autoconf.mk
  CHK     include/config/uboot.release
  UPD     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  UPD     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CC      lib/asm-offsets.s
  CHK     include/generated/generic-asm-offsets.h
  UPD     include/generated/generic-asm-offsets.h
  HOSTCC  tools/envcrc.o
  WRAP    tools/lib/crc32.c
  HOSTCC  tools/lib/crc32.o
  WRAP    tools/common/env_embedded.c
  HOSTCC  tools/common/env_embedded.o
  WRAP    tools/lib/sha1.c
  HOSTCC  tools/lib/sha1.o
  HOSTLD  tools/envcrc
  HOSTCC  tools/gen_eth_addr
  HOSTCC  tools/img2srec
  HOSTCC  tools/mkenvimage.o
  HOSTCC  tools/os_support.o
  HOSTLD  tools/mkenvimage
  HOSTCC  tools/aisimage.o
  HOSTCC  tools/atmelimage.o
  WRAP    tools/common/bootm.c
  HOSTCC  tools/common/bootm.o
  HOSTCC  tools/default_image.o
  WRAP    tools/lib/fdtdec_common.c
  HOSTCC  tools/lib/fdtdec_common.o
  WRAP    tools/lib/fdtdec.c
  HOSTCC  tools/lib/fdtdec.o
  HOSTCC  tools/fit_common.o
  HOSTCC  tools/fit_image.o
  HOSTCC  tools/gpimage.o
  HOSTCC  tools/gpimage-common.o
  WRAP    tools/common/image-fit.c
  HOSTCC  tools/common/image-fit.o
  HOSTCC  tools/image-host.o
  WRAP    tools/common/image.c
  HOSTCC  tools/common/image.o
  HOSTCC  tools/imagetool.o
  HOSTCC  tools/imximage.o
  HOSTCC  tools/kwbimage.o
  WRAP    tools/lib/md5.c
  HOSTCC  tools/lib/md5.o
  HOSTCC  tools/lpc32xximage.o
  HOSTCC  tools/mxsimage.o
  HOSTCC  tools/omapimage.o
  HOSTCC  tools/pblimage.o
  HOSTCC  tools/pbl_crc32.o
  HOSTCC  tools/socfpgaimage.o
  WRAP    tools/lib/sha256.c
  HOSTCC  tools/lib/sha256.o
  WRAP    tools/common/hash.c
  HOSTCC  tools/common/hash.o
  HOSTCC  tools/ublimage.o
  WRAP    tools/lib/libfdt/fdt.c
  HOSTCC  tools/lib/libfdt/fdt.o
  WRAP    tools/lib/libfdt/fdt_ro.c
  HOSTCC  tools/lib/libfdt/fdt_ro.o
  WRAP    tools/lib/libfdt/fdt_rw.c
  HOSTCC  tools/lib/libfdt/fdt_rw.o
  WRAP    tools/lib/libfdt/fdt_strerror.c
  HOSTCC  tools/lib/libfdt/fdt_strerror.o
  WRAP    tools/lib/libfdt/fdt_wip.c
  HOSTCC  tools/lib/libfdt/fdt_wip.o
  HOSTCC  tools/dumpimage.o
  HOSTLD  tools/dumpimage
  HOSTCC  tools/mkimage.o
  HOSTLD  tools/mkimage
  HOSTCC  tools/ncb
  HOSTCC  tools/proftool
  AS      arch/microblaze/cpu/irq.o
  CC      arch/microblaze/cpu/cpu.o
  CC      arch/microblaze/cpu/interrupts.o
  CC      arch/microblaze/cpu/cache.o
  CC      arch/microblaze/cpu/exception.o
  CC      arch/microblaze/cpu/timer.o
  LD      arch/microblaze/cpu/built-in.o
  AS      arch/microblaze/cpu/start.o
  CC      arch/microblaze/lib/bootm.o
  CC      arch/microblaze/lib/muldi3.o
  LD      arch/microblaze/lib/built-in.o
  CC      board/xilinx/microblaze-generic/microblaze-generic.o
  LD      board/xilinx/microblaze-generic/built-in.o
  CC      common/main.o
  CC      common/exports.o
  CC      common/hash.o
  CC      common/cli_hush.o
  CC      common/autoboot.o
  CC      common/board_f.o
  CC      common/board_r.o
  CC      common/cmd_boot.o
  CC      common/cmd_bootm.o
  CC      common/bootm.o
  CC      common/bootm_os.o
  CC      common/cmd_help.o
  CC      common/cmd_version.o
  CC      common/env_attr.o
  CC      common/env_callback.o
  CC      common/env_flags.o
  CC      common/env_flash.o
  CC      common/cmd_source.o
  CC      common/cmd_bdinfo.o
  CC      common/cmd_console.o
  CC      common/cmd_echo.o
  CC      common/cmd_exit.o
  CC      common/cmd_ext2.o
  CC      common/cmd_fat.o
  CC      common/cmd_fdt.o
  CC      common/fdt_support.o
  CC      common/cmd_flash.o
  CC      common/cmd_gpio.o
  CC      common/cmd_irq.o
  CC      common/cmd_itest.o
  CC      common/cmd_jffs2.o
  CC      common/cmd_load.o
  CC      common/cmd_mem.o
  CC      common/cmd_mfsl.o
  CC      common/miiphyutil.o
  CC      common/cmd_mii.o
  CC      common/cmd_mdio.o
  CC      common/cmd_misc.o
  CC      common/cmd_mtdparts.o
  CC      common/cmd_net.o
  CC      common/cmd_pcmcia.o
  CC      common/cmd_test.o
  CC      common/cmd_ubi.o
  CC      common/cmd_ximg.o
  CC      common/cmd_spl.o
  CC      common/flash.o
  CC      common/splash.o
  CC      common/cmd_nvedit.o
  CC      common/env_common.o
  CC      common/console.o
  CC      common/dlmalloc.o
  CC      common/malloc_simple.o
  CC      common/image.o
  CC      common/image-fdt.o
  CC      common/image-fit.o
  CC      common/memsize.o
  CC      common/stdio.o
  CC      common/cli_simple.o
  CC      common/cli.o
  CC      common/cli_readline.o
  CC      common/command.o
  CC      common/s_record.o
  CC      common/xyzModem.o
  CC      common/cmd_disk.o
  LD      common/built-in.o
  CC      common/env_embedded.o
  CC      disk/part.o
  CC      disk/part_dos.o
  LD      disk/built-in.o
  CC      drivers/block/systemace.o
  LD      drivers/block/built-in.o
  CC      drivers/crypto/fsl/sec.o
  LD      drivers/crypto/fsl/built-in.o
  LD      drivers/crypto/rsa_mod_exp/built-in.o
  LD      drivers/crypto/built-in.o
  LD      drivers/dfu/built-in.o
  LD      drivers/hwmon/built-in.o
  CC      drivers/input/input.o
  CC      drivers/input/key_matrix.o
  LD      drivers/input/built-in.o
  LD      drivers/memory/built-in.o
  LD      drivers/misc/built-in.o
  CC      drivers/pcmcia/tqm8xx_pcmcia.o
  LD      drivers/pcmcia/built-in.o
  LD      drivers/pwm/built-in.o
  CC      drivers/rtc/date.o
  LD      drivers/rtc/built-in.o
  LD      drivers/soc/built-in.o
  LD      drivers/sound/built-in.o
  LD      drivers/thermal/built-in.o
  LD      drivers/tpm/built-in.o
  LD      drivers/twserial/built-in.o
  LD      drivers/video/built-in.o
  CC      drivers/watchdog/xilinx_tb_wdt.o
  LD      drivers/watchdog/built-in.o
  LD      drivers/built-in.o
  LD      drivers/dma/built-in.o
  CC      drivers/gpio/xilinx_gpio.o
  LD      drivers/gpio/built-in.o
  LD      drivers/i2c/built-in.o
  LD      drivers/mmc/built-in.o
  CC      drivers/mtd/mtdcore.o
  CC      drivers/mtd/mtd_uboot.o
  CC      drivers/mtd/mtdpart.o
  CC      drivers/mtd/cfi_flash.o
  CC      drivers/mtd/cfi_mtd.o
  LD      drivers/mtd/built-in.o
  LD      drivers/mtd/onenand/built-in.o
  LD      drivers/mtd/spi/built-in.o
  CC      drivers/mtd/ubi/attach.o
  CC      drivers/mtd/ubi/build.o
  CC      drivers/mtd/ubi/vtbl.o
  CC      drivers/mtd/ubi/vmt.o
  CC      drivers/mtd/ubi/upd.o
  CC      drivers/mtd/ubi/kapi.o
  CC      drivers/mtd/ubi/eba.o
  CC      drivers/mtd/ubi/io.o
  CC      drivers/mtd/ubi/wl.o
  CC      drivers/mtd/ubi/crc32.o
  CC      drivers/mtd/ubi/misc.o
  CC      drivers/mtd/ubi/debug.o
  LD      drivers/mtd/ubi/built-in.o
  CC      drivers/net/netconsole.o
  CC      drivers/net/xilinx_emaclite.o
  CC      drivers/net/xilinx_ll_temac.o
In file included from drivers/net/xilinx_ll_temac.h:32:0,
                 from drivers/net/xilinx_ll_temac.c:30:
drivers/net/xilinx_ll_temac_sdma.h:32:3: error: #error LL_TEMAC requires big endianess
In file included from drivers/net/xilinx_ll_temac.c:30:0:
drivers/net/xilinx_ll_temac.h:35:3: error: #error LL_TEMAC requires big endianess
In file included from drivers/net/xilinx_ll_temac.c:31:0:
drivers/net/xilinx_ll_temac_fifo.h:30:3: error: #error LL_TEMAC requires big endianess
scripts/Makefile.build:276: recipe for target 'drivers/net/xilinx_ll_temac.o' failed
make[1]: *** [drivers/net/xilinx_ll_temac.o] Error 1
Makefile:1168: recipe for target 'drivers/net' failed
make: *** [drivers/net] Error 2

Why did I get such errors? How can it be solved? Thanks

0 Kudos
guillaumebres
Scholar
Scholar
7,357 Views
Registered: ‎03-27-2014


@jmgrn wrote:
..think of my file image .. ?

4.5 MB seems like a lightweight system to me, you may have problems if size > 16 MB but you are far from that.

 

  CC      drivers/net/xilinx_ll_temac.o
In file included from drivers/net/xilinx_ll_temac.h:32:0,
                 from drivers/net/xilinx_ll_temac.c:30:
drivers/net/xilinx_ll_temac_sdma.h:32:3: error: #error LL_TEMAC requires big endianess

I am not familiar with the microblaze but it looks like there's a problem between what is being compiled and make microblaze-generic_config

gw.
Embedded Systems, DSP, cyber
0 Kudos