SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
main.c File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <types.h>
#include <config.h>
#include <log.h>
#include <timer.h>
#include <common.h>
#include <jmp.h>
#include <mmu.h>
#include <smalloc.h>
#include <sstdlib.h>
#include <string.h>
#include <cli.h>
#include <cli_shell.h>
#include <cli_termesc.h>
#include "sys-dram.h"
#include "sys-i2c.h"
#include "sys-rtc.h"
#include "sys-sdcard.h"
#include "sys-sid.h"
#include "sys-spi.h"
#include "fdt_wrapper.h"
#include "ff.h"
#include "libfdt.h"
#include "sys-sdhci.h"
#include "uart.h"
Include dependency graph for main.c:

Classes

struct  atf_head
 
struct  image_info_t
 

Macros

#define CONFIG_BL31_FILENAME   "bl31.bin"
 
#define CONFIG_BL31_LOAD_ADDR   (0x48000000)
 
#define CONFIG_DTB_FILENAME   "sun50i-r818-mg-core.dtb"
 
#define CONFIG_DTB_LOAD_ADDR   (0x41f00000)
 
#define CONFIG_KERNEL_FILENAME   "Image"
 
#define CONFIG_KERNEL_LOAD_ADDR   (0x40080000)
 
#define CONFIG_SDMMC_SPEED_TEST_SIZE   1024
 
#define CONFIG_DEFAULT_BOOTDELAY   3
 
#define CONFIG_HEAP_BASE   (0x40800000)
 
#define CONFIG_HEAP_SIZE   (16 * 1024 * 1024)
 
#define FILENAME_MAX_LEN   32
 
#define CHUNK_SIZE   0x20000
 

Typedefs

typedef struct atf_head atf_head_t
 

Functions

int ar100s_gpu_fix (void)
 
static int fatfs_loadimage (char *filename, BYTE *dest)
 
static int load_sdcard (image_info_t *image)
 
void jmp_to_arm64 (uint32_t addr)
 
static void set_pmu_fin_voltage (char *power_name, uint32_t voltage)
 
static int abortboot_single_key (int bootdelay)
 
 msh_declare_command (boot)
 
 msh_define_help (boot, "boot to linux", "Usage: boot\n")
 
int cmd_boot (int argc, const char **argv)
 
int main (void)
 

Variables

sunxi_serial_t uart_dbg
 
sunxi_i2c_t i2c_pmu
 
sunxi_sdhci_t sdhci0
 
uint32_t dram_para [32]
 
image_info_t image
 
const msh_command_entry commands []
 

Macro Definition Documentation

◆ CHUNK_SIZE

#define CHUNK_SIZE   0x20000

◆ CONFIG_BL31_FILENAME

#define CONFIG_BL31_FILENAME   "bl31.bin"

◆ CONFIG_BL31_LOAD_ADDR

#define CONFIG_BL31_LOAD_ADDR   (0x48000000)

◆ CONFIG_DEFAULT_BOOTDELAY

#define CONFIG_DEFAULT_BOOTDELAY   3

◆ CONFIG_DTB_FILENAME

#define CONFIG_DTB_FILENAME   "sun50i-r818-mg-core.dtb"

◆ CONFIG_DTB_LOAD_ADDR

#define CONFIG_DTB_LOAD_ADDR   (0x41f00000)

◆ CONFIG_HEAP_BASE

#define CONFIG_HEAP_BASE   (0x40800000)

◆ CONFIG_HEAP_SIZE

#define CONFIG_HEAP_SIZE   (16 * 1024 * 1024)

◆ CONFIG_KERNEL_FILENAME

#define CONFIG_KERNEL_FILENAME   "Image"

◆ CONFIG_KERNEL_LOAD_ADDR

#define CONFIG_KERNEL_LOAD_ADDR   (0x40080000)

◆ CONFIG_SDMMC_SPEED_TEST_SIZE

#define CONFIG_SDMMC_SPEED_TEST_SIZE   1024

◆ FILENAME_MAX_LEN

#define FILENAME_MAX_LEN   32

Typedef Documentation

◆ atf_head_t

typedef struct atf_head atf_head_t

Function Documentation

◆ abortboot_single_key()

static int abortboot_single_key ( int  bootdelay)
static

◆ ar100s_gpu_fix()

int ar100s_gpu_fix ( void  )
extern

◆ cmd_boot()

int cmd_boot ( int  argc,
const char **  argv 
)

◆ fatfs_loadimage()

static int fatfs_loadimage ( char *  filename,
BYTE dest 
)
static

◆ jmp_to_arm64()

void jmp_to_arm64 ( uint32_t  addr)

◆ load_sdcard()

static int load_sdcard ( image_info_t image)
static

◆ main()

int main ( void  )

◆ msh_declare_command()

msh_declare_command ( boot  )

◆ msh_define_help()

msh_define_help ( boot  ,
"boot to linux"  ,
"Usage: boot\n"   
)

◆ set_pmu_fin_voltage()

static void set_pmu_fin_voltage ( char *  power_name,
uint32_t  voltage 
)
static

Variable Documentation

◆ commands

const msh_command_entry commands[]
Initial value:
= {
}
#define msh_command_end
Definition cli.h:21
#define msh_define_command(name)
Definition cli.h:33

◆ dram_para

uint32_t dram_para[32]
extern

◆ i2c_pmu

sunxi_i2c_t i2c_pmu
extern

◆ image

image_info_t image

◆ sdhci0

sunxi_sdhci_t sdhci0
extern

◆ uart_dbg

sunxi_serial_t uart_dbg
extern