Mainline Linux 2.6 kernel for Microblaze, Linux on Microblaze

I would like to thanks PetaLogix for lending Xilinx s3e1600E board and Xilinx for providing ML505 and s3adsp1800 boards.

If you want something to know please send email to microblaze mailing list with CC to me. (archive, archive-gmane)

Latest code is available at GIT server. http://git.monstr.eu/git/gitweb.cgi

Linux maintaining fragment

MICROBLAZE ARCHITECTURE
P:	Michal Simek
M:	monstr@monstr.eu
L:	microblaze-uclinux@itee.uq.edu.au
W:	http://www.monstr.eu/fdt/
T:	git git://git.monstr.eu/linux-2.6-microblaze.git
S:	Supported
F:	arch/microblaze/

What is different?

  • Code is based on the latest code from PetaLogix
  • Kernel is compatible with latest Linux code
  • The all code is cleaned according to Linux coding style
  • There are no driver in pure Linux kernel (only some) but it is compatible with PetaLogix distribution and drivers and it is possible to join it together
  • Completely redesign initialization part of kernel
  • Completely redesign memory part of kernel
  • The code has the same performance as common Microblaze code with static constant - that's amazing

Patch submission

Before sending your patches please do:

  1. Check for-linus, fixes-for-linus and next branch for latest rc changes
  2. Check it with checkpatch.pl script which is in linux kernel and run sparse (make C=1) for checking too. I will reject all patches which break coding style.
  3. Sending only in-line patches (git-send-email is recommended) do not attach them - it is better for reviewing.
  4. Send the smallest patches as possible and fix only one issue separately.
  5. Look at Documentation/SubmittingPatches for proper line.

How to boot Microblaze FDT kernel?

Vocabulary

  • EDK → Xilinx Embedded Development Kit - development environment where you can create/build your FPGA SoC
  • Microblaze → Xilinx soft core CPU
  • BSP
    • board support package → means full package for specific board (currently this means is not used)
    • EDK BSP → scripts which add functionality to EDK in software part.
  • DTS file → text file which contains detailed information about SoC. Currently this file is automatically generated by Device tree BSP.
  • DTB file → compiled DTS file.
  • DTC → device tree compiler which create DTB file from DTS.
  • FDT → flat device tree
  • OF → open firmware
  • BRAM → block ram memory → you can stored program there with bitstream

BSP

For working with FDT kernel you need to have DTS file which describes your Microblaze SoC.

  • Create new working folder
mkdir -p ~/microblaze-fdt/hardware/edk_user_repository/
cd ~/microblaze-fdt/hardware/edk_user_repository/
  • Download FDT BSP pack fdt-bsp.tar.gz
  • Copy fdt-bsp.tar.gz to ~/microblaze-fdt/hardware/edk_user_repository/
  • Unpack all BSP
tar xvfz fdt-bsp.tar.gz
  • Currently you have all BSP which you need for working with FDT Microblaze linux kernel.

BSP updates

This chapter is only for user which wants to update BSP.

Prepared pack contains three BSP
  1. Top BSP which helps you with generation all BSP with one setting. For more information look at this site.
  2. U-BOOT bsp which generate files for U-BOOT bootloader. For more information look at this site.
  3. Device tree BSP which generates DTS setting file
Cloning BSP from GIT server
  • For cloning the latest TOP BSP please use
git clone git://git.monstr.eu/top-bsp.git
  • For cloning the latest U-BOOT BSP please use
git clone git://git.monstr.eu/uboot-bsp.git
  • Clone Device tree BSP. Please do not use BSP from other site because of our GIT server contains Microblaze relate changes
git clone git://git.monstr.eu/device-tree.git
  • Please look at BSP structure and replace *.tcl *.mld file.

Device tree compiler

For creating DTB which is passing to Linux kernel you need DTC

  • Prepare folder for binary
 mkdir -p ~/microblaze-fdt/tools/bin/src
 cd ~/microblaze-fdt/tools/bin/src
git clone git://git.jdl.com/software/dtc.git
cd dtc
  • Compile DTC
make
  • For proper usage you have to move dtc to your PATH
    • Copy dtc to prepared bin folder
