Translation(s): none

(!) ?/Discussion

DebianOn is an effort to document how to install, configure and use Debian on some specific hardware. Therefore potential buyers would know if that hardware is supported and owners would know how get the best out of that hardware.

The purpose is not to duplicate the Debian Official Documentation, but to document how to install Debian on some specific hardware.

Models covered
TI ?BeagleBone

Overall Status

TI BeagleBone board is a development board. It is ARM architecture. The SoC is TI am335x.

System as sold

It comes with Angstrom OS on the 4G SDcard.

Installation steps (by linaro-image-tools)

Environment

Please use Debian sid or Debian Wheezy or later version because we need latest linaro-image-tools and live-build.

We also need an armel build environment. I am using qemubuilder to create a native build environment. Cross-compilers should work too. However, establishing such environment is not described in this document. Please read qemubuilder. And if you decide to use cross-compilers, please read EmdebianToolchain.

Prepare Debian binary rootfs

In this section we create a Debian Wheezy armel rootfs.

  1. We use live-build to create Debian binary rootfs. The first step is make an empty directory, for example, '/tmp/live_cd'
  2. Enter the created directory by "cd /tmp/live_cd"
  3. Execute "lb config --apt-indices none --architectures armel --binary-images tar --binary-filesystem ext3 --bootloader "" --bootstrap-flavour standard --cache false --chroot-filesystem none --debian-installer-gui false --distribution wheezy --parent-distribution wheezy --parent-debian-installer-distribution wheezy --gzip-options '--best --rsyncable' --hostname linaro-debian --initramfs none --linux-flavours none --linux-packages none --username linaro --bootstrap-qemu-arch armel --bootstrap-qemu-static /usr/bin/qemu-arm-static"
  4. Edit ./config/bootstrap and modify the following parameters
    • LB_BOOTSTRAP_INCLUDE="apt-transport-https gnupg initramfs-tools"
  5. Create ./config/hooks/01_set_root_passwd.chroot as an executable shell script:
    • #!/bin/sh
      echo "I: update password"
      echo "root:linaro" | chpasswd
      
  6. Create ./config/hooks/02_getty_on_ttyO0.chroot as an executable shell script:
    • #!/bin/sh
      echo "I: add ttyO0 to inittab"
      echo "T0:2345:respawn:/sbin/getty -L 115200 ttyO0 vt102" >> /etc/inittab
      
  7. "chmod a+rx ./config/hooks/*"
  8. Re-run "lb config"
  9. Run "sudo lb build"
    • And we should have a binary-tar.tar.gz generated now.

Prepare U-boot package

The U-boot of ?BeagleBone is still not upstreamed yet. So we have to get it from git://arago-project.org/git/projects/u-boot-am33x.git

To simplify this step, I've made a Debian package already for you. You can download the source package by the following command. And build it from source by qemubuilder.

If you are more lazy, you can just use the following command to get the binary package I've made.

Build U-boot

If you use the package I made, you can skip this section. Here we provide some information to people who want to work hard to do everything from source.

Prepare the kernel

The kernel for am335x is also not yet upstreamed. The git tree is at git://arago-project.org/git/projects/linux-am33x.git

Due to my network is too slow and the kernel packages are too large for me to upload, you can use the following to build it from source by yourself. I'll upload the binary packages when I have time.

After a long build, you should get the following binary packages:

Make a hwpack

In this section we create a hwpack that contains the kernel we just built and the am33x u-boot.

  1. create a config file "/tmp/linaro-debian-am335x" as following:
    • [hwpack]
      format=2.0
      name=linaro-debian-am335x
      architectures=armel
      origin=Linaro
      maintainer=Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
      support=unsupported
      packages=linux-image-3.1.0.paulliu-1-am335x
      mmc_id=0:1
      u_boot_package=u-boot-am33x
      u_boot_file=usr/lib/u-boot-am33x/u-boot.img
      u_boot_in_boot_part=Yes
      spl_package=u-boot-am33x
      spl_file=usr/lib/u-boot-am33x/MLO
      spl_in_boot_part=Yes
      serial_tty=ttyO0
      kernel_addr=0x80000000
      initrd_addr=0x81600000
      load_addr=0x80008000
      wired_interfaces=eth0
      partition_layout=bootfs_rootfs
      kernel_file=boot/vmlinuz-*-am335x
      initrd_file=boot/initrd.img-*-am335x
      boot_script=boot.scr
      extra_serial_options=console=tty0 console=ttyO0,115200n8
      loader_start=1
      
      [debian]
      sources-entry=http://ftp.us.debian.org/debian/ sid main
  2. Copy those kernel Debian packages and U-boot Debian packages to /tmp. (The .deb files)
  3. Run "linaro-hwpack-create --local-deb u-boot-am33x_0+git20111206_armel.deb --local-deb linux-image-3.1.0.paulliu-1-am335x_3.1.0-1_armel.deb --local-deb linux-headers-3.1.0.paulliu-1-am335x_3.1.0-1_armel.deb --local-deb linux-doc-3.1.0.paulliu-1-am335x_3.1.0-1_all.deb --local-deb linux-manual-3.1.0.paulliu-1-am335x_3.1.0-1_all.deb --local-deb linux-source-3.1.0.paulliu-1-am335x_3.1.0-1_all.deb linaro-debian-am335x 1"

Now we have a good hwpack for Debian image

Build the image

We can use linaro-media-create to build the Debian image.

And now we got an image file called linaro-debian-beaglebone.img. Just use dd to write it to a microSD card.

Boot

Just insert the microSD card into ?BeagleBone board and boot. After several seconds we'll get a login prompt from the serial console. And then we use root to login. The root password is "linaro".