Date: Mon, 12 Mar 2007 12:43:35 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: jack.avenger@gmail.com Cc: freebsd-arm@freebsd.org Subject: Re: Patch from http://people.FreeBSD.org/~cognet/ Message-ID: <20070312.124335.-494096378.imp@bsdimp.com> In-Reply-To: <66aac5180703121126x66878bb1ub819ed5b4b7262e2@mail.gmail.com> References: <66aac5180703111135v704b037fl3def6b3a66984181@mail.gmail.com> <20070311.102135.1683323324.imp@bsdimp.com> <66aac5180703121126x66878bb1ub819ed5b4b7262e2@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <66aac5180703121126x66878bb1ub819ed5b4b7262e2@mail.gmail.com> ",LN`XY(B ,L1c`PZ(B" <jack.avenger@gmail.com> writes: : avenger# make TARGET=arm TARGET_ARCH=arm buildenv : #cd /usr/src/sys/boot/arm/at91 : # make : ===> libat91 (all) : Warning: Object directory not changed from original : /usr/src/sys/boot/arm/at91/libat91 : cc -Os -mcpu=arm9 -ffreestanding : -I/usr/src/sys/boot/arm/at91/libat91/../libat9 : 1 -I/usr/src/sys/boot/arm/at91/libat91/../../../.. : -I/usr/src/sys/boot/arm/at9 : 1/libat91/../../../../arm -D_KERNEL -Wall -Waggregate-return : -Wnested-extern : s -Wpointer-arith -Wshadow -Wwrite-strings -Werror -Wmissing-prototypes : -Wmi : ssing-declarations -DBOOT_KB920X -c printf.c : printf.c:20:20: stdarg.h: No such file or directory That should be found. I assume you have a full src tree, right? I'm on travel today, but I'll see if I can recreate it tomorrow when in the office. Since you can build a kernel, I assume you've done a buildworld, right? : Also I can`t boot kernel. I have u-boot on my board so i just do next steps: : ## Starting application at 0x20000000 ... : .AN0Nt=1NDN8N7N;1NGN3v!N3FN8NK=nN;N7N< This almost certaily is a wrong baud rate problem. I believe that this may be the result of the following #define: at91rm92reg.h:#define AT91C_MASTER_CLOCK 60000000 which the uart uses to get the RCLK to generate characters. If the uboot loader doesn't setup the master clock to be 60MHz, then there will be problems. It there some way that you can verify that it is doing this? I think that might be the problem here. There may also be some assumptions about the xtal frequency that is causing problems too. Look for this in at91_pmc.c: static int at91_pmc_attach(device_t dev) { int err; pmc_softc = device_get_softc(dev); pmc_softc->dev = dev; if ((err = at91_pmc_activate(dev)) != 0) return err; #if defined(AT91_TSC) | defined (AT91_BWCT) at91_pmc_init_clock(pmc_softc, 16000000); #else at91_pmc_init_clock(pmc_softc, 10000000); #endif return (0); } There really needs to be better info passed from the boot blocks to the kernel (or we need to recognize the state better) to prevent issues like this. : So I have next questions: : 1. Is kernel right compiled? It looks ok to me... : 2. Can u-boot used to load freebsd kernel, and how do this? I think the way you did it. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070312.124335.-494096378.imp>