Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2012-10-03 11:22:24
Size: 3029
Comment:
Revision 8 as of 2016-10-25 20:23:38
Size: 2168
Editor: LukasHumbel
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
file. file and the notes given in [[Getting_Started]].

Instructions how to get an extra serial/uart interface connected to your computer are [[PandaBoard/ExtraSerial|here]].
Line 8: Line 10:
For cross-compiling to arm we are using the Mentor / codesourcery toolchain (v 2012.03): In addition to the requirements listed in [[Getting_Started]], we are using the Ubuntu/Linaro toolchain for cross-compiling ARM.
Line 11: Line 13:
arm-linux-gnueabi-gcc (Sourcery CodeBench Lite 2012.03-57) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
arm-linux-gnueabi-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
Line 17: Line 19:
Line 20: Line 21:
We need to build for `armv7` and then run `make pandaboard_image`: We need to build for `armv7` and then run `make PandaboardES`:
Line 25: Line 26:
$ make -j4 pandaboard_image }}}

Then run the following:
{{{
$ make -j4 PandaboardES
Line 28: Line 33:
If your boot environment is correctly set up, you can now:
usbboot ./pandaboard_image
Line 31: Line 34:

This creates the boot image `armv7_omap44xx_image`.
Line 34: Line 40:
To boot `pandaboard_image` we need `usbboot`
You can get `usbboot` source code from: https://github.com/swetland/omap4boot.git,
but you will have to apply a patch:
To boot `armv7_omap44xx_image` on a Pandaboard we need `usbboot`.
The Barrelfish source tree now contains a copy of `usbboot`.

Additional packages for building it are required:
Line 38: Line 45:

$ git log -n 1 --pretty=short
commit b6c998113173e38655c8c9b40d88776992bdcd78
Author: Dan Murphy <dmurphy@ti.com>

    OMAP4: Remove dummy writes to SDRC
$ git diff
diff --git a/aboot.c b/aboot.c
index 6c12694..126e40a 100644
--- a/aboot.c
+++ b/aboot.c
@@ -34,7 +34,7 @@
 
 #define WITH_MEMORY_TEST 0
 #define WITH_FLASH_BOOT 0
-#define WITH_SIGNATURE_CHECK 1
+#define WITH_SIGNATURE_CHECK 0
 
 #if WITH_MEMORY_TEST
 void memtest(void *x, unsigned count) {
diff --git a/boot.c b/boot.c
index 743e2e8..98ed777 100644
--- a/boot.c
+++ b/boot.c
@@ -42,8 +42,8 @@ int boot_image(unsigned machtype, unsigned image, unsigned len)
                if (x[n] != "ANDROID!"[n]) break;
 
        if (n != 8) {
- printf("jumping to 0x%x...\n", CONFIG_ADDR_DOWNLOAD);
- entry = CONFIG_ADDR_DOWNLOAD;
+ entry = CONFIG_ADDR_DOWNLOAD + 0x1000;
+ printf("jumping to 0x%x...\n", entry);
                entry(0, cfg_machine_type, CONFIG_ADDR_ATAGS);
                for (;;);
        }
sudo apt-get install libusb-1.0-0-dev freebsd-glue libfreebsd-glue-0 libelf-freebsd-dev
Line 75: Line 48:
Building usbboot: The Makefile will build `usbboot` on demand. It can be built explicitly using
Line 77: Line 50:
$ TOOLCHAIN=arm-none-linux-gnueabi- make
...
link out/panda/usbboot
...
make tools/bin/usbboot
Line 92: Line 62:
$ usbboot pandaboard_image
using built-in 2ndstage.bin
reading ASIC ID
CHIP: 4440
...
sending image to target...
make usbboot_panda
Line 100: Line 65:
You should see barrelfish booting on your `picocom` window: You should see Barrelfish booting on your `picocom` window:

Booting Barrelfish on PandaBoard

If you are building Barrelfish for the first time, please have a look at the README file and the notes given in Getting_Started.

Instructions how to get an extra serial/uart interface connected to your computer are here.

Toolchain

In addition to the requirements listed in Getting_Started, we are using the Ubuntu/Linaro toolchain for cross-compiling ARM.

$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Building a Barrelfish PandaBoard image

We need to build for armv7 and then run make PandaboardES:

$ mkdir build; cd build
$ ../tip/hake/hake.sh -i . -s ../tip/ -a armv7

Then run the following:

$ make -j4 PandaboardES
...
OK - pandaboard boot image is built.

This creates the boot image armv7_omap44xx_image.

Building usbboot

To boot armv7_omap44xx_image on a Pandaboard we need usbboot. The Barrelfish source tree now contains a copy of usbboot.

Additional packages for building it are required:

sudo apt-get install libusb-1.0-0-dev freebsd-glue libfreebsd-glue-0 libelf-freebsd-dev

The Makefile will build usbboot on demand. It can be built explicitly using

make tools/bin/usbboot

Booting barrelfish

Connect to the serial:

$ picocom -b 115200 /dev/ttyUSB0

And boot PandaBoard using usbboot

make usbboot_panda

You should see Barrelfish booting on your picocom window:

MMU enabled
paging_arm_reset: base: 0x80000000, length: 0x40000000.
invalidate cache
invalidate TLB
startup_early
kernel_startup_early done!
paging_map_device_section: 0x8400c000, 0xffe00000, 0x48020000.
omap serial_init[2]: base = 0xffe00000 0xffe20000
omap serial_init[2]: done.
Barrelfish CPU driver starting on ARMv7 OMAP44xx Board id 0x000008e0
...

BarrelfishWiki: PandaBoard (last edited 2016-10-25 20:23:38 by LukasHumbel)