日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux-3.4.2移植到FL2440上(一)--只是基本移植

發(fā)布時間:2023/12/20 linux 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux-3.4.2移植到FL2440上(一)--只是基本移植 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1.修改
Makefile:
ARCH??????????? ?= arm
CROSS_COMPILE?? ?= arm-linux-

2.修改串口時鐘:
在/arch/arm/mach-s3c24xx/mach-smdk2440.c
改為12M
s3c24xx_init_clocks(12000000);/* by zhutao */

3.裁剪內(nèi)核:
? │???? -> System Type????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? │ ?
? │?????? -> SAMSUNG S3C24XX SoCs Support
? │ │?????????????????????????????????? *** S3C24XX SoCs ***????????????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [ ] SAMSUNG S3C2410?????????????????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [ ] SAMSUNG S3C2412?????????????????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [ ] SAMSUNG S3C2416/S3C2450?????????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [*] SAMSUNG S3C2440?????????????????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [ ] SAMSUNG S3C2442?????????????????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [ ] SAMSUNG S3C2443?????????????????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????????? *** S3C2440 Boards ***??????????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [ ] Simtec Electronics ANUBIS???????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [ ] Avantech AT2440EVB development board????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [ ] MINI2440 development board??????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [ ] NexVision NEXCODER 2440 Light Board?????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [ ] Simtec IM2440D20 (OSIRIS) module????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [ ] HP iPAQ rx3715??????????????????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [*] SMDK2440????????????????????????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [*] SMDK2440 with S3C2440 CPU module? ?
只留下這些。

4.添加串口調(diào)試打印:

???? -> Device Drivers?????????????????????????????????????????????????????????????????????????????????????????????????????????????????? │ ?
? │?????? -> Character devices????????????????????????????????????????????????????????????????????????????????????????????????????????????? │ ?
? │???????? -> Serial drivers

?│?????????????????????????????? <*> Samsung SoC serial support??????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [*] Samsung SoC serial debug????????????????????????????????????????????????????????????????????????? │ │ ?
? │ │?????????????????????????????? [*] Support for console on Samsung SoC serial port??? ?

這三個選上。

5.make zImage

6.啟動后出現(xiàn)如下錯誤
Starting kernel ...??????????????????????????????????????????????????????????? ?
?????????????????????????????????????????????????????????????????????????????? ?
Uncompressing Linux... done, booting the kernel.?????????????????????????????? ?
s3c24xx_serial_probe(c04798e0) 0?????????????????????????????????????????????? ?
s3c24xx_serial_probe: initialising port c0467dbc...??????????????????????????? ?
s3c24xx_serial_init_port: port=c0467ddc, platdev=c04798e0????????????????????? ?
resource c0458670 (50000000..50003fff)???????????????????????????????????????? ?
port: map=50000000, mem=f7000000, irq=70 (70,71), clock=1????????????????????? ?
???????????????????????????????????????????????????????? s3c24xx_serial_probe: t
s3c24xx_serial_console_setup: co=c04680d4 (0), (null)????????????????????????? ?
s3c24xx_serial_console_setup: port=c0467ddc (0)??????????????????????????????? ?
s3c24xx_serial_get_options: port=c0467ddc???????????????????????????? //ulcon = 3=11b 串口設(shè)置為8N1模式??????? ?
registers: ulcon=00000003, ucon=000003c5, ubdriv=0000001a???????????? //ucon=000003c5=1111000101b?? UBRDIVn=11 = FCLK/n???????? ?
calculated baud 0????????????????????????????????????????????????????????????? ?
s3c24xx_serial_console_setup: baud 0?????????????????????????????????????????? ?
udivslot = 4a52 (div 6)??????????????????????????????????????????????????????? ?
config: 8bits/char???????????????????????????????????????????????????????????? ?
setting ulcon to 00000003, brddiv to 81, udivslot 00004a52�����������

執(zhí)行到這個文件:/drivers/tty/serial/samsung.c

?? ?spin_lock_irqsave(&port->lock, flags);
?? ?/* 在下面是 */
/*
?? ?dbg("setting ulcon to %08x, brddiv to %d, udivslot %08x\n",
?? ???? ulcon, quot, udivslot);?? ??? ??? ??? ??? ?/* 這一句打印了 */

?? ?wr_regl(port, S3C2410_ULCON, ulcon);?? ?
?? ?wr_regl(port, S3C2410_UBRDIV, quot);?? ?
?? ?wr_regl(port, S3C2410_UMCON, umcon);

?? ?if (ourport->info->has_divslot)
?? ??? ?wr_regl(port, S3C2443_DIVSLOT, udivslot);
*/
?? ?dbg("uart: ulcon = 0x%08x, ucon = 0x%08x, ufcon = 0x%08x\n",?? ?/* 打印這一句就亂碼了 */
?? ???? rd_regl(port, S3C2410_ULCON),
?? ???? rd_regl(port, S3C2410_UCON),
?? ???? rd_regl(port, S3C2410_UFCON));

所以注釋掉上面綠色部分,再編譯啟動后,就沒有打印問題了。

轉(zhuǎn)載于:https://www.cnblogs.com/chrispauls/p/4014229.html

總結(jié)

以上是生活随笔為你收集整理的linux-3.4.2移植到FL2440上(一)--只是基本移植的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。