|
sanecyclist
|
 |
« on: April 19, 2007, 00:46:57 AM » |
|
I've managed to recompile the 'monte' kernel loading program that jamon had found with the MGB100 tools and header files. The 'kmonte.o' kernel module loads fine (although insmod complains about tainting the kernel). The 'monte' executable runs, and I've briefly tried to boot a Debian 2.6 kernel, but without success, i.e. the telnet session just shuts down and the device doesn't appear to be doing anything.
Attached are the recompiled binaries in case anyone else wants to give it a try. I suppose a serial console connection would be useful for that. Is that available? Pagano, how do you debug your modified firmwares?
|
|
|
|
Logged
|
|
|
|
|
jamon
|
 |
« Reply #1 on: April 19, 2007, 11:14:04 AM » |
|
Hi sanecyclist, I found quite old the version monte-0.3-2.4 you used! The CVS version from sourceforge compiles without problems in 2.4.x (tested only with Xbox). Please, try it with MFB100 tools (you only need to read http://sourceforge.net/cvs/?group_id=34118 to get read access to CVS server; mondulename is "monte").
|
|
|
|
|
Logged
|
|
|
|
|
sanecyclist
|
 |
« Reply #2 on: April 20, 2007, 00:01:19 AM » |
|
Thanks jamon, I've downloaded and compiled the CVS version, see the attachment. I added '-static' to the compiler options in the Makefile, because otherwise 'monte' would complain about a missing libz.1.so. It works, including initrd, or at least it prints details about the kernel and then reboots. But I haven't yet managed to connect to the device afterwards, so that'll need further investigation.
|
|
|
|
Logged
|
|
|
|
|
jamon
|
 |
« Reply #3 on: April 20, 2007, 08:41:39 AM » |
|
Hi,
First step is test if new kernel loads. I think that we need to recompile new kernel with several debug enabled options and one output console. The MFB100 has a Serial Console connector?
|
|
|
|
|
Logged
|
|
|
|
|
tcc1000
|
 |
« Reply #4 on: April 20, 2007, 09:59:59 AM » |
|
Of sorts. If you solder on some connections and use a voltage level shifter, you can get on via serial console - to the OS not the bootloader. It does print out kernel messages though. Have a look at this thread: http://www.routertech.org/viewtopic.php?t=210&start=19 to see how to do it.
|
|
|
|
|
Logged
|
|
|
|
|
sanecyclist
|
 |
« Reply #5 on: April 20, 2007, 10:02:59 AM » |
|
My Safecom SWSAPUR-5400 doesn't have a serial connector, not on the outside anyway. But I found this thread on the unofficial Safecom forum where 'biro' posted a picture of the circuit board and a pinout. Not sure I fancy opening it up and fiddling with MAX232s though. I might first try making a very simple root filesystem on a USB stick that doesn't do more than enabling eth1, so I can try pinging it.
|
|
|
|
|
Logged
|
|
|
|
|
sanecyclist
|
 |
« Reply #6 on: April 20, 2007, 10:12:31 AM » |
|
Hi tcc1000, you got in just before me there.  Does the console really require soldering on the board though? On the picture it looks like you could just stick wires into that connector. By printing out kernel messages you mean all the kernel booting stuff you usually get right after grub, right? And do you know what and where the bootloader is on this thing?
|
|
|
|
|
Logged
|
|
|
|
|
pagano
|
 |
« Reply #7 on: April 20, 2007, 15:11:23 PM » |
|
Pagano, how do you debug your modified firmwares?I put the firmware in the web and if nobody complains...  Seriously, checking twoice before flash. Recovery system is embedded* in the kernel and if it does not boot... it's bricked. Make a greep -ir lily linux_src/* ... A easy method to read serial port without a max232 is crossing wired with another TTL port as a linksys wrt54. (no tested yet) Monte is a very good feature. I will try this weekend. Very good work.
|
|
|
|
|
Logged
|
|
|
|
|
tcc1000
|
 |
« Reply #8 on: April 21, 2007, 15:53:23 PM » |
|
The "connector" for the serial port in the photo is soldered on, it's really just a set of 10 pads on the board. After the first couple of times, matrixchanger/pagano came up with a means of flashing the firmware, so I haven't been back on again. You do need something to do the voltage conversion (I used a couple of transistors, 6 resistors a capacitor and a diode from some website that I can't remember now) at least for desktop computers (usually have the RS232 at 12V). Often laptops have lower voltages (5V), so might work - you'd have to ask someone who knows what they are doing for a definitive answer. If you have a look on the openwrt forum you can see the sort of output you would get ( http://forum.openwrt.org/viewtopic.php?id=6827&p=1)
|
|
|
|
|
Logged
|
|
|
|
|
pagano
|
 |
« Reply #9 on: April 22, 2007, 02:11:58 AM » |
|
I have a firmware builded with kexec patch, it replaces some original firmware patch (by Lily) It boots and recovery system is working but modules (included st2500 for wireless) must be builded again. Kexec is not tested yet... reading howtos  --edit-- First test freezes device... Second test freezes device... Reading more howtos 
|
|
|
|
« Last Edit: April 22, 2007, 12:25:14 PM by pagano »
|
Logged
|
|
|
|
|
sanecyclist
|
 |
« Reply #10 on: April 22, 2007, 06:49:21 AM » |
|
Yay, that sounds very promising. Looking forward to V5! 
|
|
|
|
|
Logged
|
|
|
|
|
|
|
sanecyclist
|
 |
« Reply #12 on: April 23, 2007, 07:21:07 AM » |
|
Here's what I get running the monte-CVS I had attached earlier in this thread on your firmware V4. # insmod kmonte.o Using kmonte.o Warning: loading kmonte will taint the kernel: no license See http://www.tux.org/lkml/#export-tainted for information about tainted modules # lsmod Module Size Used by Tainted: P kmonte 3512 0 (unused) rt2500 166720 0 (unused) # ./monte vmlinuz root=/dev/sda1 monte: kernel setup : 3072 bytes at 0x90000 monte: kernel code : 42768 bytes at 0x100000 monte: command line : "root=/dev/sda1" monte: region: 1 pages at 0x90000 monte: region: 11 pages at 0x100000 monte: region: 1 pages at 0x9c000 monte: 13 pages to be relocated. monte: entry point (real mode): 9020:0000 A little while later the telnet session times out. So it appears to be loading the kernel fine, but nothing else seems to be happening after that. ps: Hmm, just noticed that the kernel code is rather small, even though vmlinuz is about 1MB.
|
|
|
|
« Last Edit: April 23, 2007, 07:29:42 AM by sanecyclist »
|
Logged
|
|
|
|
|
pagano
|
 |
« Reply #13 on: April 23, 2007, 20:07:41 PM » |
|
After monte reboot in PC with 2.4.28 patched for monte. Uncompressing linux...... invalid compressed format (err=2)
I think monte get bad start address (I only thing it) With kexec, the problem is MGB100 has not reboot like PC has. This function in arch/i386/kernel/process.c void machine_restart(char * __unused) { machine_shutdown(); if(!reboot_thru_bios) { ...
is changed by MGB100 developer with a hard reboot. void machine_restart(char * __unused) { asm volatile ( " movw $0xcf8, %%dx;\n" " movl $0x80003840, %%eax;\n" ...
and kexec needs some levels for reboot. I will give a try to kexec reboot.
|
|
|
|
|
Logged
|
|
|
|
|
pagano
|
 |
« Reply #14 on: April 25, 2007, 19:04:22 PM » |
|
I've briefly tried to boot a Debian 2.6 kernel, but without success, i.e. the telnet session just shuts down and the device doesn't appear to be doing anything.Remenber. Network interfaces does not respond if they are not bridged. does not workifconfig eth1 xxx.xxx.xxx.xxx up working br0brctrl addbr br0 brctrl addif br0 eth1 ifconfig br0 xxx.xxx.xxx.xxx up Now I have a serial port in the whd 
|
|
|
|
|
Logged
|
|
|
|
|