Mikko Rapeli | 2 Dec 09:24 2008

Re: linking on ARM fails

On Wed, Nov 26, 2008 at 03:50:38PM +0200, Mikko Rapeli wrote:
> TET:
> cc  -o tcc tcc.o cleanup.o config.o copysave.o dirtab.o dtcc.o environ.o 
> error.o exec.o
> fake.o global.o jnlproc.o journal.o keys.o lock.o  popen.o procdir.o
> proctab.o proctc.o proctcd.o rescode.o resdir.o  rrproc.o scen1.o
> scen2.o scen3.o scenario.o scentab.o service.o  sigtrap.o syscall.o
> systab.o tcname.o tool.o utils.o ynstr.o ../tcclib/libtcc.a
> ../../../lib/tet3/libapi.a
> ld: proctc.o: invalid string offset 17 >= 0 for section `.shstrtab'
> ld: proctc.o: invalid string offset 37 >= 0 for section `'
> ld: proctc.o: invalid string offset 17 >= 0 for section `.shstrtab'
> ld: proctc.o: invalid string offset 48 >= 0 for section `'
> ld: proctc.o: invalid string offset 17 >= 0 for section `.shstrtab'
> ld: proctc.o: invalid string offset 59 >= 0 for section `'
> ld: proctc.o: invalid string offset 17 >= 0 for section `.shstrtab'
> ld: proctc.o: invalid string offset 74 >= 0 for section `'
> ld: proctc.o: invalid string offset 17 >= 0 for section `.shstrtab'
> service.o: In function `tcc_sloop':
> service.c:(.text+0x7c8): undefined reference to `proc_testcase'
> service.c:(.text+0xd80): undefined reference to `proc_tcwait'
> sigtrap.o: In function `engine_shutdown':
> sigtrap.c:(.text+0xae4): undefined reference to `proc_testcase'
> *** Error code 1

objdump and other bfd tools didn't recognize proctc.o as a valid object
file, so I recompiled it manually. After that linking succeeded. Perhaps
this is a cache problem which corrupts data on some cache line.

-Mikko
(Continue reading)

Hubert Feyrer | 2 Dec 17:51 2008
Picon

how to create a disk image? (shark; disklabel + / + swap)


I want to make a disk image that I can dd(1) to my shark,
but I'm not really sure how to assemble it.

What I know is
  - how to do a build, giving me kernels, executables and libs (etc.)
  - how to use makefs, to create a file system image from a directory of files
  - how to use disklabel to add a BSD disklabel and partitioning to an
    image file
  - how to use installboot, to add a bootloader to a disk/file system image
    (not applicable for the shark port, but still).

What I'm lacking is how I assemble all this (disk label, / file system, 
swap space) into a disk image.

Is there some easy way to automate this (e.g. size calculations for the 
disklabel/partitions)? Or is it all manual fiddling?

I'm at a bit of a loss here... please help! :->

  - Hubert

Hubert Feyrer | 2 Dec 18:21 2008
Picon

Re: how to create a disk image? (shark; disklabel + / + swap)

On Tue, 2 Dec 2008, Hubert Feyrer wrote:
> I'm at a bit of a loss here... please help! :->

Let me add that I'd prefer to avoid vnd(4) for two reasons:
1) it requires the host to run NetBSD (or anything that has vnd)
2) it requires root privileges

  - Hubert

Martin Husemann | 2 Dec 19:34 2008
Picon

Re: how to create a disk image? (shark; disklabel + / + swap)

On Tue, Dec 02, 2008 at 06:21:51PM +0100, Hubert Feyrer wrote:
> Let me add that I'd prefer to avoid vnd(4) for two reasons:
> 1) it requires the host to run NetBSD (or anything that has vnd)
> 2) it requires root privileges

Too bad - I would have suggested to compile sysinst with -DDEBUG and
just use that against a vnd otherwise.

Martin

Ken Hornstein | 3 Dec 02:16 2008
X-Face
Picon
Picon

NetBSD 4.0.1 install on TS-7200

So, I have a TS-7200 running 3.99.something, and I figured that I'd try
upgrading it to 4.0.1.  However ... I'm running into some problems.

I tried using the netbsd-TS7200_INSTALL kernel from the 4.0.1 distribution.
That didn't exactly work:

RedBoot> load -h 192.168.1.0 netbsd-TS7200_INSTALL.srec
Using default protocol (TFTP)
Entry point: 0x00200000, address range: 0x00200000-0x007f8dac
RedBoot> go
$T0a0f:348136c0;0d:48957fc0;#cf

Any key presses result in similar garbage.

I thought that maybe there was a problem with the install kernel, so hey,
I'll try building my own from the 4.0.1 sources.  But ... that doesn't
seem to work either:

