1
Trenz Electronic FPGA Modules / Re: Building u-boot with PetaLinux for ZynqBerry
« Last post by kampi on Today at 10:33:04 AM »Hi,
I want to boot the Linux from the SD card, so I have to do some additional research on how I modify the "boot.scr". I have checked "/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr" and found the file "boot.cmd.default" which consist the plaintext script:
I think you are right with your mention that the build system doesn´t use the changes, because the guy from Tux Engineering wrote the same:
"...
Now somewhat redundantly, we need to inform u-boot again, where to find the bootscr partition offset, by modifying the following lines in recipes-bsp/u-boot/u-boot-zynq-scr.bbappend:
..."
I want to boot the Linux from the SD card, so I have to do some additional research on how I modify the "boot.scr". I have checked "/project-spec/meta-user/recipes-bsp/u-boot/u-boot-zynq-scr" and found the file "boot.cmd.default" which consist the plaintext script:
Code: [Select]
# This is a boot script for U-Boot
# Generate boot.scr:
# mkimage -c none -A arm -T script -d boot.cmd.default boot.scr
#
################
## Please change the kernel_offset and kernel_size if the kernel image size more than
## the 100MB and BOOT.BIN size more than the 30MB
## kernel_offset --> is the address of qspi which you want load the kernel image
## kernel_size --> size of the kernel image in hex
###############
fdt_addr=0x1000
imageub_addr=0x10000000
kernel_addr=0x80000
kernel_offset=0x1E00200
kernel_size=0x7800000
kernel_type=image.ub
for boot_target in ${boot_targets};
do
if test "${boot_target}" = "jtag" ; then
booti ${kernel_addr} - ${fdt_addr};
exit;
fi
if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" ; then
if test -e ${devtype} ${devnum}:${distro_bootpart} /image.ub; then
fatload ${devtype} ${devnum}:${distro_bootpart} ${imageub_addr} image.ub;
bootm ${imageub_addr};
exit;
fi
if test -e ${devtype} ${devnum}:${distro_bootpart} /Image; then
fatload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr} Image;
booti ${kernel_addr} - ${fdt_addr};
exit;
fi
booti ${kernel_addr} - ${fdt_addr};
exit;
fi
if test "${boot_target}" = "xspi0"; then
sf probe 0 0 0;
if test "${kernel_type}" = "image.ub"; then
sf read ${imageub_addr} ${kernel_offset} ${kernel_size};
bootm ${imageub_addr};
exit;
fi
if test "${kernel_type}" = "Image"; then
sf read ${kernel_addr} ${kernel_offset} ${kernel_size};
booti ${kernel_addr} - ${fdt_addr};
exit;
fi
exit;
fi
done
I think you are right with your mention that the build system doesn´t use the changes, because the guy from Tux Engineering wrote the same:
"...
Now somewhat redundantly, we need to inform u-boot again, where to find the bootscr partition offset, by modifying the following lines in recipes-bsp/u-boot/u-boot-zynq-scr.bbappend:
..."