cp ~/microblaze-fdt/tools/bin/src/dtc/dtc ~/microblaze-fdt/tools/bin
cd ~/microblaze-fdt/tools/bin
export PATH=$PATH:`pwd`
  • Use generic location
make install

Hardware design

We will use for storing hw design special folder

mkdir -p ~/microblaze-fdt/hardware/hw_design

For example if you want to add/copy your design (ml505) to this folder. Create new folder (ml505) and add them hw files.

mkdir -p ~/microblaze-fdt/hardware/hw_design/ml505

You should able to see there mhs, mss, xmp and date folder with ucf files.

ls -R ~/microblaze-fdt/hardware/hw_design/ml505/
~/microblaze-fdt/hardware/hw_design/ml505/:
data  system.mhs  system.mss  system.xmp

~/microblaze-fdt/hardware/hw_design/ml505/data:
system.ucf

Hardware requirements

  • FDT kernel should be able to boot on any HW.
  • Please do not use Microblaze version 7.00a without tactical patch.
  • Please do not enable FULL PVR with MMU on Microblaze version 7.00.a/b.
  • Please check that your FLASH memory baseaddr is on higher address than your Main memory due to U-BOOT bootloader (U-BOOT BSP check it).
  • I recommend you enable FULL PVR setting - Linux kernel check that your kernel and DTS file is correct for your CPU

Please check your system.xmp (or *.xmp which you use) that ModuleSearchPath is set correctly

cd ~/microblaze-fdt/hardware/hw_design/ml505
grep "ModuleSearchPath" system.xmp
 ModuleSearchPath: ../../edk_user_repository/

Please choose TOP BSP and set values there. For example fragment from *.mss file for ml505

BEGIN OS
 PARAMETER OS_NAME = top
 PARAMETER OS_VER = 1.00.b
 PARAMETER PROC_INSTANCE = microblaze_0
 PARAMETER timer = xps_timer_1
 PARAMETER ethernet = Hard_Ethernet_MAC
 PARAMETER sysace = SysACE_CompactFlash
 PARAMETER iic = IIC_EEPROM
 PARAMETER gpio = LEDs_8Bit
 PARAMETER lmb_memory = dlmb_cntlr
 PARAMETER flash_memory = FLASH
 PARAMETER main_memory = DDR2_SDRAM
 PARAMETER stdin = RS232_Uart_1
 PARAMETER stdout = RS232_Uart_1
END

For example fragment from *.mss file for s3e1600

BEGIN OS
 PARAMETER OS_NAME = top
 PARAMETER OS_VER = 1.00.b
 PARAMETER PROC_INSTANCE = microblaze_0
 PARAMETER timer = xps_timer_1
 PARAMETER ethernet = Ethernet_MAC
 PARAMETER gpio = LEDs_6Bit
 PARAMETER lmb_memory = dlmb_cntlr
 PARAMETER flash_memory = FLASH
 PARAMETER main_memory = DDR_SDRAM
 PARAMETER stdin = RS232_DTE
 PARAMETER stdout = RS232_DTE
END
  • Here is one rules which save your time. Please every time run software build before hardware. Software BSP validate your SoC. If your SoC contains any fault BSP will announce it.
make -f system.make libs

Bootloader options

Before you start to build hardware you should choose our booting strategy. I would like to give you some options what you can choose.

  1. Create your own bootloader
  2. Use common bootloader
    1. Use small bootloader - FS-BOOT
    2. Use advanced bootloader - U-BOOT
DescriptionOwnFS-BootU-BOOT
Memory consumptionDepends on your features8k BRAM>128k
FunctionsDepends on what you want to developCopy SREC to memory, Boot kernel from Flash - readingFull Flash, System ACE, Network-emaclite,emac,ll_temac, gpio, booting all kernel and a lot of others
Time of developingDepends on your features but it is huge in compare to standard solution-Only adding features which are not there
Source code maintaining Customer must care aboutPetaLogixme
Stability uknown ~99.9% stable ~99% stable - Depends on setting

