本文主要是介绍u-boot-2016.07移植至S5PV210-单板配置,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
- 一、添加单板信息
- 1、
- cp -r board/samsung/smdkc100 board/samsung/smdkv210
- 2、进入smdkv210下
- cd board/samsung/smdkv210/
- mv smdkc100.c smdkv210.c
- 3、修改Kconfig
- if TARGET_SMDKV210
- config SYS_BOARD
- default "smdkv210"
- config SYS_VENDOR
- default "samsung"
- config SYS_SOC
- default "s5pv210"
- config SYS_CONFIG_NAME
- default "smdkv210"
- endif
- 4、修改MAINTAINERS
- SMDKV210 BOARD
- M: Minkyu Kang <mk7.kang@samsung.com>
- S: Maintained
- F: board/samsung/smdkv210/
- F: include/configs/smdkv210.h
- F: configs/smdkv210_defconfig
- 5、修改Makefile
- obj-y := smdkv210.o
- obj-$(CONFIG_SAMSUNG_ONENAND) += onenand.o
- obj-y += lowlevel_init.o
- 6、根据MAINTAINERS修改inclu/configs/smdkv210.h 和configs/smdkv210_defconfig
- cp include/configs/smdkc100.h include/configs/smdkv210.h
- cp configs/smdkc100_defconfig configs/smdkv210_defconfig
- 7、修改smdkv210_defconfig
- CONFIG_ARM=y
- CONFIG_ARCH_S5PV210=y
- CONFIG_TARGET_SMDKV210=y
- CONFIG_IDENT_STRING=" for SMDKV210"
- CONFIG_DEFAULT_DEVICE_TREE="s5pv210-smdkv210"
- CONFIG_BOOTDELAY=3
- CONFIG_HUSH_PARSER=y
- CONFIG_SYS_PROMPT="SMDKV210 # "
- # CONFIG_CMD_IMLS is not set
- # CONFIG_CMD_FLASH is not set
- # CONFIG_CMD_SETEXPR is not set
- CONFIG_CMD_CACHE=y
- CONFIG_CMD_FAT=y
- 二、添加S5PV210信息
- 1、进入arch/arn目录下
- cd arch/arm
- vim Kconfig
- # add by Sourcelink
- config ARCH_S5PV210
- bool "Samsung S5PV210"
- select CPU_V7
- select DM
- select DM_SERIAL
- select DM_GPIO
- # add by Sourcelink
- source "arch/arm/mach-s5pv210/Kconfig"
- 2、修改Makefile
- vim Makefile
- # add by Sourcelink
- machine-$(CONFIG_ARCH_S5PV210) += s5pv210
- 3、复制mach-s5pc1xx
- cp -r mach-s5pc1xx mach-s5pv210
- 4、修改mach-s5pv210目录下Kconfig
- cd mach-s5pv210/
- vim Kconfig
- if ARCH_S5PV210
- choice
- prompt "S5PV210 board select"
- optional
- #config TARGET_S5P_GONI
- # bool "S5P Goni board"
- # select OF_CONTROL
- config TARGET_SMDKV210
- bool "Support smdkv210 board"
- select OF_CONTROL
- endchoice
- config SYS_SOC
- default "s5pv210"
- source "board/samsung/goni/Kconfig"
- source "board/samsung/smdkv210/Kconfig"
- endif
- 4、修改cpu.h
- cd include/mach
- vim cpu.h
- #ifndef _S5PV210_CPU_H
- #define _S5PV210_CPU_H
- #define S5P_CPU_NAME "S5P"
- #define S5PV210_ADDR_BASE 0xE0000000
- /* S5PV210 */
- #define S5PV210_PRO_ID 0xE0000000
- #define S5PV210_CLOCK_BASE 0xE0100000
- #define S5PV210_GPIO_BASE 0xE0200000
- #define S5PV210_PWMTIMER_BASE 0xE2500000
- #define S5PV210_WATCHDOG_BASE 0xE2700000
- #define S5PV210_UART_BASE 0xE2900000
- #define S5PV210_MMC_BASE 0xEB000000
- #define S5PV210_SROMC_BASE 0xE8000000
- #define S5PV210_DMC0_BASE 0xF0000000
- #define S5PV210_DMC1_BASE 0xF1400000
- #define S5PV210_VIC0_BASE 0xF2000000
- #define S5PV210_VIC1_BASE 0xF2100000
- #define S5PV210_VIC2_BASE 0xF2200000
- #define SPPV210_VIC3_BASE 0xF2300000
- #define S5PV210_NAND_BASE 0xB0E00000
- /* modif by Sourcelink */
- static inline void s5p_set_cpu_id(void)
- {
- int id = 0;
- s5p_cpu_id = readl(S5PV210_PRO_ID);
- s5p_cpu_rev = s5p_cpu_id & 0x000000FF;
- id = (s5p_cpu_id & 0xFFFFF000) >> 12;
- if (id == 0x43110) {
- id = s5p_cpu_id & 0x0F;
- switch (id) {
- case 0x00:
- s5p_cpu_id = 0x56210;
- break;
- case 0x01:
- s5p_cpu_id = 0xc110;
- break;
- case 0x02:
- s5p_cpu_id = 0xc111;
- break;
- default : break;
- }
- }
- }
- /* add by Sourcelink */
- IS_SAMSUNG_TYPE(s5pv210, 0x56210)
- /* modif by Sourcelink */
- #define SAMSUNG_BASE(device, base) \
- static inline unsigned int samsung_get_base_##device(void) \
- { \
- if (cpu_is_s5pv210()) \
- return S5PV210_##base; \
- else if (cpu_is_s5pc100()) \
- return S5PC100_##base; \
- else if (cpu_is_s5pc110()) \
- return S5PC110_##base; \
- else \
- return 0; \
- }
- 5、修改board/samsung/smdkv210/lowlevel_init.S 将里面S5PC100全部替换为S5PV210
- 6、添加soc
- cd arch/arm/cpu/armv7
- vim Makefile
- # modif by Sourcelink
- ifneq (,$(filter s5pv210 s5pc1xx exynos,$(SOC)))
- obj-y += s5p-common/
- endif
- 7、添加设备树
- cd arch/arm/dts/
- cp s5pc1xx-smdkc100.dts s5pv210-tsmdkv210.dts
- 8、修改Makefile
- vim Makefile
- # add by Sourcelink
- dtb-$(CONFIG_S5PV210) += s5pv210-smdkv210.dtb
- 9、添加CONFIG_S5P210宏
- cd include/configs/
- vim smdkv210.h
- #define CONFIG_S5PV210 1 /* which is in a S5PC100 */
这篇关于u-boot-2016.07移植至S5PV210-单板配置的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!