NetBSD support for the Mini2440
Git Repository
If you are interested in my latest development, I develop in the following git repository:
git://gitorious.org/mini2440-netbsd/mini2440-netbsd.git
The development is against netbsd-current.
Building a Kernel for MINI2440
The repository above supplies two kernel configurations for the MINI2440: MINI2440 which uses ld0f as root filesystem, and MINI2440_NFSROOT which uses a NFS root filesystem. Both configuration probably need to be adapted to your setup.
I use the build.sh-script to build both tools and the kernel itself. Assuming that the GIT repository has been checked out into /usr/local/netbsd/src, the following should build the MINI2440_NFSROOT kernel:
/usr/local/netbsd/src$ ./build -U -u -O ../obj -R ../release -m evbarm kernel=MINI2440_NFSROOT
Once the kernel has been build, the stage2 boot loader for u-boot can be build by going to sys/arch/evbarm/mini2440/stand/uboot_stage2 and building it:
/usr/local/netbsd/src$ cd sys/arch/evbarm/mini2440/stand/uboot_stage2/usr/local/netbsd/src/sys/arch/evbarm/mini2440/stand/uboot_stage2$ nbmake-evbarm
Assuming that the mkimage tool from uboot is available in PATH, a uboot image can be created with the following command-line (the image is placed in /tmp/netbsd.img):
LOADER=/usr/local/netbsd/src/sys/arch/evbarm/mini2440/stand/uboot_stage2/uboot_stage2KERNEL=/usr/local/netbsd/obj/sys/arch/evbarm/MINI2440_NFSROOT/netbsdmkimage -A arm -O netbsd -T multi -C none -a 32000000 -e 32000000 -d $LOADER:$KERNEL
Booting NetBSD on the MINI2440
If the netbsd.img is placed on a FAT parition on a SD-card, NetBSD can be booted with the following command sequence in uboot:
MINI2440 # mmcinitMINI2440 # fatload mmc0 0 0x31000000 netbsd.imgMINI2440 # bootm 0x31000000## Transferring control to NetBSD stage-2 loader (at address 32000000) ...S3C: CLK=405 HCLK=101 PCLK=50 UCLK=48S3C: CLK=405 HCLK=101 PCLK=50 UCLK=48Countdown duration is: 5sMINI2440 NetBSD BootingImage address: 0x31000000entry=0x30050000, nsym=1, ssym=0xc026d9b8, esym=0xc02b8974consinit doneBootloader args are NetBSD/evbarm (MINI2440) booting ...
Supported Features
The table reflects that status of the git-repository.
| Feature | Status |
| Basic support for S3C2440 | Done, boots both QEMU and real hardware. |
| S3C2440 UART | Done |
| DM9000 (MAC+PHY) | Partially Done: Works on the Mini2440 but only supports 16-bit transfer mode, and is generally a bit hacked. |
| S3C2440 SD Controller | Partially Done:
|
| S3C2440 DMA Controller | Partially Done: Supported well enough to use for transfers to/from the SD cards and the I2S bus:
|
| S3C2440 IIS Bus | Simple interface which supports playback and recording in Master mode only. |
| S3C2440 NAND Flash Controller | Not Supported |
| S3C2440 LCD Controller | The S3C24x0 driver in netbsd-5 drives the LCD controller of the S3C2440 as well. The driver does, however, need some work. |
| FriendlyArm 7" LCD | Not Supported |
| FriendlyArm 3,5" LCD | Supported, but timings are not completely correct. |
| S3C2440 USB Host Controller | OHCI, works out-of the box with NetBSD OHCI drivers. |
| S3C2440 USB Device Controller | Not Supported |
| S3C2440 Touchscreen | Basic driver that provides a wscons mouse device and uses tpcalib for calibration. A simple averaging filter is used to improve readings, which is a bit primitive. |
| UDA1341TS (audio codec) | Supports playback, recording and most of the mixer controls. |
| S3C2440 RTC | Not Supported |
Patches
Use GIT repository above instead of these patches. They are still listed here for completeness only.
| mini2440-20091028.patch |
|
| mini2440-20091125.patch |
|
| mini2440-20091228.patch |
|
| mini2440-20100108.patch |
|
Modified: Tue 13-Jul-10 23:10:31 PDT