Skip to content

Commit

Permalink
- Implemented makefiles for linux
Browse files Browse the repository at this point in the history
- Moved configurations and related files to 'configs' folder
  • Loading branch information
xX7 committed Dec 2, 2022
1 parent 2c79c1c commit a5c3480
Show file tree
Hide file tree
Showing 11 changed files with 5,534 additions and 13 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ PLATFORM:=rpi4
curPath:=$(abspath .)
srcPath:=$(curPath)/src
imgPath:=$(curPath)/sdcard
confPath:=$(curPath)/configs

all: dir platform freertos
all: dir platform freertos linux

dir:
@mkdir -p $(imgPath)
Expand Down
134 changes: 134 additions & 0 deletions configs/bao_rpi4_linux_freertos.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
#include <config.h>

VM_IMAGE(linux_image, XSTR(BAO_DEMOS_WRKDIR_IMGS/linux.bin));
VM_IMAGE(freertos_image, XSTR(BAO_DEMOS_WRKDIR_IMGS/freertos.bin));

struct config config = {

CONFIG_HEADER

.shmemlist_size = 1,
.shmemlist = (struct shmem[]) {
[0] = { .size = 0x00010000, }
},

.vmlist_size = 2,
.vmlist = {
{
.image = {
.base_addr = 0x20000000,
.load_addr = VM_IMAGE_OFFSET(linux_image),
.size = VM_IMAGE_SIZE(linux_image)
},

.entry = 0x20000000,

.platform = {
.cpu_num = 3,

.region_num = 1,
.regions = (struct mem_region[]) {
{
.base = 0x20000000,
.size = 0x40000000,
.place_phys = true,
.phys = 0x20000000
}
},

.ipc_num = 1,
.ipcs = (struct ipc[]) {
{
.base = 0xf0000000,
.size = 0x00010000,
.shmem_id = 0,
.interrupt_num = 1,
.interrupts = (uint64_t[]) {52}
}
},

.dev_num = 2,
.devs = (struct dev_region[]) {
{
/* GENET */
.pa = 0xfd580000,
.va = 0xfd580000,
.size = 0x10000,
.interrupt_num = 2,
.interrupts = (uint64_t[]) {189, 190}
},
{
/* Arch timer interrupt */
.interrupt_num = 1,
.interrupts =
(uint64_t[]) {27}
}
},

.arch = {
.gic = {
.gicd_addr = 0xff841000,
.gicc_addr = 0xff842000,
}
}
},
},
{
.image = {
.base_addr = 0x80000,
.load_addr = VM_IMAGE_OFFSET(freertos_image),
.size = VM_IMAGE_SIZE(freertos_image)
},

.entry = 0x80000,

.platform = {
.cpu_num = 1,

.region_num = 1,
.regions = (struct mem_region[]) {
{
.base = 0x80000,
.size = 0x8000000
}
},

.ipc_num = 1,
.ipcs = (struct ipc[]) {
{
.base = 0x70000000,
.size = 0x00010000,
.shmem_id = 0,
.interrupt_num = 1,
.interrupts = (uint64_t[]) {52}
}
},

.dev_num = 2,
.devs = (struct dev_region[]) {
{
/* UART1 */
.pa = 0xfe215000,
.va = 0xfe215000,
.size = 0x1000,
.interrupt_num = 1,
.interrupts = (uint64_t[]) {125}
},
{
/* Arch timer interrupt */
.interrupt_num = 1,
.interrupts =
(uint64_t[]) {27}
}
},

.arch = {
.gic = {
.gicd_addr = 0xF9010000,
.gicc_addr = 0xF9020000,
}
}
},
},
},
};
Loading

0 comments on commit a5c3480

Please sign in to comment.