source: scripts/target-scripts/target-lilo.sh@ e38d58c

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since e38d58c was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 1.6 KB
RevLine 
[617118d]1#!/bin/sh
2
3# cross-lfs target lilo build
4# ---------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG="lilo-target.log"
13unpack_tarball lilo-${LILO_VER} &&
14cd ${SRC}/${PKGDIR}
15
16if [ "${USE_SYSROOT}" = "Y" ]; then
17 BUILD_BASEDIR=""
18 BUILD_PREFIX="/usr"
19else
20 BUILD_BASEDIR=${TGT_TOOLS}
21 BUILD_PREFIX=${TGT_TOOLS}
22fi
23
24case ${KERNEL_VER} in
25 2.[56].* )
26 case ${LILO_VER} in
27 22.5.1 )
28 #apply_patch lilo-22.5.1-2.6.0hdr-fix
29 #avoid LVM for the moment
30 if [ ! -f Makefile-ORIG ]; then cp -p Makefile Makefile-ORIG ; fi
31 sed '/^CONFIG=/s@ -DLVM@@g' Makefile-ORIG > Makefile
32
33 # need PAGE_SIZE from <asm/page.h>
34 if [ ! -f boot.c-ORIG ]; then cp -p boot.c boot.c-ORIG ; fi
35 sed '/^#include <sys\/stat.h>/a \
36#include <asm/page.h>' boot.c-ORIG > boot.c
37
38 if [ ! -f partition.c-ORIG ]; then
39 cp -p partition.c partition.c-ORIG
40 fi
41 sed '/^#include <asm\/unistd.h>/a \
42#include <asm/page.h>' partition.c-ORIG > partition.c
43 ;;
44 esac
45 ;;
46esac
47
48case ${TGT_ARCH} in
49 x86_64 ) ARCH_CFLAGS="-m32" ;;
50esac
51
52max_log_init Lilo ${LILO_VER} target ${BUILDLOGS} ${LOG}
53make CC="${TARGET}-gcc ${ARCH_CFLAGS}" \
54 SBIN_DIR=${BUILD_BASEDIR}/sbin \
55 USRSBIN_DIR=${BUILD_PREFIX}/sbin \
56 ROOT=${LFS} \
57 >> ${LOGFILE} 2>&1 &&
58echo " o Build OK" &&
59
60min_log_init ${INSTLOGS} &&
61make install \
62 SBIN_DIR=${BUILD_BASEDIR}/sbin \
63 USRSBIN_DIR=${BUILD_PREFIX}/sbin \
64 MAN_DIR=${BUILD_PREFIX}/share/man \
65 ROOT=${LFS} \
66 >> ${LOGFILE} &&
67echo " o ALL OK" || barf
68
Note: See TracBrowser for help on using the repository browser.