Hi all,
On Mon, Dec 17, 2012 at 6:40 AM, Bernhard Urban lewurm@gmail.com wrote:
On Mon, Dec 17, 2012 at 2:33 PM, darkdefende@gmail.com wrote:
Rudolf Marek writes:
Maybe it is slowly time to prepare a patch, I think I will need to write a porting guide + specific AGESA bits.
I would be really helpful if you would write a guide. I've been trying to port the asus m5a88 board to agesa but I haven't managed to get it working correctly yet. So a guide explaining how to port + AGESA would be great.
+1 similar situation here with the asus m5a99x (yeah, progress is slow... :))
btw, great work ruik :-)
Seconded! (Thirded?) I'd also be very interested to read a porting guide even though I have the f2a85-m board.
If I can assist with the m5a99x and m5a88 in any way, I'd be happy to.
I got SerialICE to start up and respond to simple commands. (I haven't run the BIOS image in Qemu yet, but commands such as *mb work.)
I selected the Asus M4A77TD_PRO board. Since SerialICE only needs to know how to init the chipset and superio enough to talk to the serial port, this is close enough. If you'd like to try SerialICE on a board other than mine (f2a85-m/csm) you should check src/mainboard/<your board>/romstage.c and start at cache_as_ram_main()
For example, src/mainboard/amd/thatcher/ romstage.c has only a few lines before it8712f_enable_serial() gets called. The code in it8712f_enable_serial() is also important.
I compared the coreboot code to SerialICE/mainboard/asus_m4a77td_pro.c chipset_init()
The same i/o is done even though it is for a different chipset and superio, so I decided to give it a try. I made sure to have a backup flash chip in a safe place in case this didn't work.
Here's a shell script to build SerialICE -- checks it out from svn, then builds serialice.rom in the current directory. The flash image is filled with 0xff bytes because flashrom is smart enough to only write to blocks that differ. SerialICE itself generates a flash image by repeating the same 64K SerialICE rom from the start of the chip to the end -- nothing wrong with that, I just wanted faster flashing by not changing blocks unless necessary.
You will most likely need to edit the script to change the size of the flash image. SerialICE itself is only 64K, but for an 8MB flash I get: sha256sum serialice.rom cd5b283bdcc017b3f27ee4064b9ec238d8223a7b04a7e69cad2e85a158b3cd90 serialice.rom
************************************************* #!/bin/bash # use set -e once errors handle ok
MISSING="" INSTALL="" C="" if type apt-get >/dev/null 2>&1; then C="apt-get install" elif type emerge >/dev/null 2>&1; then C="emerge -av" elif type yum >/dev/null 2>&1; then C="yum install" fi export C
add_install() { MISSING="$MISSING $1" export MISSING INSTALL="$INSTALL $2" export INSTALL }
is_installed() { type $1 >/dev/null 2>&1 || add_install $* }
is_installed svn subversion is_installed gcc gcc if [ -n "$INSTALL" ]; then echo "Missing tools:$MISSING" echo " Please type: sudo $C$INSTALL" echo " and try again" exit 1 fi
if [ ! -d SerialICE ]; then svn co svn://serialice.com/serialice/trunk/SerialICE SerialICE || exit 1 fi
cd SerialICE || exit 1
# # copy of my .config file: Asus M4A77TD_PRO board # note: build/config.h is tightly coupled to .config: update both at the same time # cat <<EOF > .config || exit 1 CONFIG_BOARD_ASUS_M4A77TD_PRO=y CONFIG_BOARD_INIT="asus_m4a77td-pro.c" CONFIG_SERIAL=y # CONFIG_USB is not set CONFIG_SERIAL_COM1=y # CONFIG_SERIAL_COM2 is not set CONFIG_SERIAL_PORT=0x3f8 CONFIG_SERIAL_115200=y # CONFIG_SERIAL_57600 is not set # CONFIG_SERIAL_38400 is not set # CONFIG_SERIAL_19200 is not set # CONFIG_SERIAL_9600 is not set CONFIG_SERIAL_BAUDRATE=115200 # CONFIG_EXPERIMENTAL is not set CONFIG_EXPERT=y CONFIG_HAVE_SSE=y CONFIG_BUILD_ROMCC=y # CONFIG_BUILD_XMMSTACK is not set EOF
mkdir -p build || exit 1 cat <<EOF > build/config.h || exit 1 /* * Automatically generated C config: don't edit * SerialICE version: 1.5 * Mon Dec 17 21:09:33 2012 */ #define AUTOCONF_INCLUDED #define CONFIG_SERIAL_COM1 1 #define CONFIG_BUILD_ROMCC 1 #define CONFIG_SERIAL_115200 1 #define CONFIG_SERIAL_PORT 0x3f8 #define CONFIG_SERIAL_BAUDRATE 115200 #define CONFIG_HAVE_SSE 1 #define CONFIG_BOARD_ASUS_M4A77TD_PRO 1 #define CONFIG_SERIAL 1 #define CONFIG_EXPERT 1 #define CONFIG_BOARD_INIT "asus_m4a77td-pro.c" EOF
# # build serialice.rom # make -j5 || exit 1 cd .. || exit 1
# pad serialice.rom to the size of the flash chip S=$(( 8*1048576 )) awk "BEGIN{for (i=0; i<$(( $S / 16 )); i++) printf "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff";exit}"
serialice.rom
dd if=SerialICE/build/serialice.rom of=serialice.rom bs=4096 conv=notrunc # put serialice.rom at start of flash dd if=SerialICE/build/serialice.rom of=serialice.rom bs=4096 seek=$(( ( $S - `stat -c %s SerialICE/build/serialice.rom` )/4096 )) # and at end of flash echo "" echo "Now build SerialICE QEMU Host (see SerialICE/patches/* and serialice.com/Installation.html)" ls --color=always -l serialice.rom
*************************************************
Regards, David