[pocket-linux] RedHat 9 and the Pentium
David Horton
dhorton at megsinet.net
Sat Dec 6 22:11:02 CST 2003
phil wrote:
> I am trying to build up a system on a Pentium 133 computer that I dug
> out of some pile. I am on chapter 3. Everything works okay until it gets
> to Bash. Then the computer just becomes a terminal. I can type and the
> characters appear on the screen but there is no # prompt and no
> functionality.
I agree, it sounds like the kernel is working fine and BASH is hosed.
>
> I used the root disk images from the Pocket Linux website and everything
> worked fine. Then I started copying files from the root disk image from
> PL onto my image and the problem went away when I copied the libraries.
> My Bash and David's Bash did the same thing but the libraries fixed it.
> Should I recompile the libraries? It worked in chapter 2 when Bash was
> statically linked but no joy on the dynamic libraries. I figure RedHat
> libraries are compiled for a higher processor than the P133 that I am
> trying to boot, is this a reasonable assumption?
>
The images on the website were built on a Slackware system, so it is
possible that the libraries are different. Redhat may optimize for a
6x86 since I have seen a /lib/i686 directory on my RH9 system.
If you want to build glibc from source I would suggest using the
glibc-2.3.2 recipe in The System Architect Toolkit on GNU Savannah. As
I am writing, savannah.gnu.org is down. I will attach the recipe to
this email. The recipe is basically a shell script that automates the
build process and puts the result in /var/tmp/glibc-2.3.2.
Dave
#!/bin/bash
#
# Recipe script to build glibc-2.3.2.
#
# Copyright (c)2003 David Horton
# dhorton at nospam.megsinet.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to:
#
# Free Software Foundation, Inc.
# 59 Temple Place - Suite 330
# Boston, MA 02111-1307, USA
#
#
# Define the package name, source directory, build directory and
# staging directory paths. Prefixes to directories may be overridden
# by setting shell variables SRC, BUILD and STAGING. For example,
# doing "export SRC=/root/foo" before calling this script will override
# the default /usr/src and set SRC_DIR to /root/foo/$PKG_NAME instead.
#
PKG_NAME=$(basename $0)
SRC_DIR=${SRC:-/usr/src}/$PKG_NAME
BUILD_DIR=${BUILD:-/var/tmp/build}/$PKG_NAME
STAGING_DIR=${STAGING:-/var/tmp/staging}/$PKG_NAME
#
# Check that the source directory really exits and bail out if not.
if ! [ -d $SRC_DIR ]; then
echo "Cannot find source code directory $SRC_DIR."
exit 1
fi
#
# Do not overwrite existing build directory.
if [ -d $BUILD_DIR ]; then
echo "Build directory $BUILD_DIR already exists."
exit 2
else
mkdir -p $BUILD_DIR
fi
#
# Do not overwrite existing staging directory.
if [ -d $STAGING_DIR ]; then
echo "Staging directory $STAGING_DIR already exists."
exit 4
else
mkdir -p $STAGING_DIR
fi
#
# Configure the package for FHS compliance and i386 processor.
export CC="gcc -mcpu=i386"
cd $BUILD_DIR
$SRC_DIR/configure \
--enable-add-ons \
--host=i386-pc-linux-gnu \
--infodir=/usr/share/info \
--libexec=/usr/lib \
--prefix=/usr \
#
# Check return status and bail out if it's non-zero.
if [ $? -gt 0 ]; then
echo "Configuration failed with error code $?"
exit 8
fi
# Build the package.
make
#
# Check return code and bail if it looks bad.
if [ $? -gt 0 ]; then
echo "Build failed with error code $?"
exit 16
fi
#
# Install into staging area overriding make variables as needed.
make \
install_root=$STAGING_DIR \
install
#
# Check return code and bail if it looks bad.
if [ $? -gt 0 ]; then
echo "Installation to staging area failed with error code $?"
exit 32
fi
#
# Do some post-install tweaking.
# Create symbolic links to Linux headers
ln -s ../src/linux/include/linux $STAGING_DIR/usr/include/linux
ln -s ../src/linux/include/asm $STAGING_DIR/usr/include/asm
# Remove the dir file from /usr/share/info
rm $STAGING_DIR/usr/share/info/dir
More information about the Pocket-Linux
mailing list