software/bios: cleanup includes and specify the lib in the include.
This ease understanding from which lib the file is included and also allow having simple filenames in the libs.
This commit is contained in:
parent
c3a03d0d99
commit
e91c317139
|
@ -20,18 +20,16 @@
|
||||||
#include <generated/csr.h>
|
#include <generated/csr.h>
|
||||||
#include <generated/soc.h>
|
#include <generated/soc.h>
|
||||||
|
|
||||||
#ifdef CSR_ETHMAC_BASE
|
|
||||||
#include <udp.h>
|
|
||||||
#include <tftp.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CSR_SPIFLASH_BASE
|
|
||||||
#include <spiflash.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "sfl.h"
|
#include "sfl.h"
|
||||||
#include "boot.h"
|
#include "boot.h"
|
||||||
|
|
||||||
|
#include <spiflash.h>
|
||||||
|
|
||||||
|
#include <libliteeth/udp.h>
|
||||||
|
#include <libliteeth/tftp.h>
|
||||||
|
|
||||||
|
#include <liblitesdcard/spisdcard.h>
|
||||||
|
|
||||||
extern void boot_helper(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr);
|
extern void boot_helper(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr);
|
||||||
|
|
||||||
static void __attribute__((noreturn)) boot(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr)
|
static void __attribute__((noreturn)) boot(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr)
|
||||||
|
@ -497,7 +495,6 @@ void romboot(void)
|
||||||
|
|
||||||
// SPI HARDWARE BITBANG
|
// SPI HARDWARE BITBANG
|
||||||
#ifdef CSR_SPISDCARD_BASE
|
#ifdef CSR_SPISDCARD_BASE
|
||||||
#include "spisdcard.h"
|
|
||||||
|
|
||||||
void spisdcardboot(void)
|
void spisdcardboot(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <id.h>
|
#include <id.h>
|
||||||
#include <generated/csr.h>
|
|
||||||
#include <crc.h>
|
#include <crc.h>
|
||||||
#include <system.h>
|
#include <system.h>
|
||||||
|
|
||||||
|
#include <generated/csr.h>
|
||||||
|
|
||||||
#include "../command.h"
|
#include "../command.h"
|
||||||
#include "../helpers.h"
|
#include "../helpers.h"
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include <generated/csr.h>
|
#include <generated/csr.h>
|
||||||
|
|
||||||
#include "sdram.h"
|
#include <liblitedram/sdram.h>
|
||||||
|
|
||||||
#include "../command.h"
|
#include "../command.h"
|
||||||
#include "../helpers.h"
|
#include "../helpers.h"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include <generated/csr.h>
|
#include <generated/csr.h>
|
||||||
|
|
||||||
#include "mdio.h"
|
#include <libliteeth/mdio.h>
|
||||||
|
|
||||||
#include "../command.h"
|
#include "../command.h"
|
||||||
#include "../helpers.h"
|
#include "../helpers.h"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include <generated/csr.h>
|
#include <generated/csr.h>
|
||||||
|
|
||||||
#include "sdcard.h"
|
#include <liblitesdcard/sdcard.h>
|
||||||
|
|
||||||
#include "../command.h"
|
#include "../command.h"
|
||||||
#include "../helpers.h"
|
#include "../helpers.h"
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <generated/csr.h>
|
||||||
|
|
||||||
#include "../command.h"
|
#include "../command.h"
|
||||||
#include "../helpers.h"
|
#include "../helpers.h"
|
||||||
|
|
||||||
|
|
|
@ -25,30 +25,26 @@
|
||||||
#include <irq.h>
|
#include <irq.h>
|
||||||
#include <crc.h>
|
#include <crc.h>
|
||||||
|
|
||||||
|
#include "boot.h"
|
||||||
|
#include "readline.h"
|
||||||
|
#include "helpers.h"
|
||||||
|
#include "command.h"
|
||||||
|
|
||||||
#include <generated/csr.h>
|
#include <generated/csr.h>
|
||||||
#include <generated/soc.h>
|
#include <generated/soc.h>
|
||||||
#include <generated/mem.h>
|
#include <generated/mem.h>
|
||||||
#include <generated/git.h>
|
#include <generated/git.h>
|
||||||
|
|
||||||
#ifdef CSR_ETHMAC_BASE
|
|
||||||
#include "udp.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CSR_SPIFLASH_BASE
|
|
||||||
#include <spiflash.h>
|
#include <spiflash.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CSR_ETHPHY_MDIO_W_ADDR
|
#include <liblitedram/sdram.h>
|
||||||
#include "mdio.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "sdram.h"
|
#include <libliteeth/udp.h>
|
||||||
#include "sdcard.h"
|
#include <libliteeth/mdio.h>
|
||||||
//#include "spi.h"
|
|
||||||
#include "boot.h"
|
#include <liblitespi/spiflash.h>
|
||||||
#include "readline.h"
|
|
||||||
#include "helpers.h"
|
#include <liblitesdcard/sdcard.h>
|
||||||
#include "command.h"
|
|
||||||
|
|
||||||
static void boot_sequence(void)
|
static void boot_sequence(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,12 +47,9 @@ DEPFLAGS += -MD -MP
|
||||||
#
|
#
|
||||||
INCLUDES = -I$(SOC_DIRECTORY)/software/include/base \
|
INCLUDES = -I$(SOC_DIRECTORY)/software/include/base \
|
||||||
-I$(SOC_DIRECTORY)/software/include \
|
-I$(SOC_DIRECTORY)/software/include \
|
||||||
-I$(SOC_DIRECTORY)/common \
|
-I$(SOC_DIRECTORY)/software \
|
||||||
-I$(BUILDINC_DIRECTORY) \
|
-I$(BUILDINC_DIRECTORY) \
|
||||||
-I$(CPU_DIRECTORY) \
|
-I$(CPU_DIRECTORY)
|
||||||
-I$(SOC_DIRECTORY)/software/liblitedram \
|
|
||||||
-I$(SOC_DIRECTORY)/software/libliteeth \
|
|
||||||
-I$(SOC_DIRECTORY)/software/liblitesdcard
|
|
||||||
COMMONFLAGS = $(DEPFLAGS) -Os $(CPUFLAGS) -g3 -fomit-frame-pointer -Wall -fno-builtin -nostdinc $(INCLUDES)
|
COMMONFLAGS = $(DEPFLAGS) -Os $(CPUFLAGS) -g3 -fomit-frame-pointer -Wall -fno-builtin -nostdinc $(INCLUDES)
|
||||||
CFLAGS = $(COMMONFLAGS) -fexceptions -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
|
CFLAGS = $(COMMONFLAGS) -fexceptions -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
|
||||||
CXXFLAGS = $(COMMONFLAGS) -std=c++11 -I$(SOC_DIRECTORY)/software/include/basec++ -fexceptions -fno-rtti -ffreestanding
|
CXXFLAGS = $(COMMONFLAGS) -std=c++11 -I$(SOC_DIRECTORY)/software/include/basec++ -fexceptions -fno-rtti -ffreestanding
|
||||||
|
|
Loading…
Reference in New Issue