r1948 - in profiles/LFS/branches/cross-lfs: . bootable config

thomasp at linuxfromscratch.org thomasp at linuxfromscratch.org
Sat Jul 16 13:12:14 PDT 2005


Author: thomasp
Date: 2005-07-16 14:12:12 -0600 (Sat, 16 Jul 2005)
New Revision: 1948

Added:
   profiles/LFS/branches/cross-lfs/bootable/
   profiles/LFS/branches/cross-lfs/bootable/fstab.xml
   profiles/LFS/branches/cross-lfs/bootable/grub.xml
   profiles/LFS/branches/cross-lfs/bootable/kernel.xml
   profiles/LFS/branches/cross-lfs/config/keymap.xml
Modified:
   profiles/LFS/branches/cross-lfs/LFS.xml
   profiles/LFS/branches/cross-lfs/config/config.ent
Log:
added Make System Bootable and finishing up stages

Modified: profiles/LFS/branches/cross-lfs/LFS.xml
===================================================================
--- profiles/LFS/branches/cross-lfs/LFS.xml	2005-07-16 19:32:37 UTC (rev 1947)
+++ profiles/LFS/branches/cross-lfs/LFS.xml	2005-07-16 20:12:12 UTC (rev 1948)
@@ -224,6 +224,43 @@
       <xi:include href="bootscripts/hosts.xml" />
       <xi:include href="bootscripts/network.xml" />
     </stage>
+    <stage name="Making the LFS System Bootable">
+      <stageinfo>
+	<root>&LFS;</root>
+	<environment>
+	  <variable name="HOME">/root</variable>
+	  <variable name="TERM">&TERM;</variable>
+	  <variable name="PATH">/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin</variable>
+	  <variable name="CFLAGS" />
+	  <variable name="CXXFLAGS" />
+	</environment>
+      </stageinfo>
+      <xi:include href="bootable/fstab.xml" />
+      <xi:include href="bootable/kernel.xml" />
+      <xi:include href="bootable/grub.xml" />
+    </stage>
+    <stage name="Finishing up (inside chroot)">
+      <stageinfo>
+	<root>&LFS;</root>
+      </stageinfo>
+      <remove>/tools</remove>
+      <textdump>
+	<file>/etc/lfs-release</file>
+	<content>=&version;</content>
+      </textdump>
+    </stage>
+    <stage name="Finishing Up (outside chroot)">
+      <remove>/tools</remove>
+      <execute command="umount">
+	<param>&LFS;/dev/pts</param>
+	<param>&LFS;/dev/shm</param>
+	<param>&LFS;/dev</param>
+	<param>&LFS;/proc</param>
+	<param>&LFS;/sys</param>
+	<!-- If you used a bind mount for your package dir, unmount it here. -->
+	<!-- <param>&LFS;&packages_dir;</param> -->
+      </execute>
+    </stage>
   </stage>
 </alfs>
 

Copied: profiles/LFS/branches/cross-lfs/bootable/fstab.xml (from rev 1947, profiles/LFS/trunk/chapter08/fstab.xml)
===================================================================
--- profiles/LFS/trunk/chapter08/fstab.xml	2005-07-16 19:32:37 UTC (rev 1947)
+++ profiles/LFS/branches/cross-lfs/bootable/fstab.xml	2005-07-16 20:12:12 UTC (rev 1948)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE alfs SYSTEM "../DTD/ALFS.dtd"
+[
+<!ENTITY % general_entities SYSTEM "../config/general.ent">
+<!ENTITY % config_entities SYSTEM "../config/config.ent">
+
+%general_entities;
+%config_entities;
+]>
+<alfs>
+  <stage name="Creating the /etc/fstab File">
+    <copy>
+      <source>&skeleton_dir;/etc/fstab</source>
+      <destination>/etc</destination>
+    </copy>
+  </stage>
+</alfs>

Copied: profiles/LFS/branches/cross-lfs/bootable/grub.xml (from rev 1947, profiles/LFS/trunk/chapter08/grub.xml)
===================================================================
--- profiles/LFS/trunk/chapter08/grub.xml	2005-07-16 19:32:37 UTC (rev 1947)
+++ profiles/LFS/branches/cross-lfs/bootable/grub.xml	2005-07-16 20:12:12 UTC (rev 1948)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE alfs SYSTEM "../DTD/ALFS.dtd"
+[
+<!ENTITY % general_entities SYSTEM "../config/general.ent">
+<!ENTITY % package_entities SYSTEM "../config/package.ent">
+<!ENTITY % config_entities SYSTEM "../config/config.ent">
+
+%general_entities;
+%package_entities;
+%config_entities;
+]>
+<alfs>
+  <stage name="Making the LFS System Bootable">
+    <!-- Uncomment the following if you wish to allow grub to install itself automatically.-->
+    <!-- If uncommenting remove the space between the two dashes (- -) in order for the
+     command to work properly -->
+    <!--<execute command="grub - -batch">
+      <prefix>echo -e "root (&grub-root;)\nsetup (&grub-install-location;)\nquit" | </prefix>
+      <param>1>/dev/null</param>
+      <param>2>/dev/null</param>
+    </execute>-->
+    <copy>
+      <source>&skeleton_dir;/boot/grub/menu.lst</source>
+      <destination>/boot/grub</destination>
+    </copy>
+    <mkdir>
+      <name>/etc/grub</name>
+    </mkdir>
+    <link>
+      <option>force</option>
+      <target>/boot/grub/menu.lst</target>
+      <name>/etc/grub</name>
+    </link>
+    <search_replace>
+      <file>/boot/grub/menu.lst</file>
+      <find>[LFS-version]</find>
+      <replace>&version;</replace>
+    </search_replace>
+    <search_replace>
+      <file>/boot/grub/menu.lst</file>
+      <find>[linux-version]</find>
+      <replace>&linux-version;</replace>
+    </search_replace>
+    <search_replace>
+      <file>/boot/grub/menu.lst</file>
+      <find>[grub-root]</find>
+      <replace>&grub-root;</replace>
+    </search_replace>
+  </stage>
+</alfs>

Copied: profiles/LFS/branches/cross-lfs/bootable/kernel.xml (from rev 1947, profiles/LFS/trunk/chapter08/kernel.xml)
===================================================================
--- profiles/LFS/trunk/chapter08/kernel.xml	2005-07-16 19:32:37 UTC (rev 1947)
+++ profiles/LFS/branches/cross-lfs/bootable/kernel.xml	2005-07-16 20:12:12 UTC (rev 1948)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE alfs SYSTEM "../DTD/ALFS.dtd"
+[
+<!ENTITY % general_entities SYSTEM "../config/general.ent">
+<!ENTITY % package_entities SYSTEM "../config/package.ent">
+<!ENTITY % config_entities SYSTEM "../config/config.ent">
+
+%general_entities;
+%package_entities;
+%config_entities;
+]>
+<alfs xmlns:xi="http://www.w3.org/2001/XInclude">
+  <package name="linux" version="&linux-version;">
+    <stage name="Unpacking">
+      <unpack>
+        <digest>&linux-md5;</digest>
+        <archive>&packages_dir;/&linux-package;</archive>
+        <destination>&linux-src-location;</destination>
+      </unpack>
+      <ownership user="0" group="0">
+        <option>recursive</option>
+        <name>&linux-src-location;/&linux-directory;</name>
+      </ownership>
+    </stage>
+    <stage name="Installing">
+      <stageinfo>
+        <base>&linux-src-location;/&linux-directory;</base>
+      </stageinfo>
+      <make>
+        <param>mrproper</param>
+      </make>
+      <copy>
+        <source>&skeleton_dir;/linux-kernel-config</source>
+        <destination>.config</destination>
+      </copy>
+      <xi:include href="../config/keymap.xml" />
+      <make>
+        <prefix>yes "" |</prefix>
+        <param>oldconfig</param>
+      </make>
+      <make />
+      <make>
+        <param>modules_install</param>
+      </make>
+      <copy>
+        <source>arch/i386/boot/bzImage</source>
+        <destination>/boot/lfskernel-&linux-version;</destination>
+      </copy>
+      <copy>
+        <source>System.map</source>
+        <destination>/boot/System.map-&linux-version;</destination>
+      </copy>
+      <copy>
+        <source>.config</source>
+        <destination>/boot/config-lfskernel-&linux-version;</destination>
+      </copy>
+      <copy>
+        <source>&skeleton_dir;/etc/modprobe.conf</source>
+        <destination>/etc</destination>
+      </copy>
+    </stage>
+  </package>
+</alfs>

Modified: profiles/LFS/branches/cross-lfs/config/config.ent
===================================================================
--- profiles/LFS/branches/cross-lfs/config/config.ent	2005-07-16 19:32:37 UTC (rev 1947)
+++ profiles/LFS/branches/cross-lfs/config/config.ent	2005-07-16 20:12:12 UTC (rev 1948)
@@ -85,6 +85,10 @@
 -->
 <!ENTITY jlevel "">
 
+<!-- grub settings (these need to be in grub's notation) -->
+<!ENTITY grub-root "hd0,0">
+<!ENTITY grub-install-location "hd0">
+
 <!-- terminal type for your host system (found in the TERM
      environment variable
 -->

Copied: profiles/LFS/branches/cross-lfs/config/keymap.xml (from rev 1947, profiles/LFS/trunk/config/keymap-ch8.xml)




More information about the alfs-log mailing list