Q: I am having trouble compiling uClinux-2.0.38.1pre7 for M68EZ328ADS.
======================================================================

A: M68EZ328ADS support in uClinux-2.0.38.1.pre7 is broken. In fact, I noticed that it is broken in all official 2.0.38.1preX releases.

I didn't notice it before, because 1) I had no personal need in upgrading my kernel 2) I was always referring people to my private images on ftp.employees.org

The bad news is that I don't have fixes for pre7 yet. It might take some time, though not too much, I hope.

The good news is that I just put precompiled pre1-based images for M68EZ328ADS on ftp.employees.org. For most of the stuff that you can do with the board (for now) pre1 is as good as pre7.

Of course, the diffs against 2.0.38.1pre1 are also there.

ftp://ftp.employees.org/vag/uClinux/release/uClinux-2.0.38.1pre1-vag

Q: How can I communicate with the board using Linux?
====================================================

A: You can get a kermit script "bbug" which implements most of the functionality of BBUG.EXE utility provided by Motorola. ftp://ftp.employees.org/vag/uClinux/tools/bbug

You'll also need kermit itself, which you can get from http://www.columbia.edu/kermit

Alternatively, you can run BBUG.EXE from DOSEMU.

Q: Is it possible to use SDS debugger?
======================================

A: I don't know, since I don't have it. Theoretically, it should be possible.

Q: How can I load S-records onto the board?
===========================================

A: You have to convert them to B-records that are functionally equivalent. B-record format is natively understood by MC68EZ328 CPU. It is described in M68EZ328 User's Manual by Motorola

There is a simple Perl script, distributed with uClinux that performs this conversion. You can find it in

ftp://ftp.employees.org/vag/uClinux/tools/stob

Q: How can I program FLASH on M68EZ328ADS?
==========================================

A: There is a primitive FLASH utility, at_flash.b that you can get from ftp://ftp.employees.org/vag/uClinux/tools/at_flash.b

It moves the contents of the first 1MB of DRAM into the first 1MB on FLASH.

From bbug you have to do:

load at_flash.b load your_file.b start 1004

Your B-records file should be placed at address 0x00400000

See also 'program_flash' macro in bbug source.

Q: What if I have more questions?
=================================

A: Search uClinux list archives. I've sent a lot of information there. Send an email to uClinux list. I am monitoring it, but, as I said I might not be able to answer immediately. But, there are many other people on the list who can help! Even if you send me a personal email with a uClinux question, please, copy the list.

Q: Is MC68681 DUART supported by uClinux?
=========================================

A: Unfortunately, the answer is no. The configuration option (68681 serial support) is a leftover from my original 2.0.33-based port, when I used to redirect printk() output to 68681 serial port in order to be able to debug serial driver for 68EZ328. This code has been removed since then, because there was nothing there except printk() support and it was not clean.

If you are curious how to access 68681 DUART on M68EZ328ADS, look at the file arch/m68knommu/platform/68EZ328/ads/init_ram.b This file is used to generate linux.b -- uClinux kernel that runs from RAM and it shows how to output the word "Ready" on 68681 (Port A).

I don't have any plans to support 68681, because I don't need it anymore (at least for now). But I am willing to help anyone who wants to do that. Alternatively you (or your company) can sponsor me :) to write the driver if you really need it. Please, note that 68681 only supports up to 38400bps.

Q: Is it possible to connect an LCD/touchscreen to M68EZ328ADS.
===============================================================

A: Yes, it is possible, but there is no support for it currently, because I don't have any LCD to play with. Tom Walsh tom@openhardware.net is a great source of info on that matter.

Q: I've built my own uClinux kernel and a root filesystem, but when I tried to run it I got "Unable to open initial console" message
====================================================================================================================================

A: There are 2 main causes of this: 1) You didn't have correct permissions when you were trying to build romdisk.img and thus /dev/ttyS0 didn't get included on it.

You can check your romdisk.img contents my mounting it directly on your workstation, like

mount -r -o loop -t romfs /home/vag/romdisk.img /mnt/romfs

(Please note, that you should unmount and re-mount this image whenever you rebuild romdisk.img!)

2) at_flash.b copies only 1MB of data from DRAM to FLASH. Thus, if your resulting image (linux.bin) is bigger than 1MB you are probably missing a part of your root filesystem and it can be your /dev directory.

Modify at_flash.S to support more than 1MB.

Q: I've built my own uClinux kernel and a root filesystem, but when I tried to run it, it crashed mysteriously.
===============================================================================================================

A: See the second part of the answer to the previous question.

Q: I tried to run "ppp" command in your bbug script, but it complains about authentication
==========================================================================================

A: You probably have a new pppd that has authentication enabled by default. Add a line, containing the word "noauth" to /etc/ppp/options.

Q: I could successfully run uClinux with the romdisk image I got from Vladimir's site. But when I tried to use my own, uClinux died with the following messages:
================================================================================================================================================================

        SIOCSIFADDR=-1: 19
        SIOCGIFFLAGS = -1: No such device  (19)
        SIOCADDRT=-1: 19
        SIOCADDRT=-1: 19

A: You probably built your romfs from the original sources, which are tailored for uCsimm. This message is from /sbin/ifattach, which tries to configure uCsimm's ethernet, that is definitely missing on M68EZ328ADS.

You should edit /etc/rc in your romfs directory and remove instances of /sbin/ifattach that are related to ethernet interface as well as other "ethernet-related" commands, like NFS mounts.

Use /etc/rc from the pre-built romdisk image as an example.

Q: How can i download my compiled and excutable user program from PC?
=====================================================================

A: You have several options:

1) Add it to your root filesystem, rebuild the root filesystem and re-flash it.

2) Use NFS over PPP. Mount your development directory over NFS and then execute the program directly from there, or copy it to a ramfs (/var) first.

3) Modify mtd driver to use Atmel FLASH and then use JFFS so that you have a rewritable filesystem in FLASH. Then, again, use NFS over PPP to copy your executable there.

Q: How can i debug applications?
================================

A: Use gdbserver on the board and GDB in remote mode on your development PC. Of course, you'll need a m68k-coff GDB.

gdbserver has been successfully hacked by kwonsk.