Trying to get to the next level in this game.
I managed to get 1.3.3 and 1.3.4 into the Canon menu without loading ML "boot=0"


Kind of tricky to get these screenshots because the patch to navigate the menus seems to work only when ML is loaded and I don't have GUI emulation working on these firmware versions yet. The way I did it was by going to the Canon menu I want to show in the camera and dump the firmware in that state. Yeah, 133 and 134 are working in camera but not in QEMU.
The 1.3.3 port that chris_miller did a while back almost works:


but once I merged it into the latest patched QEMU branch it was no better than 134.
Here's how I've got the directory structure for the 5D3:

This brings up a question about debugmsg.gdb. There is a section specific to 5D3.123:
# 1.2.3
if *(int*)0xFF136C94 == 0xE92D403E
b *0xFF13B674
register_func_log
end
I'm not sure if I'm stressing over the small stuff. According to "Blame" - Alex committed 29bab2b, "GDB scripts: disabled slow items by default (semaphores, message queues, MPU communication, ResLock, EDMAC)" I was able to find the equivalent address for 1.3.3 and 1.3.4. However, shouldn't the debugmsg.gdb for each of these firmware versions be inside of the appropriate directory and run with, for example:
./run_canon_fw.sh 5D3,firmware="134;boot=1" -d debugmsg -s -S & arm-none-eabi-gdb -x 5D3/134/debugmsg.gdb
An issue I bumped up against is when using this command from the qemu directory to compile a version:
make -C ../magic-lantern/platform/5D3.134 install_qemu
I'm often getting messages that the sd.img resource is busy and it won't copy ML onto the image file. However, mounting the virtual sd card and installing it that way works fine.
Several of the recent QEMU updates have to do with the run_ml_all_cams.sh script so I gave that a try and was able to get log files for all of the 5D3 firmware versions. As expected some problems are showing up on the 1.3.3 and 1.3.4 versions.
5D3.134.log
c
./run_canon_fw.sh 5D3,firmware=134;boot=1 -display none -monitor stdio
pidof: illegal option -- s
ps: Invalid process id: Help:
ps: illegal option -- k
usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]
[-g grp[,grp...]] [-u [uid,uid...]]
[-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
ps [-L]
ps: Invalid process id: Help:
ps: illegal option -- k
usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]
[-g grp[,grp...]] [-u [uid,uid...]]
[-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
ps [-L]
&
DebugMsg=00005b90 (overriden)
QEMU 2.5.0 monitor - type 'help' for more information
(qemu) Lockdown read 0
Lockdown read 0
Lockdown read 1
Lockdown read 1
Lockdown read 2
Lockdown read 2
Lockdown read 3
Lockdown read 3
Lockdown read 4
Lockdown read 4
00000000 - 00000FFF: eos.tcm_code
40000000 - 40000FFF: eos.tcm_data
00001000 - 1FFFFFFF: eos.ram
40001000 - 5FFFFFFF: eos.ram_uncached
F0000000 - F0FFFFFF: eos.rom0
F1000000 - F1FFFFFF: eos.rom0_mirror
F2000000 - F2FFFFFF: eos.rom0_mirror
F3000000 - F3FFFFFF: eos.rom0_mirror
F4000000 - F4FFFFFF: eos.rom0_mirror
F5000000 - F5FFFFFF: eos.rom0_mirror
F6000000 - F6FFFFFF: eos.rom0_mirror
F7000000 - F7FFFFFF: eos.rom0_mirror
F8000000 - F8FFFFFF: eos.rom1
F9000000 - F9FFFFFF: eos.rom1_mirror
FA000000 - FAFFFFFF: eos.rom1_mirror
FB000000 - FBFFFFFF: eos.rom1_mirror
FC000000 - FCFFFFFF: eos.rom1_mirror
FD000000 - FDFFFFFF: eos.rom1_mirror
FE000000 - FEFFFFFF: eos.rom1_mirror
FF000000 - FFFFFFFF: eos.rom1_mirror
C0000000 - DFFFFFFF: eos.iomem
[EOS] loading symbols from ../magic-lantern/platform/5D3.134//autoexec (800000-86CB40)
[EOS] loading symbols from ../magic-lantern/platform/5D3.134//magiclantern (69500-E7F14)
[EOS] loading './5D3/134/ROM0.BIN' to 0xF0000000-0xF0FFFFFF
[EOS] loading './5D3/134/ROM1.BIN' to 0xF8000000-0xF8FFFFFF
[MPU] warning: non-empty spell #41 (PROP_VIDEO_MODE) has duplicate(s): #42
[MPU] warning: non-empty spell #74 (PROP_TFT_STATUS) has duplicate(s): #48 #49 #52 #56 #59 #63 #70 #79 #80 #85 #87 #92 #95 #100 #103 #108
[MPU] warning: non-empty spell #84 (Current Q position) has duplicate(s): #82 #89 #91
[MPU] warning: non-empty spell #93 (Current Q position) has duplicate(s): #97 #99
[MPU] warning: non-empty spell #98 (Current Q position) has duplicate(s): #51 #58 #65 #83 #90 #106
[MPU] warning: non-empty spell #101 (Current Q position) has duplicate(s): #105 #107
[MPU] warning: non-empty spell #113 (PROP_CARD1_STATUS) has duplicate(s): #8
[MPU] Available keys:
- Arrow keys : Navigation
- Numpad keys : Joystick (8 directions)
- Numpad 5 : Joystick center
- PgUp, PgDn : Sub dial (rear scrollwheel)
- [ and ] : Main dial (top scrollwheel)
- SPACE : SET
- DELETE : guess (press only)
- M : MENU (press only)
- P : PLAY (press only)
- I : INFO/DISP
- Q : guess (press only)
- L : LiveView (press only)
- W : Pic.Style (press only)
- Shift : Half-shutter
- B : Open battery door
- C : Open card door
- F10 : Power down switch
- F1 : show this help
Setting BOOTDISK flag to FFFFFFFF
FFFF0948: MCR p15,0,Rd,cr9,cr1,0: XSCALE_LOCK_ICACHE_LINE <- 0x40000006 (40000000 - 40000FFF, 0x1000)
FFFF0948: MRC p15,0,Rd,cr1,cr0,0: SCTLR -> 0x2078
FFFF0948: MCR p15,0,Rd,cr1,cr0,0: SCTLR <- 0x12078
FFFF2F8C: MCR p15,0,Rd,cr6,cr0,0: 946_PRBS0 <- 0x3F (00000000 - FFFFFFFF, 0x100000000)
FFFF2F94: MCR p15,0,Rd,cr6,cr1,0: 946_PRBS1 <- 0x3D (00000000 - 7FFFFFFF, 0x80000000)
FFFF2F9C: MCR p15,0,Rd,cr6,cr2,0: 946_PRBS2 <- 0xE0000039 (E0000000 - FFFFFFFF, 0x20000000)
FFFF2FA4: MCR p15,0,Rd,cr6,cr3,0: 946_PRBS3 <- 0xC0000039 (C0000000 - DFFFFFFF, 0x20000000)
FFFF2FAC: MCR p15,0,Rd,cr6,cr4,0: 946_PRBS4 <- 0xFF00002F (FF000000 - FFFFFFFF, 0x1000000)
FFFF2FB4: MCR p15,0,Rd,cr6,cr5,0: 946_PRBS5 <- 0x39 (00000000 - 1FFFFFFF, 0x20000000)
FFFF2FBC: MCR p15,0,Rd,cr6,cr6,0: 946_PRBS6 <- 0xF700002F (F7000000 - F7FFFFFF, 0x1000000)
FFFF2FC4: MCR p15,0,Rd,cr2,cr0,0: DCACHE_CFG <- 0x70
FFFF2FCC: MCR p15,0,Rd,cr3,cr0,0: DACR <- 0x70
FFFF2FD0: MCR p15,0,Rd,cr2,cr0,1: ICACHE_CFG <- 0x70
FFFF2FD4: MCR p15,0,Rd,cr5,cr0,0: DATA_AP <- 0x3FFF
FFFF2FDC: MCR p15,0,Rd,cr5,cr0,1: INSN_AP <- 0x3FFF
FFFF2FE0: MRC p15,0,Rd,cr1,cr0,0: SCTLR -> 0x12078
FFFF3000: MCR p15,0,Rd,cr1,cr0,0: SCTLR <- 0xC001307D
FFFF0974: MCR p15,0,Rd,cr9,cr1,1: XSCALE_UNLOCK_ICACHE <- 0x6 (00000000 - 00000FFF, 0x1000)
FFFF0974: MRC p15,0,Rd,cr1,cr0,0: SCTLR -> 0xC001307D
FFFF0974: MCR p15,0,Rd,cr1,cr0,0: SCTLR <- 0xC005307D
FFFF09A4: MRC p15,0,Rd,cr1,cr0,0: SCTLR -> 0xC005307D
FFFF09A4: MCR p15,0,Rd,cr1,cr0,0: SCTLR <- 0xC005107D
SD: CMD12 in a wrong state
[SDIO] Error
SD: CMD12 in a wrong state
[SDIO] Error
[31mS[0m[31mD[0m[31m [0m[31mL[0m[31mO[0m[31mA[0m[31mD[0m[31m [0m[31mO[0m[31mK[0m[31m.[0m[31m
[0m[31m
[0m[31mO[0m[31mp[0m[31me[0m[31mn[0m[31m [0m[31mf[0m[31mi[0m[31ml[0m[31me[0m[31m [0m[31mf[0m[31mo[0m[31mr[0m[31m [0m[31mr[0m[31me[0m[31ma[0m[31md[0m[31m [0m[31m:[0m[31m [0m[31mA[0m[31mU[0m[31mT[0m[31mO[0m[31mE[0m[31mX[0m[31mE[0m[31mC[0m[31m.[0m[31mB[0m[31mI[0m[31mN[0m[31m
[0m[31m
[0mSD: CMD12 in a wrong state
[SDIO] Error
SD: CMD12 in a wrong state
[SDIO] Error
[31mF[0m[31mi[0m[31ml[0m[31me[0m[31m [0m[31ms[0m[31mi[0m[31mz[0m[31me[0m[31m [0m[31m:[0m[31m [0m[31m0[0m[31mx[0m[31m6[0m[31mC[0m[31mB[0m[31m4[0m[31m0[0m[31m
[0m[31m
[0m[31mN[0m[31mo[0m[31mw[0m[31m [0m[31mj[0m[31mu[0m[31mm[0m[31mp[0m[31m [0m[31mt[0m[31mo[0m[31m [0m[31mA[0m[31mU[0m[31mT[0m[31mO[0m[31mE[0m[31mX[0m[31mE[0m[31mC[0m[31m.[0m[31mB[0m[31mI[0m[31mN[0m[31m![0m[31m![0m[31m
[0m[31m
[0m0010DCCC: MRC p15,0,Rd,cr1,cr0,0: SCTLR -> 0xC005107D
0010DCCC: MCR p15,0,Rd,cr1,cr0,0: SCTLR <- 0xC005107D
[31m[0m[31mK[0m[31m2[0m[31m8[0m[31m5[0m[31m [0m[31mR[0m[31mE[0m[31mA[0m[31mD[0m[31mY[0m[31m
[0m[31m
[0mq[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
[MPU] [1;31mWARNING: forced shutdown.[0m
For clean shutdown, please use 'Machine -> Power Down'
(or 'system_powerdown' in QEMU monitor.)
pidof and ps on the Mac don't seem to have those options though I don't know if that is affecting the validity of the log.
In any case, even though the 1.3.3 and 1.3.4 ML ports are running in camera it looks like QEMU is showing some issues that need to be resolved. Now where to start?