[G1 Android Development] Firerat:
Well, Its never been asked, but I already answered it :)

( it was the primary reason I updated the script )

the key is this bit

in recovery console/ adb shell

dmesg|awk '/0x.+: "/{ print }'

if you get some thing like the table below, with the same names it _should_ work

<5>[ 6.626220] 0x0000024c0000-0x000002500000 : "misc"
<5>[ 6.627410] 0x0000026c0000-0x000002bc0000 : "recovery"
<5>[ 6.628173] 0x000002bc0000-0x000002e40000 : "boot"
<5>[ 6.628936] 0x000002e40000-0x000008840000 : "system"
<5>[ 6.629760] 0x000008840000-0x000008a40000 : "cache"
<5>[ 6.630554] 0x000008a40000-0x000010000000 : "userdata"

( don't worry about the numbers, the script deals with those )

but honestly, I can't say it will work 100% as I currently only have a G1

if you do

dmesg|awk '/0x.+: "/{ print }' > /sdcard/sprintcmda.txt

I can take a look at that file and confirm it will work

-------------------------------------------------------------------

the difference with the 1.5 + scripts is that the older ones were 'hardcoded' with the partition layout for a 32a/b ( misc, recovery, boot and the start of system )

The New Scripts use the ones provided by the SPL

this is the function which does it

dmesgmtdpart=/tmp/mtdpartmap
logfile=/tmp/recovery.log

readdmesg ()
{
dmesg|awk '/0x.+: "/ {sub(/-/," ");gsub(/"/,"");gsub(/0x0+0/,"");printf $6" 0x"toupper ($3)" 0x"toupper ($4)"\n"}' > $dmesgmtdpart

# need a sanity check, what if recovery had been running for ages and the dmesg buffer had been filled?
for sanity in misc recovery boot system;do
if [ `grep -q $sanity $dmesgmtdpart;echo $?` = "0" ];
then
sain=y
else
sain=n
break
fi
done
if [ "$sain" = "y" ];
then
for partition in misc recovery boot;do
eval ${partition}StartHex=`awk '/'$partition'/ {print $2}' $dmesgmtdpart`
eval ${partition}EndHex=`awk '/'$partition'/ {print $3}' $dmesgmtdpart`
done
for partition in misc recovery boot;do
eval StartHex=\$${partition}StartHex
eval EndHex=\$${partition}EndHex
eval ${partition}SizeKBytes=`expr \( $(printf %d $EndHex) - $(printf %d $StartHex) \) \/ 1024 `
eval SizeKBytes=\$${partition}SizeKBytes
eval ${partition}CL=`echo "${SizeKBytes}K@${StartHex}\(${partition}\)"`
CLInit="mtdparts=msm_nand:${miscCL},${recoveryCL},${bootCL}"
done
elif [ "`egrep -q "trout|sapphire" /proc/cmdline;echo $?`" = "0" ];
then
# use the hardcoded layout if dream or magic
#################################################################
# WARNING DO NOT CHANGE THE INITIAL PORTION OF THE COMMAND LINE #
# that is Unless your very different to a dream/magic ;) #
#################################################################

CLInit="mtdparts=msm_nand:256k@0x24C0000(misc),5120k@0x26C0000(recovery),2560k@0x2BC0000(boot)"
else
echo -e "${boot} Patcher v${version}\npartition layout not found in dmesg\nand Dream/Magic not found\nPlease use ${boot} patcher early" >> $logfile
exit
fi
return
}

and later on get the system start

if [ "$sain" = "y" ];
then
SystemStartHex=`awk '/system/ { print $2 }' $dmesgmtdpart)`
SystemStartBytes=`printf %d $(awk '/system/ { print $2 }' $dmesgmtdpart)`
elif [ "`egrep -q "trout|sapphire" /proc/cmdline;echo $?`" = "0" ];
then
SystemStartBytes=48496640
SystemStartHex=`printf '%X' $SystemStartBytes`
else
echo -e "${boot} Patcher v${version}\n" >> $logfile
echo "errm, shouldn't have got this far" >> $logfile
exit
fi

tbh, I think I should make the sanity check a little more robust and check each field