Commit d83008d2 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

changes for newer u-boot

parent 80f478a4
...@@ -33,8 +33,8 @@ SCRIPTPATH=$(dirname "$SCRIPT") ...@@ -33,8 +33,8 @@ SCRIPTPATH=$(dirname "$SCRIPT")
UBOOT_TREE="$SCRIPTPATH/u-boot-tree" UBOOT_TREE="$SCRIPTPATH/u-boot-tree"
CONFIGS="include/configs" CONFIGS="include/configs"
EZYNQ="ezynq" EZYNQ="ezynq"
REPO_DIR_NAME="u-boot-xlnx" REPO_DIR_NAME="u-boot"
PATCH_NAME="u-boot-xlnx.patch" PATCH_NAME="u-boot.patch"
SUFFIX=".orig" SUFFIX=".orig"
...@@ -44,9 +44,9 @@ CROSS_COMPILE="arm-poky-linux-gnueabi-" ...@@ -44,9 +44,9 @@ CROSS_COMPILE="arm-poky-linux-gnueabi-"
#COMPILE_PATH="/opt/poky/1.4.2/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi" #COMPILE_PATH="/opt/poky/1.4.2/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi"
COMPILE_PATH="/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi" COMPILE_PATH="/opt/poky/1.5.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi"
echo "Step 1: Cloning Xilinx's u-boot repository (master-next branch)" echo "Step 1: Cloning u-boot repository (master branch)"
if [ ! -d "$REPO_DIR_NAME/.git" ]; then if [ ! -d "$REPO_DIR_NAME/.git" ]; then
git clone -b master-next https://github.com/Xilinx/u-boot-xlnx.git "$REPO_DIR_NAME" git clone -b master git://git.denx.de/u-boot.git "$REPO_DIR_NAME"
else else
echo " Already there" echo " Already there"
fi fi
...@@ -54,7 +54,8 @@ fi ...@@ -54,7 +54,8 @@ fi
echo "Step 2: Checking out u-boot version with the certain hash" echo "Step 2: Checking out u-boot version with the certain hash"
cd "$REPO_DIR_NAME" cd "$REPO_DIR_NAME"
#git checkout 54fee227ef141214141a226efd17ae0516deaf32 #git checkout 54fee227ef141214141a226efd17ae0516deaf32
git checkout 2a0536fa48db1fc5332e3cd33b846d0da0c8bc1e #git checkout 2a0536fa48db1fc5332e3cd33b846d0da0c8bc1e
git checkout fa85e826c16b9ce1ad302a57e9c4b24db0d8b930
echo "Step 3: Merging ezynq with u-boot" echo "Step 3: Merging ezynq with u-boot"
...@@ -115,7 +116,7 @@ fi ...@@ -115,7 +116,7 @@ fi
echo "DONE. echo "DONE.
FURTHER INSTRUCTIONS (TO GENERATE BOOT.BIN): FURTHER INSTRUCTIONS (TO GENERATE BOOT.BIN):
cd u-boot-xlnx cd u-boot
./makeuboot <target> ./makeuboot <target>
SUPPORTED TARGETS: SUPPORTED TARGETS:
......
...@@ -15,12 +15,13 @@ obj-y += slcr.o ...@@ -15,12 +15,13 @@ obj-y += slcr.o
#use CONFIG_EZYNQ for the first (spl) u-boot pass or the only one (if spl building disabled) #use CONFIG_EZYNQ for the first (spl) u-boot pass or the only one (if spl building disabled)
ifeq ($(CONFIG_SPL),) ifeq ($(CONFIG_SPL),)
obj-$(CONFIG_EZYNQ) += ezynq.o obj-$(CONFIG_EZYNQ) += ezynq.o
endif endif
ifneq ($(CONFIG_SPL_BUILD),) ifneq ($(CONFIG_SPL_BUILD),)
obj-$(CONFIG_EZYNQ) += ezynq.o obj-$(CONFIG_EZYNQ) += ezynq.o
endif endif
obj-y += clk.o obj-y += clk.o
obj-y += lowlevel_init.o obj-y += lowlevel_init.o
AFLAGS_lowlevel_init.o := -mfpu=neon
obj-$(CONFIG_SPL_BUILD) += spl.o obj-$(CONFIG_SPL_BUILD) += spl.o
...@@ -4,11 +4,12 @@ ...@@ -4,11 +4,12 @@
* SPDX-License-Identifier: GPL-2.0+ * SPDX-License-Identifier: GPL-2.0+
*/ */
#include <common.h> #include <common.h>
#include <debug_uart.h>
#include <spl.h> #include <spl.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/spl.h>
#include <asm/arch/hardware.h> #include <asm/arch/hardware.h>
#include <asm/arch/spl.h>
#include <asm/arch/sys_proto.h> #include <asm/arch/sys_proto.h>
#ifndef CONFIG_EZYNQ #ifndef CONFIG_EZYNQ
...@@ -23,27 +24,29 @@ DECLARE_GLOBAL_DATA_PTR; ...@@ -23,27 +24,29 @@ DECLARE_GLOBAL_DATA_PTR;
void board_init_f(ulong dummy) void board_init_f(ulong dummy)
{ {
/* Clear the BSS. */ /* Clear the BSS. */
memset(__bss_start, 0, __bss_end - __bss_start); //memset(__bss_start, 0, __bss_end - __bss_start);
/* Set global data pointer. */ /* Set global data pointer. */
gd = &gdata; //gd = &gdata;
#ifndef CONFIG_EZYNQ #ifndef CONFIG_EZYNQ
ps7_init(); ps7_init();
#endif #endif
preloader_console_init();
arch_cpu_init(); arch_cpu_init();
#ifdef CONFIG_EZYNQ #ifdef CONFIG_EZYNQ
puts("Copying ps7_init.c/h from hw project is NOT REQUIRED\n"); puts("NOT REQUIRED: Copying ps7_init.c/h from hw project\n");
#endif #endif
board_init_r(NULL, 0); // board_init_r(NULL, 0);
} }
#ifdef CONFIG_SPL_BOARD_INIT
void spl_board_init(void) void spl_board_init(void)
{ {
preloader_console_init();
board_init(); board_init();
} }
#endif
u32 spl_boot_device(void) u32 spl_boot_device(void)
{ {
...@@ -82,7 +85,7 @@ u32 spl_boot_device(void) ...@@ -82,7 +85,7 @@ u32 spl_boot_device(void)
#ifdef CONFIG_SPL_MMC_SUPPORT #ifdef CONFIG_SPL_MMC_SUPPORT
u32 spl_boot_mode(void) u32 spl_boot_mode(void)
{ {
return MMCSD_MODE_FAT; return MMCSD_MODE_FS;
} }
#endif #endif
......
...@@ -16,19 +16,19 @@ fi ...@@ -16,19 +16,19 @@ fi
make clean make clean
make $1 make $1
make include/autoconf.mk make include/autoconf.mk
echo "Running ezynqcfg.py for the first time - u-boot length is not known yet, generating arch/arm/cpu/armv7/zynq/ezynq.c" echo "Running ezynqcfg.py for the first time - u-boot length is not known yet, generating arch/arm/mach-zynq/ezynq.c"
ezynq/ezynqcfg.py -c include/autoconf.mk --html u-boot.html -o boot_head.bin --html-mask 0x3ff --lowlevel arch/arm/cpu/armv7/zynq/ezynq.c ezynq/ezynqcfg.py -c include/autoconf.mk --html u-boot.html -o boot_head.bin --html-mask 0x3ff --lowlevel arch/arm/mach-zynq/ezynq.c
make make
echo "Running ezynqcfg.py for the second time - u-boot length is known and will be used in the RBL header" echo "Running ezynqcfg.py for the second time - u-boot length is known and will be used in the RBL header"
echo "Other files are already created, repeating it here just to remind their paths" echo "Other files are already created, repeating it here just to remind their paths"
if [ $(cat include/autoconf.mk | grep "CONFIG_SPL=y") ]; then if [ $(cat .config | grep "CONFIG_SPL=y") ]; then
UBOOT_FILE="spl/u-boot-spl.bin" UBOOT_FILE="spl/u-boot-spl.bin"
else else
UBOOT_FILE="u-boot.bin" UBOOT_FILE="u-boot.bin"
fi fi
ezynq/ezynqcfg.py -c include/autoconf.mk -o boot_head.bin --uboot $UBOOT_FILE --html u-boot.html --html-mask 0x3ff --lowlevel arch/arm/cpu/armv7/zynq/ezynq.c ezynq/ezynqcfg.py -c include/autoconf.mk -o boot_head.bin --uboot $UBOOT_FILE --html u-boot.html --html-mask 0x3ff --lowlevel arch/arm/mach-zynq/ezynq.c
cat boot_head.bin $UBOOT_FILE > boot.bin cat boot_head.bin $UBOOT_FILE > boot.bin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment