Gonna try to reply to several messages here:
Re: MEMCFG
See EP7312 user's guide page 8-3.
0x00000080 = set CLKENB bit for nCS0 (which is in fact the rom chip). This controls some timing stuff.
MEMCFG2 isn't much more interesting, but you can check the details in the manual.
Re: Kernel config
Here's the config file for the kernel, straight from PhatNoise: (rather, here's only the lines that are set to 'y')
CONFIG_ARM=y
CONFIG_UID16=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_EXPERIMENTAL=y
CONFIG_LOLAT=y
CONFIG_ARCH_CLPS711X=y
CONFIG_ARCH_PHATNOISE=y
CONFIG_ARCH_PHATNOISE11=y
CONFIG_ARCH_EP7212=y
CONFIG_ARCH_EP7312=y
CONFIG_ARCH_EDB7211=y
CONFIG_ARCH_EP7211=y
CONFIG_CPU_32=y
CONFIG_CPU_32v4=y
CONFIG_CPU_ARM720T=y
CONFIG_DISCONTIGMEM=y
CONFIG_PREEMPT=y
CONFIG_ISA=y
CONFIG_NET=y
CONFIG_SYSVIPC=y
CONFIG_SYSCTL=y
CONFIG_FPE_FASTFPE=y
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_UNIX=y
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_AUDIO_EP7x12=y
CONFIG_SERIAL_CLPS711X=y
CONFIG_SERIAL_CLPS711X_CONSOLE=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_FAT_FS=y
CONFIG_VFAT_FS=y
CONFIG_PROC_FS=y
CONFIG_DEVPTS_FS=y
CONFIG_EXT2_FS=y
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_ISO8859_1=y
CONFIG_CIRRUS_DAI=y
CONFIG_PHATNOISE_BOARD=y
CONFIG_DEBUG_USER=y
MTD would require at LEAST CONFIG_MTD=y. Also, like I said ... the version of MTD in that kernel does not support the ST Micro flash chip on the board. The necessary file would be linux/drivers/mtd/chips/cfi_cmdset_0020.c (because 0x20 is the manufacturer code for ST Micro.) This code was first written in June, 2002:
* 06/21/2002 Joern Engel <joern@wh.fh-wedel.de> and others
15 * - modified Intel Command Set 0x0001 to support ST Advanced Architecture
16 * (command set 0x0020)
... which is, unfortunately, a couple months after 2.4.18 was released.
(No, I don't know why aadec refers to it. See my next post...)
Re: BL 0xFFFF.... calls in rom_mirror.bin
Unfortunately, and it breaks my heart to say this, it looks like that dump is mainly pieces of busybox that just happened to be mapped into that address space. I say this based on:
* Strings in that dump
* The presence of linux syscalls (ie STI 0x9000000E etc)
* Those 0xFFFF.... calls. BL's operand is relative -- ie, it specifies "jump forward [or backward] by x words". 0xFFFF.... indicates a negative / backward jump -- the reason that the disassembler is not properly decoding this is because the destination of the jumps is before the start of that dump. That took me quite a while to puzzle out
and judb, I will try to locate the source for that version of hdparm, if you want to pm me the info.
For a little bit of better news, check my new thread...
-b
PS - I just wanted to say this -- thank you all for the most interesting and engaging conversation I've had online in at least the past couple of years. Seriously. Go PhatHax0rz!