You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#If you are building over ssh you may want to start a screen session that you can come back to later.
78
+
screen
79
+
80
+
#Chroot into temporary system:
81
+
[sudo] ./Chroot system
41
82
42
83
7)
43
84
#You should now be in the chroot
44
-
#First install lfspkg
85
+
#First install lfspkg:
45
86
cd /LFSPkgBuildScripts/admin/LFSPkg
46
87
BOOTSTRAP=1 ./LFSPkg.LFSBuild install
47
88
48
-
#Set $LFS/etc/lfspkg.rc or $LFS/root/.lfspkg.rc (preferred) variables, make sure the SOURCEARCHIVES points to the same place as $SOURCEARCHIVES from SystemData as that's where the main LFS sytem source files are, you can do this either from in the chroot environment or from the host with root permisions.
49
-
#The default SOURCEARCHIVES vaiable is set to /tmp/LFSSourceArchives.
50
-
#You may also want to save built packages by setting the OUTPUT variable in lfspkg.rc, you may want to mount another folder in the chroot environment from the host for this, as you will need a fair amount of storage space for all the built packages for a full desktop system, you don't of course need to keep the built packages you can if space is short just delete them, in which case leave the OUTPUT variable as is and periodically delete everything in it.
51
-
#It is handy to keep the built packages as if somthing goes wrong its's usually simpler and quicker to reinstall the binary package rather than building from source again, things like qt5 and firefox take a LOOooooonnng time to build from source.
52
-
#
53
-
#after first installing lfspkg and setting up $LFS/etc/lfspkg.rc you may want to manually move the lfspkg built package tarball to the folders set in the rc file, if you have changed them that is.
89
+
#As part of the LFSSetUp script /mnt/LFS/root/.lfspkg.rc has been created to contain basic info needed by lfspkg, review and change if needed.
90
+
#Set /mnt/LFS/etc/lfspkg.rc or /mnt/LFS/root/.lfspkg.rc (preferred) variables, make sure the SOURCEARCHIVES points to the same place as $SOURCEARCHIVES from #SystemData.local as that's where the main LFS system source files are, you can do this either from in the chroot environment or from the host with root permissions.
91
+
#At this point wget/openssl is not installed so you will get a load of complaints from lfspkg, ignore them as lfspkg will be reinstalled later with the main system.
92
+
93
+
#You should run lfspkg --setup to create the lfspkg.rc file ( in ~ (/root) )
94
+
#Rc files are sourced from /etc/lfspkg.rc then ~/.lfspkg.rc.
95
+
#lfspkg --setup can be run again later if you need/want to change source/build folders etc.
96
+
#For building the main system you should probably set the configure options config files in /etc and log options.
97
+
lfspkg --setup
54
98
55
99
8)
56
-
#Build main system
100
+
#Build main system:
57
101
cd /LFSPkgBuildScripts/system/system-meta
58
-
#Use system-sysvinit-meta
59
-
#for standard sysvinit like so:
102
+
103
+
#Use system-sysvinit-meta for standard sysvinit like so:
60
104
./system-sysvinit-meta.LFSBuild install
61
-
#Or use system-bbinit-meta.LFSBuild
62
-
#for a RECOMMENDED busy box init system ( non standard ) like so:
105
+
106
+
#Or use system-bbinit-meta.LFSBuildfor a busy box init system ( non standard ) like so:
63
107
./system-bbinit-meta.LFSBuild install
64
108
65
109
#Or for ##experimental## custom init system use:
66
110
./system-LFSInit-meta.LFSBuild install
67
111
112
+
#Or for rpi sysvinit system use:
113
+
./system-pi-sysvinit-meta.LFSBuild install
114
+
115
+
Wait for script to complete:
116
+
...
117
+
Have coffee
118
+
Walk the dog
119
+
...
120
+
68
121
9)
69
-
#logout from temporary system
122
+
#logout from temporary system:
70
123
exit
71
124
72
125
10)
73
-
#Remove tools folder link from host and if you want to save tools archive for futre use move/copy the ${LFS}/tools-${LFSVERSION}.tar.gz somewhere safe.
126
+
#Remove tools folder link from host and if you want to save tools archive for futre use move/copy the ${LFS}/tools-${LFSVERSION}.tar.gz somewhere safe:
74
127
sudo rm /tools
75
-
#Remove the tools folder from your LFS install disk.
76
-
sudo rm -rf ${LFS}/tools
128
+
#Remove the tools folder from your LFS install disk:
129
+
[sudo] rm -rf /mnt/LFS/tools
77
130
78
131
11)
79
-
#Re-enter the chroot ( this time and subsequent times don't use the 'system' argument to Chroot ).
80
-
sudo ./Chroot
132
+
#Re-enter the chroot ( this time and subsequent times don't use the 'system' argument to Chroot ):
133
+
[sudo] ./Chroot
81
134
82
135
12)
83
136
#You MUST rebuild lfspkg after completeing the the basic system and removing the tools folder.
84
137
#Use same process as 2)/7) EXCEPT do NOT use BOOTSTRAP=1
85
138
#If you have set any vairiable in /etc/lfspkg.rc then reply 'R' ( without the quotes ) when asked about replacing files in /etc.
86
-
#If you forgot to do the above bit just re-edit /etc/lfspkg.rc
139
+
#If you forgot to do the above bit just re-edit /etc/lfspkg.rc:
140
+
87
141
cd /LFSPkgBuildScripts/admin/LFSPkg
88
142
./LFSPkg.LFSBuild install
89
143
90
144
13)
91
-
#Configure and build the kernel
145
+
#No point in compiling your own kernel on pi so prebuilt one is used, so skip this bit on pi.
146
+
#Configure and build the kernel:
92
147
cd /LFSPkgBuildScripts/kernel
93
148
./kernel.LFSBuild install
94
149
150
+
#Again on pi skip this bit as firmware is installed by the pi-system-meta package.
151
+
#You may prefer to manually copy all firmware modules from the host sytem from /lib/firmware to your new LFS system.
152
+
#Or use the firmware build script to install all the latest firmware from https://git.kernel.org/ eg Whilst still in the kernel build folder:
The LFSSetup script will install a basic grub.cfg file in ${LFS}/${BUILDSCRIPTS}/system/grub/ based on the details given to the script.
100
-
Check that the grub.cfg file is OK, make any changes and just copy it to /boot/grub, or manually do this:
160
+
#The LFSSetup script will install a basic grub.cfg file in ${LFS}/${BUILDSCRIPTS}/system/grub/ based on the details given to the script.
161
+
#Check that the grub.cfg file is OK, make any changes and just copy it to /boot/grub, or manually do this:
101
162
102
-
#assuming root device is /dev/sda and LFS system is on /dev/sda1 mounted at /mnt/LFS
163
+
#assuming root device is /dev/sda and LFS system is on /dev/sda1 mounted at /mnt/LFS:
103
164
grub-install /dev/sda
104
165
105
166
cat > /boot/grub/grub.cfg << "EOF"
@@ -110,13 +171,14 @@ set timeout=30
110
171
insmod ext2
111
172
set root=(hd0,1)
112
173
113
-
menuentry "GNU/Linux, Linux 4.9.9-lfs-8.0" {
114
-
linux /boot/vmlinuz-4.9.9-lfs-8.0 root=/dev/sda1 ro
174
+
menuentry "GNU/Linux, Linux 4.9.9" {
175
+
linux /boot/vmlinuz-4.9.9 root=/dev/sda1 ro
115
176
}
116
177
EOF
117
178
118
179
14)
119
-
#Build xorg
180
+
#Before building the X server now is a good time to quickly boot into your new system and make sure all is OK, you can then reboot back to the host and continue building in the chroot or build in the 'real' system, the choice is yours but this HowTo assumes all building is done in the chroot.
181
+
#Build xorg:
120
182
cd /LFSPkgBuildScripts/xorg/xorg-meta/
121
183
./xorg-meta.LFSBuild install
122
184
@@ -139,6 +201,10 @@ cd /LFSPkgBuildScripts/print/cups
139
201
cd /LFSPkgBuildScripts/gtk/gtk
140
202
./gtk.LFSBuild install
141
203
204
+
#xsane frontends and xsane require gimp installed first to build the plugin
205
+
cd /LFSPkgBuildScripts/desktop/gimp
206
+
./gimp.LFSBuild install
207
+
142
208
#rest of printing stuff
143
209
cd /LFSPkgBuildScripts/print/printing-meta
144
210
./printing-meta.LFSBuild install
@@ -159,7 +225,7 @@ cd /LFSPkgBuildScripts/devel/development-meta
159
225
#this is for an xfce4 desktop.
160
226
cd /LFSPkgBuildScripts/desktop/desktop-meta
161
227
./desktop-meta.LFSBuild install
162
-
#Or for an LFSDesktop
228
+
#Or fo r an LFSDesktop
163
229
cd /LFSPkgBuildScripts/lfsdesktop/LFSDesktop-meta
164
230
./LFSDesktop-meta.LFSBuild install
165
231
@@ -202,24 +268,14 @@ cd /LFSPkgBuildScripts/net/davfs2
202
268
cd /LFSPkgBuildScripts/net/curlftpfs
203
269
./curlftpfs.LFSBuild install
204
270
205
-
#Qt5 stuff
206
-
#cd /LFSPkgBuildScripts/qt/lxqt-meta
207
-
#./lxqt-meta.LFSBuild install
208
-
209
271
#TODO
210
272
cd /LFSPkgBuildScripts/qt/qt-creator
211
273
./qt-creator.LFSBuild install
212
274
275
+
#If you are building in chroot you will pobably have to rerun the postinstall script for this package AFTER booting to the 'real' system.
213
276
cd /LFSPkgBuildScripts/admin/mariadb
214
277
./mariadb.LFSBuild install
215
278
216
-
#Busybox init
217
-
#cd /LFSPkgBuildScripts/sys/busybox
218
-
#./busybox.LFSBuild install
219
-
#
220
-
#cd /LFSPkgBuildScripts/sys/bootfiles
221
-
#./bootfiles.LFSBuild install
222
-
223
279
#Odd stuff
224
280
cd /LFSPkgBuildScripts/xorg/xbindkeys
225
281
./xbindkeys.LFSBuild install
@@ -230,7 +286,29 @@ cd /LFSPkgBuildScripts/net/libcddb
230
286
cd /LFSPkgBuildScripts/desktop/epdfview
231
287
./epdfview.LFSBuild install
232
288
233
-
cd /LFSPkgBuildScripts/desktop/conky
234
-
./conky.LFSBuild install
289
+
#Conky is getting increasingly tied to gnome and difficult ( impossible! )to build.
0 commit comments