移植kernel-3.10.79 (1)

u-boot 使用u-boot-2014.10

find * -name "*2410*_defconfig"
find * -name "*2440*_defconfig"

可以看到
arch/arm/configs/mini2440_defconfig
arch/arm/configs/s3c2410_defconfig

下载命令:

set serverip 192.168.1.104
kernel:
  tftp 30000000 uImage
  nand erase 0x000c0000 0x500000
  nand write.jffs2 30000000 0xc0000 0x500000
  set machid 16a

1 基本修改

1.1 GCC

export  PATH=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/flinn/tools/4.4.3/bin

1.2 Makefile

ARCH            ?= arm
CROSS_COMPILE   ?= arm-linux-

或者

ARCH            ?= arm
CROSS_COMPILE   ?= /home/flinn/tools/4.4.3/bin/arm-none-linux-gnueabi-

1.3 编译

make s3c2410_defconfig;make    uImage    // s3c2410_defconfig肯定比mini2440_defconfig更全面些

这里s3c2410_defconfig肯定有开发板的支持, 编译出来的uImage会很大。执行make menuconfig裁剪

1.4 烧录

Uncompressing Linux... done, booting the kernel.

        Error: unrecognized/unsupported machine ID (r1 = 0x000000c1).

        Available machine support:

        ID (hex)        NAME
        000007cf        MINI2440
        0000016a        SMDK2440

1.5 设置u-boot参数machid

  set machid 16a
  boot后 乱码
  set machid 7cf,正常
  可知smdk2440时钟有问题

1.6 修改时钟

  vim arch/arm/mach-s3c24xx/mach-smdk2440.c

  

smdk2440_map_io
            s3c24xx_init_clocks(16934400);   //改成12000000

烧录启动:

0x000000000000-0x000000004000 : "Boot Agent"
        mtd: partition "Boot Agent" doesn‘t end on an erase block -- force read-only
        0x000000000000-0x000000200000 : "S3C2410 flash partition 1"

1.7 修改分区

  注意:最小单位128K,否则
  mtd: partition "device_tree" doesn‘t end on an erase block -- force read-onl

  vim arch/arm/mach-s3c24xx/common-smdk.c

  

static struct mtd_partition smdk_default_nand_part[] = {
        [0] = {
                .name   = "bootloader",
                .size   = SZ_512K,
                .offset = 0,
        },
        [1] = {
                .name   = "device_tree",
                .offset = MTDPART_OFS_APPEND,
                .size   = SZ_128K,
        },
        [2] = {
                .name   = "params",
                .offset = MTDPART_OFS_APPEND,
                .size   = SZ_128K,
        },
        [3] = {
                .name   = "kernel",
                .offset = MTDPART_OFS_APPEND,
                .size   = 0x500000,          // 5M
        },
        [4] = {
                .name   = "root",
                .offset = MTDPART_OFS_APPEND,
                .size   = MTDPART_SIZ_FULL,
        }
            };

  新分区:

  

device nand0 <smdk2440-0>, # parts = 5
 #: name                size            offset          mask_flags
 0: bootloader          0x00080000      0x00000000      0
 1: device_tree         0x00020000      0x00080000      0
 2: params              0x00020000      0x000a0000      0
 3: kernel              0x00500000      0x000c0000      0
 4: rootfs              0x0fa40000      0x005c0000      0

  设置u-boot

  #define CONFIG_BOOTCOMMAND "nand read.jffs2 0x30007FC0 kernel; nand read.jffs2 32000000 device_tree; bootm 0x30007FC0 - 0x32000000"

原文地址:https://www.cnblogs.com/hulig7/p/9924182.html

时间: 2024-08-03 01:11:47

移植kernel-3.10.79 (1)的相关文章

移植kernel-3.10.79 (1) 支持 yaffs

网站: http://www.yaffs.net/ 获取方法: 执行git clone git://www.aleph1.co.uk/yaffs2 解压:tar zxf yaffs_source.tar.gz 打补丁: #cd /work/tmp/yaffs2 // cd yaffs-dir #./patch-ker.sh c m ~/mini2440/linux-3.10.79 // ./patch-ker.sh c m linux-tree make menuconfig File Syst

Implement a System Call in Kernel 3.10.56 (X86_64)

Implementing a system call in Kernel 2.6.32 is somehow different from the method in Kernel 3.10.56. In kernel 2.6.32, we should register the system call number in the file /arch/x86/include/asm/unistd_64.h and then add the corresponding function prot

Install a new Linux Kernel (3.10.56) in Guest OS (Dom U)

These days I want to install a new Linux kernel in Guest Operating System. The original version of Guest OS is 2.6.32, but I need a kernel version 3.10. I have tried several ways and following steps is just one of methods which can work: 1. We should

ARM开发板系统移植-----kernel的编译

前面一篇文章http://www.cnblogs.com/linzizhang/p/4817336.html介绍了开发板上系统软件的第一部分--bootloader的编译方法. 背景:把bootloader烧写到开发板的Nand Flash中后,开发板从Nand启动,硬件会自动将bootloader加载到内存中运行,bootloader将板载资源都初始化完成后,会停留在一个命令行界面,接收并执行用户敲入的命令.这时候用户可以通过命令控制开发板,比如查看参数列表:print.读写nand:nand

I.MX6Q(TQIMX6Q/TQE9)学习笔记——新版BSP之kernel移植

前篇文章已经在tqimx6q上成功跑起了新版BSP的uboot,本文来配置下新版BSP的kernel,使kernel能在tqimx6q上正常启动. 准备工作 每次移植kernel的时候都会做的工作就是找到与当前开发板接近的config,其实uboot移植的时候也是一样的.由于tqimx6q的芯片是imx6q的,所以,还是以mx6q_sabresd为例.另外,自己动手移植BSP时应该充分使用官方文档,本人以为,以下文档是非常有用的: (1) i.MX 6 BSP Porting Guide: 该文

《连载 | 物联网框架ServerSuperIO教程》-4.如开发一套设备驱动,同时支持串口和网络通讯。附:将来支持Windows 10 IOT

感谢唯笑志在分享 原博主原地址:http://www.cnblogs.com/lsjwq/ 注:ServerSuperIO有可能被移植到Windows 10 IOT上,那么将来有可能开发一套设备驱动,可以支行在服务端.嵌入式设备中,将形成完整的解决方案.       现在已经调试通过部分代码,还得需要一段时间,一般都是晚上干,时间也有限.如下图: 目       录 4.如开发一套设备驱动,同时支持串口和网络通讯... 2 4.1           概述... 2 4.2          

Cocos2d-x移植到Android平台编译的两个文件Android.mk和Application.mk

背景 首先,说说文章的背景.最近手中的一个项目,由于需求中要求提供Web界面的打印功能,当然如果没有打印机,还可以提供保存到本地.项目组长把这个"小任务"分给了我.本着努力为组长分忧解难的思想,领了任务之后,就马上开始了工作. 问题 刚开始的时候,组长给了一个工具(jatoolsprinter)让我研究,我用了一个多小时的时间,做出了一个简单的Demo,然后就是各种的测试,由于 web 打印需要浏览器安装 ActiveX 组件,在随后的测试中,我用了几款浏览器,甚至把安全级别都调到了最

嵌入式开发之web服务器---boa移植

近段时间在做ti8148的编解码器又涉及到boa web服务器的移植.在移植到ARM开发板的过程中,遇到很多的问题.原先的自带thttpd 由于功能没有boa完善,比如在ubuntu下面的utf-8编码的网页在thttpd中给客户浏览器显示的是默认ios欧洲乱码,但是boa显示正常,就干掉了 现将移植步骤整理如下:(其中涉及到个人习惯和路径问题,视各自情况而定) 1.下载源码: 下载网址http://www.boa.org/boa-0.94.13.tar.gz,但实际上下载的包为boa-0.94

【Windows10&nbsp;IoT开发系列】API&nbsp;移植工具

原文:[Windows10 IoT开发系列]API 移植工具 Windows 10 IoT Core 中是否提供你的当前 Win32 应用程序或库所依赖的 API? 如果不提供,是否存在可使用的等效 API? 此工具可以为你回答这些问题,并协助你将你的当前 Win32 应用程序和库迁移到 Windows IoT Core. Windows 10 IoT 核心版 API 移植工具可在 ms-iot/iot-utilities github 存储库中找到.下载存储库 zip 并将 IoTAPIPor