[uClinux-dev] uCLinux and memory mapping large files.

2007-04-27 Thread Nick Vaughan
Hi, 

I was wondering whether anyone out there would be able to provide me
with some information about memory mapping in uCLinux. I have done a
fair bit of searching for information and so far i understand that there
is some support for mmap() in the uCLinux kernel however i have so far
been unable to get it to work.

I have an application which was written using mmap() to map a large data
file (120MB) into virtual memory. The application was initially written
with desktop/server linux in mind and therefore the assumption that
there would be MMU support on the platform.

I am currently trying to port this application to an embedded platform
which currently runs uCLinux. The hardware in question is the KB9202B
from KwikByte and consists of an Arm core with 64MB SDRAM. It also has a
SD/MMC card reader which is where i would like to store the data file.
The application only needs read access to the data.

I have read (http://www.linuxjournal.com/article/7221) that memory
mapping is possible if the filesystem from which the mapped file comes
from is ROMFS and the mapping is readonly. If this is the case, would it
be feasible to store my data file on an SD card using ROMFS and memory
map this into the address space?

Regards,

Nick Vaughan.

=
Nick Vaughan

Codestuff LTD

Breich Pit Studio
West Calder
EH55 8PL

tel:+44 1506 870 777
fax:+44 1506 870 770
email:  [EMAIL PROTECTED]

Winners of the IIPSEC 2006 Award for Innovation.
Winners of the IIPSEC 2006 Award for Best Software Product.


Codestuff is a private limited company, registered in
Scotland with number 261589 and having its registered
office at Breich Pit Studio, West Calder, West Lothian
EH55 8PL.  Our VAT registration number is 829 9597 53.

=
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] Compile and run an image

2007-04-27 Thread kang shuo

CPU option is used to select which CPU simulation and mach option is
used to select which SOC simulation.
mem_bank option used to indicate memory map in your hardware,
including the start address, size , type of some memory region. In
type parameter, R means read-only , used to means that is ROM for this
mem_bank. RW means read-write, used to indicate that is RAM. file
option is used to load an image to a mem_bank.

-- Thanks
-- Michael.Kang

On 4/27/07, Thai Pham Vinh [EMAIL PROTECTED] wrote:

Hi Greg,

Thanks for your reply. I'm using 2.6.19 as I got the whole distribution from
uclinux website.

Could you please explain a bit more about the meaning of the configuration
in the skyeye.conf file? Or guide me to somewhere I can look for
explanation?

Thanks,
Thai.


Greg Ungerer [EMAIL PROTECTED] wrote:
 Hi Thai,

Thai Pham Vinh wrote:
 Hello everybody out there,

 I'm new to the linux programming world and have some problem when
 practicing for the first time. I have compiled a uClinux image for an
 ARM7 CPU. The compiling has been done successfully. However, when I
 loaded it on skyeye, it hung although there was no error messages shown.
 I don't know if I did it correctly.

What kernel version are you using?

It can be useful to use gdb/ARMulator for problems like this.
At least you can trace through the start of execution. The
gdb/ARMulator is buggy though if you are using 2.6 kernels.
But you can still debug the startup.


 Here is the log:
 [EMAIL PROTECTED]:/downloads/uClinux-dist/images# skyeye
