Over the weekend, I've managed to put together some stuff which other
people might find useful. First of all, I've managed to build GNU diff,
GNU sed, Larry Wall's patch and tr. They pretty much built without
needing to make any changes --- the only real problem which I
encountered while trying to build them is that the configuration progam
which you need to run to build sed itself wants to uses sed to build the
Makefile. Oops. :-)
In any cases, if anyone wants to just snarf the binaries, they can be
found via anonymous FTP on TSX-11 in /pub/linux/binaries. If you want
to submit some something Linux-related for the FTP site, you can put the
file(s) in /pub/incoming and send me a quick note describing what you
left there.
--------------------------------
I've made a quickie change to the tools/build.c program so that it can
optionally take a fourth argument which specifies what the root device
should be. Add to that a definition in the makefile for $(ROOTDEV), and
customizing kernels for a particular system becomes a snap! Since the
patch isn't that big, I'll include the diffs at the end of this message.
------------------------
Other comments; maybe I'm doing something stupid, but I can't seem to
get mtools to want to write a file from Linux land to MS-DOS land. The
other way works fine, but when I try something like "mcopy foo.tar
c:foo.tar", the program just returns to the prompt without actually
performing the copy. Another bug: if you do "mcopy c:foo.tar .", the
file which will be created in your directory will be "???.???".
So you can't just specify a unix directory as the target; you actually
need to give the name that you want in the directory or the name will be
unrecognizable. This also happens if you try "mcopy a:*.* .". Final
problem: the program will hang if the destination file already exists;
you need to control-C out of it when this happens.
----------------------------
Also, trying to compile RCS for Linux apparently tickles a compiler bug
in gcc. When you try to compile ci.c, gcc gets an "unrecognizable insn"
error. When I mentioned to a friend of mine who is a gcc expert, he was
a bit surprised because he thought all of these bugs had been fixed in
version 1.40. His suggestion was that I should try compiling GCC 2.0,
which led me to discovering the filesystem corruption problems. (Which
are very repeatable, by the way; I can start with a newly mkfs'ed
partition and corrupt it just by untaring GCC 2.0.)
Another problem which was uncovered by trying to compile RCS: In
sys/wait.h, the definition for WIFEXITED(s) is missing a close
parenthesis at the end of the line.
------------------------
That's all for now.... the patch tools/build.c are below.
- Ted
*** build.c.orig Sat Nov 9 21:50:51 1991
--- build.c Sat Nov 9 22:23:13 1991
***************
*** 17,24 ****
--- 17,27 ----
*/
#include <stdio.h> /* fprintf */
+ #include <string.h>
#include <stdlib.h> /* contains exit */
#include <sys/types.h> /* unistd.h needs this */
+ #include <sys/stat.h>
+ #include <linux/fs.h>
#include <unistd.h> /* contains read/write */
#include <fcntl.h>
***************
*** 25,30 ****
--- 28,36 ----
#define MINIX_HEADER 32
#define GCC_HEADER 1024
+ #define DEFAULT_MAJOR_ROOT 3
+ #define DEFAULT_MINOR_ROOT 6
+
/* max nr of sectors of setup: don't change unless you also change
* bootsect etc */
#define SETUP_SECTS 4
***************
*** 46,54 ****
{
int i,c,id;
char buf[1024];
! if (argc != 4)
usage();
for (i=0;i<sizeof buf; i++) buf[i]=0;
if ((id=open(argv[1],O_RDONLY,0))<0)
die("Unable to open 'boot'");
--- 52,85 ----
{
int i,c,id;
char buf[1024];
+ char major_root, minor_root;
+ struct stat sb;
! if ((argc != 4) && (argc != 5))
usage();
+ if (argc == 5) {
+ if (strcmp(argv[4], "FLOPPY")) {
+ if (stat(argv[4], &sb)) {
+ perror(argv[4]);
+ die("Couldn't stat root device.");
+ }
+ major_root = MAJOR(sb.st_rdev);
+ minor_root = MINOR(sb.st_rdev);
+ } else {
+ major_root = 0;
+ minor_root = 0;
+ }
+ } else {
+ major_root = DEFAULT_MAJOR_ROOT;
+ minor_root = DEFAULT_MINOR_ROOT;
+ }
+ fprintf(stderr, "Root device is (%d, %d)\n", major_root, minor_root);
+ if ((major_root != 2) && (major_root != 3) &&
+ (major_root != 0)) {
+ fprintf(stderr, "Illegal root device (major = %d)\n",
+ major_root);
+ die("Bad root device --- major #");
+ }
for (i=0;i<sizeof buf; i++) buf[i]=0;
if ((id=open(argv[1],O_RDONLY,0))<0)
die("Unable to open 'boot'");
***************
*** 72,77 ****
--- 103,110 ----
die("Boot block must be exactly 512 bytes");
if ((*(unsigned short *)(buf+510)) != 0xAA55)
die("Boot block hasn't got boot flag (0xAA55)");
+ buf[508] = (char) minor_root;
+ buf[509] = (char) major_root;
i=write(1,buf,512);
if (i!=512)
die("Write call failed");
| Michal Piotrowski | Re: 2.6.23-rc1-mm1 |
| Bodo Eggert | Re: [PATCH][RFC] 4K stacks default, not a debug thing any more...? |
| Andrea Arcangeli | [PATCH 00 of 11] mmu notifier #v16 |
| Ingo Molnar | Re: AIM7 40% regression with 2.6.26-rc1 |
| Theodore Ts'o | Re: demand paging: proposal |
| drew | Re: Use PERL rather than C for system commands? |
| Stewart Baker | HD timeout Errors (with .95a) |
| BATES, ROBERT PATRICK | Some Q's... |
git: | |
| Andy Parkins | svn:externals using git submodules |
| Sam Song | Fwd: [OT] Re: Git via a proxy server? |
| Liu Yubao | Re: how to revert changes in working tree? |
| Stephen R. van den Berg | RFC: grafts generalised |
| Herbert Xu | Re: sockets affected by IPsec always block (2.6.23) |
| Jeff Garzik | Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC |
| Patrick McHardy | net-sched 00/06: dynamically sized class hashes v2 |
| Patrick McHardy | net 00/06: add GARP/GVRP support |
| windows folder creation surprise | 34 minutes ago | Windows |
| Problem in scim in Fedora 9 | 2 hours ago | Linux general |
| Firewall | 15 hours ago | OpenBSD |
| IP layer send packet | 1 day ago | Linux kernel |
| dtrace for linux available | 1 day ago | Linux kernel |
| Unable to mount ramdisk image using UBoot while upgrading to 2.6.15 kernel for a MPC8540 based target | 1 day ago | Linux kernel |
| RealTek RTL8169 - can't connect | 2 days ago | NetBSD |
| vsftpd Upload Problems | 2 days ago | Linux general |
| creating con folder in desktop | 2 days ago | Windows |
| Question about PFRA, dirty page cache, and tmpfs/swap | 2 days ago | Linux kernel |
