aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc1
Commit message (Collapse)AuthorAgeFilesLines
* Rewrite of the CAM error recovery code.Kenneth D. Merry2001-03-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the major changes include: - The SCSI error handling portion of cam_periph_error() has been broken out into a number of subfunctions to better modularize the code that handles the hierarchy of SCSI errors. As a result, the code is now much easier to read. - String handling and error printing has been significantly revamped. We now use sbufs to do string formatting instead of using printfs (for the kernel) and snprintf/strncat (for userland) as before. There is a new catchall error printing routine, cam_error_print() and its string-based counterpart, cam_error_string() that allow the kernel and userland applications to pass in a CCB and have errors printed out properly, whether or not they're SCSI errors. Among other things, this helped eliminate a fair amount of duplicate code in camcontrol. We now print out more information than before, including the CAM status and SCSI status and the error recovery action taken to remedy the problem. - sbufs are now available in userland, via libsbuf. This change was necessary since most of the error printing code is shared between libcam and the kernel. - A new transfer settings interface is included in this checkin. This code is #ifdef'ed out, and is primarily intended to aid discussion with HBA driver authors on the final form the interface should take. There is example code in the ahc(4) driver that implements the HBA driver side of the new interface. The new transfer settings code won't be enabled until we're ready to switch all HBA drivers over to the new interface. src/Makefile.inc1, lib/Makefile: Add libsbuf. It must be built before libcam, since libcam uses sbuf routines. libcam/Makefile: libcam now depends on libsbuf. libsbuf/Makefile: Add a makefile for libsbuf. This pulls in the sbuf sources from sys/kern. bsd.libnames.mk: Add LIBSBUF. camcontrol/Makefile: Add -lsbuf. Since camcontrol is statically linked, we can't depend on the dynamic linker to pull in libsbuf. camcontrol.c: Use cam_error_print() instead of checking for CAM_SCSI_STATUS_ERROR on every failed CCB. sbuf.9: Change the prototypes for sbuf_cat() and sbuf_cpy() so that the source string is now a const char *. This is more in line wth the standard system string functions, and helps eliminate warnings when dealing with a const source buffer. Fix a typo. cam.c: Add description strings for the various CAM error status values, as well as routines to look up those strings. Add new cam_error_string() and cam_error_print() routines for userland and the kernel. cam.h: Add a new CAM flag, CAM_RETRY_SELTO. Add enumerated types for the various options available with cam_error_print() and cam_error_string(). cam_ccb.h: Add new transfer negotiation structures/types. Change inq_len in the ccb_getdev structure to be "reserved". This field has never been filled in, and will be removed when we next bump the CAM version. cam_debug.h: Fix typo. cam_periph.c: Modularize cam_periph_error(). The SCSI error handling part of cam_periph_error() is now in camperiphscsistatuserror() and camperiphscsisenseerror(). In cam_periph_lock(), increase the reference count on the periph while we wait for our lock attempt to succeed so that the periph won't go away while we're sleeping. cam_xpt.c: Add new transfer negotiation code. (ifdefed out) Add a new function, xpt_path_string(). This is a string/sbuf analog to xpt_print_path(). scsi_all.c: Revamp string handing and error printing code. We now use sbufs for much of the string formatting code. More of that code is shared between userland the kernel. scsi_all.h: Get rid of SS_TURSTART, it wasn't terribly useful in the first place. Add a new error action, SS_REQSENSE. (Send a request sense and then retry the command.) This is useful when the controller hasn't performed autosense for some reason. Change the default actions around a bit. scsi_cd.c, scsi_da.c, scsi_pt.c, scsi_ses.c: SF_RETRY_SELTO -> CAM_RETRY_SELTO. Selection timeouts shouldn't be covered by a sense flag. scsi_pass.[ch]: SF_RETRY_SELTO -> CAM_RETRY_SELTO. Get rid of the last vestiges of a read/write interface. libkern/bsearch.c, sys/libkern.h, conf/files: Add bsearch.c, which is needed for some of the new table lookup routines. aic7xxx_freebsd.c: Define AHC_NEW_TRAN_SETTINGS if CAM_NEW_TRAN_CODE is defined. sbuf.h, subr_sbuf.c: Add the appropriate #ifdefs so sbufs can compile and run in userland. Change sbuf_printf() to use vsnprintf() instead of kvprintf(), which is only available in the kernel. Change the source string for sbuf_cpy() and sbuf_cat() to be a const char *. Add __BEGIN_DECLS and __END_DECLS around function prototypes since they're now exported to userland. kdump/mkioctls: Include stdio.h before cam.h since cam.h now includes a function with a FILE * argument. Submitted by: gibbs (mostly) Reviewed by: jdp, marcel (libsbuf makefile changes) Reviewed by: des (sbuf changes) Reviewed by: ken Notes: svn path=/head/; revision=74840
* Add missing NOSECURE check for `includes' target.Ruslan Ermilov2001-03-261-1/+1
| | | | | | | Reviewed by: markm Notes: svn path=/head/; revision=74812
* Enhancement to 1.99 -> 1.100.Ruslan Ermilov2001-03-221-2/+1
| | | | | | | Avoid EPERM from ln(1) in a different (proper) way. Notes: svn path=/head/; revision=74645
* setlocale(3) has been fixed to match POSIX standard:Ruslan Ermilov2001-03-021-2/+2
| | | | | | | LC_ALL takes precedence over other LC_* envariables. Notes: svn path=/head/; revision=73349
* MACHINE_ARCH is the target arch to crossbuild to, not TARGET_ARCH.John Baldwin2001-02-221-1/+1
| | | | | | | Requested by: marcel Notes: svn path=/head/; revision=72924
* Document TARGET_ARCH.John Baldwin2001-02-221-0/+1
| | | | Notes: svn path=/head/; revision=72859
* Removed some garbage (genassym(8) and its infrastructure).Bruce Evans2001-02-171-1/+1
| | | | Notes: svn path=/head/; revision=72558
* Fix make world.Mark Murray2001-02-141-2/+1
| | | | Notes: svn path=/head/; revision=72492
* Provide backwards compatable recognition of ${KERNEL}. You should bePeter Wemm2001-01-231-0/+11
| | | | | | | | able to use KERNEL= again with buildkernel, but it will point you at KERNCONF= and press on regardless. Notes: svn path=/head/; revision=71419
* Sigh, I thought we still had the rm -rf objdir stuff in make world, whichPeter Wemm2001-01-221-1/+2
| | | | | | | | | | would have taken care of the possibility of buildkernel crossing over from one binutils set to another. Back out the part about turning off 'make clean' if the 'make depend' is still active, but add a NO_KERNELCLEAN target instead that works like NOCLEAN but just for the kernel. Notes: svn path=/head/; revision=71401
* Use 'make clean' instead of 'config -r', and only if the 'depend' step hasPeter Wemm2001-01-221-4/+4
| | | | | | | | been skipped. We went to a lot of trouble to make the 'blow away' stage unneeded, and it has not been needed for quite some time. Notes: svn path=/head/; revision=71397
* As threatened in hackers@ on Friday, obviate the need for a buildworldWarner Losh2001-01-221-2/+7
| | | | | | | | | | | | to preceed a buildkernel. The buildworld is still required when upgrading across major releases, across binutil upgrades and when config changes version. If buildkernel breaks, and you haven't done a buildworld, then do not complain unless you do a buildworld and it still breaks. Notes: svn path=/head/; revision=71366
* Using "KERNEL" for buildkernel was a very very bad mistake. $KERNEL isPeter Wemm2001-01-221-4/+4
| | | | | | | | | | | | | | | | already used by the kernel makefiles themselves, and this leads to a lot of trouble when people put "KERNEL=MYKERNEL" in make.conf. Bite the bullet and change it to KERNCONF instead, before it gets too far entrenched. The kernel Makefiles use ${KERNEL} as the name of what to install the kernel as, eg: /boot/${KERNEL}/kernel or /${KERNEL}. This leads to much unhappiness with things like /LOCAL instead of /kernel. buildkernel is severely limited as it is only useful directly after a buildworld. Reviewed by: jhb Notes: svn path=/head/; revision=71364
* Also add some timing information for kernel builds so that it'sJordan K. Hubbard2001-01-211-2/+5
| | | | | | | | easy to do "make world kernel |grep -e '^>>>'" and get a complete event log. Notes: svn path=/head/; revision=71355
* Create a build-tools target for sysinstall and rtermcap. This is stillPeter Wemm2001-01-191-1/+1
| | | | | | | | | | not right because rtermcap would be reading the *host* termcap, not from the termcap in the src tree. Besides, /usr/sbin/sysinstall (not the crunched one in /stand) should use the runtime termcap not the precompiled set. Notes: svn path=/head/; revision=71238
* Removed pc98-hack of aout tools.KATO Takenori2000-12-241-10/+1
| | | | Notes: svn path=/head/; revision=70334
* Fix cross-building once again.Marcel Moolenaar2000-12-031-1/+1
| | | | | | | Forgotten by: ache Notes: svn path=/head/; revision=69556
* Fix release, broken by the perl cross-build fixes.Marcel Moolenaar2000-11-211-0/+9
| | | | | | | | | | | | The distribute target is basicly the same as an install. For perl, this means that miniperl is needed. Since miniperl is only present in the object directory, we need to make sure the path is set correctly. To do this, we have make release use a new distribworld target that sets the path before doing a make distribute. Notes: svn path=/head/; revision=68987
* Fix cross-building.Marcel Moolenaar2000-11-201-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Move building libperl and miniperl from build-tools to cross-tools. libperl uses MACHINE_ARCH to determine the right configuration, which doesn't match the build machine when cross-building if they are built as build- tools. o Since miniperl needs to be built as a cross-tool, it needs to be installed under /usr/obj so that it can be used (cross-tools have a special object directory to avoid build conflicts. As a downside, you can't easily run cross-tools from their object directory). Remove the install and distribute override targets. To avoid having miniperl installed by installworld, remove it from SUBDIR. o We can't pickup miniperl from the object directory but since it's installed, depend on PATH. This is save, because the makefiles are run with a known path. o Build libperl again as part of the library target. A _libperl variable existed, but it was never defined. o Add chmod to the list of saved tools, because perl conditionally uses it during install. The bootstrap-tools and cross-tools targets are modified to avoid building profiled and shared libraries. While here, have these targets build static binaries instead of shared binaries. Approved by: markm Notes: svn path=/head/; revision=68927
* libgcc now needs to be built earlier in the build.David E. O'Brien2000-11-101-5/+6
| | | | | | | Submitted by: jdp Notes: svn path=/head/; revision=68586
* * Bring back the guts of crt{i,n}.S. This allows C++ exceptions to workDavid E. O'Brien2000-10-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | when using the egcs and gcc-devel ports, along with GCC built from stock public FSF sources. With out this change, FreeBSD will be removed from the list of systems GCC 3.0 must be evaluated on before release. With the effort some of us put into getting FreeBSD on this list, we should not turn this effort into a waste, else we might not be worth fighting for in the future. (note that Alpha and IA-64 versions of crt{i,n}.S are needed) * Switch from our own crt{begin,in} to those created from GCC's crtstuff.c. This will allow us to switch to DWARF2 exceptions in the future, along with staying in sync with any future GCC requirements. * Break out our ELF branding bits into a seperate file. Currently this is now included by our crt1.c files (since this functionality was part of our native crtbegin.c). Later crtbrand.o will be merged in the creation of crti.o. Notes: svn path=/head/; revision=67811
* Fail the 'buildkernel' target if not even one of the specified kernel ↵Joseph Koshy2000-10-251-0/+4
| | | | | | | | | | | configuration files was found. Reviewed by: obrien Notes: svn path=/head/; revision=67547
* Number the stages in the documentation to match what is printed out whenDavid E. O'Brien2000-10-131-5/+5
| | | | | | | running. Notes: svn path=/head/; revision=67050
* This is really gross.Justin T. Gibbs2000-09-181-2/+2
| | | | | | | | | | | | | If a user decides to forego a make depend during "make buildkernel", they should get what they deserve if no previous make depend has been run for that kernel. Instead, the build process includes special instructions to unconditionally rebuild aicasm. When aicasm moved to its own directory, this hack broke. Correct the hack until a get buy off on killing it. Notes: svn path=/head/; revision=66018
* Add reinstallkernel target. Does same thing as installkernel, butWarner Losh2000-09-171-0/+3
| | | | | | | | executes the reinstall target rather than the install target that installkernel does. Notes: svn path=/head/; revision=66005
* Include libfetch in the includes target.Dag-Erling Smørgrav2000-09-091-0/+1
| | | | Notes: svn path=/head/; revision=65636
* USA_RESIDENT is no longer required for buildworld, do not force it.Peter Wemm2000-09-091-12/+0
| | | | Notes: svn path=/head/; revision=65629
* Allow one to specify what the installed kernel's name is by settingDavid E. O'Brien2000-09-031-3/+11
| | | | | | | | | "INSTKERNNAME". Reviewed by: marcel Notes: svn path=/head/; revision=65387
* Define SUPHOST. If this is set a '-h ${SUPHOST}' is added to theJosef Karthauser2000-08-131-0/+3
| | | | | | | | | SUPFLAGS when a 'make update' is run. This means that the supfile doesn't need to be edited because the -h will override the CHANGE_THIS.FreeBSD.org host. Notes: svn path=/head/; revision=64605
* Make the update target consistent; both ports and doc are updatedSheldon Hearn2000-08-071-1/+6
| | | | | | | | | | | | | | if their SUPFILE variables are defined _and_ NO_PORTSUPDATE and NO_DOCUPDATE respectively are not defined. Previously, only ports was updated and there was no way to prevent this without undefining its SUPFILE variable. PR: 17514 Reported by: Udo Erdelhoff <ue@nathan.ruhr.de> Notes: svn path=/head/; revision=64340
* Fix buildkernel and installkernel when KERNEL is defined inMarcel Moolenaar2000-08-031-3/+3
| | | | | | | | | | /etc/make.conf. PR: 20325 Submitted by: Johan Karlsson <k@numeri.campus.luth.se> Notes: svn path=/head/; revision=64178
* Argh... mtree has been removed from the bootstrap-tools. In thatMarcel Moolenaar2000-07-231-2/+2
| | | | | | | | | case we need to save it in installworld. That latter I forgot... Pointy hat: me Notes: svn path=/head/; revision=63783
* Name all kernels 'kernel'. This fixes the incompatible behaviourMarcel Moolenaar2000-07-231-5/+3
| | | | | | | | | | | | of the buildkernel and installkernel targets where the kernel was called after the config name. While here, fix the brokenness of the installkernel target. It used to use ${IMAKEENV}, but since that has a very restricted PATH, it couldn't find make(1). Use ${CROSSENV} instead. Notes: svn path=/head/; revision=63779
* Remove mtree for bootstrap-tools. The -L switch change has beenMarcel Moolenaar2000-07-231-1/+1
| | | | | | | backed out. Notes: svn path=/head/; revision=63777
* Don't save cp(1) in installworld. Its use has been replaced byMarcel Moolenaar2000-07-231-1/+1
| | | | | | | a use of install. Notes: svn path=/head/; revision=63762
* Add awk and wc to the list of copied binaries for the installworldMarcel Moolenaar2000-07-201-2/+2
| | | | | | | | | target. These are needed by liloldr. Found by: make release Notes: svn path=/head/; revision=63592
* Add cp(1) to the list of binaries we need to save. The cp(1) commandMarcel Moolenaar2000-07-191-2/+3
| | | | | | | | is used by the installation of ld-elf.so when an existing version exists. Notes: svn path=/head/; revision=63560
* Don't save install-info. We already have that built. We'll useMarcel Moolenaar2000-07-191-3/+2
| | | | | | | the one we built anyway. Notes: svn path=/head/; revision=63544
* Save any binaries we use by installworld, so that we won't use theMarcel Moolenaar2000-07-191-2/+13
| | | | | | | | | | binaries we just installed. This allows a future upgrade target to install a new system without intermediate reboots and also prevents conflicts for parallel make runs where we might exec a binary that's being installed at the same time. Notes: svn path=/head/; revision=63487
* Move mtree to bootstrap-tools and add PATH=${TMPPATH} to IMAKEENV to pick itAndrey A. Chernov2000-07-181-4/+4
| | | | Notes: svn path=/head/; revision=63366
* Add mtree to cross-tools to make it updated for new -L optionAndrey A. Chernov2000-07-181-1/+2
| | | | | | | It must solve make world breakage Notes: svn path=/head/; revision=63360
* Perl's version number needs to change.Mark Murray2000-07-021-1/+1
| | | | Notes: svn path=/head/; revision=62419
* Rearrange Perl's build priority; it needs to get made earlier.Mark Murray2000-06-251-6/+6
| | | | Notes: svn path=/head/; revision=62083
* Add -DNO_KERNELDEPEND and -DNO_KERNELCONFIGBrian Somers2000-06-151-2/+10
| | | | | | | Not reviewed by: sheldonh Notes: svn path=/head/; revision=61703
* Set KERNEL=${INSTALLKERNEL} doing a make install in /sys/confBrian Somers2000-06-091-1/+1
| | | | Notes: svn path=/head/; revision=61448
* GENERIC98 is removed.Yoshihiro Takahashi2000-05-051-1/+1
| | | | Notes: svn path=/head/; revision=60026
* Make gperf be a bootstrap-tool, since we now depend on features ofGarrett Wollman2000-04-271-1/+1
| | | | | | | | | the specific version in -current. Approved in principle by: marcel Notes: svn path=/head/; revision=59713
* Revert my changes to make gperf a build-tool; that was the wrong thing.Garrett Wollman2000-04-271-2/+2
| | | | | | | | All builds had been broken; now just upgrade builds are until I or someone else can figure out the Right Thing. Notes: svn path=/head/; revision=59705
* Add gperf(1) to build tools. It should have been one before, butGarrett Wollman2000-04-271-2/+2
| | | | | | | gcc does not depend on version-specific gperf behavior (yet). Notes: svn path=/head/; revision=59699
* Create ${KRNLOBJDIR} before running config(8), since config(8) doesSheldon Hearn2000-04-271-0/+1
| | | | | | | | not create required parent directories of the kernel compile directory specified with its -d option. Notes: svn path=/head/; revision=59680