Sponsored Content
Top Forums Programming Running bin file from a module Post 302506162 by Corona688 on Friday 18th of March 2011 04:55:25 PM
Old 03-18-2011
Quote:
Originally Posted by Chrisdot
Well, I show you "Big picture" as you asked for.

Actors:
User
PC with preinstalled OS: RedHat from 2010year
Network Interface Card (let's call it "NIC") produced in 2011year

Usage model:
1. User plugs NIC to PCIe bus in PC
2. User turns on PC
3. User has got an internet connection

Do you got the idea? Just plug and play - no drivers, no additional installations, etc.
Well that only took three entire pages of begging. THANK YOU.

I think you may be going about this the wrong way still though. The way to do this would be to add general-purpose UEFI support to Linux, not to hack one special thing that supports UEFI. And you'd probably want to use some sort of emulator, not something that converts UEFI code into whatever code your kernel uses.

But the biggest problem is I'm not sure UEFI even applies once an operating system's been loaded. Linux used to support BIOS-mode disk devices, for example, until it became clear that there were just too many corner cases where running in protected mode and controlling your own interrupts and DMA and all that jazz prevented BIOS calls from being able to work the way it was intended no matter how hard you tried to fool them. Sometimes. Very firmware-dependent. So they dropped that and added support for droves of different hard drive controllers instead, and that's how it's worked for a long time. Some coherent standards like AHCI are helping make drivers more generic again though.

You could make something like a DOS around raw UEFI devices -- a small self-contained OS which relies on system firmware to do most of the work. It could be surprisingly sophisticated with the system firmware features available now. Networking and graphics could be sufficient to run a reasonable impression of a web browser to download and save drivers with.

Last edited by Corona688; 03-18-2011 at 06:04 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

/bin/sh: /usr/bin/vi: No such file or directory when doing crontab

I just set up an ftp server with Red Hat 5.2. I am doing the work, I'm baby stepping, but it seems like every step I get stuck. Currently, I'm trying to set up a crontab job, but I'm getting the following message: /bin/sh: /usr/bin/vi: No such file or directory. I see that vi exists in /bin/vi,... (3 Replies)
Discussion started by: kwalter
3 Replies

2. Programming

find the fully-qualified path for the app my module is running in

Hi- I need the cpp call that will tell me the full path to the app I'm running in. For example, I'm running in a loaded library for either mozilla or firefox, but would like to know the full path to the executable /usr/bin/firefox /usr/bin/mozilla /usr/local/firefox1_5 etc... (For... (4 Replies)
Discussion started by: erwinfletch
4 Replies

3. Linux

How to convert Linux Kernel built-in module into a loadable module

Hi all, I am working on USB data monitoring on Fedora Core 9. Kernel 2.6.25 has a built-in module (the one that isn't loadable, but compiles and links statically with the kernel during compilation) to snoop USB data. It is in <kernel_source_code>/drivers/usb/mon/. I need to know if I can... (0 Replies)
Discussion started by: anitemp
0 Replies

4. Shell Programming and Scripting

Why does my /bin/csh take longer than /bin/perl?

Okay, so I have two "Hello, world!" scripts, "test.pl" and "test.sh". #!/bin/perl -w use strict; print "Hello, world!\n"; #!/bin/csh echo Hello,\ world! When I run test.pl, it runs instantly, always. When I run test.sh, it takes anywhere between 4 and 22 seconds! I'd like to know what... (3 Replies)
Discussion started by: acheong87
3 Replies

5. UNIX for Dummies Questions & Answers

fuser: difference with bin/sh and bin/ksh shell script

Hi, I have a problem I don't understand with fuser. I launch a simple shell script mysleep.sh: I launch the command fuser -fu mysleep.sh but fuser doesn't return anything excepted: mysleep: Then I modify my script switching from #!/bin/sh to #!/bin/ksh I launch the command fuser -fu... (4 Replies)
Discussion started by: Peuj
4 Replies

6. OS X (Apple)

When to use /Users/m/bin instead of /usr/local/bin (& whats the diff?)?

Q1. I understand that /usr/local/bin means I can install/uninstall stuff in here and have any chance of messing up my original system files or effecting any other users. I created this directory myself. But what about the directory I didn't create, namely /Users/m/bin? How is that directory... (1 Reply)
Discussion started by: michellepace
1 Replies

7. Programming

Why am i getting these strange packets while running my packet capture module written in c.?

I have made an packet capture application running on intel machine, it is capturing packets with src address- 17.0.0.0 destination ip- 66.0.0.0, source port- 0, destination port- 0, and protocol- 0 what does these packets mean ? The code written to interpreter captured bytes is given below.... (5 Replies)
Discussion started by: arunpushkar
5 Replies

8. Ubuntu

Compile smbfs module in kernel version 3.10 running Ubuntu 12.04 LTS

Is there any way to compile smbfs module in kernel 3.10 running Ubuntu 12.04 LTS. I did a 'make menuconfig' and it shows cifs. I found out online that smbfs is deprecated and replaced by cifs. I have an old system with kernel version 2.4 which only has smbfs (no cifs). Is it possible to compile... (1 Reply)
Discussion started by: Monil
1 Replies

9. AIX

Redistribution bin required for AIX. j7r164redist.7.1.0.25.bin

Hi, I am planning to install a version of Informatica on my AIX box. It requires a specific java build in pap6470_27sr2-20141101_01(SR2). The current link for IBM 64-bit SDK for AIX®, JavaTM Technology Edition, Version 7 Release 1 has a more recent version in j7r164redist.7.1.0.75.bin. Is... (4 Replies)
Discussion started by: meetpraveens
4 Replies

10. Shell Programming and Scripting

Usage of #!/bin/sh vs #!/bin/bash shell scripts?

Some question about the usage of shell scripts: 1.) Are the commands of the base shell scripts a subset of bash commands? 2.) Assume I got a long, long script WITHOUT the first line. How can I find out if the script was originally designed für "sh" or "bash"? 3.) How can I check a given... (3 Replies)
Discussion started by: pstein
3 Replies
BOOT(8) 						 BSD/i386 System Manager's Manual						   BOOT(8)

