Differences between revisions 4 and 5
Revision 4 as of 2013-06-05 08:13:49
Size: 3357
Comment:
Revision 5 as of 2016-08-24 14:56:55
Size: 1850
Editor: LukasHumbel
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
In addition to the requirements listed in [[Getting_Started]], we are using the Mentor / codesourcery toolchain (v 2012.03) for cross-compiling to arm: In addition to the requirements listed in [[Getting_Started]], we are using the Ubuntu/Linaro toolchain for cross-compiling ARM.
Line 11: Line 11:
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 19: Line 19:
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 25:
After running hake.sh edit the Config.hs file in the hake subdirectory of your build directory and modify the `armv7_platform` setting as follows:
{{{
armv7_platform = "pandaboard"
}}}
Line 31: Line 28:
$ make -j4 pandaboard_image $ make -j4 PandaboardES
Line 34: Line 31:
If your boot environment is correctly set up, you can now:
usbboot ./pandaboard_image
Line 37: Line 32:
Line 40: Line 36:
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 `pandaboard_image` we need `usbboot`. The Barrelfish source tree now contains a copy
of usbboot.
Additional packages for building it are required:
Line 44: Line 40:

$ 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
Line 81: Line 43:
Building usbboot:
{{{
$ TOOLCHAIN=arm-none-linux-gnueabi- make
...
link out/panda/usbboot
...
}}}
The Makefile will build usbboot on demand.
Line 98: Line 54:
$ usbboot pandaboard_image
using built-in 2ndstage.bin
reading ASIC ID
CHIP: 4440
...
sending image to target...
make usbboot_panda

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.

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.

Building usbboot

To boot pandaboard_image 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 

The Makefile will build usbboot on demand.

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)