software/bios: cleanup includes and specify the lib in the include.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 20 May 2020 07:55:19 +0000 (09:55 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 20 May 2020 07:55:19 +0000 (09:55 +0200)
This ease understanding from which lib the file is included and also allow
having simple filenames in the libs.

litex/soc/software/bios/boot.c
litex/soc/software/bios/cmds/cmd_bios.c
litex/soc/software/bios/cmds/cmd_litedram.c
litex/soc/software/bios/cmds/cmd_liteeth.c
litex/soc/software/bios/cmds/cmd_litesdcard.c
litex/soc/software/bios/cmds/cmd_mem.c
litex/soc/software/bios/main.c
litex/soc/software/common.mak

index a85bca2d6bbecc2f4a1becc68a5176f9a4f30760..639d1266071e9beaf1cd612861940e08c0f219b2 100644 (file)
 #include <generated/csr.h>
 #include <generated/soc.h>
 
-#ifdef CSR_ETHMAC_BASE
-#include <udp.h>
-#include <tftp.h>
-#endif
+#include "sfl.h"
+#include "boot.h"
 
-#ifdef CSR_SPIFLASH_BASE
 #include <spiflash.h>
-#endif
 
-#include "sfl.h"
-#include "boot.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);
 
@@ -497,7 +495,6 @@ void romboot(void)
 
 // SPI HARDWARE BITBANG
 #ifdef CSR_SPISDCARD_BASE
-#include "spisdcard.h"
 
 void spisdcardboot(void)
 {
index bbca856ce35a33d9fb6d91ecbc6f7f6e7e20bea5..cf555ef09500c21d637c163ed61c700b45ccc212 100644 (file)
@@ -2,12 +2,12 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-
 #include <id.h>
-#include <generated/csr.h>
 #include <crc.h>
 #include <system.h>
 
+#include <generated/csr.h>
+
 #include "../command.h"
 #include "../helpers.h"
 
index 0b9ea2280fe37175608e9900dc2ae901086c256e..b9a9f225b90706bc72d74122402a06936ce6c6ba 100644 (file)
@@ -5,7 +5,7 @@
 
 #include <generated/csr.h>
 
-#include "sdram.h"
+#include <liblitedram/sdram.h>
 
 #include "../command.h"
 #include "../helpers.h"
index f9df1d248b8561b2f2e873db3f4d28c4f801ad0c..e8702f6786a9e1e1373e70c5cb281b74cbd4a4ba 100644 (file)
@@ -5,7 +5,7 @@
 
 #include <generated/csr.h>
 
-#include "mdio.h"
+#include <libliteeth/mdio.h>
 
 #include "../command.h"
 #include "../helpers.h"
index d5d1651f8e64ab378d70974fe7eb45345b195cd4..4cac68f261bf1ac8a7dfab72d0d67e7a3ab80c69 100644 (file)
@@ -5,7 +5,7 @@
 
 #include <generated/csr.h>
 
-#include "sdcard.h"
+#include <liblitesdcard/sdcard.h>
 
 #include "../command.h"
 #include "../helpers.h"
index 8c63d4c44f5454d80c8efec4b89623280aa5abda..01c607e1fc6cb91777101365bd102d2b0bb6cf5b 100644 (file)
@@ -3,6 +3,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <generated/csr.h>
+
 #include "../command.h"
 #include "../helpers.h"
 
index 9d1dc85bedef6025c9597d49d265c5364cfa6e25..dc2117ad433d59adf5d25faca22b703d1ba28153 100644 (file)
 #include <irq.h>
 #include <crc.h>
 
+#include "boot.h"
+#include "readline.h"
+#include "helpers.h"
+#include "command.h"
+
 #include <generated/csr.h>
 #include <generated/soc.h>
 #include <generated/mem.h>
 #include <generated/git.h>
 
-#ifdef CSR_ETHMAC_BASE
-#include "udp.h"
-#endif
-
-#ifdef CSR_SPIFLASH_BASE
 #include <spiflash.h>
-#endif
 
-#ifdef CSR_ETHPHY_MDIO_W_ADDR
-#include "mdio.h"
-#endif
+#include <liblitedram/sdram.h>
 
-#include "sdram.h"
-#include "sdcard.h"
-//#include "spi.h"
-#include "boot.h"
-#include "readline.h"
-#include "helpers.h"
-#include "command.h"
+#include <libliteeth/udp.h>
+#include <libliteeth/mdio.h>
+
+#include <liblitespi/spiflash.h>
+
+#include <liblitesdcard/sdcard.h>
 
 static void boot_sequence(void)
 {
index 1431ad5522c4240644f072a10723299ef0cc8147..802a48b8da2117554ebc56dbb5ed49514b221bbf 100644 (file)
@@ -47,12 +47,9 @@ DEPFLAGS += -MD -MP
 #
 INCLUDES = -I$(SOC_DIRECTORY)/software/include/base \
            -I$(SOC_DIRECTORY)/software/include \
-           -I$(SOC_DIRECTORY)/common \
+           -I$(SOC_DIRECTORY)/software \
            -I$(BUILDINC_DIRECTORY) \
-           -I$(CPU_DIRECTORY) \
-           -I$(SOC_DIRECTORY)/software/liblitedram \
-           -I$(SOC_DIRECTORY)/software/libliteeth \
-           -I$(SOC_DIRECTORY)/software/liblitesdcard
+           -I$(CPU_DIRECTORY)
 COMMONFLAGS = $(DEPFLAGS) -Os $(CPUFLAGS) -g3 -fomit-frame-pointer -Wall -fno-builtin -nostdinc $(INCLUDES)
 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