树莓派学习

想搞搞树莓派买了一块都没碰,还是要勤奋点啊。

昨天安装好了编译器啥的,把内核编了,比较简单没有碰到什么难度很大的问题。
但是今天找bootloader的时候发现不太对头。查了一下发现了一下
树莓派大致的启动步骤

看到这一段

At power-up, the CPU is offline, and a small RISC core on the GPU is responsible for booting the SoC, therefore most of the boot components are actually run on the GPU code, not the CPU.

The boot order and components are as follows:

1.First stage bootloader - This is used to mount the FAT32 boot partition on the SD card so that the second stage bootloader can be accessed. It is programmed into the SoC itself during manufacture of the RPi and cannot be reprogrammed by a user.
2.Second stage bootloader (bootcode.bin) - This is used to retrieve the GPU firmware from the SD card, program the firmware, then start the GPU.
3.GPU firmware (start.elf) - Once loaded, this allows the GPU to start up the CPU. An additional file, fixup.dat, is used to configure the SDRAM partition between the GPU and the CPU. At this point, the CPU is release from reset and execution is transferred over.
4.User code - This can be one of any number of binaries. By default, it is the Linux kernel (usually named kernel.img), but it can also be another bootloader (e.g. U-Boot), or a bare-bones application.

为了自己方便看,翻了一下
大致意思
是上电的时候,cpu是不在线的,一个gpu伤的小系统会负责启动soc,所以大部分的启动都是在gpu上面完成的,而不是在cpu
启动顺序如下:
- 第一阶段:这一步是用来挂载sd卡上的fat32启动分区的,运行之后才能进行第二阶段的启动。这一步是被厂家编写在soc中的,并且不能被用户修改。
- 第二阶段(bootcode.bin):这是用来检索sd卡内的gpu软件的,运行该软件,启动gpu
- 第三阶段(start.elf):加载后,这个就允许gpu启动cpu,一个附加的文件fixup.dat,用来设置gpu和cpu之间的sdram分区,在这个时候,cpu就开始跑了。
- 第四阶段:用户代码:这里就有很多选择了,默认情况下是名为kernel.img的linux 内核,但是也可以是另外一些bootloader,比方uboot,或者是一些裸机程序。

大概是这个意思。有错误请指正。
第一部分是集成的所以不需要
第二部分是bootcode.bin
第三部分是start.elf和一个附加的fixup.dat
第四部分就是自己的代码了

那么接下去就要去找这些东西了。

在传说中世界最大男性同性交友网站github上轻轻松松就找到了
github上关于树莓派启动的文件
待会儿试试行不行

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值