Re: [lfs-support] init-functions: new pidofproc function: posix compliant: no sub shells: tested
On 4/9/2021 5:16 AM, Scott Andrews wrote: This script is not intended to run with ash, the she bang line is as follows #!/bin/bash --posix My apologies for the duplicate reply Scott, I didn't reply to list. Unfortunately, init-functions is a special case. You cannot guarantee that the calling script will use /bin/bash. That script will be run under whatever interpreter is used by the calling script (the schebang in init-functions is basically meaningless). When making any changes in init-functions, you have to test at least under dash (it's not a 1:1 for AST/AT ash, but close enough, and building AST ash is likely a non-starter now days). You don't get a choice here, it has to be sh compliant because we have no control over what a vendor supplied script will use. --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
[lfs-support] Lumina (Was: Re: DBus-Broker)
On 3/1/2020 4:50 PM, Scott Andrews wrote: I may not need dbus if I am successful building lumina. Hey, something I might actually be able to help with. From about a year ago (or so)... = Prep (but feel free to substitute as_root however you like): as_root() { if [ $EUID = 0 ]; then $* elif [ -x /usr/bin/sudo ]; then sudo $* else su -c \\"$*\\" fi } export -f as_root = Libev: Download: (http): http://dist.schmorp.de/libev/libev-4.24.tar.gz Download MD5 Sum: 94459a5a22db041dec6f98424d6efe54 Download Size: 512 KB Estimated Disk Space: 3.6 MB Estimated Build Time: less than 0.1 SBU ./configure --prefix=/usr --disable-static && make && as_root make install = Libconfig: Download: (http): https://github.com/hyperrealm/libconfig/archive/v1.7.2/libconfig-1.7.2.tar.gz Download MD5 Sum: d666f0ca093906d34d6e1e4890053e62 Download Size: 2.9 MB Estimated Disk Space: 16 MB Estimated Build Time: 0.2 SBU autoreconf -fi && ./configure --prefix=/usr --disable-static && make && as_root make install = Compton: Download (http): https://github.com/yshui/compton/archive/v4/compton-4.0.tar.gz Download MD5 Sum: 5a6fd6bda66032babf638f5b52925eb1 Download Size: 1.2 MB Estimated Disk Space: 3.4 MB Estimated Build Time: less than 0.1 SBU Required: Hicolor-icon-theme, Libconfig, D-Bus, Libev, Mesa, Pcre, Pixman, Xcb-util-image, Xcb-util-renderutil Optional: Asciidoc (to build man pages) mkdir build && cd build && meson --prefix /usr .. && ninja && as_root ninja install = Numlockx: Download (http): http://pkgs.fedoraproject.org/repo/pkgs/numlockx/numlockx-1.2.tar.gz/be9109370447eae23f6f3f8527bb1a67/numlockx-1.2.tar.gz Download MD5 Sum: be9109370447eae23f6f3f8527bb1a67 Download Size: 88 KB Estimated Disk Space: 900 KB Estimated Build Time: less than 0.1 SBU ./configure --prefix=/usr && make && as_root make install = Pavucontrol: Download (http): https://freedesktop.org/software/pulseaudio/pavucontrol/pavucontrol-3.0.tar.xz Download MD5 Sum: d82e6d960ecd4f1db1eb4637e73b9eec Download Size: 21.5 MB Estimated Disk Space: xx Estimated Build Time: ?? SBU Required: Gtk+-2.x or Gtk+-3.x, gnome-icon-theme, libcanberra, gtkmm, libsigc++ Optional: lynx (to create docu) ./configure --prefix=/usr && make && as_root make install = Lumina Desktop: Download (http): https://github.com/lumina-desktop/lumina/archive/v1.4.0-p1/lumina-1.4.0-p1.tar.gz Download MD5 Sum: d82e6d960ecd4f1db1eb4637e73b9eec Download Size: 21.5 MB Estimated Disk Space: xx Estimated Build Time: ?? SBU Required: QT5, Xcb-unil, Xcb-util-wm, Xcb-util-image, Xorg-Server Runtime (required): Fluxbox, Xinit, Xscreensaver Runtime (recommended): Numlocx, Compton, Xterm (or any terminal emulator) Runtime (optional): Xorg-Apps (Xbacklight), Pavucontrol, Acpid, and D-Bus For a /usr install: qmake PREFIX=/usr L_ETCDIR=/etc/lumina make as_root make install For an /opt/lumina install: qmake PREFIX=/opt/lumina L_ETCDIR=/etc/lumina make as_root make install as_root cat >> /etc/profile.d/lumina.sh << "EOF" path_append /opt/lumina/bin EOF as_root cat >> /etc/ld.so.conf.d/lumina.d << "EOF" /opt/lumina/lib EOF HTH --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Kernel Compilation for Headless Server
On 12/22/2019 5:41 PM, Rob wrote: I'm working on building a storage server, where I'm going to cram in as many drives as I can. I currently have 10. As such, I need to get rid of the video card to make room. I'll be administering the server over ssh. Can I build a linux version that requires no video support? And how? You are referring to a "headless" system. In addition to the suggestion to use a USB VGA dongle, you have the option of a serial console as well (and I would suggest adding this option as a secondary even if you do go the USB->VGA route). I have needed this a few times over the past few years for firewall projects. It's been a bit since I've set one up, but this should be close enough to get you there: Add the following to grub.cfg (assuming COM1 change unit=1 and ttyS1 below for COM2): serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 terminal --timeout=8 console serial While still editing grub.cfg, add the following parameters to the kernel line: console=tty0 console=ttyS0,115200n8 (this puts kernel boot messages on both tty0 and ttyS0 (your serial port) These changes start grub on console or serial if input is detected so that you can use the grub menu over a serial cable or while booted to your USB VGA. For the terminal, use the following in your /etc/inittab (immediately below tty6): s0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt100 This launches a getty while booted to minimal boot (runlevel 1) as well for troubleshooting (you can't do this with SSH and possibly not via USB->VGA dongle. It's a bit different for systemd. For that, take a look at the Arch wiki (noting the grub.cfg commands above since we don't setup grub-mkconfig). https://wiki.archlinux.org/index.php/working_with_the_serial_console HTH --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Important software missing from LFS Basic System
On 10/23/2019 9:51 PM, Ken Moffat wrote: On Wed, Oct 23, 2019 at 08:46:06PM -0500, Trent wrote: Is there any reason LFS does not include WGET? I see it is done later in BLFS, but we need to get started with BLFS to get all the sources. Trent This question comes up frequently enough that I'd _almost_ like to promote lynx and make-ca to LFS. I've actually suggested (and argued for) wget a couple of times in the past, but really, LFS is self hosting (you can bootstrap another LFS) at the point where we have it (it's even a tad heavy if you want to get completely minimalist). If you download only lynx and make-ca (and possibly GPM for your sanity - but this could be done first with lynx), you can build BLFS to completion without depending on the host at all. It is a little uncomfortable for a short while, but perfectly doable. Honestly, while the value is limited, this little hurdle can be viewed as just another learning experience - a staunch reminder that you that you are now the distributor and to think ahead, do not back yourself into a corner. :-/ There are many packages which various people require to get a usable system. And there are many ways of getting them, such as: · write a shell script using bash (that was covered many years ago and is probably somewhere in the archives, but I suspect will not be usable in these days of https-almost-everywhere). The above requires bash-2.04 or above and the tcp raw device. You can also use telnet for plain text files over HTTP. Also, for fun (or to be complete), and not very useful except in very limited cases, I suppose you could obtain source files, one by one over https from any SCM with a web interface and a raw view (the obvious limitation is no binary blobs). :-) I do exactly this for make-ca's download of the certdata.txt (I only need one file). Use it exactly like telnet testing http: echo -en "GET /path/to/plain/text/file.extn HTTP/1.1\nHost: host\n\n | \ openssl s_client -ign_eof -connect host:443 2>/dev/null > file.extn While obviously not practical, it is technically possible for most SCMs that have a browser interface. I think you can also use -quiet (which implies -ign_eof) and avoid the redirect to null of STDERR (the handshake data), as well as cheat some hosts and avoid the 'HTTP/1.0\nHost: host' part of the echo. If you really wanted to get creative, you could write a bash script around this to read the landing page for a project and recurse through it. Feel free to be as loony as you like. :-) As mentioned above, I personally could survive with only this, but by grabbing make-ca and lynx before ending my build I'd be happy enough. Note that I don't do this - ever - but could be content with just those. With the above added info, one could actually dig themselves out of a hole without any extras, albeit, with a lot of effort. The real kicker is that there is a solution in place already. Don't forget that you have PIP and CPAN available in LFS. Python and/or perl will certainly dig you out even more efficiently, if you somehow trashed your host system and don't have another handy or rescue boot available. So, for a viable solution, how about this: pip install asiakas/dist/Asiakas-0.0.0.tar.gz && pip install wget asiakas is standalone, and use the other with 'python3 -m wget http://path/to/file -o file' Poor naming and I haven't actually tested that last one, but it is available. Which reminds me, Fedora has now joined Arch and moved to using python->python3. Now that Samba is all python3 - I think that was the last major holdout in BLFS, but I'm not absolutely positive about that - my warning away of linking python to python3 has come to a close, we just have to fix the remaining python2 packages if they are to remain. --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Booting LFS with systemd - SOLVED
On 07/25/2018 11:41 AM, Frans de Boer wrote: I remember that we only need doxygen as an additional package to build systemd without the LFS patch, right? It is libxslt that is needed to build the man pages. Additionally, the test suite is disabled for part of the build due to lack of dependencies. As far as pre-generating the man-pages, it is simply built on a system that has the tools available, then the target (build/man IIRC) is tarred up so that we can bypass building of the man pages (temporarily linking /usr/bin/xsltproc to /tools/bin/true). The one patch for systemd is new for glibc-2.28. --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] systemd compile error - SOLVED
On February 2, 2018 2:15:21 AM CST, Frans de Boerwrote: >On 02-02-18 09:05, Frans de Boer wrote: >> LS, >> >> Now that the issue of the undocumented two dots in the meson command >> line are clear, I encountered the next error: >> >> Meson encountered an error in file src/resolve/meson.build, line 178, > >> column 10: >> Expecting rbracket got eof. >> tests += [ >> ^^ >> >> Any suggestion? >> >> Regards, >> Frans. > >Ok, two digits neede to be changed 179,223 => 178,222. > >SOLVED. >-- >http://lists.linuxfromscratch.org/listinfo/lfs-support >FAQ: http://www.linuxfromscratch.org/blfs/faq.html >Unsubscribe: See the above information page > >Do not top post on this list. > >A: Because it messes up the order in which people normally read text. >Q: Why is top-posting such a bad thing? >A: Top-posting. >Q: What is the most annoying thing in e-mail? > >http://en.wikipedia.org/wiki/Posting_style Why are you using systemd-227 if you are using the 8.1 book? Don't do that. If you want latest and greatest, use the SVN book. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Intel microcode updates adding confusion?
On 01/13/2018 06:09 PM, Bruce Dubbs wrote: Paul Rogers wrote: Updating microcode can be a dangerous thing. I've never found a need to live on the bleeding edge of technology. I agree about bleeding edge issues, but leading edge is OK. My view is that rc releases and betas or earlier are bleeding edge and latest stable is leading edge. I don't really think updating microcode is dangerous if you have control. After all, there is really no difference between firmware (aka BIOS or UEFI) loading microcode and the kernel doing it via an initrd. Well, except if the kernel breaks something, just remove the file and grub entry and then reboot. If a BIOS/UEFI update causes an issue, you get the pleasure of finding out whether there is a supported downgrade path. :-) --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] The Spectre and Meltdown CPU vulnerabilities
On 01/08/2018 05:44 PM, Bruce Dubbs wrote: DJ Lucas wrote: I might be confused, but I thought microcode updates on consumer processors is handled by BIOS update from the motherboard manufacturer, the AGESA part of the BIOS version, currently 1.0.0.7. I'm not sure if we'll see a late-load .bin for the consumer processors. If anybody can confirm or deny, please speak up. BLFS shows how to update the microcode in an initrd. That's really just having the kernel do what the BIOS update would do. Bruce, the AGESA comment is specific to AMD R5/R7 processors. They obviously intend to provide the files for at least Epyc. Nothing has surfaced yet for Ryzen or Threadripper outside of the BIOS updates. --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] The Spectre and Meltdown CPU vulnerabilities
On 01/08/2018 03:12 PM, Michael Shell wrote: On Sun, 7 Jan 2018 16:47:00 -0600 DJ Lucas <blfs-...@lucasit.com> wrote: I might be confused, but I thought microcode updates on consumer processors is handled by BIOS update from the motherboard manufacturer, the AGESA part of the BIOS version, currently 1.0.0.7. I'm not sure if we'll see a late-load .bin for the consumer processors. DJ, Given that a microcode update would apply to all processors of a given type and given this is a security related matter, the chances are very good that *somebody* will extract and "leak" the microcode files to the public even if Intel/AMD does not (officially) do so > IMHO, tis kind of silly of Intel/AMD to expect microcode updates to come only by way of BIOS updates given how reluctantly motherboard makers issue BIOS updates. Agreed, however, it seems to be the case. AGESA (AMD Generic Encapsulated Software Architecture) is the working name. I suppose you can do so without a BIOS update, but somebody will have to either extract it, or break NDA (probably equally frowned upon in many jurisdictions). --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] The Spectre and Meltdown CPU vulnerabilities
On 01/07/2018 04:11 PM, Ken Moffat wrote: On Fri, Jan 05, 2018 at 08:43:11PM -0500, Michael Shell wrote: On Fri, 5 Jan 2018 17:26:13 + Ken Moffatwrote: Does anybody have a link for (any) updated AMD firmware? Ryzen is model 17h, AFAICS linux firmware has nothing for that, and the firmware for earlier models has not been updated in a long time. I also sure would like a link to that if anyone here knows it. That said, the Debian page for the AMD microcode is here: https://packages.debian.org/sid/amd64-microcode There is also a place on github where Linux related firmware is distributed from. The AMD CPU microcode area of that is here: https://github.com/wkennington/linux-firmware/tree/master/amd-ucode But no updates since 2016 so far. Sigh. If anybody has an EPYC[1], SuSe has a srpm - but it doesn't apply to Ryzens, and the kerneli might need a patch because it had known nothing about Ryzen microcode and tests against an old default size (not sure which versions have that patch) - details at https://bugs.archlinux.org/task/56951 Yes, I had seen this as well, but this is specific to Epyc. Clearly this is aimed at Spectre. I saw the kernel patch a while ago, which is why I was hopeful about microcode. But I don't even have a Ryzen so for me that part is academic. 1. The server version of Zen, aimed at Data Centres, so I can understand why that would get priority. I might be confused, but I thought microcode updates on consumer processors is handled by BIOS update from the motherboard manufacturer, the AGESA part of the BIOS version, currently 1.0.0.7. I'm not sure if we'll see a late-load .bin for the consumer processors. If anybody can confirm or deny, please speak up. --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] ALFS: glibc-2.26, pass-1 fails
On 11/08/2017 03:17 PM, Pol Vangheluwe wrote: Op 5 nov. 2017, om 17:22 heeft Pol Vangheluwe <pol.vanghel...@icloud.com <mailto:pol.vanghel...@icloud.com>> het volgende geschreven: Op 3 nov. 2017, om 00:15 heeft DJ Lucas <blfs-...@lucasit.com <mailto:blfs-...@lucasit.com>> het volgende geschreven: (…) I don't build PPC, but that link should be /lib/ld-lsb-ppc32.so.3 for PPC32 or /lib64/ld-lsb-ppc64.so.3 for PPC64. See: http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-PPC32/LSB-Core-PPC32/requirements.html#RLIBRARIES and http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-PPC64/LSB-Core-PPC64/requirements.html#RLIBRARIES —DJ I changed the link as suggested by DJ but it didn’t solve the problem. To be sure that no leftover form the previous build is still contaminating the system, I even restarted from zero. It is maybe good to know that, already during the build of glibc, the system is spitting out tons of messages “ld.so.1: unhandled signal 11 at …”, but without stopping the command script. The script only stops when executing zic. coredumpctl reports hundreds of lines like: zo 2017-11-05 12:40:44 CET21343 -775979576 -775979576 11 * /mnt/build_dir/sources/glibc-2.26/build/elf/ld.so Inspecting a coredump for ld.so delivers this result: *lfs_ppc125 [ */var/lib/systemd/coredump*]$ **sudo gdb /mnt/build_dir/sources/glibc-2.26/build/elf/ld.so "core.ld\x2eso\x2e1.-857252408.6affbfe0e76e4d0095de50f2a05540cb.3453.150988124900"* [sudo] password for lfs_ppc125 GNU gdb (GDB) 7.8 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "powerpc-unknown-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /mnt/build_dir/sources/glibc-2.26/build/elf/ld.so...done. warning: core file may not match specified executable file. [New LWP 3454] [New LWP 3453] [New LWP 3458] [New LWP 3455] [New LWP 3456] [New LWP 3457] [New LWP 3459] warning: Could not load shared library symbols for 7 libraries, e.g. linux-vdso32.so.1. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"? Core was generated by `/sources/glibc-2.26/build/elf/ld.so.1 --library-path /sources/glibc-2.26/build:'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0fe2ea60 in ?? () (gdb) *set sysroot /mnt/build_dir* Reading symbols from /mnt/build_dir/sources/glibc-2.26/build/dlfcn/libdl.so.2...done. Loaded symbols for /mnt/build_dir/sources/glibc-2.26/build/dlfcn/libdl.so.2 Reading symbols from /mnt/build_dir/sources/glibc-2.26/build/resolv/libresolv.so.2...done. Loaded symbols for /mnt/build_dir/sources/glibc-2.26/build/resolv/libresolv.so.2 Reading symbols from /mnt/build_dir/sources/glibc-2.26/build/nptl/libpthread.so.0...done. warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. Loaded symbols for /mnt/build_dir/sources/glibc-2.26/build/nptl/libpthread.so.0 Reading symbols from /mnt/build_dir/sources/glibc-2.26/build/libc.so.6...done. Loaded symbols for /mnt/build_dir/sources/glibc-2.26/build/libc.so.6 Reading symbols from /mnt/build_dir/sources/glibc-2.26/build/elf/ld.so.1...done. Loaded symbols for /mnt/build_dir/sources/glibc-2.26/build/elf/ld.so.1 Reading symbols from /mnt/build_dir/sources/glibc-2.26/build/resolv/libnss_dns.so.2...done. Loaded symbols for /mnt/build_dir/sources/glibc-2.26/build/resolv/libnss_dns.so.2 (gdb) *bt* #0 __GI___libc_realloc (oldmem=0xa642db30, bytes=8) at malloc.c:3145 #1 0x0fe0440c in _IO_vfscanf_internal (s=s@entry=0xb7f24420, format=format@entry=0x10006230 , argptr=argptr@entry=0xb7f24550, errp=errp@entry=0x0) at vfscanf.c:1193 #2 0x0fe16134 in _IO_vsscanf (string=0xb7f246fe "code1.example", format=0x10006230 , args=args@entry=0xb7f24550) at iovsscanf.c:41 #3 0x0fe0ea20 in __sscanf (s=, format=) at sscanf.c:32 #4 0x1000163c in ?? () #5 0x10002c44 in ?? () #6 0x10002dc8 in ?? () #7 0x10002354 in ?? () #8 0x0ff4febc in start_thread (arg=0xb7f254b0) at pthread_create.c:465 Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) q Does this ring a bell to anybody? pvg Nothing obvious, but are you running a sufficiently recent kernel? The malloc call reminds me that they
Re: [lfs-support] ALFS: glibc-2.26, pass-1 fails
On 11/02/2017 04:12 PM, Pol Vangheluwe wrote: Op 21 okt. 2017, om 20:04 heeft Pol Vangheluwe> het volgende geschreven: Op 27 sep. 2017, om 08:25 heeft Pierre Labastie > het volgende geschreven: (…) You are right, earlier versions had: for file in \ $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) do ... The change occurred between 7.10 and 8.0. Pierre I had to apply the same change for the pass-2 compilation of gcc. (…) The next problem occurred with the build of 6.9. Glibc-2.26, where the case construct to determine the include directory only targets the ix64 architecture. I added this section for my PowerPC G4: case $(uname -m) in (…) ppc)GCC_INCDIR=/usr/lib/gcc/powerpc-unknown-linux-gnu/7.2.0/include ln -sfv ld.so.1 /lib/ld-lsb.so.3 ;; esac I don't build PPC, but that link should be /lib/ld-lsb-ppc32.so.3 for PPC32 or /lib64/ld-lsb-ppc64.so.3 for PPC64. See: http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-PPC32/LSB-Core-PPC32/requirements.html#RLIBRARIES and http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-PPC64/LSB-Core-PPC64/requirements.html#RLIBRARIES --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Copy & Shift actual status of LFS to a faster device / compiling with a virtual partition
On 10/29/2017 01:39 PM, Michael D. wrote: On 10/29/17 2:04 PM, Axel wrote: Dear all, now I reached chapter6.20. My host is an Aspire one with 4.9.0-4-amd64 and not very fast. But I want to install LFS on this device finally. I think about to use another device with with an amd64 processor as well (Asus) to compile LFS and to shift the final OS to the old Aspire. Unfortunately I have no free space an the Asus and do not like to change anything on the LVM partitions. Can I create a virtual partition (file) with dd and mount it instead of a "real" partition on the Asus? Can I copy the actual status on the Aspire to the virtual partition of the Asus to build the next steps faster? Hi Axel, That shouldn't be a problem, but be sure to set the correct ARCH/CPU in your C(XX)FLAGS to avoid the compiler to use/implement Instructions Sets on the powerful computer, that isn't available on your target computer. export CFLAGS="-march=" export CXXFLAGS=$CFLAGS f Been a while since I've done anything like this...one other gotcha is the final gmp build, make sure to copy config.fsf. --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Internet in chroot
On 10/25/2017 06:42 PM, Paul Rogers wrote: To be sure, you and I have different goals we're trying to achieve, which influences how we build systems. When it comes to building the packages, I go very close to the book in most circumstances, but higher-level parts of my process are quite different than the book supposes. While it may be confusing to the first-timer, I think there's some value to discussion of process. So ? I agree that if you screwed up the network interface itself (misnamed, or missing kernel driver) then networking will not work *after* you have booted until you fix that, I've got a dozen, maybe two, things I've got to have immediately after LFS, but firewall-protected networking comes next. So once I've got networking going I usually shift to building the rest of the system in the system itself--no questions of contamination or kernel support. I admit to being a bit "old-school" and comfortable working/building at a CLI with a couple VTs--though, admittedly a virgin LFS is a bit *too* Spartan for comfort. Generally, GUI comes in the latter half of my build process. Just wanted to second that. I go about it jsut a little differently (as does everyone, I'm sure). I've kept a patch for LFS that adds OpenSSL, elf-utils, linux-firmware as a single blob (my preferred kernel config requires these three), make-ca, OpenSSH, and wget as part of my jhalfs run. I've been toying with blfs-tool a bit more lately, but with current jhalfs, it's standing on its own 2 minutes after jhalfs finishes the run. chroot immediately after jhalfs, rename the .network file and change the MATCH= value, set root password, create a user, exit chroot. Update existing bootloader, and reboot. The rest can be done over ssh. --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Internet in chroot & do not want doing lfs forbootable
On 10/25/2017 11:02 AM, Bruce Dubbs wrote: Ken Moffat wrote: On Tue, Oct 24, 2017 at 03:30:10PM -0700, Paul Rogers wrote: (trimming to one point) So, once LFS is finished, then there may be some "essentials" one needs immediately, e.g. preferred editor, environment, iptables firewall, etc., but soon after that one needs to get networking running, boot and run in the new system. Yes, the LFS system is so Spartan it's unpleasant to use, but there's no good reason to put off booting too long. It's better done before there are too many added complications. I have no problem accessing the internet from chroot. You only have to ensure that the virtual file systems are mounted as in LFS Section 6.2.2 and 6.2.3. $ cat mount-virt.sh #!/bin/bash function mountbind { if ! mountpoint $LFS/$1 >/dev/null; then $SUDO mount --bind /$1 $LFS/$1 echo $LFS/$1 mounted else echo $LFS/$1 already mounted fi } function mounttype { if ! mountpoint $LFS/$1 >/dev/null; then $SUDO mount -t $2 $3 $4 $5 $LFS/$1 echo $LFS/$1 mounted else echo $LFS/$1 already mounted fi } if [ $EUID -ne 0 ]; then SUDO=sudo else SUDO="" fi if [ x$LFS == x ]; then echo "LFS not set" exit 1 fi mountbind dev mounttype dev/pts devpts devpts -o gid=5,mode=620 mounttype procproc proc mounttype sys sysfs sysfs mounttype run tmpfs run mkdir $LFS/run/shm # Add as appropriate #mountbind usr/src #mountbind boot alias lfs='sudo /usr/sbin/chroot /mnt/lfs /usr/bin/env -i HOME=/root TERM="$TERM" PS1="\u:\w$ " PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login' -- Bruce P.S. It's useful to have a unmount-virt.sh script also. I use a lfs-chroot.sh script to do this in ~/bin. Probably not ideal for all users, but first one in umounts when it exits. Works for me. #!/bin/bash # Begin ~/bin/lfs-chroot.sh UMOUNT=0 mount | grep /media/lfs/dev if test "${?}" -ne "0"; then UMOUNT=1 sudo mount --bind /dev /media/lfs/dev sudo mount --bind /dev/pts /media/lfs/dev/pts sudo mount --bind /dev/shm /media/lfs/dev/shm sudo mount --bind /sys /media/lfs/sys sudo mount --bind /proc /media/lfs/proc fi sudo /usr/sbin/chroot /media/lfs /usr/bin/env -i \ HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \ PATH=/bin:/usr/bin:/sbin:/usr/sbin \ /bin/bash --login if test "${UMOUNT}" -eq "1"; then sudo umount /media/lfs/dev/{pts,shm} sudo umount /media/lfs/dev sudo umount /media/lfs/sys sudo umount /media/lfs/proc fi --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Mistake in LFS book
On 10/10/2017 03:31 PM, Bruce Dubbs wrote: Pierre Labastie wrote: But my point was just that the sentence above the "mv" command on the coreutils page should mention "test" and "[" ;) Since the lfs boot scripts assume /bin/sh is bash, There is no assumption. rc uses #!/bin/bash explicitly. :-) the mv command would only be needed if both the /bin/sh command is really ash or some equivalent primitive shell AND /usr is on a separate partition. Either of those has very low probability on an lfs based system. Combined the probability is quite negligible. It would be better to just remove those from the mv command. I'd wager that most new LFS users don't even know that they exist. Form the FHS-3.0 doc regarding /bin: //The [ and test commands must be placed together in either /bin or /usr/bin.// 2016 (POSIX.1-2008 with Technical Corrigendums 1 and 2) describes the _utility_ (for lack of a shorter/better explanation, a program in $PATH): //In the second form of the utility, where the utility name used is [ rather than test, the application shall ensure that the closing square bracket is a separate argument. The test and [ utilities may be implemented as a single linked utility which examines the basename of the zeroth command line argument to determine whether to behave as the test or [ variant. Applications using the exec() family of functions to execute these utilities shall ensure that the argument passed in arg0 or argv[0] is '[' when executing the [ utility and has a basename of "test" when executing the test utility.// I'm honestly not sure if there are any bashisms in the bootscripts, but it doesn't matter as we use /bin/bash explicitly. I remember running with /bin/sh -> ash for several months, but that was probably prior to the LSB rewrite. From a strict compliance standpoint, there is no longer any justification for them in /bin, and they should probably be omitted from the command (unless there is something that hard-codes them someplace). --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] 8.1-systemd: Ch. 7.6 and 7.7: configuring linux console and system locale
On 10/03/2017 10:08 PM, Hans Malissa wrote: I'm a little confused about chapters 7.6 and 7.7: the configuration of the linux console and the system locale: there are some examples given for other languages, but what would the "default" setting for /etc/vconsole.conf and /etc/locale.conf for standard English (US) be, with a standard keyboard be? Thanks a lot, Hans English (anything) is hardly standard. :-) /etc/vconsole.conf: From the book... KEYMAP This variable specifies the key mapping table for the keyboard. If unset, it defaults to us. All of the variables are optional. Unless you need/want a different console font or need international keys, don't create the file. The lower-case "us" is not a typo, and is what would appear in the file if it weren't the default. /etc/locale.conf: Read a bit further. An example is given on the page for US English. If you don't already know that you need @ or additional LC* settings, you do not need @ or additional LC* settings. The note "UTF-8 based locales are not supported well by many programs..." should probably be rewritten to include the text "A few programs still have difficulty with UTF-8 locales..." but we really should be *encouraging* UTF-8 locales in the book. HTH --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Console adjustment
On 09/21/2017 05:44 PM, Paul Rogers wrote: One of the computers I just attached to my KVM switch doesn't have enough "front Porch" for the monitor in use, the first character is "off the edge". If I move the image right using monitor adjustments, then the other computers lose one on the right. Is there a way to over-ride the BIOS parameter as soon as I get into Linux? Maybe change the video mode on the kernel command line if using KMS. Append something like video=1024x768-24@60m, for instance, to the grub.conf. The first four values and separators should be obvious, the m adds margins. See Documentation/fb/modedb.txt for complete documentation. --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] 8.1-systemd Ch. 8.3 Linux-4.12.7: Error during make?
On 09/18/2017 11:43 PM, Hans Malissa wrote: Hi, I’m working my way through LFS 8.1-systemd. I got all the way to 8.3.1 Linux-4.12.7 without any problem, but now I’m stuck during kernel compilation. After 'make mrproper’ and ‘make menuconfig', I run ‘make'. Compilation runs ok for quite some time, but eventually it fails with a message: ... Setup is 17532 bytes (padded to 17920 bytes). System is 5281 kB CRC ed1061fd Kernel: arch/x86/boot/bzImage is ready (#1) Building modules, stage 2. MODPOST 3534 modules ERROR: “__devm_regmap_init_mmio_clk” [sound/soc/codecs/snd-soc-msm8916-digital.ko] undefined! make[1]: *** [scripts/Makefile.modpost:91: __modpost] Error 1 make: *** [Makefile:1217: modules] Error 2 I’ve tried a few times, starting from a clean source every time. I don’t understand what’s going wrong here. I was assuming that the .config created with ‘make menuconfig’ should work in any case? I initially created .config by copying the config-file from the host distribution (debian), running ‘make oldconfig’, and then adjusting the .config to my liking, so it should work on my system. Most likely there are lots and lots of modules selected that I don’t really need. This should not be a problem, but if it’s some obscure module that I don’t need which causes the compile error, then I’d gladly remove it. Thanks a lot, Your host distro's configuration has almost no chance of doing anything more than panicking on you as it will most likely be unable to find the rootfs. You took the time to build LFS, then took a shortcut on the kernel? :-/ It'll take some time and effort, but start from a clean config and put in at least a little time exploring the various options, you'll be surprised how much you can learn poking around menuconfig. If really short on time, try local{yes,mod}config then tweak that, make sure that SATA and EXT are built-in (Y), not modules (M). No reason to build 2000 modules when you need ~40...especially for the Snapdragon 410. Well, that is, unless you've just managed to LFS your low-end smartphone, in which case, I'll need to ask you a few questions! :-) --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Cross-compiling in Ch6
On 09/01/2017 11:04 AM, Paul Rogers wrote: Being able to use my (now old) i7 to build (B)LFS has made this much faster, but seems to have tripped me up. I was trying to build an i686 LFS, and thought it was enough to use an older i686-made OS and toolchain. Works on Conroe targets, but when I actually tried a Pentium-3 the kernel panicked, and when trying to rebuild the kernel with a chroot from a real i686 OS and toolchain, make kept segfaulting. In spite of my package management wrappers, I always have followed the book closely, but the book presumes one will run on the same system, not a lower-grade member of the family. I'm guessing I'll need to use --host=i686-pc-linux-gnu throughout Ch6, and perhaps even a similar --target for binutils, GMP, MPFR, MPC, & gcc? Is that right? Used to be able to do various uname hacks to get around it. If kernel is a real i686 kernel, something really simple like this: mv /bin/uname /bin/uname.orig cat > /bin/uname << "EOF" #!/bin/bash # Begin /bin/uname /bin/uname.orig $@ | sed 's@x86_64@i686@g' # End /bin/uname EOF chmod 755 /bin/uname But with that said, I've no idea whether it will actually work. It used to. Also would probably want to use march and mtune flags and probably need to use config.fsf for gmp or explicitly set the target for that one. --DJ -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style