You can use our own bootloader in all variants but be sure you have time and developer who will do it. Keep in your mind that if you want to use it after some years again someone take care about. Please counted how much money this option cost. You will not have any support of it.

  1. System has no non-volatile memory (without FLASH, SPI flash, SystemACE)
    • Use FS-BOOT which waits for SREC through serial line
      • copy advanced bootloader to ram and start it - recommended way
        • + add more functionality
        • - you want to boot any kernel - you must have any different way how to get kernel to memory
        • loading around 30s (baudrate 115200)
      • copy directly linux kernel to memory and boot it
        • + simply
        • - time wasting
  2. System has FLASH memory - NOR
    • Use FS-BOOT and place it to BRAM
      • Only start kernel stored in FLASH (Kernel is stored to FLASH via JTAG)
      • Start U-BOOT and use U-BOOT for advanced booting - recommended way
    • Use any simple bootloader which only jump to flash memory and boots whatever
  3. System has FLASH memory - NAND, Spansion FLASH
    • Use U-BOOT which can work with NAND flashes
  4. System has System.ACE
    • Create own bootloader which will read file from CF and loads it to memory and boots - it is possible load U-BOOT too
    • Use .ACE file with FS-BOOT and boots kernel or U-BOOT stored in flash
    • Use .ACE file with U-BOOT - recommended way
  5. System has SPI flash
    • Currently I don't know about any standard solution. Recommended way is stored U-BOOT there and create simple bootloader which copy it to main memory and jump to start.

Hw build

  • Do hardware build
make -f system.make init_bram
  • If you want to use any bootloader in BRAM you should add it to EDK project.

U-BOOT bootloader

mkimage executable files

  • Download U-BOOT sources
mkdir -p ~/microblaze-fdt/software/
cd ~/microblaze-fdt/software/
git clone git://git.monstr.eu/u-boot-microblaze.git
  • Setup U-BOOT source code
    • Copy two generated file from hw design
cp ~/microblaze-fdt/hardware/hw_design/ml505/microblaze_0/libsrc/uboot_v4_00_c/config.mk  ~/microblaze-fdt/software/u-boot-microblaze/board/xilinx/microblaze-generic/config.mk
cp ~/microblaze-fdt/hardware/hw_design/ml505/microblaze_0/libsrc/uboot_v4_00_c/xparameters.h  ~/microblaze-fdt/software/u-boot-microblaze/board/xilinx/microblaze-generic/xparameters.h
  • Set your Cross compiler. You can use the same for MMU and noMMU kernel
export CROSS_COMPILE=microblaze-uclinux-
  • Setup your board to build
make microblaze-generic_config
  • Build U-BOOT source code
make
  • Load U-BOOT code to board
    • via XMD
cat <<EOF >xmd.ini
connect mb mdm
dow u-boot
exit
EOF
  • Run XMD
xmd
  • via Serial line through FS-BOOT
    • check write permission on ttyS0
cat u-boot.srec > /dev/ttyS0
  • Copy mkimage utility to generic location
cp ~/microblaze-fdt/software/u-boot-microblaze/tools/mkimage ~/microblaze-fdt/tools/bin/mkimage

Linux Microblaze FDT kernel

  • Prepared software folder for Linux kernel
mkdir -p ~/microblaze-fdt/software/
cd ~/microblaze-fdt/software/
  • Download Microblaze FDT Linux kernel
git clone git://git.monstr.eu/linux-2.6-microblaze.git
cd linux-2.6-microblaze
  • export your cross_compile
    • For noMMU kernel
export CROSS_COMPILE=microblaze-uclinux-
  • For MMU kernel
export CROSS_COMPILE=mb-linux-
  • Run menuconfig and setup kernel
make menuconfig
  • Please check some parameters in menuconfig (.config file) Should correspond with your HW setting
#
# Automatic platform settings from Kconfig.auto
#
CONFIG_KERNEL_BASE_ADDR=0x90000000
CONFIG_XILINX_MICROBLAZE0_FAMILY="virtex5"
CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
CONFIG_XILINX_MICROBLAZE0_USE_DIV=1
CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=2
CONFIG_XILINX_MICROBLAZE0_USE_FPU=2
CONFIG_XILINX_MICROBLAZE0_HW_VER="7.10.d"     
  • Compile linux kernel