[... blah blah blah ...]
#    create  instkernel/netbsd-TS7200_INSTALL (from:
/Users/kenh/NetBSD-4.0.1/obj/sys/arch/evbarm/compile/TS7200_INSTALL/netbsd /Users/kenh/NetBSD-4.0.1/obj/distrib/evbarm/instkernel/ramdisk/ramdisk.fs)
/Users/kenh/NetBSD-4.0.1/obj/tooldir.Darwin-9.5.0-powerpc/bin/arm--netbsdelf-mdsetimage -v
netbsd-TS7200_INSTALL.tmp /Users/kenh/NetBSD-4.0.1/obj/distrib/evbarm/instkernel/ramdisk/ramdisk.fs
usage:
/Users/kenh/NetBSD-4.0.1/obj/tooldir.Darwin-9.5.0-powerpc/bin/arm--netbsdelf-mdsetimage
[-svx] [-b bfdname] kernel image
supported targets: elf32-littlearm elf32-bigarm a.out-arm-netbsd coff-arm-little coff-arm-big
elf32-little elf32-big srec symbolsrec tekhex binary ihex

*** Failed target:  netbsd-TS7200_INSTALL
(Continue reading)

Rafal Boni | 3 Dec 03:58 2008
Picon

Re: NetBSD 4.0.1 install on TS-7200

On Tue, Dec 02, 2008 at 08:16:02PM -0500, Ken Hornstein wrote:
> This makes me wonder three things:
> 
> 1) Did anyone happen to test the install kernel for the TS7200?  (I know that
>    might be difficult if you don't have the hardware)
> 2) Does the install kernel work for anyone else?

ENOCLUE

> 3) How was this ever built?  (Seems like the problem is the -v flag to
>    mdsetimage; that could very well be a MacOS-specific problem.  I'll
>    look into that further).

This is a OSX specific problem and I think has been fixed in the 5.0 branch
as well as -current.  Ok, maybe worked around, but I recall discussion of
this on a more generic list (current-users?  tech-kern?).

--rafal

--

-- 
  Time is an illusion; lunchtime, doubly so.     |/\/\|           Rafal Boni
                   -- Ford Prefect               |\/\/|      rafal <at> pobox.com

Simon Burge | 3 Dec 04:11 2008
Picon

Re: NetBSD 4.0.1 install on TS-7200

Rafal Boni wrote:

> On Tue, Dec 02, 2008 at 08:16:02PM -0500, Ken Hornstein wrote:
>
> > 3) How was this ever built?  (Seems like the problem is the -v flag to
> >    mdsetimage; that could very well be a MacOS-specific problem.  I'll
> >    look into that further).
> 
> This is a OSX specific problem and I think has been fixed in the 5.0 branch
> as well as -current.  Ok, maybe worked around, but I recall discussion of
> this on a more generic list (current-users?  tech-kern?).

There's a problem with getopt(3) and the tools libcompat and MacOS.
Look at

  http://mail-index.netbsd.org/tech-toolchain/2008/02/04/msg000025.html
  http://mail-index.netbsd.org/tech-toolchain/2008/06/09/msg000220.html
  http://mail-index.netbsd.org/current-users/2008/06/28/msg003259.html

for some info.  In current, src/distrib/common/Makefile.mdset does this:

	OPSYS!= uname -s
	.if ${OPSYS} == "Darwin"
	MDSETIMAGEFLAGS=
	.else
	MDSETIMAGEFLAGS=-v
	.endif

Cheers,
Simon.
(Continue reading)

Ken Hornstein | 3 Dec 04:17 2008
X-Face
Picon
Picon

Re: NetBSD 4.0.1 install on TS-7200

>There's a problem with getopt(3) and the tools libcompat and MacOS.
>Look at
>
>  http://mail-index.netbsd.org/tech-toolchain/2008/02/04/msg000025.html
>  http://mail-index.netbsd.org/tech-toolchain/2008/06/09/msg000220.html
>  http://mail-index.netbsd.org/current-users/2008/06/28/msg003259.html
>[...]

Ah-ha.  Thanks for the info!  Dunno if that will solve the problem with
the TS7200_INSTALL kernel, but we'll see!

--Ken

Ken Hornstein | 3 Dec 04:50 2008
X-Face
Picon
Picon

Re: NetBSD 4.0.1 install on TS-7200

>Ah-ha.  Thanks for the info!  Dunno if that will solve the problem with
>the TS7200_INSTALL kernel, but we'll see!

Damn ... no such luck.  Back to the drawing board ...

--Ken

Simon Burge | 3 Dec 05:46 2008
Picon

Re: NetBSD 4.0.1 install on TS-7200

Ken Hornstein wrote:

> So, I have a TS-7200 running 3.99.something, and I figured that I'd try
> upgrading it to 4.0.1.  However ... I'm running into some problems.
> 
> I tried using the netbsd-TS7200_INSTALL kernel from the 4.0.1 distribution.
> That didn't exactly work:
> 
> RedBoot> load -h 192.168.1.0 netbsd-TS7200_INSTALL.srec
> Using default protocol (TFTP)
> Entry point: 0x00200000, address range: 0x00200000-0x007f8dac
> RedBoot> go
> $T0a0f:348136c0;0d:48957fc0;#cf
> 
> Any key presses result in similar garbage.

That vaguely looks like gdb gibberish maybe?  Is the entry point
same/similar for your 3.99.mumble kernel?

Out of curiosity, does the 4.0.1 normal TS7200 kernel at least load and
start normally?  You mentioned that a 3.99.mumble works, but I didn't
see if you'd mention that a 4.0.1 non-INSTALL kernel worked.

Cheers,
Simon.


Gmane