[U-Boot] U-boot -printk kernel crash dump using md on PDK
Magnus Lilja
lilja.magnus at gmail.com
Thu Apr 30 18:05:06 CEST 2009
Hi
2009/4/30 alfred steele <alfred.jaquez at gmail.com>:
> Hi Magnus,
>
>
>> The mainline u-boot + my patches from early April does not contain any
>> driver for the i.MX31 NAND flash controller so that can't autodetect
>> any flash part at all.
> How does it boot out of NAND then? I am getting confused. By
> detection, i meant the basic init of the NFC and the NFCBUF and the
> associated initiliazation to pool the SPL off the NAND which further
> hand over to the uboot.
I realize I wasn't clear. U-boot NAND booting is done in several
steps. For the i.MX31 the following steps are involved:
1. i.MX31 reads the first 2048 bytes from NAND. This is the SPL.
2. The SPL contains lowlevel-init and sets up the SDRAM (in
assembler). SPL is compiled without SKIP_LOWLEVEL_INIT and without
SKIP_RELOATE_UBOOT.
3. The SPL copies the rest of U-boot, a predefined number of blocks,
from NAND to SDRAM (nand_boot_mx31.c). This is currently done without
run-time detection of the NAND
type.CFG_NAND_CHIP_SIZE/CFG_NAND_PAGE_SIZE and others control this.
4. After copying, SPL jumps to U-boot
5. U-boot starts executing (cpu/arm1136/start.S)
6. SKIP_LOWLEVEL_INIT and SKIP_RELOCATE_UBOOT are defined when
compiling U-boot since the SDRAM has already been setup by SPL and SPL
has already placed U-boot at the correct address (i.e. no relocation
needed).
7. Eventually board/freescale/mx31pdk/mx31pdk.c:board_init is called.
8. U-boot main loop is entered.
(I hope I got the above right)
If U-boot had full NAND support for i.MX31, NAND would be detected
somewhere between steps 7 and 8.
Remember that there are two separate applications involved above, SPL
which is built in nand_spl, and U-boot. The two applications are
concatenated into one binary.
What's may be confusing is that the same config-file is used both when
compiling SPL and U-boot, but config.h is modified a bit.
>> CONFIG_NAND_SPL is defined in
>> nand_spl/board/freescale/mx31pdk/Makefile when it builds the second
>> phase loader.
> CONFIG_NAND_SPL is fine but CONFIG_SKIP_LOWLEVEL_INIT and
> CONFIG_SKIP_RELOCATE_UBOOT should not be defined in case we are
> booting out of NAND, right?
See my explanation above. CONFIG_SKIP* is defined when compiling
U-boot, but not when compiling SPL.
/Magnus
More information about the U-Boot
mailing list