make
  • Generate U-BOOT executable file
    • for noMMU kernel. Address correspond with CONFIG_KERNEL_BASE_ADDR in .config file
mkimage -A microblaze -O linux -T kernel -C none -a 0x90000000 -e 0x90000000 -n "Microblaze FDT kernel without FS" -d arch/microblaze/boot/linux.bin /tftpboot/image.ub
  • Generate Filesystem - I recommend you use Petalogix distribution and reuse file image.img (ROMFS or CRAMFS filesystem should be enable in kernel .config file)
mkimage -A microblaze -O linux -T ramdisk -C none -n "Microblaze ROOTFS" -d arch/microblaze/platform/generic/image.img /tftpboot/romfs.ub;
  • for MMU kernel. Address correspond with CONFIG_KERNEL_BASE_ADDR in .config file
    • Generate Filesystem - I recommend you use Petalogix distribution and reuse file rootfs.cpio. Please do correct setting in kernel .config file.
mkimage -A microblaze -O linux -T kernel -C none -a 0x90000000 -e 0x90000000 -n "Microblaze MMU FDT kernel" -d arch/microblaze/boot/linux.bin /tftpboot/image.ub

Creating DTB file

  • Move to folder where DTS file is
cd hw_design/ml505/microblaze_0/libsrc/device-tree_v1_01_a/
  • There is xilinx.dts file
  • Generate DTB file from DTS and add it to /tftpboot folder
dtc -f -O dtb -b 0 -V 16 xilinx.dts > system.dtb
  • Copy system.dtb to /tftpboot folder
cp system.dtb /tftpboot/system.dtb

FDT Kernel booting

Memory layout

Kernel can be place to almost every position. There are some limitation like. The last instruction of kernel cannot exceed limit which is placed approximately 16 kB from the end of memory. You have to calculate with size of file system too.

U-BOOT

For noMMU kernel → here is separated Rootfs and kernel

tftp 0x90780000 system.dtb
fdt addr 0x90780000
fdt list /
fdt print /
tftp 0x90800000 image.ub
tftp 0x90A00000 romfs.ub
bootm 0x90800000 0x90A00000 0x90780000

For MMU kernel → initramfs is included in image.ub file

tftp 0x90780000 system.dtb
fdt addr 0x90780000
fdt list /
fdt print /
tftp 0x90800000 image.ub
bootm 0x90800000 - 0x90780000

If you see message below you have problem with overriding DTB with kernel image. You should change fdt address.

ERROR: Did not find a cmdline Flattened Device Tree

Booting from others bootloaders

  • Register R5: command line
  • Register R6: physical address to ramdisk. (Build in fs == 0)
  • Register R7: physical address to DTB file

Command line priorities

From the lowest to the highest priority

  • Passing command line through r5
  • CONFIG_CMDLINE in menuconfig
  • dts command line
  • CONFIG_CMDLINE with CONFIG_CMDLINE_FORCE in menuconfig

NFS rootfs

Setup nfsroot bootargs

bootargs = "console=ttyUL0,115200 highres=on ip=dhcp root=/dev/nfs rw nfsroot=192.168.0.102:/tftpboot/rootnommu";

Setup current configs in menuconfig

CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y - for dhcp usage
CONFIG_ROOT_NFS=y

Command line options summaru

Rootfs on SystemACEroot=/dev/xsa2
NFS rootfsroot=/dev/nfs rw nfsroot=192.168.0.102:/tftpboot/rootnfs
Console on uart16550 or old uartliteconsole=ttyS0,115200
Console on uarliteconsole=ttyUL0,115200
Turn off consolesilent=off
Single user modesingle
tmpfs as root devfs=mount rw rootfstype=tmpfs root=/dev/ram

Serial console

Uartlite

#
# Serial drivers
#
# CONFIG_SERIAL_8250 is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_UARTLITE=y
CONFIG_SERIAL_UARTLITE_CONSOLE=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y

Uart16550

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
# CONFIG_SERIAL_UARTLITE is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_OF_PLATFORM=y

Extract compiled in .config

I recommend you in developing to enable CONFIG_IKCONFIG, CONFIG_IKCONFIG_PROC for compiled in .config

