tsec / x-loader Goto Github PK
View Code? Open in Web Editor NEWThis project forked from jamincheung/x-loader
bootloader for ingenic X1000 series Soc(u-boot/kernel/rtos)
This project forked from jamincheung/x-loader
bootloader for ingenic X1000 series Soc(u-boot/kernel/rtos)
# # Copyright (C) 2016 Ingenic Semiconductor Co.,Ltd # # X1000 series bootloader for u-boot/rtos/linux # # Zhang YanMing <[email protected], [email protected]> # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 675 Mass Ave, Cambridge, MA 02139, USA. # # 这是什么? ============== bootloader - 用于加载引导u-boot/linux/rtos,支持spi nand/nor, mmc/sdcard启动 如何编译? ============== 以halley2板(spi nor)为例 第一步: 配置 make halley2_nor_config 第二步:编译 make 如何添加新板极? ============== 1.在boards下添加板极目录 2.打开Makefile添加新板极编译目标 如何引到u-boot? ============== 打开boards/BOARD_NAME/board.mk,修改BOOT_NEXT_STAGE := 0,重新编译 将编译出的x-loader-xxx.bin和u-boot.bin cat在一起 cat x-loader-xxx.bin u-boot.bin > xxx.bin 如何引导RTOS? ============== 打开boards/BOARD_NAME/board.mk,修改BOOT_NEXT_STAGE := 2,重新编译 如何引导zImage? ============== 打开boards/BOARD_NAME/board.mk,修改BOOT_NEXT_STAGE := 1, KERNEL_IMAGE_TYPE := 0,重新编译 如何引导xImage? ============== 打开boards/BOARD_NAME/board.mk,修改BOOT_NEXT_STAGE := 1, KERNEL_IMAGE_TYPE := 1,重新编译 如何引导vmlinux? ============== 打开boards/BOARD_NAME/board.mk,修改BOOT_NEXT_STAGE := 1, KERNEL_IMAGE_TYPE := 2,重新编译 kernel编译: make vmlinux.bin 板极配置文件在哪里? ============== 在include/configs/BOARD_NAME.h 如何针对板子做特定初始化? ============== boards/BOARD_NAME/board.c中board_init()用于在引导前对板子 进行初始化,当然也可以没有 如何修改Soc各时钟频率? ============== include/configs/boards_common.h为默认值 打开板极头文件BOARD.h,去定义默认值再重新定义期望值 如何修改串口号以及波特率? ============== 打开include/configs/BOARD_NAME.h 修改: #define CONFIG_CONSOLE_BAUDRATE 3000000 #define CONFIG_CONSOLE_PC #define CONFIG_CONSOLE_INDEX 2 如何关闭系统串口打印? ============== 打开include/configs/BOARD_NAME.h #undef CONFIG_CONSOLE_ENABLE 如何添加自定义的kernel cmdline? ============== 打开include/configs/BOARD_NAME.h #define KERNEL_ARGS_BOARD "xxx " 系统没有32KHz晶振如何休眠唤醒? ============== 打开include/configs/BOARD_NAME.h 增加定义:#define CONFIG_RTCCLK_SRC_EXT 如何添加recovery引导功能? ============== 打开include/configs/BOARD_NAME.h 增加定义:#define CONFIG_RECOVERY 如何使能watch dog功能? ============== 打开include/configs/BOARD_NAME.h 增加定义:#define CONFIG_WDT 默认timeout为1000ms 通过#define CONFIG_WDT_TIMEOUT_MS修改默认值 x-loader中如何进入低功耗状态? ============== 打开include/configs/BOARD_NAME.h 增加定义:#define CONFIG_PM_SUSPEND 以及 #define CONFIG_PM_SUSPEND_STATE PM_SUSPEND_STANDY ---> CPU进入idle状态 #define CONFIG_PM_SUSPEND_STATE PM_SYSPEND_MEM ---> CPU进入sleep状态 在boards/BOARD_NAME/board.c中实现gpio_ss_table[][2]数组设置休眠状态,可以不实现 x-loader中如何进入USB烧录模式? ============== 打开include/configs/BOARD_NAME.h 增加定义:#define CONFIG_SOFT_BURN 在适当位置调用set_jump_to_usbboot();机器会重启进入烧录模式 烧录什么文件? ============== 编译完成会有提示:“Image: xxxxxx” is ready 添加了代码编译不过怎么办? ============== 首先确认代码没有超过12KByte,如果没有继续debug 引导不成功怎么办? ============== 1.执行make | tee make.txt 2.将out目录和make.txt打包 3.问题反馈 问题反馈:ZhangYanMing<[email protected]>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.