Altera SoC 内核更新3.7到3.10

时间:2024-09-01 12:33:26
为什么需要更新呢?其实是为了更好的搭建自己的开发环境,同时熟悉altera对代码的更新和管理方式,便于进一步的熟悉和了解altera SoC开发过程。
1、下载linux代码:
  1. git clone git://git.rocketboards.org/linux-socfpga.git
2、进入代码路径:
  1. cd linux-socfpga

3、查看远程分支有哪些版本

  1. git branch -r

可以看到有很多的版本,我选择了socfpga-3.10

  1. leo@chen:~/altera/linux-src/linux-socfpga$ git branch -r
  2. origin/HEAD -> origin/master
  3. origin/master
  4. origin/socfpga-3.10
  5. origin/socfpga-3.10-ltsi
  6. origin/socfpga-3.10-ltsi-rt
  7. origin/socfpga-3.11
  8. origin/socfpga-3.12
  9. origin/socfpga-3.13
  10. origin/socfpga-3.13-rel14.0
  11. origin/socfpga-3.14
  12. origin/socfpga-3.15
  13. origin/socfpga-3.16
  14. origin/socfpga-3.17
  15. origin/socfpga-3.4-ltsi
  16. origin/socfpga-3.6
  17. origin/socfpga-3.7
  18. origin/socfpga-3.7-ghrd
  19. origin/socfpga-3.8
  20. origin/socfpga-3.9
  21. origin/socfpga-3.9-rel
  22. origin/socfpga-3.9-rel-amp

4、获取Linux3.10代码:

  1. git checkout -t -b socfpga-3.10 origin/socfpga-3.10

5、指定交叉编译环境路径

  1. export CROSS_COMPILE=/tool/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-

6、编译linux,生成zImage

  1. make ARCH=arm socfpga_defconfig
  2. make ARCH=arm zImage

编译完成以后,可以看到以下信息

  1. ......... ...........................................................

7、替换SD卡中的zImage文件

8、上电运行,可看到以下信息

Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Linux version 3.10.0-00208-gc29c849 (leo@chen) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #3 SMP Mon Feb 23 17:12:46 CST 2015
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Altera SOCFPGA Cyclone V
Truncating RAM at 0x00000000-0x40000000 to -0x2f800000
Memory policy: Data cache writealloc
PERCPU: Embedded 8 pages/cpu @ef1e4000 s11008 r8192 d13568 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 193040
Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait fbmode=VGA
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 763272K/778240K available (5567K kernel code, 267K rwdata, 1516K rodata, 390K init, 134K bss, 14968K reserved)

至此3.10系统已经可以顺利运行啦