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 -T ../tools -m evbarm tools kernel=MINI2440_NFSROOT
Once the kernel has been build, the bootloader can be build by going to sys/arch/evbarm/mini2440/stand/bootloader and building it:
/usr/local/netbsd/src$ cd sys/arch/evbarm/mini2440/stand/bootloader /usr/local/netbsd/src/sys/arch/evbarm/mini2440/stand/bootloader$ nbmake-evbarm
Note that this assumes that the path to nbmake-evbarm has to be in the path (probably located in /usr/local/netbsd/tools/bin),
The bootloader will as default try to load netbsd.elf from ld0e, and then try to boot via DHCP. This can be configured by editing Makefile (-DDEFAULT_BOOTFILE define).
Booting NetBSD on the MINI2440
The bootloader is to be placed at 0x30A00000 in memory, and it will figure out how to place the kernel correctly.
Assuming that the bootloader is located on the first FAT partition on an SD-card, NetBSD can be booted with the following sequence in uboot:
MINI2440 # mmcinit MINI2440 # fatload mmc0 0 0x30A00000 bootmini2440 MINI2440 # go 0x30A00000 ...
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: Thu 17-Feb-11 05:58:16 PST