iTop-4412精英版的u-boot-2017.11移植教程(一)

获取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
  • 8
    点赞
  • 51
    收藏
    觉得还不错? 一键收藏
  • 15
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 15
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值