gunzip < /proc/config.gz >/tmp/.config

Showing linux kernel buffer

Via U-BOOT

  • Find on your x86 or whatever where log buffer is
[/home/kernel/]$ cat System.map | grep __log_buf
201c4624 b __log_buf
  • Starting your board
  =================================================
  FS-BOOT First Stage Bootloader (c) 2006 PetaLogix
  =================================================
  FS-BOOT: System initialisation completed.
  FS-BOOT: Booting from FLASH. Press 's' for image download.
  FS-BOOT: Booting image...
  U-Boot-mONStR> run d
  TFTP from server 192.168.0.5; our IP address is 192.168.0.3
  Filename 'system.dtb'.
  Load address: 0x21900000
  Loading: #
  done
  Bytes transferred = 6912 (1b00 hex)
  TFTP from server 192.168.0.5; our IP address is 192.168.0.3
  Filename 'image.ub'.
  Load address: 0x20a00000
  Loading: #################################################################
           #############################################################
  done
  Bytes transferred = 1847360 (1c3040 hex)
  TFTP from server 192.168.0.5; our IP address is 192.168.0.3
  Filename 'romfs.ub'.
  Load address: 0x21400000
  Loading: #################################################################
           ###########################
  done
  Bytes transferred = 1341504 (147840 hex)
  ## Booting kernel from Legacy Image at 20a00000 ...
     Image Name:   kernel bez FS
     Image Type:   MicroBlaze Linux Kernel Image (uncompressed)
     Data Size:    1847296 Bytes =  1.8 MB
     Load Address: 20000000
     Entry Point:  20000000
     Verifying Checksum ... OK
     Loading Kernel Image ... OK
  OK
  ## Loading init Ramdisk from Legacy Image at 21400000 ...
     Image Name:   fs v no network
     Image Type:   MicroBlaze Linux RAMDisk Image (uncompressed)
     Data Size:    1341440 Bytes =  1.3 MB
     Load Address: 00000000
     Entry Point:  00000000
     Verifying Checksum ... OK
  ## Transferring control to Linux (at address 20000000) ...
  aaaa
  bbb
     Booting using OF flat tree...root=romfs, 0x21400040, 0x21900000
  • Something is wrong. → restart board
  =================================================
  FS-BOOT First Stage Bootloader (c) 2006 PetaLogix
  =================================================
  FS-BOOT: System initialisation completed.
  FS-BOOT: Booting from FLASH. Press 's' for image download.
  FS-BOOT: Booting image...
  • Show your log buffer
  U-Boot-mONStR> md 201c4624
  201c4624: 3c353e46 6f756e64 20464454 20617420    <5>Found FDT at 
  201c4634: 30783231 39303030 30300a3c 353e4c69    0x21900000.<5>Li
  201c4644: 6e757820 76657273 696f6e20 322e362e    nux version 2.6.
  201c4654: 32342d6d 4f4e5374 522d6733 38333939    24-mONStR-g38399
  201c4664: 62373720 286d6f6e 73747240 6d6f6e73    b77 (monstr@mons
  201c4674: 74722e65 75292028 67636320 76657273    tr.eu) (gcc vers
  201c4684: 696f6e20 332e342e 31202820 50657461    ion 3.4.1 ( Peta
  201c4694: 4c696e75 7820302e 32302042 75696c64    Linux 0.20 Build
  201c46a4: 202d7263 31203035 30363037 20292920     -rc1 050607 )) 
  201c46b4: 23322046 7269204d 61792031 36203134    #2 Fri May 16 14
  201c46c4: 3a32333a 32382043 45535420 32303038    :23:28 CEST 2008
  201c46d4: 0a3c363e 73657475 705f6370 75696e66    .<6>setup_cpuinf
  201c46e4: 6f3a2069 6e697469 616c6973 696e670a    o: initialising.
  201c46f4: 3c363e73 65747570 5f6d656d 6f72793a    <6>setup_memory:
  201c4704: 206d6178 5f6d6170 6e723a20 30783232     max_mapnr: 0x22
  201c4714: 3030300a 3c363e73 65747570 5f6d656d    000.<6>setup_mem
  U-Boot-mONStR> 
  201c4724: 6f72793a 206d696e 5f6c6f77 5f70666e    ory: min_low_pfn
  201c4734: 3a203078 32303030 300a3c36 3e736574    : 0x20000.<6>set
  201c4744: 75705f6d 656d6f72 793a206d 61785f6c    up_memory: max_l
  201c4754: 6f775f70 666e3a20 30783230 30300a3c    ow_pfn: 0x2000.<
  201c4764: 373e4f6e 206e6f64 65203020 746f7461    7>On node 0 tota
  201c4774: 6c706167 65733a20 38313932 0a3c373e    lpages: 8192.<7>
  201c4784: 20204e6f 726d616c 207a6f6e 653a2036      Normal zone: 6
  201c4794: 34207061 67657320 75736564 20666f72    4 pages used for
  201c47a4: 206d656d 6d61700a 3c373e20 204e6f72     memmap.<7>  Nor
  201c47b4: 6d616c20 7a6f6e65 3a203020 70616765    mal zone: 0 page
  201c47c4: 73207265 73657276 65640a3c 373e2020    s reserved.<7>  
  201c47d4: 4e6f726d 616c207a 6f6e653a 20383132    Normal zone: 812
  201c47e4: 38207061 6765732c 204c4946 4f206261    8 pages, LIFO ba
  201c47f4: 7463683a 300a3c37 3e20204d 6f766162    tch:0.<7>  Movab
  201c4804: 6c65207a 6f6e653a 20302070 61676573    le zone: 0 pages
  201c4814: 20757365 6420666f 72206d65 6d6d6170     used for memmap
  U-Boot-mONStR> 
  201c4824: 0a3c353e 53656c66 206d6f64 69666965    .<5>Self modifie
  201c4834: 6420636f 64652065 6e61626c 650a3c34    d code enable.<4
  201c4844: 3e427569 6c742031 207a6f6e 656c6973    >Built 1 zonelis
  201c4854: 74732069 6e205a6f 6e65206f 72646572    ts in Zone order
  201c4864: 2c206d6f 62696c69 74792067 726f7570    , mobility group
  201c4874: 696e6720 6f6e2e20 20546f74 616c2070    ing on.  Total p
  201c4884: 61676573 3a203831 32380a3c 353e4b65    ages: 8128.<5>Ke
  201c4894: 726e656c 20636f6d 6d616e64 206c696e    rnel command lin
  201c48a4: 653a2063 6f6e736f 6c653d74 7479554c    e: console=ttyUL
  201c48b4: 302c3131 35323030 206c6f67 6c657665    0,115200 logleve
  201c48c4: 6c3d3135 0a3c363e 786c6e78 2c787073    l=15.<6>xlnx,xps
  201c48d4: 2d696e74 632d312e 30302e61 20233020    -intc-1.00.a #0 
  201c48e4: 61742030 78343030 30303030 302c206e    at 0x40000000, n
  201c48f4: 756d5f69 72713d38 2c206564 67653d30    um_irq=8, edge=0
  201c4904: 78300a3c 343e5049 44206861 73682074    x0.<4>PID hash t
  201c4914: 61626c65 20656e74 72696573 3a203132    able entries: 12
  U-Boot-mONStR> 
  201c4924: 3820286f 72646572 3a20372c 20353132    8 (order: 7, 512
  201c4934: 20627974 6573290a 3c363e78 6c6e782c     bytes).<6>xlnx,
  201c4944: 7870732d 74696d65 722d312e 30302e61    xps-timer-1.00.a
  201c4954: 20233020 61742030 78343034 30303030     #0 at 0x4040000
  201c4964: 302c2069 72713d30 0a3c363e 44656e74    0, irq=0.<6>Dent
  201c4974: 72792063 61636865 20686173 68207461    ry cache hash ta
  201c4984: 626c6520 656e7472 6965733a 20343039    ble entries: 409
  201c4994: 3620286f 72646572 3a20322c 20313633    6 (order: 2, 163
  201c49a4: 38342062 79746573 290a3c36 3e496e6f    84 bytes).<6>Ino
  201c49b4: 64652d63 61636865 20686173 68207461    de-cache hash ta
  201c49c4: 626c6520 656e7472 6965733a 20323034    ble entries: 204
  201c49d4: 3820286f 72646572 3a20312c 20383139    8 (order: 1, 819
  201c49e4: 32206279 74657329 0a3c363e 4d656d6f    2 bytes).<6>Memo
  201c49f4: 72793a20 32393130 346b2f33 32373732    ry: 29104k/32772
  201c4a04: 6b206176 61696c61 626c650a 00000000    k available.....
  201c4a14: 00000000 00000000 00000000 00000000    ................
  U-Boot-mONStR>

