Hi I have just received a new board with a dual core cortex a7, the A20-OLinuXino, which I'd like to set up and add to the genode tree - currently more pressing than the RPi! I'm no Arm expert, but I'm assuming that I can take most of the existing arm_v7 and a9 code in base-hw and just use this for setting up an a20olinuxino environment and building an image? https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO-4GB/open-s... CheersNick
Hi Nick,
Nice to hear that you're intending to port base-hw to A20-OLinuXino :-) Currently there are 3 Cortex-A9 boards officially supported by base-hw: VEA9X4, PBXA9, and the Pandaboard. You can refer to any of these boards. Looking e.g. at PBXA9, you can see that basically the following files must be implemented for your board:
base/mk/spec-platform_<BOARD>.mk base/include/platform/<BOARD>/drivers/board_base.h
base-hw/mk/spec-hw_<BOARD>.mk base-hw/src/core/<BOARD>/tlb.h base-hw/src/core/<BOARD>/target.mk base-hw/src/core/<BOARD>/timer.h base-hw/src/core/<BOARD>/pic.h base-hw/src/core/<BOARD>/platform_support.cc base-hw/src/core/<BOARD>/cpu.h
To add support for your board in the builddir tool you should add
hw_<BOARD>:: @echo "SPECS = genode hw_<BOARD>" > $(BUILD_DIR)/etc/specs.conf
to tool/create_builddir and copy tool/builddir/etc/build.conf.hw_pbxa9 to tool/builddir/etc/build.conf.hw_<BOARD>.
Cortex-A9 brings its own core timer and interrupt controller, so the only thing left is a UART driver. Either one of the drivers in base/include/drivers/uart/ fit or you should implement your own at this place. To install the driver afterwards you should create base-hw/include/<UARTNAME>/drivers/serial_log.h (for instance PBXA9 uses base-hw/include/pl011/drivers/serial_log.h) and add UARTNAME to SPECS in your base/mk/spec-platform_<BOARD>.mk. After that Genode::printf should print to the UART.
Assuming that the Cortex-A9 / ARMv7 revision of your board and the board you used as reference do not differ, you should be able to run a first scenario after this. If you have further questions do not hesitate to ask ;-)
Greetings, Martin
On 17.12.2013 14:19, buzz heavyyear wrote:
Hi
I have just received a new board with a dual core cortex a7, the A20-OLinuXino, which I'd like to set up and add to the genode tree - currently more pressing than the RPi!
I'm no Arm expert, but I'm assuming that I can take most of the existing arm_v7 and a9 code in base-hw and just use this for setting up an a20olinuxino environment and building an image?
https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO-4GB/open-s...
Cheers Nick
Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clk...
Genode-main mailing list Genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hi Martin It's a Cortex-A7 - I'm hoping that the assembler is 100% compatible. If not, I'll dig down into the linux that the AOlinuXino refers to. Thanks for taking time to outline the structure I need to set up. Very best, and if I don't manage to post before the 25th, have a great xmas %*}Nick
Date: Tue, 17 Dec 2013 15:06:27 +0100 From: martin.stein@...1... To: genode-main@lists.sourceforge.net Subject: Re: A20-OLinuXino-MICRO-4GB
Hi Nick,
Nice to hear that you're intending to port base-hw to A20-OLinuXino :-) Currently there are 3 Cortex-A9 boards officially supported by base-hw: VEA9X4, PBXA9, and the Pandaboard. You can refer to any of these boards. Looking e.g. at PBXA9, you can see that basically the following files must be implemented for your board:
base/mk/spec-platform_<BOARD>.mk
base/include/platform/<BOARD>/drivers/board_base.h
base-hw/mk/spec-hw_<BOARD>.mk
base-hw/src/core/<BOARD>/tlb.h
base-hw/src/core/<BOARD>/target.mk
base-hw/src/core/<BOARD>/timer.h
base-hw/src/core/<BOARD>/pic.h
base-hw/src/core/<BOARD>/platform_support.cc
base-hw/src/core/<BOARD>/cpu.h
To add support for your board in the builddir tool you should add
hw_<BOARD>::
@echo "SPECS = genode hw_<BOARD>" > $(BUILD_DIR)/etc/specs.conf
to tool/create_builddir and copy tool/builddir/etc/build.conf.hw_pbxa9 to tool/builddir/etc/build.conf.hw_<BOARD>.
Cortex-A9 brings its own core timer and interrupt controller, so the only thing left is a UART driver. Either one of the drivers in base/include/drivers/uart/ fit or you should implement your own at this place. To install the driver afterwards you should create base-hw/include/<UARTNAME>/drivers/serial_log.h (for instance PBXA9 uses base-hw/include/pl011/drivers/serial_log.h) and add UARTNAME to SPECS in your base/mk/spec-platform_<BOARD>.mk. After that Genode::printf should print to the UART.
Assuming that the Cortex-A9 / ARMv7 revision of your board and the board you used as reference do not differ, you should be able to run a first scenario after this. If you have further questions do not hesitate to ask ;-)
Greetings,
Martin
On 17.12.2013 14:19, buzz heavyyear wrote:
Hi
I have just received a new board with a dual core cortex a7, the A20-OLinuXino, which I'd like to set up and add to the genode tree - currently more pressing than the RPi!
I'm no Arm expert, but I'm assuming that I can take most of the existing arm_v7 and a9 code in base-hw and just use this for setting up an a20olinuxino environment and building an image?
https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO-4GB/open-s...
Cheers Nick
------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clk...
_______________________________________________ Genode-main mailing list Genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clk... _______________________________________________ Genode-main mailing list Genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hi Martin,
Thanks for the insightful reply. That's a terrific place to start with your guidelines.
Adding to the queries, I have a few of my own. 1) On what basis have you used the IRQs in plaform_support.cc? 2) And you're using board.h in src/core. Which inherits the data members from board_base.h : Which one? Every board_base.h is inside its own platform under base/include. 3) Once I create the aforementioned files, can I run make in the build folder immediately and use the image.elf from var/run? If so, how do I boot this from device? (I read a thread answered by Stefan and Norman that converts this elf to binary to uImage - for uboot) 4) What is an MLO and how is it used in Genode?
I hope these questions will help others who want to run Genode on bare metal.
Thanks and regards, Aditya
On Tue, Dec 17, 2013 at 7:36 PM, Martin Stein <martin.stein@...1...>wrote:
Hi Nick,
Nice to hear that you're intending to port base-hw to A20-OLinuXino :-) Currently there are 3 Cortex-A9 boards officially supported by base-hw: VEA9X4, PBXA9, and the Pandaboard. You can refer to any of these boards. Looking e.g. at PBXA9, you can see that basically the following files must be implemented for your board:
base/mk/spec-platform_<BOARD>.mk base/include/platform/<BOARD>/drivers/board_base.h
base-hw/mk/spec-hw_<BOARD>.mk base-hw/src/core/<BOARD>/tlb.h base-hw/src/core/<BOARD>/target.mk base-hw/src/core/<BOARD>/timer.h base-hw/src/core/<BOARD>/pic.h base-hw/src/core/<BOARD>/platform_support.cc base-hw/src/core/<BOARD>/cpu.h
To add support for your board in the builddir tool you should add
hw_<BOARD>:: @echo "SPECS = genode hw_<BOARD>" > $(BUILD_DIR)/etc/specs.conf
to tool/create_builddir and copy tool/builddir/etc/build.conf.hw_pbxa9 to tool/builddir/etc/build.conf.hw_<BOARD>.
Cortex-A9 brings its own core timer and interrupt controller, so the only thing left is a UART driver. Either one of the drivers in base/include/drivers/uart/ fit or you should implement your own at this place. To install the driver afterwards you should create base-hw/include/<UARTNAME>/drivers/serial_log.h (for instance PBXA9 uses base-hw/include/pl011/drivers/serial_log.h) and add UARTNAME to SPECS in your base/mk/spec-platform_<BOARD>.mk. After that Genode::printf should print to the UART.
Assuming that the Cortex-A9 / ARMv7 revision of your board and the board you used as reference do not differ, you should be able to run a first scenario after this. If you have further questions do not hesitate to ask ;-)
Greetings, Martin
On 17.12.2013 14:19, buzz heavyyear wrote:
Hi
I have just received a new board with a dual core cortex a7, the A20-OLinuXino, which I'd like to set up and add to the genode tree - currently more pressing than the RPi!
I'm no Arm expert, but I'm assuming that I can take most of the existing arm_v7 and a9 code in base-hw and just use this for setting up an a20olinuxino environment and building an image?
https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO-4GB/open-s...
Cheers Nick
Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clk...
Genode-main mailing listGenode-main@...220...://lists.sourceforge.net/lists/listinfo/genode-main
Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clk... _______________________________________________ Genode-main mailing list Genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hello Martin
On further examination, I've noticed you've added the commands to generate uImage in build_uboot_image in tool/run (but it doesn't generate the uImage in var/run/<script>).
Secondly, On what basis have you filled the enumerations in board_base.h ? Because there are different values for pbxa9, vea9x4 and pandaboard. I understand that every SoC might have a different driver implementation, but how did you get around to building one, say for pbxa9? Can you share some insight into the process: the use of mmio regions, IRQ handlers etc.?
Thanks in advance Aditya
On Tue, Dec 17, 2013 at 7:36 PM, Martin Stein <martin.stein@...1...>wrote:
Hi Nick,
Nice to hear that you're intending to port base-hw to A20-OLinuXino :-) Currently there are 3 Cortex-A9 boards officially supported by base-hw: VEA9X4, PBXA9, and the Pandaboard. You can refer to any of these boards. Looking e.g. at PBXA9, you can see that basically the following files must be implemented for your board:
base/mk/spec-platform_<BOARD>.mk base/include/platform/<BOARD>/drivers/board_base.h
base-hw/mk/spec-hw_<BOARD>.mk base-hw/src/core/<BOARD>/tlb.h base-hw/src/core/<BOARD>/target.mk base-hw/src/core/<BOARD>/timer.h base-hw/src/core/<BOARD>/pic.h base-hw/src/core/<BOARD>/platform_support.cc base-hw/src/core/<BOARD>/cpu.h
To add support for your board in the builddir tool you should add
hw_<BOARD>:: @echo "SPECS = genode hw_<BOARD>" > $(BUILD_DIR)/etc/specs.conf
to tool/create_builddir and copy tool/builddir/etc/build.conf.hw_pbxa9 to tool/builddir/etc/build.conf.hw_<BOARD>.
Cortex-A9 brings its own core timer and interrupt controller, so the only thing left is a UART driver. Either one of the drivers in base/include/drivers/uart/ fit or you should implement your own at this place. To install the driver afterwards you should create base-hw/include/<UARTNAME>/drivers/serial_log.h (for instance PBXA9 uses base-hw/include/pl011/drivers/serial_log.h) and add UARTNAME to SPECS in your base/mk/spec-platform_<BOARD>.mk. After that Genode::printf should print to the UART.
Assuming that the Cortex-A9 / ARMv7 revision of your board and the board you used as reference do not differ, you should be able to run a first scenario after this. If you have further questions do not hesitate to ask ;-)
Greetings, Martin
On 17.12.2013 14:19, buzz heavyyear wrote:
Hi
I have just received a new board with a dual core cortex a7, the A20-OLinuXino, which I'd like to set up and add to the genode tree - currently more pressing than the RPi!
I'm no Arm expert, but I'm assuming that I can take most of the existing arm_v7 and a9 code in base-hw and just use this for setting up an a20olinuxino environment and building an image?
https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO-4GB/open-s...
Cheers Nick
Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clk...
Genode-main mailing listGenode-main@...220...://lists.sourceforge.net/lists/listinfo/genode-main
Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clk... _______________________________________________ Genode-main mailing list Genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hi Nick,
I don't think that the instruction set will differ that much. Differences in the ARMv7 revisions more often refer to details of the hardware virtualisation. The different Cortex-A revisions in turn more likely mean that you can't e.g. reuse the Cortex-A9 timer base-hw/src/core/timer/cortex_a9.h. However, in regards to the interrupt controller merely the MMIO base depends on Cortex A9. So maybe you can reuse at least the ARM-GIC backend base-hw/src/core/pic/arm_gic.h.
Greetings, Martin
On 17.12.2013 15:36, buzz heavyyear wrote:
Hi Martin
It's a Cortex-A7 - I'm hoping that the assembler is 100% compatible. If not, I'll dig down into the linux that the AOlinuXino refers to.
Thanks for taking time to outline the structure I need to set up.
Very best, and if I don't manage to post before the 25th, have a great xmas %*} Nick
Date: Tue, 17 Dec 2013 15:06:27 +0100 From: martin.stein@...1... To: genode-main@lists.sourceforge.net Subject: Re: A20-OLinuXino-MICRO-4GB
Hi Nick,
Nice to hear that you're intending to port base-hw to A20-OLinuXino :-) Currently there are 3 Cortex-A9 boards officially supported by base-hw: VEA9X4, PBXA9, and the Pandaboard. You can refer to any of these boards. Looking e.g. at PBXA9, you can see that basically the following files must be implemented for your board:
base/mk/spec-platform_<BOARD>.mk base/include/platform/<BOARD>/drivers/board_base.h
base-hw/mk/spec-hw_<BOARD>.mk base-hw/src/core/<BOARD>/tlb.h base-hw/src/core/<BOARD>/target.mk base-hw/src/core/<BOARD>/timer.h base-hw/src/core/<BOARD>/pic.h base-hw/src/core/<BOARD>/platform_support.cc base-hw/src/core/<BOARD>/cpu.h
To add support for your board in the builddir tool you should add
hw_<BOARD>:: @echo "SPECS = genode hw_<BOARD>" > $(BUILD_DIR)/etc/specs.conf
to tool/create_builddir and copy tool/builddir/etc/build.conf.hw_pbxa9 to tool/builddir/etc/build.conf.hw_<BOARD>.
Cortex-A9 brings its own core timer and interrupt controller, so the only thing left is a UART driver. Either one of the drivers in base/include/drivers/uart/ fit or you should implement your own at this place. To install the driver afterwards you should create base-hw/include/<UARTNAME>/drivers/serial_log.h (for instance PBXA9 uses base-hw/include/pl011/drivers/serial_log.h) and add UARTNAME to SPECS in your base/mk/spec-platform_<BOARD>.mk. After that Genode::printf should print to the UART.
Assuming that the Cortex-A9 / ARMv7 revision of your board and the board you used as reference do not differ, you should be able to run a first scenario after this. If you have further questions do not hesitate to ask ;-)
Greetings, Martin
On 17.12.2013 14:19, buzz heavyyear wrote:
Hi I have just received a new board with a dual core cortex a7, the A20-OLinuXino, which I'd like to set up and add to the genode tree - currently more pressing than the RPi! I'm no Arm expert, but I'm assuming that I can take most of the existing arm_v7 and a9 code in base-hw and just use this for setting up an a20olinuxino environment and building an image? https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO-4GB/open-source-hardware Cheers Nick ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Genode-main mailing list Genode-main@lists.sourceforge.net <mailto:Genode-main@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/genode-main
Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clk... _______________________________________________ Genode-main mailing list Genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clk...
Genode-main mailing list Genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hi Aditya,
On 18.12.2013 06:24, Aditya Kousik wrote:
Hi Martin,
Thanks for the insightful reply. That's a terrific place to start with your guidelines.
Adding to the queries, I have a few of my own.
- On what basis have you used the IRQs in plaform_support.cc?
The interrupts listed in irq_ids[] are those that are currently needed by any of our user-land drivers or more general those that the userland shall be allowed to listen to. However, as issue https://github.com/genodelabs/genode/issues/995 mentions, this shall change soon towards declaring which interrupts the user-land is not allowed to listen to. You should use current system anyways for your platform - I only added this so you can keep it in mind.
- And you're using board.h in src/core. Which inherits the data
members from board_base.h : Which one? Every board_base.h is inside its own platform under base/include.
If you have a look at base/mk/spec-platform_pbxa9.mk you can see REP_INC_DIR += include/platform/pbxa9 which means "add include path include/platform/pbxa9 relative to all repositories denoted in the current etc/build.conf". So this also adds the path of the right board_base.h in the base repository. The file base/mk/spec-platform_pbxa9.mk gets included by base-hw/mk/spec-hw_pbxa9.mk which gets included because of the SPECS += hw_pbxa9 in the etc/specs.conf in your build directory.
- Once I create the aforementioned files, can I run make in the build
folder immediately and use the image.elf from var/run? If so, how do I boot this from device? (I read a thread answered by Stefan and Norman that converts this elf to binary to uImage - for uboot)
If you add RUN_OPT="--target uboot" in front of your make command, the build system should additionally create a uImage in var/run. For further details you might also have a look at http://genode.org/documentation/release-notes/13.05 - "Targeting real hardware via the run tool".
- What is an MLO and how is it used in Genode?
I cannot give an answer to this question because I'm not firm with MLOs. But maybe someone else in this mailing list can help you.
I hope these questions will help others who want to run Genode on bare metal.
Thanks and regards, Aditya
Greetings, Martin
Hi Aditya,
On 18.12.2013 07:56, Aditya Kousik wrote: Hello Martin
On further examination, I've noticed you've added the commands to generate uImage in build_uboot_image in tool/run (but it doesn't generate the uImage in var/run/<script>).
Please see my reply to your previous mail.
Secondly, On what basis have you filled the enumerations in board_base.h ? Because there are different values for pbxa9, vea9x4 and pandaboard. I understand that every SoC might have a different driver implementation, but how did you get around to building one, say for pbxa9? Can you share some insight into the process: the use of mmio regions, IRQ handlers etc.?
Each of these enumerations has at least one concrete component in base/include/drivers or base-hw/ that depends on it. Separating these values from e.g. the device drivers came due to the fact that they do not depend on the device specification but on the board that integrates the device. For instance you might want to reuse the PL011 timer but different boards integrate it with a different clock or interrupt number (see base/include/platform/rpi/drivers/board_base.h and base/include/platform/pbxa9/drivers/board_base.h). A board might even integrate multiple PL011 chips with different values (see PBXA9).
Thanks in advance Aditya
Greetings, Martin