Re: Problems with FreeBSD assembly
Mihai Don??u mihai.do...@gmail.com wrote: I don't think the kernel is the one that initializes the 0, 1 and 2 file descriptors (stdin, stdout and stderr). Correct so far. I think you have to open them yourself ... No, the shell does it. That's how it is able to set up pipes and redirection. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: atom based servers
David Rawling wrote: Hi Brian Indeed, I have a FreeBSD 8.0RC1 system running as my primary time server for the home network. Since it's an Atom 330, it fully supports 64-bit mode (an opportunity I have grasped with both hands). I have one of the Acer ION gadgets running at home and that also uses the Atom 330. I cannot find any nice way to reduce the power consumption though as the 330 doesn't seem to support speedstep and my cpu is always running at 68C. Does your board provide any power control opportunity? The board I happen to be using is an Intel DG945GCLF2 - a clone board with just 1 DIMM slot and two SATA ports. Everything I need to have supported Just Worked out of the box. . I can provide the output of most any other commands if you'd like to see anything specific. I rather suspect that the Supermicro and other server-class Atoms will still be using the Intel 945 or similar chipsets. -- Robin Becker ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
where's my konqueror?
I installed kdebase-4.3.1_1, but cannot find konqueror. It's supposed be a part of kdebase, isn't it? many thanks anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Can I prevent freebsd-update from installing kernel debug files
On Wed 2009-11-11 12:35:55 UTC-0600, Jason Fried (r...@churchofbsd.org) wrote: I have a fairly old install and not much room on my ROOT is there a way to prevent freebsd-update from installing .symbols files. In /etc/freebsd-update.conf: IgnorePaths /boot/kernel/*.symbols From reading the man page I get the impression this should work. I haven't tested it though. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: where's my konqueror?
On Thu, Nov 12, 2009 at 2:47 PM, Anton Shterenlikht me...@bristol.ac.uk wrote: I installed kdebase-4.3.1_1, but cannot find konqueror. It's supposed be a part of kdebase, isn't it? % grep konqueror /usr/ports/x11/kdebase4/pkg-plist bin/konqueror lib/libkdeinit4_konqueror.so [...] --Herbert ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: where's my konqueror?
On Thu, Nov 12, 2009 at 3:17 PM, Herbert J. Skuhra h.sku...@gmail.comwrote: On Thu, Nov 12, 2009 at 2:47 PM, Anton Shterenlikht me...@bristol.ac.uk wrote: I installed kdebase-4.3.1_1, but cannot find konqueror. It's supposed be a part of kdebase, isn't it? % grep konqueror /usr/ports/x11/kdebase4/pkg-plist bin/konqueror lib/libkdeinit4_konqueror.so [...] my 4.3.0 decided to install everything into /usr/local/kde4. so my konq is at /usr/local/kde4/bin/konqueror. don't know why. didn't dare to ask. regards, usleep --Herbert ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
RE: atom based servers
Robin Becker opined: ... I have one of the Acer ION gadgets running at home and that also uses the Atom 330. I cannot find any nice way to reduce the power consumption though as the 330 doesn't seem to support speedstep and my cpu is always running at 68C. Does your board provide any power control opportunity? sysctl dev.cpu.0.freq reports that my CPU is running at 202 or 404MHz generally: timeserver ~ 127# sysctl dev.cpu.0.freq dev.cpu.0.freq: 404 timeserver ~ 128# sysctl dev.cpu.0.freq_levels dev.cpu.0.freq_levels: 1618/-1 1415/-1 1213/-1 1011/-1 809/-1 606/-1 404/-1 202/-1 I notice the only C states are C0 and C1, and that it's generally running in C1: timeserver ~ 136# sysctl dev.cpu.0 dev.cpu.0.%desc: ACPI CPU dev.cpu.0.%driver: cpu dev.cpu.0.%location: handle=\_PR_.CPU0 dev.cpu.0.%pnpinfo: _HID=none _UID=0 dev.cpu.0.%parent: acpi0 dev.cpu.0.freq: 202 dev.cpu.0.freq_levels: 1618/-1 1415/-1 1213/-1 1011/-1 809/-1 606/-1 404/-1 202/-1 dev.cpu.0.cx_supported: C1/0 dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_usage: 100.00% last 500us lmmon is not particularly helpful for anything on this board, but that could be because I'm using the Generic kernel and /dev/smb0 is not present: timeserver ~ 134# lmmon -i Motherboard Temp Voltages 255C / 491F / 528KVcore1: +3.984V Vcore2: +3.984V Fan Speeds + 3.3V: +3.984V + 5.0V: +6.654V 1:0 rpm+12.0V: +15.938V 2:0 rpm-12.0V: -15.938V 3:0 rpm- 5.0V: -6.654V Do you have any other suggestions of tools I could use to help answer your question? Perhaps the lack of other C states is causing the excess power consumption (or perhaps your system is more heavily loaded)? I'm assuming for the sake of simplicity that powerd is already enabled (I'm running with powerd_flags=-i 85 -r 60 -p 100)? Dave. -- David Rawling PD Consulting And Security Email: d...@pdconsec.net ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: cannot boot freebsd
On Wed, Nov 11, 2009 at 06:57:02PM -0600, Jesús Abidan wrote: i did it like you say, but something is happening with my installation, it boots always the first OS, i don't have any ideas for having a dual system... argh!! Perchance, is your other system MS-Vista? As I mentioned in a previous response, I have heard of people having problems with dual booting with Vista and having to follow some other procedure for that. But, I haven't used Vista (and do not intend to) so you will have to do some archive searching to find those pieces of information. jerry 2009/11/11 Jerry McAllister jerr...@msu.edu On Wed, Nov 11, 2009 at 02:12:22PM -0600, Jesús Abidan wrote: so, then i need to create 2 slices with gparted, install windows on the first one, and install freebsd on the second one and label this partition automatically by the installer (ad0s1, ad0s2, etc) and install the bootmgr? Yes, essentially except for those partition names. Create the two slices/primary partitions. Install the MS-Win in the first one. I think then MS will call it 'c:' Anyway, FreeBSD will think it is ad0s1. Then install FreeBSD in the second slice/primary partition. MS will not even know it is there. FreeBSD will call it ad0s2. During the install, that ad0s2 slice will be subdivided according to how you tell it into FreeBSD partitions with names like ad0s2a (for root) and ad0s2b (for swap), ad0s2d for whatever - maybe /tmp, ad0s2e for something else, such as /usr, etc. For my general purpose machines I usually subdivide in to the following partitions: amounts as / eg: mount /dev/ad0s2a / b swap cdescribes the slice and is not a real partition dmounts as /tmp eg: mount /dev/ad0s2d /tmp emounts as /usr etc fmounts as /var gmounts as /home or something similar For my systems that are single purpose central servers I tend to do this: amounts as / everything but swap and afscache goes in root. b swap cslice description d/afscache If I have a second drive for scratch or work space I tend to do: amounts as /work and uses up all the space except extra swap bused for additional swap cdescribes the slice The sizes of the various partition-subdivisions depends on the size of the disk and the use being made of the machine and what I want to install on it and how I want to handle backups. jerry 2009/11/11 Jerry McAllister jerr...@msu.edu On Wed, Nov 11, 2009 at 01:22:58PM -0600, Jesús Abidan wrote: ok. the slices in freebsd are little tricky, i will check my installation and send some feedback later. ?? FreeBSD slices are pretty straight forward. They are just the name of the 4 primary divisions of a disk - limited to 4 by BIOS. MS just calls them primary partitions instead of slices. The major difference is how they might be subdivided. MS does what it calls logical partitions. FreeBSD subdivisions are just called partitions. The fdisk(8) utility creates slices (or primary partitions in MS, though the FreeBSD fdisk is not very conversant with some of the new MS types so you may be better off using something else to create primary partitions/slices if other OSen are being accomodated). Slices (or primary partitions) are identified by numbers 1..4. The bsdlabel(8) utility in FreeBSD is what subdivides a slice in to partitions. It used to be that it was limited to 7 real partitions identified with letters a..h with the letter 'c' reserved to describe the whole slice and not usable as a real partition. Partition 'a' is normally root mounted as '/' and partition 'b' is used as swap. These two (a b) are conventions and not enforced, except that some software may make these assumptions.My understanding is that the newest versions of FreeBSD (8.0) modify or remove the limit and you can have letters above 'h' and thus more subdivisions in a slice, but I haven't tried that yet. In FreeBSD, to create a filesystem from a partition, you run newfs(8) on it. jerry Thanks a lot. 2009/11/11 Jerry McAllister jerr...@msu.edu On Wed, Nov 11, 2009 at 12:27:13PM -0600, Jesús Abidan wrote: i pressed f2 for freebsd and nothing happens... i pressed f1 for windows. I install freebsd on the first partition and now it occurs the viceversa, i cannot boot windows, does it have to be something with the order of the partitions? i mean primary, logical o something like this? MS-Win should optimally be installed on the first primary partition. This is called 'slice 1' by FreeBSD. Then FreeBSD should be
Re: Problems with FreeBSD assembly
Charlie Kester wrote: On Wed 11 Nov 2009 at 17:32:41 PST Charlie Kester wrote: One more thing: Notice that the system call number (or any other dword) should also be pushed onto the stack before the int 80h. The reason for this is given at the top of the page: although the kernel is accessed using int 80h, it is assumed the program will call a function that issues int 80h, rather than issuing int 80h directly. So the extra dword pushed onto the stack takes the place of the return address from the function the kernel expects to have been called. And since you're not actually using as a return address, it doesn't matter what value it actually has. The kernel doesn't use it for anything; it just expects it to be there in a properly arranged stack frame. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org The push eax is what made it work. So that was the problem. Stdin and stdout do not need to opened before they are used, as in C. Thank you everyone for your help on this, that solved it. Here is the code that works: section .data hello db 'Hello, World!', 0xa hbytes equ $ - hello section .text global _start _start: pushdword hbytes pushdword hello pushdword 1 mov eax,0x4 push eax int 0x80 add esp,16 pushdword 0 mov eax,0x1 push eax int 0x80 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: cannot boot freebsd
On Thu, Nov 12, 2009 at 10:04:29AM -0600, Jesús Abidan wrote: i think i have the problem... i have two hard disks, IDE and SATA, i saw in my MS XP, my root label is F: instead of C: maybe it is something related to jumpers or something like that? That is a little surprise to me, but I am not up on the ins and outs of IDE/SATA labeling.Most of my machines - all of the servers - have SCSI or SAS disk which does it differently (and more easily). My only SATA machines have only a single disk. One thing to ask is: what does it have as c:, d: and e: ?? Maybe something is plugged in the wrong - or inconvenient - order on the controller. Or, I suppose there might be a jumper issue. jerry 2009/11/12 Jesús Abidan jabi...@gmail.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: cannot boot freebsd
On Thu, Nov 12, 2009 at 09:38:27AM -0600, Jesús Abidan wrote: First, please send all messages to the freebsd-questions list and not just to me. That is proper list etiquette, plus you will be able to get responses from more than just me. Others may know more. In other words, always do a 'reply all' on list email. read this: First, be aware that all the information necessary to boot FreeBSD must be located within the first 1,024 cylinders of the hard disk. This is necessary for the FreeBSD boot manager to work; it means that when you partition the disk for FreeBSD using FIPS, either the root partition must be completely located within the first 1,024 cylinders or you can use a separate boot partition that is completely located in the first 1,024 cylinders. Use the Start and End cylinder readouts in FIPS to determine where your partitions start and end. If you choose the latter option, the root partition does not have to be completely located in the first 1,024 cylinders. Note that completely located means that the partition has to both start and end below the 1,024th cylinder. Simply starting below the 1,024th cylinder is not good enough. This is obsolete information for most computers with BIOS and disks created later than about 1998. That really means all computers functioning today. It is also obsolete for FreeBSD systems which do not use BIOS to talk to the disk. There are numerous web sites that explain this including some documentation on the FreeBSD web site:http://www.freebsd.org/ jerry http://www.informit.com/articles/article.aspx?p=32084seqNum=4; as i see, do i need to create a partition(located in the first 1024cylinders) to BOOT from? (sorry) 2009/11/12 Jesús Abidan jabi...@gmail.com no, it's not vista, is XP 2009/11/12 Jerry McAllister jerr...@msu.edu On Wed, Nov 11, 2009 at 06:57:02PM -0600, Jesús Abidan wrote: i did it like you say, but something is happening with my installation, it boots always the first OS, i don't have any ideas for having a dual system... argh!! Perchance, is your other system MS-Vista? As I mentioned in a previous response, I have heard of people having problems with dual booting with Vista and having to follow some other procedure for that. But, I haven't used Vista (and do not intend to) so you will have to do some archive searching to find those pieces of information. jerry 2009/11/11 Jerry McAllister jerr...@msu.edu On Wed, Nov 11, 2009 at 02:12:22PM -0600, Jesús Abidan wrote: so, then i need to create 2 slices with gparted, install windows on the first one, and install freebsd on the second one and label this partition automatically by the installer (ad0s1, ad0s2, etc) and install the bootmgr? Yes, essentially except for those partition names. Create the two slices/primary partitions. Install the MS-Win in the first one. I think then MS will call it 'c:' Anyway, FreeBSD will think it is ad0s1. Then install FreeBSD in the second slice/primary partition. MS will not even know it is there. FreeBSD will call it ad0s2. During the install, that ad0s2 slice will be subdivided according to how you tell it into FreeBSD partitions with names like ad0s2a (for root) and ad0s2b (for swap), ad0s2d for whatever - maybe /tmp, ad0s2e for something else, such as /usr, etc. For my general purpose machines I usually subdivide in to the following partitions: amounts as / eg: mount /dev/ad0s2a / b swap cdescribes the slice and is not a real partition dmounts as /tmp eg: mount /dev/ad0s2d /tmp emounts as /usr etc fmounts as /var gmounts as /home or something similar For my systems that are single purpose central servers I tend to do this: amounts as / everything but swap and afscache goes in root. b swap cslice description d/afscache If I have a second drive for scratch or work space I tend to do: amounts as /work and uses up all the space except extra swap bused for additional swap cdescribes the slice The sizes of the various partition-subdivisions depends on the size of the disk and the use being made of the machine and what I want to install on it and how I want to handle backups. jerry 2009/11/11 Jerry McAllister jerr...@msu.edu On Wed, Nov 11, 2009 at 01:22:58PM -0600, Jesús Abidan wrote: ok. the slices in freebsd are little tricky, i will check my installation and send some feedback later. ?? FreeBSD slices are pretty straight forward. They are just the name of the 4 primary divisions of a disk - limited to 4 by BIOS.
Re: cannot boot freebsd
ok, sorry... 2009/11/12 Jerry McAllister jerr...@msu.edu On Thu, Nov 12, 2009 at 09:38:27AM -0600, Jesús Abidan wrote: First, please send all messages to the freebsd-questions list and not just to me. That is proper list etiquette, plus you will be able to get responses from more than just me. Others may know more. In other words, always do a 'reply all' on list email. read this: First, be aware that all the information necessary to boot FreeBSD must be located within the first 1,024 cylinders of the hard disk. This is necessary for the FreeBSD boot manager to work; it means that when you partition the disk for FreeBSD using FIPS, either the root partition must be completely located within the first 1,024 cylinders or you can use a separate boot partition that is completely located in the first 1,024 cylinders. Use the Start and End cylinder readouts in FIPS to determine where your partitions start and end. If you choose the latter option, the root partition does not have to be completely located in the first 1,024 cylinders. Note that completely located means that the partition has to both start and end below the 1,024th cylinder. Simply starting below the 1,024th cylinder is not good enough. This is obsolete information for most computers with BIOS and disks created later than about 1998. That really means all computers functioning today. It is also obsolete for FreeBSD systems which do not use BIOS to talk to the disk. There are numerous web sites that explain this including some documentation on the FreeBSD web site:http://www.freebsd.org/ jerry http://www.informit.com/articles/article.aspx?p=32084seqNum=4; as i see, do i need to create a partition(located in the first 1024cylinders) to BOOT from? (sorry) 2009/11/12 Jesús Abidan jabi...@gmail.com no, it's not vista, is XP 2009/11/12 Jerry McAllister jerr...@msu.edu On Wed, Nov 11, 2009 at 06:57:02PM -0600, Jesús Abidan wrote: i did it like you say, but something is happening with my installation, it boots always the first OS, i don't have any ideas for having a dual system... argh!! Perchance, is your other system MS-Vista? As I mentioned in a previous response, I have heard of people having problems with dual booting with Vista and having to follow some other procedure for that. But, I haven't used Vista (and do not intend to) so you will have to do some archive searching to find those pieces of information. jerry 2009/11/11 Jerry McAllister jerr...@msu.edu On Wed, Nov 11, 2009 at 02:12:22PM -0600, Jesús Abidan wrote: so, then i need to create 2 slices with gparted, install windows on the first one, and install freebsd on the second one and label this partition automatically by the installer (ad0s1, ad0s2, etc) and install the bootmgr? Yes, essentially except for those partition names. Create the two slices/primary partitions. Install the MS-Win in the first one. I think then MS will call it 'c:' Anyway, FreeBSD will think it is ad0s1. Then install FreeBSD in the second slice/primary partition. MS will not even know it is there. FreeBSD will call it ad0s2. During the install, that ad0s2 slice will be subdivided according to how you tell it into FreeBSD partitions with names like ad0s2a (for root) and ad0s2b (for swap), ad0s2d for whatever - maybe /tmp, ad0s2e for something else, such as /usr, etc. For my general purpose machines I usually subdivide in to the following partitions: amounts as / eg: mount /dev/ad0s2a / b swap cdescribes the slice and is not a real partition dmounts as /tmp eg: mount /dev/ad0s2d /tmp emounts as /usr etc fmounts as /var gmounts as /home or something similar For my systems that are single purpose central servers I tend to do this: amounts as / everything but swap and afscache goes in root. b swap cslice description d/afscache If I have a second drive for scratch or work space I tend to do: amounts as /work and uses up all the space except extra swap bused for additional swap cdescribes the slice The sizes of the various partition-subdivisions depends on the size of the disk and the use being made of the machine and what I want to install on it and how I want to handle backups. jerry 2009/11/11 Jerry McAllister jerr...@msu.edu On Wed, Nov 11, 2009 at 01:22:58PM -0600, Jesús Abidan wrote: ok. the slices in freebsd are little tricky, i will check my installation and send
Re: cannot boot freebsd
no idea... the machine had only one hard drive(PATA), then i plugged a new sata HD(freebsd style), with information on it. The PATA drive is cofigured as the primary disk, and the sata in bios it says is in PORT 0. I'll try removing the SATA disk and install freebsd, maybe is the jumper configuration. 2009/11/12 Jerry McAllister jerr...@msu.edu On Thu, Nov 12, 2009 at 10:04:29AM -0600, Jesús Abidan wrote: i think i have the problem... i have two hard disks, IDE and SATA, i saw in my MS XP, my root label is F: instead of C: maybe it is something related to jumpers or something like that? That is a little surprise to me, but I am not up on the ins and outs of IDE/SATA labeling.Most of my machines - all of the servers - have SCSI or SAS disk which does it differently (and more easily). My only SATA machines have only a single disk. One thing to ask is: what does it have as c:, d: and e: ?? Maybe something is plugged in the wrong - or inconvenient - order on the controller. Or, I suppose there might be a jumper issue. jerry 2009/11/12 Jesús Abidan jabi...@gmail.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: cannot boot freebsd
no, it is not the disk, i removed it and the same problem... 2009/11/12 Jesús Abidan jabi...@gmail.com no idea... the machine had only one hard drive(PATA), then i plugged a new sata HD(freebsd style), with information on it. The PATA drive is cofigured as the primary disk, and the sata in bios it says is in PORT 0. I'll try removing the SATA disk and install freebsd, maybe is the jumper configuration. 2009/11/12 Jerry McAllister jerr...@msu.edu On Thu, Nov 12, 2009 at 10:04:29AM -0600, Jesús Abidan wrote: i think i have the problem... i have two hard disks, IDE and SATA, i saw in my MS XP, my root label is F: instead of C: maybe it is something related to jumpers or something like that? That is a little surprise to me, but I am not up on the ins and outs of IDE/SATA labeling.Most of my machines - all of the servers - have SCSI or SAS disk which does it differently (and more easily). My only SATA machines have only a single disk. One thing to ask is: what does it have as c:, d: and e: ?? Maybe something is plugged in the wrong - or inconvenient - order on the controller. Or, I suppose there might be a jumper issue. jerry 2009/11/12 Jesús Abidan jabi...@gmail.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Problems with FreeBSD assembly
On Wed, 11 Nov 2009 14:43:21 -0500, David Jackson norsta...@gmail.com wrote: I am having great difficulty running a very simple assembler program on FreeBSD on x86 in my efforts to learn some assembly programming on FreeBSD. I have tried to compile the following with nasm, however i get nothing in response when I attempt to run this program: section .data hello db 'Hello, World!', 0xa hbytes equ $ - hello section .text global _start _start: pushdword hbytes pushdword hello pushdword 1 mov eax,0x4 int 0x80 add esp,12 pushdword 0 mov eax,0x1 int 0x80 nasm -f elf -o hello1s.o hello1.s ld -s -o hello1s hello1s.o ./hello1s prints nothing. What is wrong here? It should print hello world. Thanks in advance for your help, it is greatly appreciated. Hi David. The truss utility is your friend when you are trying to decipher system call problems. It can translate system call arguments to human-readable output; a very useful property when debugging issues like this. For example here's the output for your original code: $ truss ./hello write(134516904,0xe,1) ERR#9 'Bad file descriptor' process exit, rval = 1 Note how the arguments of write() are 'misplaced'? The answer is that you are not calling the system call with C-like conventions (including a function call return address). The calling conventions of system calls are described in the Developer's Handbook at: http://www.freebsd.org/doc/en/books/developers-handbook/x86-system-calls.html You are missing a dword push before interrupting. As the dev handbook says, you have to use C calling conventions or push an extra (ignorable) dword before interrupting: An assembly language program can do that as well. For example, we could open a file: | kernel: | int 80h ; Call kernel | ret | | open: | pushdword mode | pushdword flags | pushdword path | mov eax, 5 | callkernel | add esp, byte 12 | ret This is a very clean and portable way of coding. If you need to port the code to a UNIX system which uses a different interrupt, or a different way of passing parameters, all you need to change is the kernel procedure. But assembly language programmers like to shave off cycles. The above example requires a call/ret combination. We can eliminate it by pushing an extra dword: | open: | pushdword mode | pushdword flags | pushdword path | mov eax, 5 | pusheax ; Or any other dword | int 80h | add esp, byte 16 So by pushing *one* more dword before you interrupt should work fine (and it does, from a small test I ran just now): : keram...@kobe:/home/keramida$ cat hello.s : section .data : hello db 'Hello, World!', 0xa : hbytes equ $ - hello : : section .text : global _start : _start: : push dword hbytes : push dword hello : push dword 1 : push dword 0 ;or any other dword : mov eax, 4 : int 0x80 : add esp, byte 16 : : push dword 0 : push dword 0 ;ignored dword : mov eax, 1 : int 0x80 : add esp, byte 8 ;NOT REACHED : keram...@kobe:/home/keramida$ nasm -f elf -o hello.o hello.s : keram...@kobe:/home/keramida$ ld -s -o hello hello.o : keram...@kobe:/home/keramida$ truss ./hello : Hello, World! : write(1,Hello, World!\n,14)= 14 (0xe) : process exit, rval = 0 : keram...@kobe:/home/keramida$ HTH, Giorgos ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: where's my konqueror?
On Thu, Nov 12, 2009 at 7:50 PM, usleepl...@gmail.com wrote: On Thu, Nov 12, 2009 at 3:17 PM, Herbert J. Skuhra h.sku...@gmail.com wrote: On Thu, Nov 12, 2009 at 2:47 PM, Anton Shterenlikht me...@bristol.ac.uk wrote: I installed kdebase-4.3.1_1, but cannot find konqueror. It's supposed be a part of kdebase, isn't it? % grep konqueror /usr/ports/x11/kdebase4/pkg-plist bin/konqueror lib/libkdeinit4_konqueror.so [...] my 4.3.0 decided to install everything into /usr/local/kde4. so my konq is at /usr/local/kde4/bin/konqueror. don't know why. didn't dare to ask. for co-existence with kde3 regards, usleep --Herbert ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
APM
Hello, On Tuesday, I was all happy that I got APM working on my pre-2000 Compaq Deskpro following these instructions: http://forums.freebsd.org/showthread.php?t=4619 On Wednesday, after configuring the router to wake the server whenever DHCP leases are touched (quickdirty hack), I was disappointed to learn that suspend mode saves only ~1watt over the inherent use of the HLT instruction by the kernel. I was expecting a savings of ~6 watts due to the disk spinning down. Approx power consumption (+- 1W): 51 Watts (busy; disk + CPU IIRC; not retested with DVD activity) 35 Watts idle 34 Watts suspend 3 Watts off (Measured using Kill-A-Watt model P4400) Part of the problem may be that I am not using the on board IDE controllers: I am using a Promise (Ultra100TX2) PDC20268 I realize the memory can't be shutdown without Hibernation support, but the disks can be spun down manually (using atacontrol): http://forums.freebsd.org/showthread.php?t=1012 However, when I try to do that, I find that the disk wakes within 2 seconds of spinning down. I noticed that the spindowns are logged. Could the log being written be causing the drive to spin up again? apm(4) says that apm gets around that problem by logging the suspend event AFTER waking up. I suppose it would be tricky to concurrently log to spin down of several disks that way. For example: Say disk with /var/log spins down at 00:00:05, but the rarely-used /srv drive spins down at 00:00:07. Should the logging drive defer recording BOTH spin-down messages, or spin-up, then spin-down again at about 00:15:20? Not that important for a 1W savings, but apm says my BIOS supports the following capabilities: global standby state // Supported sleep modes global suspend state resume timer from standby // Resume timer allows sleep to last resume timer from suspend // specific period of time? RI resume from standby // Wake on interrupts, i assume RI resume from suspend Would it be possible to coordinate the cron dameon with the suspend timer? Ie: wake 15 sec- 5min before next cron job? Not worth it without hibernate support though. apm(4) does not mention suspend timers at all. acpi(4) mentions timer as a sub-device and feature that can be disabled. Regards, James Phillips __ Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Cut/Paste with USB mouse inoperative
On Wed, 11 Nov 2009 06:40:11 -0500, Carmel carmel...@hotmail.com wrote: Well, the results of that test does not exactly exhilarate me. # moused -f -d -p /dev/ums0 moused: unable to open /dev/ums0: Device busy Seems that there's already a moused running. Use ps ax to find it PID and simply kill it. I had to do the same to check. Afterwards, enabling moused again is possible. A common problem in today's society. It reminds me of an old adage: Just like with unexploded bombs, Blame is best dealt with by passing it as quickly as possible to someone else. With the idea in mind that responsibility for confirming to existing standards is on the manufacturer's side. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Tracking commit messages from cli
On Mon, Nov 09, 2009 at 05:55:57PM -0500, APseudoUtopia wrote: On Sun, Nov 8, 2009 at 2:06 PM, Troels Kofoed Jacobsen tkjacob...@gmail.com wrote: Hi all With pkg_version I can easily see which installed ports has newer versions available, but what I miss is a way to see what has changed. The reason for this is that commit messages often say that only the pkg-plist has changed or something that does not make me want to update. Right now I'm reading the commit messages from the cvs web frontend, but it would be awesome with a program that could say: gd-2.0.35_1,1 needs updating (index has 2.0.35_2,1) Commit messages between the versions: blah blah blah blah ... ... ... I know freshports exist, but I would rather not have to open a web browser. Does such a program exist or do I have to write my own. In the latter case can anyone point me to an easy way to get raw-text versions of commit messages without having to track the whole tree. Does freshports e.g. have an api -- it has all the necessary information, just not available in a suitable form (to my knowledge) Best regards Troels Kofoed Jacobsen I asked this question some time ago and never got a response. I currently just use a browser and visit www.freebsd.org/ports/ and read the commit log there. So far, I haven't found any other alternative. If anyone's interested I've hacked together a small python script doing this: https://www.student.dtu.dk/~s052580/?page=software/commitmessages Best regards Troels Kofoed Jacobsen ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Cut/Paste with USB mouse inoperative
On Thu, 12 Nov 2009 20:37:04 +0100 Polytropon Polytropon free...@edvax.de replied: Well, the results of that test does not exactly exhilarate me. # moused -f -d -p /dev/ums0 moused: unable to open /dev/ums0: Device busy Seems that there's already a moused running. Use ps ax to find it PID and simply kill it. I had to do the same to check. Afterwards, enabling moused again is possible. 'moused' was running. I have no idea why though. I did not start it. Anyway, I killed it, confirmed it was dead, and then ran the command: moused -f -d -p /dev/ums0 It failed again with a 'device busy' message. -- Carmel carmel...@hotmail.com |=== |=== |=== |=== | IBM Pollyanna Principle: Machines should work. People should think. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Cut/Paste with USB mouse inoperative
On Thu, 12 Nov 2009, Polytropon wrote: On Wed, 11 Nov 2009 06:40:11 -0500, Carmel carmel...@hotmail.com wrote: Well, the results of that test does not exactly exhilarate me. # moused -f -d -p /dev/ums0 moused: unable to open /dev/ums0: Device busy Seems that there's already a moused running. Common with USB mice. /etc/defaults/rc.conf has moused_nondefault_enable=YES, and rc.conf(5) says: Having this variable set to YES allows a usb(4) mouse, for example, to be enabled as soon as it is plugged in. -Warren Block * Rapid City, South Dakota USA ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Cut/Paste with USB mouse inoperative
On Thu, 12 Nov 2009 15:21:18 -0500, Carmel carmel...@hotmail.com wrote: 'moused' was running. I have no idea why though. I did not start it. It surely was usbd. Anyway, I killed it, confirmed it was dead, and then ran the command: moused -f -d -p /dev/ums0 It failed again with a 'device busy' message. Then there's something wrong. It should look like this: # moused -f -d -p /dev/ums0 moused: unable to open /dev/ums0: Device busy # ps ax | grep mouse 646 ?? Is 0:03.63 /usr/sbin/moused -p /dev/ums0 -t auto -I /var/run/mou # kill -9 646 # moused -f -d -p /dev/ums0 moused: proto params: f8 80 00 00 8 00 ff moused: port: /dev/ums0 interface: usb type: sysmouse model: generic moused: received char 0x87 moused: received char 0x0 moused: received char 0xff moused: received char 0x0 moused: received char 0x0 moused: received char 0x0 moused: received char 0x0 moused: received char 0x7f moused: assembled full packet (len 8) 87,0,ff,0,0,0,0,7f moused: ts: 5396 251403094 moused: flags:8000 buttons: obuttons: moused: activity : buttons 0x dx 0 dy 1 dz 0 moused: received char 0x87 moused: received char 0x0 moused: received char 0xff moused: received char 0x0 moused: received char 0xff moused: received char 0x0 moused: received char 0x0 moused: received char 0x7f moused: assembled full packet (len 8) 87,0,ff,0,ff,0,0,7f moused: ts: 5396 261402131 moused: flags:8000 buttons: obuttons: moused: activity : buttons 0x dx 0 dy 2 dz 0 [...] moused: assembled full packet (len 8) 86,0,0,0,0,0,0,7f moused: ts: 5397 608884283 moused: : 5395 429419435 moused: flags:0004 buttons:0004 obuttons: moused: activity : buttons 0x0004 dx 0 dy 0 dz 0 moused: mstate[2]-count:1 moused: button 3 count 1 moused: received char 0x87 moused: received char 0x0 moused: received char 0x0 moused: received char 0x0 moused: received char 0x0 moused: received char 0x0 moused: received char 0x0 moused: received char 0x7f moused: assembled full packet (len 8) 87,0,0,0,0,0,0,7f moused: ts: 5397 756882422 moused: flags:0004 buttons: obuttons:0004 moused: activity : buttons 0x dx 0 dy 0 dz 0 moused: mstate[2]-count:1 moused: button 3 count 0 ^C # moused -p /dev/ums0 (I just started moused again manually, sufficient.) Everything is done as root, of course. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: atom based servers
Curious, how did you get it installed? My motherboard doesn't have an IDE port (so, no IDE CD-ROM) and don't think booting from USB-CDROM is supported Booting from USB Flash drive works? David Rawling wrote: -Original Message- From: Brian Whalen Sent: Thu 12/11/2009 9:26 AM I see supermicro and potentially others have atom servers available, anyone tried these on freebsd with success? Brian Hi Brian Indeed, I have a FreeBSD 8.0RC1 system running as my primary time server for the home network. Since it's an Atom 330, it fully supports 64-bit mode (an opportunity I have grasped with both hands). The board I happen to be using is an Intel DG945GCLF2 - a clone board with just 1 DIMM slot and two SATA ports. Everything I need to have supported Just Worked out of the box. The server itself is running at a very low load level: timeserver ~ 15 uptime 1:00PM up 6 days, 12:38, 1 user, load averages: 0.00, 0.00, 0.00 I can provide the output of most any other commands if you'd like to see anything specific. I rather suspect that the Supermicro and other server-class Atoms will still be using the Intel 945 or similar chipsets. Dave. -- David Rawling PD Consulting And Security Email: d...@pdconsec.net ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org