arm-linuxgcc version 4.3.2 经过试验,最高可以编译到 linux-4.1.36 ,在高的版本会有错误 ,可能是 GCC 编译器版本较低造成。

解压比较麻烦还要装一个 xz xz -d ,我是用 7z-zip 在电脑上解好,传 tar 上去解包。
修改 makefile
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-

find -name *24*_defconfig 查找出来有的配置项
./arch/arm/configs/s3c2410_defconfig
./arch/arm/configs/mini2440_defconfig

s3c2410_defconfig 也包含 2440 machid
vi /arch/arm/mach-s3c24xx/mach-smdk2440.c 修改 晶振为 12000000
vi /arch/arm/mach-s3c24xx/common-smdk.c 修改 nand flash 分区信息

 static struct mtd_partition smdk_default_nand_part[] = {
[] = {
.name = "uboot",
.size = SZ_256K,
.offset = ,
},
[] = {
.name = "env",
.offset = MTDPART_OFS_APPEND,
.size = SZ_128K,
},
[] = {
.name = "kernel",
.offset = MTDPART_OFS_APPEND,
.size = SZ_2M,
},
[] = {
.name = "rootfs",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
}
};

make s3c2410_defconfig
make menuconfig
启用 EABI
[*] Use the ARM EABI to compile the kernel
[*] Allow old ABI binaries to run with this kernel (EXPERIMENTAL)
make uImage
Image arch/arm/boot/uImage is ready
cp arch/arm/boot/uImage /nfs_fs

查看 u-boot 2016 中配置的机器 ID
/arch/arm/lib/bootm.c boot_jump_linux()
从 gd 中取出来
unsigned long machid = gd->bd->bi_arch_number;

在 /board/samsung/smdk2440/smdk2440.c 中进行设置

/arch/arm/include/asm/mact-types.h 中定义
#define MACH_TYPE_SMDK2410 193

s = getenv("machid");
从 env 中取出来

随意乱设个 machid 启用就会报错,显示出来所有 可用的 machid
set machid 12345
nfs 0x32000000 192.168.1.100:/nfs_fs/uImage;bootm 0x32000000

因为是未知的 machid 所以报错
000007cf MINI2440
0000016a SMDK2440

..........
set machid 16a

加上波特率配置,不加也会乱码
set bootargs root=/dev/mtdblock3 init=/linuxrc console=ttySAC0,115200

bdinfo  可以查看 gd 信息

开启串口调试,有错误就能显示出来,否则什么也不显示。不知道哪里出错了。
Device Drivers
Character devices
Serial drivers
Samsung SoC serial debug

制作 文件系统 参考之前的博文 http://www.cnblogs.com/ningci/p/5261567.html

1, 制作 jffs2 文件系统
mkfs.jffs2 -n -s 2048 -e 128KiB -d new_1.24 -o new_1.24.jffs2

nfs 0x30000000 192.168.1.100:/nfs_fs/new_1.24.jffs2
nand erase.part root
nand write.jffs2 0x30000000 260000 3bc24c

set bootargs root=/dev/mtdblock3 init=/linuxrc console=ttySAC0,115200 rootfstype=jffs2
set machid 16a
nfs 0x30000000 192.168.1.100:/nfs_fs/uImage;bootm 0x30000000

烧写试验 能挂载文件系统

2, 添加 yaffs2 支持
http://www.yaffs.net/
git clone git://www.aleph1.co.uk/yaffs2
下载解压,打补丁
./patch-ker.sh c m /home/linux-4.1.24
make uImage
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_readpage_nolock':
fs/yaffs2/yaffs_vfs.c:286: error: 'struct file' has no member named 'f_dentry'
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_hold_space':
fs/yaffs2/yaffs_vfs.c:484: error: 'struct file' has no member named 'f_dentry'
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_release_space':
fs/yaffs2/yaffs_vfs.c:502: error: 'struct file' has no member named 'f_dentry'
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_file_write':
fs/yaffs2/yaffs_vfs.c:594: error: 'struct file' has no member named 'f_dentry'
fs/yaffs2/yaffs_vfs.c:606: error: 'struct file' has no member named 'f_dentry'
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_file_flush':
fs/yaffs2/yaffs_vfs.c:730: error: 'struct file' has no member named 'f_dentry'
fs/yaffs2/yaffs_vfs.c: At top level:
fs/yaffs2/yaffs_vfs.c:780: error: 'new_sync_read' undeclared here (not in a function)
fs/yaffs2/yaffs_vfs.c:781: error: 'new_sync_write' undeclared here (not in a function)
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_iterate':
fs/yaffs2/yaffs_vfs.c:1730: error: 'struct file' has no member named 'f_dentry'
make[2]: *** [fs/yaffs2/yaffs_vfs.o] Error 1
make[1]: *** [fs/yaffs2] Error 2
make: *** [fs] Error 2

fs/yaffs2/yaffs_vfs.c 中 file 结构体定义变了
f_dentry 替换为 f_path.dentry

780 缺少函数

搜了一下有这个函数 /fs/read_write.c
static ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos)
前面加有 static 外面用不了,经过试验,发现不使用这2行也正常工作。所以改为如下。
#if 0
.read = new_sync_read,
.write = new_sync_write,
#endif