Via XMD

There is second way how to read Linux kernel log buffer via XMD. This features is not available for free users. Here is the log to show you how this options works. There are new built-in features in xmd called log. The script find-out log buffer from latest Linux kernel code and you can just type log command to show whole log buffer.

FIXME



HeartBeat function

Error logs

Initramfs bug

If you write __log_buf, you see these messages on MMU kernel - your problem is that your initramfs is too big that kernel can't do early page alloc.

Found FDT at 0x9e800000
Kernel panic - not syncing: ERROR: Failed to allocate 0x1000 bytes below 0x91000000.

Here you can see that max_mapnr is zero and there is no any mem base + size printk message → means your DTB is wrong.

<5>Found FDT at 0x90780000
<5>Linux version 2.6.29-mONStR-00426-g432b099-dirty (monstr@monstr.eu) (gcc version 3.4.1 ( PetaLinux 0.20 Build -rc1 050607 )) #2 Tue Mar 24 20:49:09 CET 2009
<6>setup_cpuinfo: initialising
<6>setup_cpuinfo: Using full CPU PVR support
<6>setup_memory: kernel addr=0x90000000-0x904c6000 size=0x004c6000
<6>setup_memory: max_mapnr: 0x0
<6>setup_memory: min_low_pfn: 0x20000
<6>setup_memory: max_low_pfn: 0x22000
<4>BUG: failure at mm/bootmem.c:320/mark_bootmem()!
<0>Kernel panic - not syncing: BUG!
<0>Rebooting in 120 seconds..<5>Machine restart...
<6>
<6>Stack:
<6>  90299ec4 90215fc0 902b1318 00090000 00000001 90022c14 90208f6c 00000000 
<4>  00000001 00000000 000000e2 000000b7 900127bc 00000001 000904c6 00090000 
<4>  00000000 00000000 0001d4bf 902a4360 9020b4b8 00000078 902b3c44 ffffffff 
<5>Call Trace: <5>
<4>[<90022c14>] emergency_restart+0xc/0x20
<4>[<900127bc>] panic+0x180/0x224
<4>[<902a4360>] mark_bootmem+0x128/0x17c
<4>[<902a44d0>] reserve_bootmem+0x34/0x48
<4>[<902a0e98>] setup_memory+0x310/0x364
<4>[<9029f9c8>] setup_arch+0x84/0x98
<4>[<90000000>] _start+0x0/0x20
<4>[<9029a5cc>] start_kernel+0xa8/0x41c
<4>[<9000005c>] no_fdt_arg+0x28/0x44
<4>[<90003ef4>] machine_halt+0x0/0x20
<5>

stat.h

It is caused with mishmash in stat.h. Solution is use new toolchain.

Freeing unused kernel memory: 19387k freed
Mounting proc: 
/etc/rc: line 6: mount: Value too large for defined data type
Mounting var: 

/etc/rc: line 9: mount: Value too large for defined data type
Populating /var: 
/etc/rc: line 14: mkdir: Value too large for defined data type
Running local start scripts.

(none) login: 

ROMFS on 2.6.29-rc2/rc3

There were bug in ROMFS implementation - for fix this issue please use latest ROMFS version or use this tar.gz.

Sparse Installation

git clone rsync://rsync.kernel.org/pub/scm/devel/sparse/sparse.git
make install PREFIX=/
Go to Linux kernel code and run
make C=1

Kernel logs

Site with limited access

 
fdt/fdt.txt · Last modified: 2010/01/29 09:07 by monstr
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki