Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- u-boot_MiSTer/include/configs/socfpga_de10_nano.h
- https://github.com/MiSTer-devel/u-boot_MiSTer/blob/MiSTer/include/configs/socfpga_de10_nano.h
- # Annotated environment parameters for MiSTer platform U-Boot
- # u-boot_MiSTer/include/configs/socfpga_de10_nano.h
- # URL: https://github.com/MiSTer-devel/u-boot_MiSTer/blob/MiSTer/include/configs/socfpga_de10_nano.h
- # Commands executed on preboot stage. Start USB PHY.
- preboot=usb start
- # CONFIG_SYS_LOAD_ADDR = CONFIG_LOADADDR = 0x01000000 (as defined in /include/configs/socfpga_de10_nano.h)
- loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "
- # Load compressed Linux kernel from /boot/zImage
- bootimage=zImage
- # Set address for FDT (Flat device tree) to 100(0x00000064) and set device tree image file to /boot/socfpga.dtb
- # See more: https://www.denx.de/wiki/DULG/UBootCmdFDT
- fdt_addr=100
- fdtimage=socfpga.dtb
- # Load FPGA binary to address 0x02000000. Set FPGA core name as menu.rbf (It will be loaded from )
- fpgadata=0x02000000
- core=menu.rbf
- # Check FPGA state procedure
- # 1. If TSTSCRATCH (0xFFD05054) register contains zero (Cold reset was made), then call loading FPGA image data procedure
- # 2. Otherwise (warm reset case)
- # 2.1 Check for 4 bytes signature 0x87654321(12345678) is found in memory on address 0x1FFFF000. That means extra env block was loaded from file.
- # 2.2 If such block found, load extra env settings starting from address 0x1FFFF004 (skipping 4 signature bytes)
- # 2.3 Call loading FPGA image data procedure
- fpgacheck=if mt 0xFFD05054 0;then run fpgaload;else if mt 0x1FFFF000 0x87654321;then env import 0x1FFFF004;run fpgaload;fi;fi
- # Procedure 'fpgaload'
- # 1. Load FPGA image from file on MMC Boot (/boot/menu.rbf)
- fpgaload=load mmc 0:$mmc_boot $fpgadata $core;fpga load 0 $fpgadata $filesize;bridge enable;mw 0x1FFFF000 0;mw 0xFFD05054 0x12345678
- scrload1=load mmc 0:$mmc_boot $loadaddr u-boot.scr;source $loadaddr
- scrload2=load mmc 0:$mmc_os $loadaddr u-boot.scr;source $loadaddr
- # If MMC Boot location contains u-boot.scr file - load and execute it
- scrtest=if test -e mmc 0:$mmc_boot /u-boot.scr;then run scrload1;fi;
- # If MMC OS location contains u-boot.scr file - load and execute it
- if test -e mmc 0:$mmc_os /u-boot.scr;then run scrload2;fi
- # Set Ethernet address to 02:03:04:05:06:07
- ethaddr=02:03:04:05:06:07
- # Boot application image from memory
- # arg1 = $loadaddr - Linux image address in memory
- # arg2 = - (dash) - No initrd ramdisk image should be used
- # arg3 = $fdt_addr - Address of Flat device tree BLOB loaded into memory
- # See more: https://www.denx.de/wiki/DULG/UBootCmdGroupExec
- bootm $loadaddr - $fdt_addr
- # Define partition index (in SD card MBR) for:
- # MMC Boot partition. mmc_boot = 1
- # MMC OS partition mmc_os = 2
- # MMC root path (MMC block device partition) mmc_root = /dev/mmcblk0p2
- mmc_boot=" __stringify(CONFIG_SYS_MMCSD_FS_BOOT_PARTITION) "
- mmc_os=" __stringify(CONFIG_SYS_MMCSD_FS_OS_PARTITION) "
- mmcroot=/dev/mmcblk0p" __stringify(CONFIG_SYS_MMCSD_FS_OS_PARTITION) "
- # Set loglevel to 4 (default_loglevel = 4). That means that no messages will be logged.
- v=loglevel=4
- mmcboot=setenv bootargs " CONFIG_BOOTARGS " root=$mmcroot ro rootwait;" "bootz $loadaddr - $fdt_addr
- mmcload=mmc rescan;
- run fpgacheck;
- run scrtest;
- # Load zImage and socfpga.dtb into memory on specified addresses
- # zImage -> 0x
- # socfpga.dtb -> 0x00000064
- load mmc 0:$mmc_os $loadaddr /boot/$bootimage;
- load mmc 0:$mmc_os $fdt_addr /boot/$fdtimage
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement