Difference between revisions of "Barebox"

From eLinux.org
Jump to: navigation, search
Line 39: Line 39:
 
     running /env/bin/init...
 
     running /env/bin/init...
 
     barebox:/
 
     barebox:/
 +
    barebox:/ ls -al /dev/
 +
    ls: invalid option -- a
 +
    cr-------- 18446744073709551615 zero
 +
    crw-------      8249 defaultenv
 +
    crw------- 4294967295 mem
 +
    crw-------      2198 fd0
 +
    barebox:/ devinfo
 +
    devices:
 +
    `---- hostfile0
 +
    `---- console0
 +
    `---- cs0
 +
    `---- ramfs0
 +
    `---- devfs0
 +
    `---- mem0
 +
    `---- 0x00000000-0x00002038: /dev/defaultenv
 +
    `---- mem1
 +
        `---- 0x00000000-0xfffffffe: /dev/mem
 +
    `---- tap0
 +
    `---- eth0
 +
   
 +
    drivers:
 +
      console
 +
        ramfs
 +
        devfs
 +
          tap
 +
          mem
 +
        cramfs
 +
      hostfile
 +
    barebox:/
 +
   
 +
    barebox:/ help
 +
        . - alias for source
 +
        ? - alias for help
 +
        [ - alias for test
 +
  addpart - adds a partition table to a device
 +
boot_config - Boot Menu
 +
boot_menu - Boot Menu
 +
      cat - concatenate file(s)
 +
        cd - change working directory
 +
    clear - clear screen
 +
        cp - copy files
 +
    crc32 - crc32 checksum calculation
 +
  delpart - delete partition(s)
 +
  devinfo - Show information about devices and drivers.
 +
      dhcp - invoke dhcp client to obtain ip/boot params
 +
      echo - echo args to console
 +
      edit - Usage: (s)edit <file>
 +
    ethact - set current ethernet device
 +
      exit - exit script
 +
    export - export environment variables
 +
    false - do nothing, unsuccessfully
 +
        go - start application at address or file
 +
      help - print online help
 +
linux_exec - Execute a command on the host
 +
  loadenv - Load environment from ENVFS into DIRECTORY (default: /dev/env0 -> /env).
 +
    login - login
 +
        ls - list a file or directory
 +
        md - memory display
 +
    md5sum - md5 checksum calculation
 +
    memcmp - memory compare
 +
    memcpy - memory copy
 +
  meminfo - print info about memory usage
 +
    memset - memory fill
 +
      menu - Menu Management
 +
    mkdir - make directories
 +
    mount - Mount a filesystem of a given type to a mountpoint or list mounted filesystems.
 +
        mw - memory write (fill)
 +
    passwd - passwd
 +
      ping - ping <destination>
 +
  printenv - Print value of one or all environment variables.
 +
      pwd - print working directory
 +
  readline - prompt for user input
 +
    reset - Perform RESET of the CPU
 +
        rm - remove files
 +
    rmdir - remove directorie(s)
 +
  saveenv - save environment to persistent storage
 +
    sedit - alias for edit
 +
        sh - run shell script
 +
  sha1sum - sha1 checksum calculation
 +
sha224sum - sha224 checksum calculation
 +
sha256sum - sha256 checksum calculation
 +
    sleep - delay execution for n seconds
 +
    source - execute shell script in current shell environment
 +
      test - minimal test like /bin/sh
 +
      tftp - Load file using tftp protocol
 +
      time - measure execution time of a command
 +
  timeout - wait for a specified timeout
 +
      true - do nothing, successfully
 +
    umount - umount a filesystem
 +
  version - print monitor version
 +
barebox:/
 +
= Menu =
 +
 +
It's on ather great d
  
 
[[Category:Bootloaders]]
 
[[Category:Bootloaders]]

Revision as of 11:14, 27 October 2011

Barebox is an attempt to work around the limitations that U-Boot shows through its age. Originally dubbed U-Boot v2, it now has a different name because its design goals are different.

Barebox now support support arm, powerpc, mips, nios2, blackfin, x86

Barebox (U-Boot-v2)

U-Boot-v2 Presentation from CELF Embedded Linux Conference Europe Grenoble, 2009-10-16 (pdf)

Booting Linux Fast & Fancy (pdf)


Sandbox

One of the great thinks with barebox, it's the sandbox.

Basically you can develop and debug generic feature

1) compile it

for other arch than x86 or ppc you need to use the next branch or the mainline

As I just recently fix the support for all host

ARCH=sandbox make sandbox_defconfig

ARCH=sandbox make

now just start it

  # ./barebox

   barebox 2011.10.0-00119-gad62fdb-dirty (Oct 15 2011 - 11:38:46)

   Board: sandbox
   Malloc space: 0x7f679f24b010 -> 0x7f679fa4b010 (size  8 MB)
   Open /dev/env0 No such file or directory
   no valid environment found on /dev/env0. Using default environment
   running /env/bin/init...
   barebox:/
   barebox:/ ls -al /dev/
   ls: invalid option -- a
   cr-------- 18446744073709551615 zero
   crw-------       8249 defaultenv
   crw------- 4294967295 mem
   crw-------       2198 fd0
   barebox:/ devinfo 
   devices:
   `---- hostfile0
   `---- console0
    `---- cs0
   `---- ramfs0
   `---- devfs0
   `---- mem0
    `---- 0x00000000-0x00002038: /dev/defaultenv
   `---- mem1
        `---- 0x00000000-0xfffffffe: /dev/mem
   `---- tap0
   `---- eth0
   
   drivers:
      console
        ramfs
        devfs
          tap
          mem
       cramfs
     hostfile
   barebox:/ 
   
   barebox:/ help
        . - alias for source
        ? - alias for help
        [ - alias for test
  addpart - adds a partition table to a device
boot_config - Boot Menu
boot_menu - Boot Menu
      cat - concatenate file(s)
       cd - change working directory
    clear - clear screen
       cp - copy files
    crc32 - crc32 checksum calculation
  delpart - delete partition(s)
  devinfo - Show information about devices and drivers.
     dhcp - invoke dhcp client to obtain ip/boot params
     echo - echo args to console
     edit - Usage: (s)edit <file>
   ethact - set current ethernet device
     exit - exit script
   export - export environment variables
    false - do nothing, unsuccessfully
       go - start application at address or file
     help - print online help
linux_exec - Execute a command on the host
  loadenv - Load environment from ENVFS into DIRECTORY (default: /dev/env0 -> /env).
    login - login
       ls - list a file or directory
       md - memory display
   md5sum - md5 checksum calculation
   memcmp - memory compare
   memcpy - memory copy
  meminfo - print info about memory usage
   memset - memory fill
     menu - Menu Management
    mkdir - make directories
    mount - Mount a filesystem of a given type to a mountpoint or list mounted filesystems.
       mw - memory write (fill)
   passwd - passwd
     ping - ping <destination>
 printenv - Print value of one or all environment variables.
      pwd - print working directory
 readline - prompt for user input
    reset - Perform RESET of the CPU
       rm - remove files
    rmdir - remove directorie(s)
  saveenv - save environment to persistent storage
    sedit - alias for edit
       sh - run shell script
  sha1sum - sha1 checksum calculation
sha224sum - sha224 checksum calculation
sha256sum - sha256 checksum calculation
    sleep - delay execution for n seconds
   source - execute shell script in current shell environment
     test - minimal test like /bin/sh
     tftp - Load file using tftp protocol
     time - measure execution time of a command
  timeout - wait for a specified timeout
     true - do nothing, successfully
   umount - umount a filesystem
  version - print monitor version
barebox:/ 

Menu

It's on ather great d