AT91RM9200 & uClinux
- Copy & Unpack uClinux distributive to opt cp uClinux-dist-20041215.tar.bz2 /opt cd /opt tar -xjvf ./uClinux-dist-20041215.tar.bz2
- Copy & Unpack Atmel Linux kernel to uClinux tree cp linux-2.4.19-rmk7.tar.gz /opt/uClinux-dist cd /opt/uClinux-dist tar -xzvf linux-2.4.19-rmk7.tar.gz
- Copy & apply EVM9200 support for linux-2.4.19-rmk7 cp linux-2.4.19-rmk7-EVM9200.patch /opt/uClinux-dist cd /opt/uClinux-dist cat ./linux-2.4.19-rmk7-EVM9200.patch | patch -p0
If you board differ from EVM9200. Don't apply linux-2.4.19-rmk7-EVM9200.patch.
ln -s /opt/uClinux-dist/linux-2.4.19-rmk7 /opt/uClinux-dist/linux-2.4.19.rmk7.x
- Copy & Apply EVM9200 support for uClinux cp EVM9200-uClinux-20041215.patch /opt cd ./opt cat ./EVM9200-uClinux-20041215.patch | patch -p0
- Configure linux-2.4.19-rmk7 & uClinux user applications
type: make menuconfig
Then from 'Vendor/Product Selection' dialog Select Vendor: '(Atmel) Vendor' Select Product: '(EVM9200)'
If you board differ select another board type.
Return to main menu. From main menu select item:'Kernel/Library/Default Selection'
Then from 'Kernel/Library/Default Selection' dialog Select kernel version:(linux-2.4.19-rmk7.x) and Libc Version : (glibc)
Return to main menu. Select "Exit" to exit from 'make menuconfig' utility.
- Compile linux-2.4.19-rmk7 & uClinux user applications
type:
make dep 2>&1 | tee make_dep.out make | tee make.out
files appear:
/opt/uClinux-dist/images/ucImage /opt/uClinux-dist/images/ucInitrd
- Update kernel image via u-boot.
u-boot>tftpboot 20800000 ucImage u-boot>protect off 10020000 100BFFFF u-boot>erase 10020000 100BFFFF u-boot>cp.b 20800000 10020000 9FFFF
where: u-boot> - u-boot prompt
tftpboot - u-boot load file via tftp protocol command
20800000 - SDRAM load address ucImage - linux kernel imageuImage must be located at the host tftp server download directory (Linux host) /tftpboot
protect - u-boot flash protect on/off command off - disable protection
10020000 - start flash address 100BFFFF - end flash addresserase - u-boot flash erase command
10020000 - start flash erase address 100BFFFF - end flash erase addresscp.b - u-boot byte copy command
20800000 - SDRAM source address 10020000 - flash destination address 9FFFF - bytes copy
- Update linux initrd via u-boot tftp.
If initrd is in parallel flash: u-boot>tftpboot 20800000 ucInitrd u-boot>erase 100C0000 101EFFFF u-boot>cp.b 20800000 100C0000 12FFFF
If in AT45DB642: u-boot>tftpboot 20800000 ucInitrd u-boot>protect off C0000000 C001FFFF u-boot>cp.b 20800000 C0000000
- Set u-boot environment variables. for 32Mb SDRAM: u-boot>setenv bootargs root=/dev/ram rw initrd=0x20800000,0x400000 ramdisk_size=8000 console=ttyS0,115200 mem=32M or for 16Mb SDRAM: u-boot>setenv bootargs root=/dev/ram rw initrd=0x20800000,0x400000 ramdisk_size=8000 console=ttyS0,115200 mem=16M
u-boot>bootcmd bootm 10020000 100C0000
or if initrd disk in AT45DB642:
u-boot>bootcmd bootm 10020000 C0000000
u-boot>saveenv
- Reboot target.
Best Regards, Dmitriy Ckerkashin.