- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a custom board of AGFB027R25AR0. I want to bring it up, now I follow the article below and encounter the following problems:
#keywords. tags
agilex, fpga, u-boot, spl
1. `Env setup`
export CROSS_COMPILE=aarch64-none-linux-gnu- KCFLAGS=-DDEBUG
export ARCH=arm
export TOP_FOLDER=`pwd`
2. `Build Arm Trusted Firmware`
cd $TOP_FOLDER
rm -rf arm-trusted-firmware
cd arm-trusted-firmware
# comment out next line to use the latest ATF branch
git checkout -b socfpga_v2.10.0 origin/socfpga_v2.10.0
make bl31 PLAT=agilex DEPRECATED=1
cd ..
3. `Build U-Boot`
rm -rf u-boot-socfpga
cd u-boot-socfpga
# comment out next line to use the latest default branch
git checkout -b socfpga_v2022.10 -t origin/socfpga_v2022.10
# enable dwarf4 debug info, for compatibility with arm ds
sed -i 's/PLATFORM_CPPFLAGS += -D__ARM__/PLATFORM_CPPFLAGS += -D__ARM__ -gdwarf-4/g' arch/arm/config.mk
# use 'Image' for kernel image instead of 'kernel.itb'
sed -i 's/kernel\.itb/Image/g' include/configs/socfpga_soc64_common.h
# only boot from SD, do not try QSPI and NAND
sed -i 's/u-boot,spl-boot-order.*/u-boot\,spl-boot-order = \&flash0;/g' arch/arm/dts/socfpga_agilex_socdk-u-boot.dtsi
# disable NAND in the device tree
sed -i '/&nand {/!b;n;c\\tstatus = "disabled";' arch/arm/dts/socfpga_agilex_socdk-u-boot.dtsi
# remove the NAND configuration from device tree
sed -i '/images/,/binman/{/binman/!d}' arch/arm/dts/socfpga_agilex_socdk-u-boot.dtsi
# link to atf
ln -s $TOP_FOLDER/arm-trusted-firmware/build/agilex/release/bl31.bin .
# Create configuration custom file.
cat << EOF > config-fragment-agilex
# - Disable NAND/UBI related settings from defconfig.
CONFIG_NAND_BOOT=n
CONFIG_SPL_NAND_SUPPORT=n
CONFIG_CMD_NAND_TRIMFFS=n
CONFIG_CMD_NAND_LOCK_UNLOCK=n
CONFIG_NAND_DENALI_DT=n
CONFIG_SYS_NAND_U_BOOT_LOCATIONS=n
CONFIG_SPL_NAND_FRAMEWORK=n
CONFIG_CMD_NAND=n
CONFIG_MTD_RAW_NAND=n
CONFIG_CMD_UBI=n
CONFIG_CMD_UBIFS=n
CONFIG_MTD_UBI=n
CONFIG_ENV_IS_IN_UBI=n
CONFIG_UBI_SILENCE_MSG=n
CONFIG_UBIFS_SILENCE_MSG=n
# - Disable distroboot and use specific boot command.
CONFIG_DISTRO_DEFAULTS=n
CONFIG_HUSH_PARSER=y
CONFIG_SYS_PROMPT_HUSH_PS2="> "
# Enable more QSPI flash manufacturers
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_SPI_FLASH_ISSI=y
EOF
# change ddr bank number to 1
vi configs/socfpga_agilex_defconfig
CONFIG_NR_DRAM_BANKS 1
# change dtsi memory node to 1GB
vi arch/arm/dts/socfpga_agilex_socdk-u-boot.dtsi
memory {
/* 1GB */
reg = <0 0x00000000 0 0x40000000>;
};
# build U-Boot
make clean && make mrproper
make socfpga_agilex_defconfig
# Use created custom configuration file to merge with the default configuration obtained in .config file.
./scripts/kconfig/merge_config.sh -O ./ ./.config ./config-fragment-agilex
make -j 64
cd ..
#package and program
quartus_pfg -c intel_prj.sof output_prj.sof -o hps_path=u-boot-spl-dtb.hex
quartus_pgm -c 1 -m jtag -o "p;output_prj.sof@2"
#terminal console output
"pte not found", and then hang...
4. `Version Info`:
- Quartus: 22.04
- u-boot: socfpga_v2022.10
- ATF: socfpga_v2.10.0
- Board: boot from QSPI(256M GIGADEVICE), no emmc, 1GB SDRAM(I don't know why it can't read 3GB SDRAM??? If I change it to 3GB in dtb, I will failed in sdram_mmr_init_full->`gd->ram_size > hw_size`->‘DDR: Error: DRAM size from device tree is greater than hardware size.’)
- Memory Layout: follow the attached.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can someone help me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shirley
Is it possible that you share the full terminal logs?
This is to see which stage the board have already booted.
Regards
Jingyang, Teh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Of course, the complete log is in the attachment pack above named "uboot output info.txt", it stucks at the stage of u-boot SPL...
This is the result that I packaged the logic bitstream and uboot-spl.hex into a new sof and burning the board in.
And I noticed the DRAM size is different with the demo project, then I refer to this post to make modifications. But it still fails to boot...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Could you try changing the parameter of the "CONFIG_NR_DRAM_BANKS" back to the default and try again?
CONFIG_NR_DRAM_BANKS=2
Regards,
Jingyang, Teh
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page