From owner-freebsd-arm@FreeBSD.ORG Thu Sep 19 00:03:04 2013 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 308E9900 for ; Thu, 19 Sep 2013 00:03:04 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E8AF92E50 for ; Thu, 19 Sep 2013 00:03:03 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VMRhx-000Fiz-BN; Thu, 19 Sep 2013 00:02:57 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r8J02sf7015406; Wed, 18 Sep 2013 18:02:54 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18sxhwnhnTeRsCBxVGmmJso Subject: Re: stm32flash under FreeBSD? From: Ian Lepore To: Torfinn Ingolfsen In-Reply-To: <20130918215217.24905fd7f91523a0b70170b5@getmail.no> References: <20130918101235.e1737d4bd839f71ebf554803@getmail.no> <1379511626.1197.69.camel@revolution.hippie.lan> <20130918215217.24905fd7f91523a0b70170b5@getmail.no> Content-Type: text/plain; charset="us-ascii" Date: Wed, 18 Sep 2013 18:02:53 -0600 Message-ID: <1379548973.1197.76.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2013 00:03:04 -0000 On Wed, 2013-09-18 at 21:52 +0200, Torfinn Ingolfsen wrote: > On Wed, 18 Sep 2013 07:40:26 -0600 > Ian Lepore wrote: > > > > > With a quick glance at the stm32flash source I'm not seeing anything > > unusual about the way it handles the serial port. It might be useful to > > try "truss ./stm32flash /dev/cuaU0" and see what call it fails on and > > what the call args are. > > I always forget about truss - thanks for reminding me. > Unfortunately, I can't make anything out of the output from truss, nothing here "pops out" to me. > Maybe more trained eyes than mine can spot something: > tingo@kg-core1$ truss ./stm32flash /dev/cuaU0 > __sysctl(0x7fffffffe070,0x2,0x7fffffffe08c,0x7fffffffe080,0x0,0x0) = 0 (0x0) > mmap(0x0,688,PROT_READ|PROT_WRITE,MAP_ANON,-1,0x0) = 34365198336 (0x800535000) > munmap(0x800535000,688) = 0 (0x0) > __sysctl(0x7fffffffe0e0,0x2,0x80063f408,0x7fffffffe0d8,0x0,0x0) = 0 (0x0) > mmap(0x0,32768,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34365198336 (0x800535000) > issetugid(0x800536015,0x800530684,0x80064bb10,0x80064bae0,0x5991,0x0) = 0 (0x0) > open("/etc/libmap.conf",O_RDONLY,0666) ERR#2 'No such file or directory' > open("/var/run/ld-elf.so.hints",O_RDONLY,057) = 3 (0x3) > read(3,"Ehnt\^A\0\0\0\M^@\0\0\0002\^A\0"...,128) = 128 (0x80) > lseek(3,0x80,SEEK_SET) = 128 (0x80) > read(3,"/lib:/usr/lib:/usr/lib/compat:/u"...,306) = 306 (0x132) > close(3) = 0 (0x0) > access("/lib/libc.so.7",0) = 0 (0x0) > open("/lib/libc.so.7",O_RDONLY,030771340) = 3 (0x3) > fstat(3,{ mode=-r--r--r-- ,inode=5537727,size=1298464,blksize=32768 }) = 0 (0x0) > pread(0x3,0x80063e2c0,0x1000,0x0,0x101010101010101,0x8080808080808080) = 4096 (0x1000) > mmap(0x0,2371584,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34366341120 (0x80064c000) > mmap(0x80064c000,1085440,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE,3,0x0) = 34366341120 (0x80064c000) > mmap(0x800855000,126976,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED,3,0x109000) = 34368475136 (0x800855000) > mmap(0x800874000,110592,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,-1,0x0) = 34368602112 (0x800874000) > close(3) = 0 (0x0) > mmap(0x0,656,PROT_READ|PROT_WRITE,MAP_ANON,-1,0x0) = 34365231104 (0x80053d000) > munmap(0x80053d000,656) = 0 (0x0) > mmap(0x0,43904,PROT_READ|PROT_WRITE,MAP_ANON,-1,0x0) = 34365231104 (0x80053d000) > munmap(0x80053d000,43904) = 0 (0x0) > sysarch(0x81,0x7fffffffe160,0x800539088,0x0,0xffffffffffcde450,0x8080808080808080) = 0 (0x0) > sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0) > sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) > __sysctl(0x7fffffffe0f0,0x2,0x80087a780,0x7fffffffe0e8,0x0,0x0) = 0 (0x0) > sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0) > sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) > fstat(1,{ mode=crw--w---- ,inode=147,size=0,blksize=4096 }) = 0 (0x0) > __sysctl(0x7fffffffe0b0,0x2,0x800879dc8,0x7fffffffe0a8,0x0,0x0) = 0 (0x0) > __sysctl(0x7fffffffdfd0,0x2,0x7fffffffdf60,0x7fffffffdfc8,0x8007478c0,0xc) = 0 (0x0) > __sysctl(0x7fffffffdf60,0x2,0x800879fd0,0x7fffffffe028,0x0,0x0) = 0 (0x0) > readlink("/etc/malloc.conf",0x7fffffffe0d0,1024) ERR#2 'No such file or directory' > issetugid(0x800746581,0x7fffffffe0d0,0xffffffffffffffff,0x0,0x2,0x0) = 0 (0x0) > break(0x600000) = 0 (0x0) > __sysctl(0x7fffffffe360,0x2,0x7fffffffe37c,0x7fffffffe370,0x0,0x0) = 0 (0x0) > mmap(0x0,2097152,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34368712704 (0x80088f000) > mmap(0x800a8f000,1511424,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34370809856 (0x800a8f000) > munmap(0x80088f000,1511424) = 0 (0x0) > ioctl(1,TIOCGETA,0xffffe540) = 0 (0x0) > stm32flash - http://stm32flash.googlecode.com/ > write(1,"stm32flash - http://stm32flash.g"...,47) = 47 (0x2f) > > write(1,"\n",1) = 1 (0x1) > open("/dev/cuaU0",O_RDWR|O_NONBLOCK|O_NOCTTY,00) = 3 (0x3) > fcntl(3,F_SETFL,0x0) = 0 (0x0) > ioctl(3,TIOCGETA,0xa07084) = 0 (0x0) > ioctl(3,TIOCGETA,0xa070b0) = 0 (0x0) > ioctl(3,TIOCFLUSH,0xffffe5c4) = 0 (0x0) > ioctl(3,TIOCSETA,0xa070b0) = 0 (0x0) > ioctl(3,TIOCGETA,0xffffe620) = 0 (0x0) > stat("/usr/share/nls/C/libc.cat",0x7fffffffd8b0) ERR#2 'No such file or directory' > stat("/usr/share/nls/libc/C",0x7fffffffd8b0) ERR#2 'No such file or directory' > stat("/usr/local/share/nls/C/libc.cat",0x7fffffffd8b0) ERR#2 'No such file or directory' > stat("/usr/local/share/nls/libc/C",0x7fffffffd8b0) ERR#2 'No such file or directory' > /dev/cuaU0: No such file or directory > writev(0x2,0x7fffffffddf0,0x4,0x19,0x1b4664,0x800a00128) = 38 (0x26) > ioctl(3,TIOCFLUSH,0xffffe624) = 0 (0x0) > ioctl(3,TIOCSETA,0xa07084) = 0 (0x0) > close(3) = 0 (0x0) > > write(1,"\n",1) = 1 (0x1) > sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0) > sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) > sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0) > sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) > process exit, rval = 1 > > It looks to me like it's complaining about not finding libc's nls files (which I would think would be in /usr/local/share), as if a required port is missing or something. Or maybe ports with conflicting NLS options are installed. Then it mangles the error reporting to make it look like the tty device was the thing not found. -- Ian