Closed rainwonder closed 5 years ago
Hi,
Currently NUC970 driver in U-Boot does not support device tree.
Sincerely,
Yi-An Chen
Hi
If I want to support the device tree to start the kernel, how should I modify the uboot and kernel?
Sincerely
Hi,
970's U-Boot driver does not support device tree. But U-Boot can still pass .dtb to kernel.
Enable following kernel options in menuconfig. [] Flattened Device Tree support [] Support for the traditional ATAGS boot data passing
Enable following u-boot option
Sincerely,
Yi-An Chen
Hi, Yes, I have chosen these two options, but can not start uboot.
Hmmm, my u-boot works fine with those two options enabled. So your u-boot works fine without those two options? What NAND flash are you using?
Sincerely,
Yi-An Chen
The NAND I used is H27U1G8F2B (Rev0.1) -nand flash 128M.
U-boot shows NAND capacity as 4351MB... What is PA[6:9] power on setting status on your board? Please keep them as high.
My PA[6:9] is full of pins, I'm not sure whether it is high, I use a voltmeter to try
What board are you using?
Please check SW35 on your board.
SW35 choose on
If you re-build uboot with nuc970_defconfig, can it boot on your board?
Do not choose those two options?
use >make nuc970_defconfig
make all
Hmmmm,This setting can start uboot.
But when I choose those two options, I can't start uboot.
make menuconfig in uboot,i choose those two options,
Un-select support flattened image tree within SPL and test again. You only need to trun on following two options.
And after restore default config, does your U-Boot shows correct NAND size?
yes,it shows correct NAND size,iwill try agin,I just need to modify include/configs/nuc970_evb.h ,and then make nuc970_defconfig,Do I not need to specify the address of *dtb in uboot?
Yeah, Two options were opened, but the compiler failed.
Do I need to open some more options?
Please paste your .config file here.
This is my .config
Can you sync your repository and test again. I have to answer some config options while trying to build your config. But the build is fine, didn't see the error you reported.
After I try again,still see the error reported.No need to answer some config option when I build my config. i show you my command to build uboot,
vim include/configs/nuc970_evb.h -> add #define CONFIG_OF_LIBFDT #define CONFIG_FIT make nuc970_defconfig make ARCH=arm CROSS_COMPILE=arm-linux- all
Enable those two options in header file seems break some dependency rule. Please enable them with menuconfig. Anyway, attached is my config file. config_ok.txt
Oh,There is no need to add #define CONFIG_OF_LIBFDT #define CONFIG_FIT to inlcude/configs/nuc970_evb.h. just make menuconfig is ok.
But didn't start uboot whith nand,
Can you attach the u-boot.bin that failed to boot up here?
u-boot.txt this is my uboot.bin
Did you enable other features except device tree? Your u-boot.bin exceed CONFIG_SYS_NAND_U_BOOT_SIZE defined in nuc970_evb.h. Please enlarge this value and rebuild u-boot SPL.
U-Boot 2016.11 (Aug 30 2018 - 11:33:20 +0800)
CPU: NUC972 Board: NUC970 DRAM: 64 MiB NAND: 128 MiB *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial Net: emac Error: emac address not set.
rain=>
Yeah,it is ok! Thanks a lot for your help.
An error occurred when I added the FDT address. err: libfdt fdt_check_header(): FDT_ERR_BADMAGIC
I look for source code. (fdt_magic(fdt) == FDT_MAGIC) is not eq. Is the address of command(FDT ad) fixed?
How do you set the FDT address? Have you try to pass the address to bootm command?
command ->: fdt addr 0x600000
Hi, What is the problem of my command
nothing's wrong. You need to load the dtb file to the offset first.
=> nand read 0x600000 0x200000 0x100000
NAND read: device 0 offset 0x200000, size 0x100000 1048576 bytes read: OK => fdt addr 0x600000 =>
I have download the dtb and kernel,then just use command
=>bootm 0x7fc0
spi pin is off.
The nuc972.dts in kernel needs to be modified .
That message's from U-Boot. Please rebuid U-Boot with SPI disabled if you don't need it.
I have already SPI disabled and rebuild U-boot
That string is coming from U-Boot, not kernel. Please check again. SPI flash support is still enabled in U-Boot.
I have disabled spi-flash and rebuid u-boot, but the same error occurred during startup
Please check your .config file make make sure SPI related stuffs are disabled.
dtb is not correct?
You need to pass the dtb address to kernel.
───────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ [] Support Flattened Image Tree │ │
│ │ [ ] Support Flattened Image Tree within SPL │ │
│ │ [ ] Display verbose messages on FIT boot │ │
│ │ [ ] Select the best match for the kernel device tree │ │
│ │ [ ] Show verbose messages when FIT images fails │ │
│ │ () Extra Options (DEPRECATED) │ │
│ │ [ ] Enable SPL loading U-Boot as a FIT │ │
│ │ [ ] Enable SPL with DFU to load binaries to memory device │ │
│ │ [] Enable arch_fixup_fdt() call and then
U-Boot 2016.11 (Aug 24 2018 - 14:23:53 +0800)
CPU: NUC972 Board: NUC970 DRAM: 64 MiB NAND: 4863 MiB
can not start uboot