Commit c01f87c8dd071c5487b590c9829bc40946af3361

Authored by Masahiro Yamada
Committed by Tom Rini
1 parent e8e6d2a990

doc: README.SPL: adjust for Kbuild and Kconfig

Reflect the latest build system to doc/README.SPL.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Showing 1 changed file with 6 additions and 22 deletions Side-by-side Diff

... ... @@ -13,35 +13,30 @@
13 13 How it works
14 14 ------------
15 15  
16   -There is a new directory $(srctree)/spl which contains only a Makefile.
17   -The object files are built separately for SPL and placed in this directory.
  16 +The object files for SPL are built separately and placed in the "spl" directory.
18 17 The final binaries which are generated are u-boot-spl, u-boot-spl.bin and
19 18 u-boot-spl.map.
20 19  
21   -During the SPL build a variable named CONFIG_SPL_BUILD is exported
22   -in the make environment and also appended to CPPFLAGS with -DCONFIG_SPL_BUILD.
  20 +A config option named CONFIG_SPL_BUILD is enabled by Kconfig for SPL.
23 21 Source files can therefore be compiled for SPL with different settings.
24   -ARM-based boards have previously used the option CONFIG_PRELOADER for it.
25 22  
26 23 For example:
27 24  
28 25 ifeq ($(CONFIG_SPL_BUILD),y)
29   -COBJS-y += board_spl.o
  26 +obj-y += board_spl.o
30 27 else
31   -COBJS-y += board.o
  28 +obj-y += board.o
32 29 endif
33 30  
34   -COBJS-$(CONFIG_SPL_BUILD) += foo.o
  31 +obj-$(CONFIG_SPL_BUILD) += foo.o
35 32  
36 33 #ifdef CONFIG_SPL_BUILD
37 34 foo();
38 35 #endif
39 36  
40 37  
41   -The building of SPL images can be with:
  38 +The building of SPL images can be enabled by CONFIG_SPL option in Kconfig.
42 39  
43   -#define CONFIG_SPL 1
44   -
45 40 Because SPL images normally have a different text base, one has to be
46 41 configured by defining CONFIG_SPL_TEXT_BASE. The linker script has to be
47 42 defined with CONFIG_SPL_LDSCRIPT.
... ... @@ -69,17 +64,6 @@
69 64 CONFIG_SPL_SPI_LOAD (drivers/mtd/spi/spi_spl_load.o)
70 65 CONFIG_SPL_RAM_DEVICE (common/spl/spl.c)
71 66 CONFIG_SPL_WATCHDOG_SUPPORT (drivers/watchdog/libwatchdog.o)
72   -
73   -Normally CPU is assumed to be the same between the SPL and normal
74   -u-boot build. However it is possible to specify a different CPU for
75   -the SPL build for cases where the SPL is expected to run on a
76   -different CPU model from the main u-boot. This is done by specifying
77   -an SPL CPU in boards.cfg as follows:
78   -
79   - normal_cpu:spl_cpu
80   -
81   -This case CPU will be set to "normal_cpu" during the main u-boot
82   -build and "spl_cpu" during the SPL build.
83 67  
84 68  
85 69 Debugging