NAME
boot -- system bootstrapping procedures DESCRIPTION
Power fail and crash recovery. Normally, the system will reboot itself at power-up or after crashes. An automatic consistency check of the file systems will be performed, and unless this fails, the system will resume multi-user operations. Cold starts. Most i386 PCs attempt to boot first from floppy disk drive 0 (sometimes known as drive A:) and, failing that, from hard disk drive 0 (sometimes known as drive C:, or as drive 0x80 to the BIOS). Some BIOSes allow you to change this default sequence, and may also include a CD-ROM drive as a boot device. Some newer PCs boot using UEFI firmware, not BIOS. That process is described in uefi(8). By default, a three-stage bootstrap is employed, and control is automatically passed from the boot blocks (bootstrap stages one and two) to a separate third-stage bootstrap program, loader(8). This third stage provides more sophisticated control over the booting process than it is possible to achieve in the boot blocks, which are constrained by occupying limited fixed space on a given disk or slice. However, it is possible to dispense with the third stage altogether, either by specifying a kernel name in the boot block parameter file, /boot.config, or, unless option -n is set, by hitting a key during a brief pause (while one of the characters -, , |, or / is displayed) before loader(8) is invoked. Booting will also be attempted at stage two, if the third stage cannot be loaded. The remainder of this subsection deals only with the boot blocks. The loader(8) program is documented separately. After the boot blocks have been loaded, you should see a prompt similar to the following: >> FreeBSD/i386 BOOT Default: 0:ad(0,a)/boot/loader boot: The automatic boot will attempt to load /boot/loader from partition 'a' of either the floppy or the hard disk. This boot may be aborted by typing any character on the keyboard at the 'boot:' prompt. At this time, the following input will be accepted: ? Give a short listing of the files in the root directory of the default boot device, as a hint about available boot files. (A ? may also be specified as the last segment of a path, in which case the listing will be of the relevant subdirectory.) bios_drive:interface(unit,[slice,]part)filename [-aCcDdghmnPprsv] [-Sspeed] Specify boot file and flags. bios_drive The drive number as recognized by the BIOS. 0 for the first drive, 1 for the second drive, etc. interface The type of controller to boot from. Note that the controller is required to have BIOS support since the BIOS services are used to load the boot file image. The supported interfaces are: ad ST506, IDE, ESDI, RLL disks on a WD100[2367] or lookalike controller fd 5 1/4" or 3 1/2" High density floppies da SCSI disk on any supported SCSI controller unit The unit number of the drive on the interface being used. 0 for the first drive, 1 for the second drive, etc. [slice,]part The partition letter inside the BSD portion of the disk. See bsdlabel(8). By convention, only partition 'a' contains a bootable image. If sliced disks are used (``fdisk partitions''), any slice (1 for the first slice, 2 for the second slice, etc.) can be booted from, with the default (if not specified) being the active slice or, otherwise, the first FreeBSD slice. If slice is specified as 0, the first FreeBSD slice (also known as ``compatibility'' slice) is booted from. filename The pathname of the file to boot (relative to the root directory on the specified partition). Defaults to /boot/kernel/kernel. Symbolic links are not supported (hard links are). [-aCcDdghmnPpqrsv] [-Sspeed] Boot flags: -a during kernel initialization, ask for the device to mount as the root file system. -C try to mount root file system from a CD-ROM. -c this flag is currently a no-op. -D boot with the dual console configuration. In the single configuration, the console will be either the internal display or the serial port, depending on the state of the -h option below. In the dual console configuration, both the inter- nal display and the serial port will become the console at the same time, regardless of the state of the -h option. -d enter the DDB kernel debugger (see ddb(4)) as early as possible in kernel initialization. -g use the GDB remote debugging protocol. -h force the serial console. For instance, if you boot from the internal console, you can use the -h option to force the kernel to use the serial port as its console device. The serial port driver sio(4) (but not uart(4)) has a flag (0x20) to override this option. If that flag is set, the serial port will always be used as the console, regardless of the -h option described here. -m mute the console to suppress all console input and output during the boot. -n ignore key press to interrupt boot before loader(8) is invoked. -P probe the keyboard. If no keyboard is found, the -D and -h options are automatically set. -p pause after each attached device during the device probing phase. -q be quiet, do not write anything to the console unless automatic boot fails or is disabled. This option only affects second-stage bootstrap, to prevent next stages from writing to the console use in combination with the -m option. -r use the statically configured default for the device containing the root file system (see config(8)). Normally, the root file system is on the device that the kernel was loaded from. -s boot into single-user mode; if the console is marked as ``insecure'' (see ttys(5)), the root password must be entered. -Sspeed set the speed of the serial console to speed. The default is 9600 unless it has been overridden by setting BOOT_COMCONSOLE_SPEED in make.conf(5) and recompiling and reinstalling the boot blocks. -v be verbose during device probing (and later). Use the /boot.config file to set the default configuration options for the boot block code. See boot.config(5) for more information about the /boot.config file. FILES
/boot.config parameters for the boot blocks (optional) /boot/boot1 first stage bootstrap file /boot/boot2 second stage bootstrap file /boot/loader third stage bootstrap /boot/kernel/kernel default kernel /boot/kernel.old/kernel typical non-default kernel (optional) DIAGNOSTICS
When disk-related errors occur, these are reported by the second-stage bootstrap using the same error codes returned by the BIOS, for example ``Disk error 0x1 (lba=0x12345678)''. Here is a partial list of these error codes: 0x1 Invalid argument 0x2 Address mark not found 0x4 Sector not found 0x8 DMA overrun 0x9 DMA attempt across 64K boundary 0xc Invalid media 0x10 Uncorrectable CRC/ECC error 0x20 Controller failure 0x40 Seek failed 0x80 Timeout NOTE: On older machines, or otherwise where EDD support (disk packet interface support) is not available, all boot-related files and struc- tures (including the kernel) that need to be accessed during the boot phase must reside on the disk at or below cylinder 1023 (as the BIOS understands the geometry). When a ``Disk error 0x1'' is reported by the second-stage bootstrap, it generally means that this requirement has not been adhered to. SEE ALSO
ddb(4), boot.config(5), make.conf(5), ttys(5), boot0cfg(8), bsdlabel(8), btxld(8), config(8), gptboot(8), halt(8), loader(8), nextboot(8), reboot(8), shutdown(8), uefi(8) BUGS
The bsdlabel format used by this version of BSD is quite different from that of other architectures. Due to space constraints, the keyboard probe initiated by the -P option is simply a test that the BIOS has detected an ``extended'' keyboard. If an ``XT/AT'' keyboard (with no F11 and F12 keys, etc.) is attached, the probe will fail. BSD
November 14, 2014 BSD
All times are GMT -4. The time now is 09:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy