From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYXog-0002Cw-8l for qemu-devel@nongnu.org; Sat, 04 May 2013 04:27:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYXof-00060w-8a for qemu-devel@nongnu.org; Sat, 04 May 2013 04:27:38 -0400 Received: from cantor2.suse.de ([195.135.220.15]:33823 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYXoe-00060r-Vc for qemu-devel@nongnu.org; Sat, 04 May 2013 04:27:37 -0400 Message-ID: <5184C674.2080007@suse.de> Date: Sat, 04 May 2013 10:27:32 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1367438026-27573-1-git-send-email-jcd@tribudubois.net> <51825E30.5000802@suse.de> <5183D4E3.9060505@tribudubois.net> <5183D5D7.3010805@suse.de> <5183E020.2030209@tribudubois.net> <5183E8C1.5070506@suse.de> <5184C52B.2070600@tribudubois.net> In-Reply-To: <5184C52B.2070600@tribudubois.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] Add i.MX I2C device emulator. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jean-Christophe DUBOIS Cc: Peter Maydell , qemu-devel@nongnu.org Am 04.05.2013 10:22, schrieb Jean-Christophe DUBOIS: > On 05/03/2013 06:41 PM, Andreas F=E4rber wrote: >> CC tests/libi2c-imx.o >> LINK tests/tmp105-test >> CC tests/ds1338-test.o >> LINK tests/ds1338-test >> GTESTER check-qtest-arm >> Kernel image must be specified >> Without seeing your code and since tmp105-test is working on my side, = I >> can only guess that your ds1338-test is starting either your own machi= ne >> or some machine that terminates with above error. > the ds1338-test.c code is very similar to the tmp105-test.c code. >=20 > The tmp105-test.c code starts a n800 machine while the ds1338-test.c > starts a imx25_3ds machine (to get the i.MX I2C device, it seems natura= l). >=20 > Nowhere in the tmp105-test.c code is any kernel or initrd file > specified. So I did the same with ds1338-test.c. The mentioned machine init is part of the emulation, not of qtest. > But then "make check" is complaining the kernel is missing ... >=20 > So it seems the n800 allows qemu to start even if no parameters (ram > size, kernel file, ...) are provided (you can actually confirm this by > running "qemu-system-arm -machine n800"). This is not the default > behavior for most implemented platform (including imx25_3ds) that will > refuse to start if no parameter is given. >=20 > Is there a new requirement mandating platforms to start with guessed > parameters if not provided on the command line in order to be compatibl= e > with qtest? >> >> The solution is to only mandate -kernel, -initrd, -dtb, etc. in the >> machine init function if !qtest_enabled() or so. >=20 > I am calling arm_load_kernel() with a pointer to a "struct arm_boot_inf= o". >=20 > The first thing done by arm_load_kernel() is to check for the kernel > parameter without checking for qtest_enable() and all. >=20 > /* Load the kernel. */ > if (!info->kernel_filename) { > fprintf(stderr, "Kernel image must be specified\n"); > exit(1); > } >=20 > Do you mean arm_load_kernel() should test for qtest_enable() or should = I > call arm_load_kernel() only if !qtest_enable() (there is not much > platform checking for qtest_enable() at this time and it seems somebody > need to set the "entry" field in the info struct). In short, qtest does not execute any code, so it does not need to load binaries or set CPU entry addresses. Yes, I would say there is no point calling arm_load_kernel() if !qtest_enabled(). Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg