爱技术

 找回密码
 注册会员

QQ登录

只需一步,快速开始

微信登录

微信扫一扫,快速登录

搜索
查看: 880|回复: 0
收起左侧

[教程] linux on sx1 hao to

[复制链接]
发表于 2006-11-17 14:00:23 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?注册会员 微信登录

x
LINUX ON SX1 HOW-TO( by Vladimir Ananiev, Vovan888 at gmail dot com )
Tools needed:
  • firmware patch for loading uboot
  • uboot source
  • uboot precompiled binary
  • uboot sx1 patch: sx1.uboot.patch.v1.8.sxp
  • minicom
  • kermit
  • sx1.uboot.pdf
  • patch-2.6.15-rc4-omap1
  • patch-2.6.15-sx1
  • config-kernel
  • config-busybox
  • config-buildroot
  • arm-linux toolchain
Detecting amount of internal flashTo determine amount of SX1 internal flash you should read value at address 0x44 (0x50000044 in Symbian). You can use FCAMem for this, or Uboot. SX1# md 44 - should give you a value at 0x44. Then if it is 0x01000000 - you are lucky to have 32Mb flash, if 0x04000000 - you have old 24Mb strataflash.
BootloaderUniversal bootloader (U-Boot) has SX1 support. First copy sx1 uboot patch to uboot-1.1.4 dir and apply it
    cat patch-1.1.4-sx1  | patch -p1
Then type:
make SX1_config makeNow you have u-boot.bin ready. Then apply firmware patch sx1.uboot.patch.v1.8.sxp to original SX1 fw 15, it installs u-boot binary into disk Z replacing file z:\system\data\testserver.mbm. You should know how to apply patches, if not - visit http://forum.oslik.ru. After all this stuff you should have uboot running when pressing 9 + CAMERA buttons. Remember to plug in standart USB cable. To work with uboot console your linux kernel on host machine should have "usbserial" compiled as module and loaded with commands:
rmmod usbserial rmmod cdc_acmmodprobe usbserial vendor=0x0525 product=0xA4A6
Now after starting uboot you should see messages with "ttyUSB0" in system log. Read sx1.uboot.pdf for complete instructions on how to work with uboot.
KernelPut kernel patches into the 2.6.15-rc4 kernel sources: cat patch-2.6.15-rc4-omap1 | patch -p1 cat patch-2.6.15-sx1 | patch -p1
Then copy kernel-config to .config and place it into kernel source dir. Run
make menuconfig make
Alternatively you can use script mkimage.kernel.sh. It uses "mkimage" from uboot/tools. It will copy uImage (kernel binary in uboot format) to your home dir.
XIP KernelTo make use of XIP kernel you should flash it into internal flash. Connect to u-boot console, then do from it: SX1# loadb press Ctrl+A S, select uxipimage.bin,wait while uploadingSX1# protect off 1:192-214SX1# erase 1:192-214SX1# cp.b 10000000 01800000 $(filesize)SX1# protect on allSX1# setenv bootcmd bootm 01800000SX1# saveenvSX1# bootNow you should see linux kernel booting on SX1 LCD!
Running linuxYour host machine should have NFS server up and running. Unpack root filesystem image to /rootfs and export it with NFS - add this line to /etc/exports
/rootfs *(rw,sync,no_root_squash)

Start uboot, then from uboot console:
SX1# setenv bootargs root=/dev/nfs rw nfsroot=1.1.1.1:/rootfs,rsize=1024,wsize=1024,nolock ip=1.1.1.2 SX1# saveenvSX1# loadb
    now press Ctrl-A + S, choose uImage and send it to SX1.
SX1# bootm

    now you will see kernel booting on SX1 LCD screen.
Exit from uboot (Ctrl-A + X). Kernel uses USB Gadget Ethernet to establish network communication with host. So after a few seconds you should see new network device on host - usb0 attached in system logs. You should configure it with IP adress:
    ifconfig usb0 1.1.1.1
Now you should see kernel continue booting with NFS. Then it will be Busybox invitation on LCD. By default there is telnetd running on SX1, so you can login to it:
telnet 1.1.1.2 login: rootpassword: oslikSX1 >
For developersBy default keypad CAMERA key is binded to "soft reset" function. So after you see some error and want to get back to uboot simply press CAMERA + 9.
您需要登录后才可以回帖 登录 | 注册会员 微信登录

本版积分规则

小黑屋|Archiver|手机版|爱技术 ( 沪ICP备08115260号-3 )

GMT+8, 2024-5-11 22:32

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表