-e linux -c
 skyeye.conf
 arch: arm
 cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
 mach info: name at91, mach_init addr 0x80568f0
 ethmod num=1, mac addr=0:0:0:0:0:0, hostip=10.0.0.1
 uart_mod:0, desc_in:, desc_out:
 SKYEYE: use arm7100 mmu ops
 Loaded ROM ./romfs.img
 exec file linux's format is elf32-little.
 load section .init: addr = 0x01008000 size = 0xf000.
 load section .text: addr = 0x01017000 size = 0x000a53ac.
 not load section .pci_fixup: addr = 0x010bd000 size = 0x .
 not load section .rio_route: addr = 0x010bd000 size = 0x .
 not load section __ksymtab: addr = 0x010bd000 size = 0x .
 not load section __ksymtab_gpl: addr = 0x010bd000 size = 0x .
 not load section __ksymtab_unused: addr = 0x010bd000 size = 0x .
 not load section __ksymtab_unused_gpl: addr = 0x010bd000 size =
 0x .
 not load section __ksymtab_gpl_future: addr = 0x010bd000 size =
 0x .
 not load section __kcrctab: addr = 0x010bd000 size = 0x .
 not load section __kcrctab_gpl: addr = 0x010bd000 size = 0x .
 not load section __kcrctab_unused: addr = 0x010bd000 size = 0x .
 not load section __kcrctab_unused_gpl: addr = 0x010bd000 size =
 0x .
 not load section __kcrctab_gpl_future: addr = 0x010bd000 size =
 0x .
 load section __param: addr = 0x010bd000 size = 0x0078.
 load section .data: addr = 0x010be000 size = 0x00017d60.
 not load section .bss: addr = 0x010d5d60 size = 0xa218 .
 not load section .comment: addr = 0x size = 0x1128 .
 start addr is set to 0x01008000 by exec file.

 Because I don't have a real board to test it therefore I have to use
 skyeye. But skyeye seems to have not much support. If any of you know
 the syntax of skyeye.conf file please show me as I have no idea about
 it. I really appreciate your help.

This is what I use:

 cpu: arm7tdmi
 mach: at91
 mem_bank: map=M, type=RW, addr=0x, size=0x4000
 mem_bank: map=M, type=RW, addr=0x0100, size=0x0040
 mem_bank: map=M, type=R, addr=0x0140, size=0x0040, file=boot.rom
 mem_bank: map=M, type=RW, addr=0x0200, size=0x0040
 mem_bank: map=M, type=RW, addr=0x0240, size=0x8000
 mem_bank: map=M, type=RW, addr=0x0400, size=0x0040
 mem_bank: map=I, type=RW, addr=0xf000, size=0x1000
 lcd: state=off

Regards
Greg




Greg Ungerer -- Chief Software Dude EMAIL: [EMAIL PROTECTED]
Secure Computing Corporation PHONE: +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev



 
Ahhh...imagining that irresistible new car smell?
 Check out new cars at Yahoo! Autos.
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


___
uClinux-dev mailing list
uClinux-dev@uclinux.org

[uClinux-dev] traces in a driver

2007-04-27 Thread Stan Marly
Hi,

I would like to make some traces in a driver. I can't use printk because
it introduces delay and affects the driver behaviour. Is there an easy
way to log some traces in a file ?
Thanks for your help.
Stan
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


RE: [uClinux-dev] How to set RTC? -- Answer

2007-04-27 Thread Bob Furber
Duh!

The answer was in the first google hit on linux set time
(http://www.linuxsa.org.au/tips/time.html):

Set the [soft] system clock with date:

# date 042716452007
Fri Apr 27 16:44 UTC 2007

..and then set the RTC from the system clock:

# hwclock --systohc
Fri Apr 27 16:44:58 2007 -0.925760 seconds


RF

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Bob Furber
 Sent: April 26, 2007 5:06 PM
 To: uClinux development list
 Subject: [uClinux-dev] How to set RTC?


 I am having difficlty setting the [pcf8563] RTC on a WildFireMod, from
 uClinux-2.6.6:

 # hwclock --set --date=04/26/07 13:00:00
 The date command issued by hwclock returned unexpected results
 The command was
date -d 04/26/07 13:00:00 + seconds-into-epoch=%s
 The response was
 No usable set-to-timeCannot set clock

 # hwclock --set 042613002007
 ..fared no better.


 However, I am able to read the RTC:

 # hwclock --show
 Thu Apr 26 15:03:12 2007 -0.909022 seconds

 I should mention that I have no difficulty setting the RTC from dBUG, so I
 know it can be done.

 I have the feeling that is is a Duh! situation, but for the
 life of me, I
 do not see it.

 Thanks,

 RF


 ___
 uClinux-dev mailing list
 uClinux-dev@uclinux.org
 http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
 This message was resent by uclinux-dev@uclinux.org
 To unsubscribe see:
 http://mailman.uclinux.org/mailman/options/uclinux-dev



___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev