Linux-Development-Sys Digest #416, Volume #8     Sun, 14 Jan 01 23:13:11 EST

Contents:
  EPP (rillet)
  Re: can libraries be made to load> 0x40000000 (Ulrich Weigand)
  Ansi C++ forbids implicit conversion from 'void *' in argument passing ("Victor 
Morales")
  Re: ppp 2.3.10 fails (LCP Timeout) after installing 2.4.0 kernel. ("mpierce")
  Re: Ansi C++ forbids implicit conversion from 'void *' in argument passing (Hartmann 
Schaffer)
  Re: Is it possible to boot off of a usb floppy or usb cd-rom disk yet? (Dances With 
Crows)
  Re: Is it possible to boot off of a usb floppy or usb cd-rom disk yet? (jtnews)
  Linux kernel routing table implementation (IP Guy)
  2.4.0 printer (lpr) problem ("mpierce")
  Re: can libraries be made to load> 0x40000000 (Eric Taylor)
  Re: Having problems creating my first module. ("Brian Wagener")
  What causes these parse errors when compiling kernel module? ("Brian Wagener")

----------------------------------------------------------------------------

From: rillet <[EMAIL PROTECTED]>
Subject: EPP
Date: Sun, 14 Jan 2001 23:08:28 +0100

How can I read datas from the EPP parallel port?
I will use C to write my program.

Thanks in advance

Romaric Rillet
[EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED] (Ulrich Weigand)
Subject: Re: can libraries be made to load> 0x40000000
Date: 15 Jan 2001 00:41:43 +0100

Eric Taylor <[EMAIL PROTECTED]> writes:

>Thanks, very helpful. Will changing this affect anything
>else? Seems like a pretty powerful constant, to have only
>this one use.

TASK_UNMAPPED_BASE does indeed only have this single use.

>I looked at anonymous mmap(), and tried a small program.
>It seems to limit me to about 65meg per segment, but
>will merge multiple contiguous segments into one segment.

You might have memory overcommit switched off, in which
case every single mmap is limited to the available 
memory + swap space.  You can switch memory overcommit 
on by issuing (as root)
  echo 1 > /proc/sys/vm/overcommit_memory

After doing that, I was able to allocate up to the 
available virtual address space limit (2 GB - size of
loaded libraries) with a single mmap().

>One item I noticed was a code comment that in order to
>have > 1 gig of PHYSICAL ram, the kernel would also
>need to be reconfigured to start at the 2 gig boundary
>instead of the 3 gig boundary.

>Is this true? And if so,what is the connection between
>kernel virtual space and how much physical ram is on
>a system?

This depends on the kernel version.  If you have 
support for 'high memory', then there is no connection.
You can have up to 64GB memory (on Intel), and still
have 3GB private address space per process.

If the kernel does not support high memory, then the
kernel virtual address space must be at least as big
as the physical memory (plus a little extra for vmalloc()),
and that means that the private address space per process
is smaller than (4GB - physical memory size). 

The 2.4 kernel does support high memory by default,
while the 2.2 kernels do not.  However, there are
2.2 kernel patches that provide something similar
(called 'big memory' support); these patches are
included with several Linux distributions by default.

>I had hoped that in the future, I could get a 3gig
>private address space for my app. Some of these
>configuration parameters seem like they may limit
>this.

The size of the private address space is defined
by the TASK_SIZE constant.  This is normally set
to 3GB (unless you have more than 1GB physical
memory and are *not* using high memory).

The TASK_UNMAPPED_SIZE doesn't affect the size of
the private address space, it just affects which
parts of that address space are used for what 
purposes.  The default address space layout is
like this (on Intel):

  0 .. 128MB                       unused
  128MB .. TASK_UNMAPPED_SIZE      sbrk() area
  TASK_UNMAPPED_SIZE .. TASK_SIZE  mmap() area

Note that the executable code and data sit at
the bottom of the sbrk area, while the stack sits
at the top the mmap() area, growing downwards.

[ The 128MB are not exactly 128MB, but rather 0x08048000.
  This 'magical' constant is simply the base address
  of the executable, which is set by the default linker 
  script.  As executables are not relocateable, that 
  address must be determined by the linker. ]

-- 
  Dr. Ulrich Weigand
  [EMAIL PROTECTED]

------------------------------

From: "Victor Morales" <[EMAIL PROTECTED]>
Subject: Ansi C++ forbids implicit conversion from 'void *' in argument passing
Date: Mon, 15 Jan 2001 00:59:29 +0100

I'm using C++ with Posix linux threads (lib6). I've a problem when passing
(void *) &my_function to pthreads_create function.Compiler (g++) says: "ANSI
C++ forbids implicit conversion from 'void *' in argument passing".
Does anybody know what is the problem?

Thanks,
Morales



------------------------------

From: "mpierce" <[EMAIL PROTECTED]>
Subject: Re: ppp 2.3.10 fails (LCP Timeout) after installing 2.4.0 kernel.
Date: Mon, 15 Jan 2001 22:15:28 +1100

Jerry, I've already thanked you for your help. Have had a very long day
trying to configure 2.4.0 - getting USB Zip250 & HP CDRW to work. You know
how it is as you rack your brain trying to make something work. Finally
they work. 

I have one more problem that I believe you've solved. How do I get my
printer to work under 2.4.0? I'm using Mandrake 7.2, kernel-2.4.0. I've

Here's my modules.conf file: alias net-pf-4 ipx pre-install pcmcia_core
/etc/rc.d/init.d/pcmcia start alias usb-interface usb-uhci alias
parport_lowlevel parport_pc alias sound-slot-0 maestro pre-install plip
modprobe parport_pc ; echo 7 > /proc/parport/0/irq
#Jerry Peter aliases 15.01.01
#PPP
alias netalias-2 ip_alias alias char-major-4 serial
#alias char-major-10 off # -130 softdog
#alias iso9660 isofs
alias ppp-compress-21 bsd_comp alias ppp-compress-24 ppp_deflate alias
ppp-compress-26 ppp_deflate
#modutils > 2.3.11
alias tty-ldisc-3 ppp_async alias char-major-108 ppp_generic alias
/dev/ppp  ppp_generic alias tty-ldisc-14 ppp_synctty
#binfmt
alias binfmt-0064 binfmt_aout alias binfmt--310 binfmt_java   
#parport
options parport_pc io=0x378 irq=7 post-install parport modprobe parport_pc
alias parport_lowlevel parport_pc alias usb-interface-0 usb-uhci

I'd appreciate any suggestions or help. 

Marvin
--
In article <3a612e27$0$15464$[EMAIL PROTECTED]>,
"mpierce" <[EMAIL PROTECTED]> wrote:

> Jerry, Thank you for your help!!! I'm using Mandrake7.2 kernel-2.4.0,
> modutils-2.3.21-1.3mdk and it works. I edited modules.conf and added the
> following lines to end of file:
> #Jerry Peter aliases 15.01.01
> #PPP
> alias netalias-2 ip_alias alias char-major-4 serial
> #alias char-major-10 off # -130 softdog
> #alias iso9660 isofs
> alias ppp-compress-21 bsd_comp alias ppp-compress-24 ppp_deflate alias
> ppp-compress-26 ppp_deflate
> #modutils > 2.3.11
> alias tty-ldisc-3 ppp_async alias char-major-108 ppp_generic alias
> /dev/ppp  ppp_generic alias tty-ldisc-14 ppp_synctty
> #binfmt
> alias binfmt-0064 binfmt_aout alias binfmt--310 binfmt_java  
> 
> Thanks again! Now, another question do you know how I configure a USB
> CD-RW? What is the device type, e.g., sda or sdc? Marvin In article
> <lY386.3110$[EMAIL PROTECTED]>,
> "Jerry Peters" <[EMAIL PROTECTED]> wrote:
> 
>> Gene Heskett <[EMAIL PROTECTED]> wrote:
>>> Gene Heskett sends Greetings to mpierce ;
>> 
>>>> Hopefully, you guys are still monitoring this thread.
>> 
>>>> Having similar problem with K-2.4.0 on Mandrake 7.2 after finally
>>>> getting it to compile w/o panic or set profile freeze my system
>>>> error.
>> 
>>>> Have tried using ppp-2.3.11, ppp-2.4.0-3, ppp-2.4.0b2-2 w/o success.
>> 
>>>> Did you guys patch the kernel? Can someone post exactly how they got
>>>> ppp to work in a step format, i.e.,
>>>> 1) ...
>>>> 2) ..., etc.
>> 
>>> Duh, dunno if I can.  I built ppp as a module, and the
>>> /etc/modules.conf file entries are a little different, all recorded by
>>> dejanews.  I'd post it, but I'm not on that machine for email or news.
>>>  Thats all documented in the readme's in the tar.gz archive of the
>>> latest ppp.
>> 
>>> The authoritative ppp-2.4.0 release is the one at linuxcare.com.au,
>>> and none of the 2.3 series wil work with kernel 2.4 and up.
>> 
>> Not true: Jan 13 16:36:29 darkstar pppd[320]: unrecognized option
>> '--vers' pppd version 2.3.11
>> 
>> Linux darkstar 2.4.0 #2 Sat Jan 6 19:11:36 EST 2001 i686 unknown
>> 
>> 2.3.11 works just fine. 
>> 
>> modules.conf
>> # some aliases
>> alias netalias-2 ip_alias alias char-major-4 serial alias char-major-10
>> off # -130 softdog alias iso9660 isofs alias ppp-compress-21 bsd_comp
>> alias ppp-compress-24 ppp_deflate alias ppp-compress-26 ppp_deflate
>> # for 2.3.13 >
>> alias tty-ldisc-3    ppp_async alias char-major-108 ppp_generic alias
>> /dev/ppp          ppp_generic
>> #alias tty-ldisc-14      ppp_synctty
>> #
>> alias binfmt-0064 binfmt_aout alias binfmt--310 binfmt_java
>> #
>> # alias net-pf-2 off            #       IPv4
>> alias net-pf-3 off alias net-pf-4 off                      # IPX alias
>> net-pf-5 off                      # DDP / appletalk alias net-pf-10 off
>> 
>>  
>>                  # IPv6
>> # Other aliases:
>> alias net-pf-17 af_packet       # packet mode (tcpdump, etc.)
>> #
>> #
>> options parport_pc io=0x378 irq=7 post-install parport modprobe
>> parport_pc alias parport_lowlevel parport_pc
>> #options lp parport=0
>> #----cut here----
>> # I2C module options
>> alias char-major-89 i2c-dev
>> #----cut here----
>> 
>> ppp/options
>> /dev/modem      # device is /dev/modem
>> #57600          # run serial port at this speed
>> 115200          # run serial port at this speed
>> crtscts         # hardware flow control noauth          # isp isn't
>> required to authenticate itself defaultroute    # use the isp as our
>> default route noipdefault     # get our ip address from the isp modem  
>> 
>>  
>>      # use the modem control lines  lock            # use uucp style
>> locking for modem
>> #debug          # print debugging messages (to syslog).
>> #kdebug 1       # 1  to  enable  general debug  messages.
>>                 # 2 to print the contents of received packets.
>>                 # 4 to print the contents of
>>              # transmitted packets.
>> usepeerdns      # ask peer for up to 2 DNS addrs. Passed as DNS[12] to
>> ip-up hide-password   # don't log pap passwords
>>                              
>> Make sure you're setting up the serial ports, if necessary.
>> 
>> The only problems I've had with 2.4.0 have been related to the changes
>> in modutils 2.4; had to change my startup scripts to accomodate the new
>> modutils.
>> 
>> Module                  Size  Used by ppp_async               6480   1
>> ppp_generic            12704   2 [ppp_async] slhc                   
>> 4656 
>>  1 [ppp_generic] smc-ultra               4960   1
>> 8390                    6240   0 [smc-ultra]
>> lp                      4752   0 (unused) parport_pc             17792 
>> 
>> 1 parport                14560   1 [lp parport_pc]
>> 
>>      Jerry
>> 
>>> In my case, and I've been told I shouldn't have to do that, but I had
>>> to copy my /etc/ppp/*-secrets files to /etc/sysconf/network-scripts
>>> before it would work.
>> 
>>> Cheers, Gene
>>>

------------------------------

From: [EMAIL PROTECTED] (Hartmann Schaffer)
Subject: Re: Ansi C++ forbids implicit conversion from 'void *' in argument passing
Date: 14 Jan 2001 19:17:55 -0500

In article <DRq86.4564$[EMAIL PROTECTED]>, 
Victor Morales wrote:
>I'm using C++ with Posix linux threads (lib6). I've a problem when passing
>(void *) &my_function to pthreads_create function.Compiler (g++) says: "ANSI
>C++ forbids implicit conversion from 'void *' in argument passing".
>Does anybody know what is the problem?

what is (void *) &my-function supposed to mean?  you are trying to pass the
address of a function, and pthreads_create is expectiong the address of a
function.  why are you trying to coerce the pointer to some other type?

hs

------------------------------

From: [EMAIL PROTECTED] (Dances With Crows)
Crossposted-To: comp.os.linux.hardware
Subject: Re: Is it possible to boot off of a usb floppy or usb cd-rom disk yet?
Date: 15 Jan 2001 00:44:06 GMT
Reply-To: [EMAIL PROTECTED]

On Sun, 14 Jan 2001 11:36:24 -0500, jtnews staggered into the Black Sun
and said:
>Is it possible to boot off of a USB floppy or USB CDROM disk yet in
>Linux 2.2 or 2.4?

Booting the machine is a BIOS problem, not a Linux problem.  It's not a
Linux problem until the kernel is loaded!  If the root filesystem you
wish to mount is on the USB floppy/CD-ROM, the kernel will need USB
support compiled in and possibly a few kernel parameters.  If the root
filesystem is on a compressed RAMdisk image, it should load OK provided
the BIOS can find the boot block on the USB device.

If your motherboard allows booting from a USB floppy/CD-ROM, you will
probably have to tweak the BIOS settings to make the board see the USB
device as a "normal" device, since the standard PC BIOS knows nothing of
USB and expects to find standard floppy/hard drives at fixed locations.
(A similar BIOS hackaround allows you to use a USB keyboard as a normal
keyboard when using DOS or doing BIOS setup.)

I do not know how many motherboards have this capability.  If you could
post details about your hardware and specifics of what you want to do,
it's possible that someone would be able to steer you in the right
direction.

If this is a laptop, that could make things even more difficult.

-- 
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /  Workin' in a code mine, hittin' Ctrl-Alt
http://www.brainbench.com     /   Workin' in a code mine, whoops!
=============================/    I hit a seg fault....

------------------------------

Date: Sun, 14 Jan 2001 19:56:42 -0500
From: jtnews <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: Is it possible to boot off of a usb floppy or usb cd-rom disk yet?

I don't have any particular motherboard in mind.
I just want to know if the capability exists
at all in any motherboard because I'm
researching ways to build an inexpensive
cluster of NFS file servers.

Dances With Crows wrote:
> 
> On Sun, 14 Jan 2001 11:36:24 -0500, jtnews staggered into the Black Sun
> and said:
> >Is it possible to boot off of a USB floppy or USB CDROM disk yet in
> >Linux 2.2 or 2.4?
> 
> Booting the machine is a BIOS problem, not a Linux problem.  It's not a
> Linux problem until the kernel is loaded!  If the root filesystem you
> wish to mount is on the USB floppy/CD-ROM, the kernel will need USB
> support compiled in and possibly a few kernel parameters.  If the root
> filesystem is on a compressed RAMdisk image, it should load OK provided
> the BIOS can find the boot block on the USB device.
> 
> If your motherboard allows booting from a USB floppy/CD-ROM, you will
> probably have to tweak the BIOS settings to make the board see the USB
> device as a "normal" device, since the standard PC BIOS knows nothing of
> USB and expects to find standard floppy/hard drives at fixed locations.
> (A similar BIOS hackaround allows you to use a USB keyboard as a normal
> keyboard when using DOS or doing BIOS setup.)
> 
> I do not know how many motherboards have this capability.  If you could
> post details about your hardware and specifics of what you want to do,
> it's possible that someone would be able to steer you in the right
> direction.
> 
> If this is a laptop, that could make things even more difficult.
> 
> --
> Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
> Brainbench MVP for Linux Admin /  Workin' in a code mine, hittin' Ctrl-Alt
> http://www.brainbench.com     /   Workin' in a code mine, whoops!
> -----------------------------/    I hit a seg fault....

------------------------------

From: IP Guy <[EMAIL PROTECTED]>
Crossposted-To: linux.dev.kernel,comp.os.linux.networking,comp.os.linux.questions
Subject: Linux kernel routing table implementation
Date: Sun, 14 Jan 2001 19:58:39 -0500

Hi,

Could somebody give me information about how the Linux kernel routing
table (forwarding table) implemented for IPv4?

I am interested in the data structures used to store the entries (hash
table/tree/something else)

Thank you

------------------------------

From: "mpierce" <[EMAIL PROTECTED]>
Subject: 2.4.0 printer (lpr) problem
Date: Mon, 15 Jan 2001 23:16:59 +1100

Printer is refusing to print under 2.4.0, i.e.,

lpq
lp is not ready
Rank   Owner      Job             Files                       Total Size
1st    mpierce    1               PPP-logfile                 2048 bytes
2nd    mpierce    2               PrinterTest.txt             1024 bytes
[mpierce@localhost mpierce]$  

Does anyone have a solution or know what is causing this?
Marvin

------------------------------

From: Eric Taylor <[EMAIL PROTECTED]>
Subject: Re: can libraries be made to load> 0x40000000
Date: Mon, 15 Jan 2001 01:28:47 GMT

Eric Taylor wrote:
> 
> Ulrich Weigand wrote:
> >
> > Eric Taylor <[EMAIL PROTECTED]> writes:
> >
> > >I've got a app that needs more
> > >than 1 gig virtual address space.
> > >All the libraries load at 0x40000000,
> > >if I could force these higher, I could
> > >have more address space (that sbrk could
> > >grab). I need all the dynamic memory to
> > >be contiguous so I can write it all out
> > >in one i/o.
> >
> > This address is determined by the constant
> > TASK_UNMAPPED_BASE defined in include/asm/processor.h.
> > It defaults (on Intel) to TASK_SIZE / 3, which is 1 GB
> > (as TASK_SIZE is 3GB).
> >
> > If you recompile your kernel with TASK_UNMAPPED_BASE
> > set to (say) 0x80000000, you should be able to sbrk()
> > up to nearly 2GB.
> >


I just tried it and it works! Actually, I didn't change
the symbol TASK_UNMAPPED_BASE, as I could only find
one place it was used, so I just changed the assignment
in mmap.c:

unsigned long get_unmapped_area(unsigned long addr, unsigned long len)
{
        struct vm_area_struct * vmm;

        if (len > TASK_SIZE)
                return 0;
        if (!addr)
                addr = TASK_UNMAPPED_BASE; <<<- just changed this

So... might I suggest to some developer that this be
configurable in /proc somewhere.

Or.. must it be same for all processes (don't see why tho?)

Thanks again, this helps alot!!!

eric

------------------------------

From: "Brian Wagener" <[EMAIL PROTECTED]>
Subject: Re: Having problems creating my first module.
Date: Mon, 15 Jan 2001 03:37:23 GMT

Yes that was the problem, I went to  a real terminal and it worked.
Thanks.

--
Brian Wagener

ForceConstant
http://force.ath.cx
http://shoptalk.tunacan.net
"Kasper Dupont" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Brian Wagener wrote:
> >
> > I just got my copy of Linux Device Drivers, but I can't get the "Hello
> > World" module to work.  I can insmod it, but it doesn't print anything
like
> > it is supposed to.  I also get this error when I compile it:  Below is
also
> > the code.
> > Thanks.
> >
> > /tmp/ccGp7G0s.s: Assembler messages:
> > /tmp/ccGp7G0s.s:9: Warning: Ignoring changed section attributes for
.modinfo
> >
> > Hello.c
> > #define MODULE
> > #include <linux/module.h>
> >
> > int init_module(void) { printk("<1>Hello World\n"); return 0;}
> > int cleanup_module(void) { printk("<1>Goodbye World\n"); return 0;}
> >
> > --
> > Brian Wagener
> >
> > ForceConstant
> > http://force.ath.cx
> > http://shoptalk.tunacan.net
>
> If you do this within X the messages will not be displayed
> on the screen, you should be able to find them in the file
> /var/log/messages. Try typing this command in another xterm:
> tail -f /var/log/messages
>
> --
> Kasper Dupont



------------------------------

From: "Brian Wagener" <[EMAIL PROTECTED]>
Subject: What causes these parse errors when compiling kernel module?
Date: Mon, 15 Jan 2001 03:44:03 GMT

Well I am getting closer to making some kernel module code, well I made some
code to setup use of input/output of a node in the proc directory.  I
compile with gcc -D__KERNEL__ -DMODULE -c module.c but I get a whole lot of
errors like "Parse error before time_t" and clock_t, and such.  What am I
forgetting?
Thanks.

--
Brian Wagener

ForceConstant
http://force.ath.cx
http://shoptalk.tunacan.net



------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list by posting to the
comp.os.linux.development.system newsgroup.

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-System Digest
******************************

Reply via email to