制作 yaffs2 文件
mkyaffs2image new_1.24 new_1.24.yaff2

nfs 0x30000000 192.168.1.100:/nfs_fs/new_1.24.yaff2
nand erase.part root
nand write.yaffs 0x30000000 260000 797640

set bootargs root=/dev/mtdblock3 init=/linuxrc console=ttySAC0,115200
set machid 16a
nfs 0x30000000 192.168.1.100:/nfs_fs/uImage;bootm 0x30000000

linux-3.4.112 正常,不用任何修改,打上 yaffs 补丁就能使用

yaffs 操作比 jfss 快不少。

最后 内核裁剪,没难度,去掉不用的东西变小就行。

s3c2440 移值新内核 linux-4.1.36的更多相关文章

  1. dm9000c 移值新内核 linux-4.1.24

    错误 1 /home/dm9000/dm9dev9000c.c:309: error: conflicting types for 'phy_read'include/linux/phy.h:637: ...

  2. s3c2440 移值u-boot-2016.03 第6篇 支持mtd yaffs 烧写

    1, 解决启动时的错误 Warning - bad CRC, using default environment 搜索发现 在 /tools/env/fw_env.c 中 /* 放在NAND FLAS ...

  3. s3c2440 移值u-boot-2016.03 第2篇 支持Nand flash启动

    1, 要求:在4K 的代码以内,完成 NOR NAND 类型判断,初始化 NAND 复制自身到 SDRAM ,重定向. 2, 在 /arch/arm/cpu/arm920t/ 文件夹里 添加一个 in ...

  4. s3c2440 移值u-boot-2016.03 第3篇 支持Nor flash 识别

    当选择,NOR flash 启用时,才可以访问 NOR FLASH ./common/board_r.c 364 line:initr_flash()flash_size = flash_init() ...

  5. s3c2440 移值u-boot-2016.03 第1篇 新建单板

    目前除RC版外,最新的就是 u-boot-2016.03.tar.bz2 ,大概看了几个年份的u-boot 发现,现在 更像是 linux kernel .有 menuconfig . 对比2012年 ...

  6. s3c2440 移值u-boot-2016.03 第5篇 支持dm9000 识别

    1, 通过查看 /drivers/net/Makefile 发现想要编译上,需要添加宏 /include/configs/smdk2440.h 中添加 #define CONFIG_DRIVER_DM ...

  7. s3c2440 移值u-boot-2016.03 第4篇 支持NAND flash 识别

    1, /include/configs/smdk2440.h 中添加 #define CONFIG_CMD_NAND 编译 drivers/mtd/nand/built-in.o: In functi ...

  8. linux如何编译安装新内核支持NTFS文件系统?(以redhat7.2x64为例)

    内核,是一个操作系统的核心.它负责管理系统的进程.内存.设备驱动程序.文件和网络系统,决定着系统的性能和稳定性.Linux作为一个自由软件,在广大爱好者的支持下,内核版本不断更新.新的内核修订了旧内核 ...

  9. linux新内核的freeze框架以及意义【转】

    转自:https://blog.csdn.net/dog250/article/details/5303442 linux的电源管理发展非常迅速,比如在挂起到内存的时候,系统会冻结住所有的进程,也就是 ...

随机推荐

  1. 李洪强iOS经典面试题132-版本控制

    面试过程中,可能会问及一些关于版本控制的问题,理解下SVN和Git的原理,记住常用命令即可. SVN SVN 是集中式源代码管理工具 概念: 1> Repository 代码仓库,保存代码的仓库 ...

  2. [LintCode] Count and Say 计数和读法

    The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221 ...

  3. Logistic Regression Vs Decision Trees Vs SVM: Part I

    Classification is one of the major problems that we solve while working on standard business problem ...

  4. HTML静态网页 图片热点、框架、表单

    图片热点: 规划出图片上的一个区域,可以做出超链接,直接点击图片区域就可以完成跳转的效果. 示例: 网页划区: 在一个网页里,规划出一个区域用来展示另一个网页的内容. 示例: 框架: 1.frames ...

  5. 关于ueditor1_4_3 上传出现无法加载配置的问题

    我的解决方案是: 1. 检查 ueditor.config.js  中的 serverUrl: URL + "/net/controller.ashx" 的配置,记得一定用绝对路径 ...

  6. [转]Oracle版本号解释

    注意: 在oracle 9.2 版本之后, oracle 的maintenance release number 是在第二数字位更改. 而在之前,是在第三个数字位. 1. Major Database ...

  7. cocos2d-x-3.1.1 创建项目

    cocos new 项目名  -p 包名 -l  语言 -d 路径 cmd 输入以下命令 cocos new HelloLua -p com.wcc.hellolua -l lua -d E:\coc ...

  8. github page 构建自己的页面

    新建一个仓库.命名为:<你的账号>.github.io 然后上传一个index.html即可 打开浏览器输入:<你的账号>.github.io 即可访问

  9. svn文件批量清除

    svn文件批量清除 http://files.cnblogs.com/files/douxuyao/clearsvn.rar

  10. 上传下载后台函数以及前端脚本(webuploader) 备份

    import java.io.BufferedOutputStream; import java.io.IOException; import java.io.InputStream; import ...