获取u-boot-2017.11
本博客的版本是u-boot-2017.11.tar.bz2.
注:关于u-boot的启动流程及原理,本博客就不详细说明,网上教程也是一大堆,想要了解的各位可以自行搜索学习
官网下载地址:ftp://ftp.denx.de/pub/u-boot/u-boot-2017.11.tar.bz2
开始移植
(一)创建板级目录
mkdir board/samsung/itop4412
mkdir board/samsung/itop4412/tools
(二)添加板级文件
touch board/samsung/itop4412/itop4412.c
touch board/samsung/itop4412/Kconfig
touch board/samsung/itop4412/Makefile
touch board/samsung/itop4412/MAINTAINERS
touch board/samsung/itop4412/tools/mkitop4412spl.c
(三)编辑文件内容
(1)itop4412.c
/*
* Copyright (C) 2011 Samsung Electronics
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <asm/io.h>
#include <asm/gpio.h>
#include <asm/arch/cpu.h>
#include <asm/arch/mmc.h>
#include <asm/arch/periph.h>
#include <asm/arch/pinmux.h>
#include <usb.h>
DECLARE_GLOBAL_DATA_PTR;
u32 get_board_rev(void)
{
return 0;
}
int exynos_init(void)
{
return 0;
}
int board_usb_init(int index, enum usb_init_type init)
{
return 0;
}
#ifdef CONFIG_BOARD_EARLY_INIT_F
int exynos_early_init_f(void)
{
return 0;
}
#endif
(2)Kconfig
if TARGET_ITOP4412
config SYS_BOARD
default "itop4412"
config SYS_VENDOR
default "samsung"
config SYS_CONFIG_NAME
default "itop4412"
endif
(3)Makefile
#
# Copyright (C) 2011 Samsung Electronics
#
# SPDX-License-Identifier: GPL-2.0+
#
ifdef CONFIG_SPL_BUILD
# necessary to create built-in.o
obj- := __dummy__.o
hostprogs-y := tools/mkitop4412spl
al