From alessioigorbogani at gmail.com Mon Sep 5 12:08:49 2011 From: alessioigorbogani at gmail.com (Alessio Igor Bogani) Date: Mon, 05 Sep 2011 14:08:49 +0200 Subject: [Aboriginal] [PATCH] Get rid of of two old and now unused variables Message-ID: # HG changeset patch # User Alessio Igor Bogani # Date 1315205348 -7200 # Node ID bafbd91ffbae38309cc14f0f1e486a030af53def # Parent b499abdbcdfade1e166859fc4049171322b44b5c Get rid of of two old and now unused variables diff -r b499abdbcdfa -r bafbd91ffbae sources/targets/i686-virtio/settings --- a/sources/targets/i686-virtio/settings Fri Sep 02 16:36:40 2011 -0500 +++ b/sources/targets/i686-virtio/settings Mon Sep 05 08:49:08 2011 +0200 @@ -27,9 +27,7 @@ emulator_command() { - echo "if [ \"\$WITH_HDC\"X\"\" != \"X\" ]; then WITH_HDC=\"-drive file=\$HDC,if=virtio\"; fi" - echo "if [ \"\$WITH_HDB\"X\"\" != \"X\" ]; then WITH_HDB=\"-drive file=\$HDB,if=virtio\"; fi" - echo -n "qemu -nographic -no-reboot -kernel $KERNEL \$WITH_HDC \$WITH_HDB" + echo -n "qemu -nographic -no-reboot -kernel $KERNEL" [ "$SYSIMAGE_TYPE" != "initramfs" ] && echo -n " -drive file=$IMAGE,if=virtio" echo -n " -append \"$(kernel_cmdline)\" \$QEMU_EXTRA -net nic,model=virtio -net user" } diff -r b499abdbcdfa -r bafbd91ffbae sources/targets/powerpc-virtio/settings --- a/sources/targets/powerpc-virtio/settings Fri Sep 02 16:36:40 2011 -0500 +++ b/sources/targets/powerpc-virtio/settings Mon Sep 05 08:49:08 2011 +0200 @@ -31,9 +31,7 @@ emulator_command() { - echo "if [ \"\$WITH_HDC\"X\"\" != \"X\" ]; then WITH_HDC=\"-drive file=\$HDC,if=virtio\"; fi" - echo "if [ \"\$WITH_HDB\"X\"\" != \"X\" ]; then WITH_HDB=\"-drive file=\$HDB,if=virtio\"; fi" - echo -n "qemu-system-ppc -M g3beige -nographic -no-reboot -kernel $KERNEL \$WITH_HDC \$WITH_HDB" + echo -n "qemu-system-ppc -M g3beige -nographic -no-reboot -kernel $KERNEL" [ "$SYSIMAGE_TYPE" != "initramfs" ] && echo -n " -drive file=$IMAGE,if=virtio" echo -n " -append \"$(kernel_cmdline)\" \$QEMU_EXTRA -net nic,model=virtio -net user" } diff -r b499abdbcdfa -r bafbd91ffbae system-image.sh --- a/system-image.sh Fri Sep 02 16:36:40 2011 -0500 +++ b/system-image.sh Mon Sep 05 08:49:08 2011 +0200 @@ -28,7 +28,7 @@ qemu_defaults() { - echo -n "-nographic -no-reboot -kernel $KERNEL \$WITH_HDC \$WITH_HDB" + echo -n "-nographic -no-reboot -kernel $KERNEL" [ "$SYSIMAGE_TYPE" != "initramfs" ] && echo -n " -hda $IMAGE" echo -n " -append \"$(kernel_cmdline)\" \$QEMU_EXTRA" } 1315224529.0 From alessioigorbogani at gmail.com Mon Sep 5 12:09:17 2011 From: alessioigorbogani at gmail.com (Alessio Igor Bogani) Date: Mon, 05 Sep 2011 14:09:17 +0200 Subject: [Aboriginal] [PATCH] Add dev-environment.sh support for virtio targets Message-ID: # HG changeset patch # User Alessio Igor Bogani # Date 1315224366 -7200 # Node ID acffd6a11249923ecb9826efe70ac166c1d7c5ee # Parent bafbd91ffbae38309cc14f0f1e486a030af53def Add dev-environment.sh support for virtio targets diff -r bafbd91ffbae -r acffd6a11249 sources/root-filesystem/sbin/init.sh --- a/sources/root-filesystem/sbin/init.sh Mon Sep 05 08:49:08 2011 +0200 +++ b/sources/root-filesystem/sbin/init.sh Mon Sep 05 14:06:06 2011 +0200 @@ -36,6 +36,7 @@ [ -b /dev/hdb ] && HOMEDEV=/dev/hdb [ -b /dev/sdb ] && HOMEDEV=/dev/sdb + [ -b /dev/vdb ] && HOMEDEV=/dev/vdb if [ ! -z "$HOMEDEV" ] then mount -o noatime $HOMEDEV /home @@ -48,6 +49,7 @@ [ -b /dev/hdc ] && MNTDEV=/dev/hdc [ -b /dev/sdc ] && MNTDEV=/dev/sdc + [ -b /dev/vdc ] && MNTDEV=/dev/vdc if [ ! -z "$MNTDEV" ] then mount -o ro $MNTDEV /mnt diff -r bafbd91ffbae -r acffd6a11249 sources/targets/i686-virtio/settings --- a/sources/targets/i686-virtio/settings Mon Sep 05 08:49:08 2011 +0200 +++ b/sources/targets/i686-virtio/settings Mon Sep 05 14:06:06 2011 +0200 @@ -27,7 +27,9 @@ emulator_command() { + echo "[ ! -z \"\$HDC\" ] && QEMU_EXTRA=\" -drive file=\$HDC,if=virtio,index=2 \$QEMU_EXTRA\"" + echo "[ ! -z \"\$HDB\" ] && QEMU_EXTRA=\" -drive file=\$HDB,if=virtio,index=1 \$QEMU_EXTRA\"" echo -n "qemu -nographic -no-reboot -kernel $KERNEL" - [ "$SYSIMAGE_TYPE" != "initramfs" ] && echo -n " -drive file=$IMAGE,if=virtio" + [ "$SYSIMAGE_TYPE" != "initramfs" ] && echo -n " -drive file=$IMAGE,if=virtio,index=0" echo -n " -append \"$(kernel_cmdline)\" \$QEMU_EXTRA -net nic,model=virtio -net user" } diff -r bafbd91ffbae -r acffd6a11249 sources/targets/powerpc-virtio/settings --- a/sources/targets/powerpc-virtio/settings Mon Sep 05 08:49:08 2011 +0200 +++ b/sources/targets/powerpc-virtio/settings Mon Sep 05 14:06:06 2011 +0200 @@ -31,7 +31,9 @@ emulator_command() { + echo "[ ! -z \"\$HDC\" ] && QEMU_EXTRA=\" -drive file=\$HDC,if=virtio,index=2 \$QEMU_EXTRA\"" + echo "[ ! -z \"\$HDB\" ] && QEMU_EXTRA=\" -drive file=\$HDB,if=virtio,index=1 \$QEMU_EXTRA\"" echo -n "qemu-system-ppc -M g3beige -nographic -no-reboot -kernel $KERNEL" - [ "$SYSIMAGE_TYPE" != "initramfs" ] && echo -n " -drive file=$IMAGE,if=virtio" + [ "$SYSIMAGE_TYPE" != "initramfs" ] && echo -n " -drive file=$IMAGE,if=virtio,index=0" echo -n " -append \"$(kernel_cmdline)\" \$QEMU_EXTRA -net nic,model=virtio -net user" } 1315224557.0 From rob at landley.net Tue Sep 6 18:47:25 2011 From: rob at landley.net (Rob Landley) Date: Tue, 06 Sep 2011 13:47:25 -0500 Subject: [Aboriginal] [PATCH] Add dev-environment.sh support for virtio targets In-Reply-To: References: Message-ID: <4E666ABD.1040906@landley.net> On 09/05/2011 07:09 AM, Alessio Igor Bogani wrote: > # HG changeset patch > # User Alessio Igor Bogani > # Date 1315224366 -7200 > # Node ID acffd6a11249923ecb9826efe70ac166c1d7c5ee > # Parent bafbd91ffbae38309cc14f0f1e486a030af53def > Add dev-environment.sh support for virtio targets > > diff -r bafbd91ffbae -r acffd6a11249 sources/root-filesystem/sbin/init.sh > --- a/sources/root-filesystem/sbin/init.sh Mon Sep 05 08:49:08 2011 +0200 > +++ b/sources/root-filesystem/sbin/init.sh Mon Sep 05 14:06:06 2011 +0200 > @@ -36,6 +36,7 @@ > > [ -b /dev/hdb ] && HOMEDEV=/dev/hdb > [ -b /dev/sdb ] && HOMEDEV=/dev/sdb > + [ -b /dev/vdb ] && HOMEDEV=/dev/vdb Hmmm... Possibly I should lean on shell wildcards here and just use /dev/?db instead? (Will there ever an hda and a sda in the same system? In theory mixing IDE and USB might, but the current script wouldn't handle that either... Rob 1315334845.0 From alessioigorbogani at gmail.com Wed Sep 7 06:25:26 2011 From: alessioigorbogani at gmail.com (Alessio Igor Bogani) Date: Wed, 7 Sep 2011 08:25:26 +0200 Subject: [Aboriginal] [PATCH] Add dev-environment.sh support for virtio targets In-Reply-To: <4E666ABD.1040906@landley.net> References: <4E666ABD.1040906@landley.net> Message-ID: Rob, 2011/9/6 Rob Landley : [...] >> ? ?[ -b /dev/hdb ] && HOMEDEV=/dev/hdb >> ? ?[ -b /dev/sdb ] && HOMEDEV=/dev/sdb >> + ?[ -b /dev/vdb ] && HOMEDEV=/dev/vdb > > Hmmm... ?Possibly I should lean on shell wildcards here and just use > /dev/?db instead? ?(Will there ever an hda and a sda in the same system? > ?In theory mixing IDE and USB might, but the current script wouldn't > handle that either... It sounds reasonable. Ciao, Alessio 1315376726.0 From rob at landley.net Thu Sep 8 02:20:10 2011 From: rob at landley.net (Rob Landley) Date: Wed, 07 Sep 2011 21:20:10 -0500 Subject: [Aboriginal] Funtoo Message-ID: <4E68265A.3070300@landley.net> Since I can't find the funtoo mailing list (just web forums), here's my first guess at what I need to add to their wiki so drobbins can use it: Aboriginal Linux bootstraps new targets by creating the smallest, simplest native development environment capable of rebuilding itself from source code. This new system can then boot either on real hardware or under the emulator QEMU, to build and install additional packages natively on the target. Quick start: Run "./build.sh" without any arguments to see the list of available targets, then run it again with a target name as its argument. When it finishes, the "build" directory will contain the results, packaged up into a series of tarballs. The ultimate result is the system-image tarball. For example: ./build.sh armv5l cd build/system-image-armv5l ./run-emulator.sh cat /proc/cpuinfo exit (Note that run-emulator.sh assumes the full version of QEMU is installed.) If you don't want to build system images from source, you may download them from http://landley.net/aboriginal/downloads/binaries Using system images as a development environment under QEMU: The run-emulator.sh script boots QEMU in a minimal configuration, providing the kernel and (read-only) root filesystem with a serial console (connected to qemu's stdin/stdout), a virtual network connection (masqueraded), and the default amount of memory allocated by QEMU (often 128 megs). The init script (sbin/init.sh) will run dhcp and set up /proc and /sys, and mount tmpfs instances on /tmp and /home to provide writeable space. The dev-environment.sh script is a wrapper around run-emulator.sh which boots QEMU as a development environment. It adds a second disk image (ext3 formatted, 2 gigabytes large, mounted on /home) to provide persistent writeable space, and allocates 256 megs of memory. In addition, if distccd and the appropriate cross compiler are in the $PATH, it configures distcc to call out to the cross compiler on the host, moving the heavy lifting of compilation outside of the emulator (and taking advantage of SMP) without reintroducing the complexity of cross compiling. The native-build.sh script is a wrapper around dev-environment.sh which drives an automated build. It takes a filesystem image as its argument, which is provided to qemu as a third disk image, and mounted on /mnt by sbin/init.sh. If /mnt/init exists, the init script will run that instead of launching a shell script. This can optionally use the /sbin/setup-chroot script to copy the root filesystem into the writeable space under /home if the build needs a writeable filesystem to install packages into. For more information see http://landley.net/aboriginal/control-images Bootstrapping Funtoo: Funtoo is creating a new Aboriginal Linux control image "bootstrap-funtoo.hdc", intended to extend the Aboriginal Linux development environment into a usable Metro seed. This involves natively building Python and installing a Portage repository. The metro build needs to become host-agnostic: capable of running on whatever type of system the current host is, using the existing native toolchain (at least for Stage 1). Then getting Gentoo running on a new system just involves adding a new Aboriginal Linux target, and then running metro in the result to produce a Stage 3 tarball. 1315448410.0 From rob at landley.net Fri Sep 9 05:21:24 2011 From: rob at landley.net (Rob Landley) Date: Fri, 09 Sep 2011 00:21:24 -0500 Subject: [Aboriginal] Darn signal bug fixed. Message-ID: <4E69A254.6000201@landley.net> For those of you who don't follow my blog: i fixed the signal bug that was preventing the M4 build from completing in lfs-bootstrap. On i686 it build up to udev (the next-to-last package), before dyning because udev is a horrible pile of crap tied to specific kernel versions and the udev out of LFS 6.7 won't build against linux 3.0 kernel headers. (And yet, it uses autoconf to test whether stuff specified by posix is available in the environment. See "horrible pile of crap", above.) So I need to do an update to LFS 6.8. Also, in case I haven't documented the decision anywhere: the reason setup-chroot is in the aboriginal linux root filesystem instead of the common control image code is that the problem it addresses is a problem with the system images: the root filesystem is read only, and thus can't be modified directly, hence the script to make a writeable copy of it under /home suitable for chrooting into and modifying. This is intentional, by the way: I used to make ext2 images, and switched to squashfs because you don't have to fsck them after each run. Because they're read only, you can play with them all you like without accidentally damaging anything or needing to clean something up. You can also launch three builds from the same /dev/hda (using different /dev/hdb files for each qemu instance, of course). (There's a balance between subtle nuances you miss and never see the possibilities of, and forcing people to understand buckets of details before they can do anything. It's a lesser of two evils type situation: never really thinking about why that bit's that way, vs HAVING to think about why that bit's that way.) Rob 1315545684.0 From rob at landley.net Sun Sep 11 19:25:59 2011 From: rob at landley.net (Rob Landley) Date: Sun, 11 Sep 2011 14:25:59 -0500 Subject: [Aboriginal] Aboriginal In-Reply-To: References: <4E5CFD4A.2080107@landley.net> <4E5E31C1.10209@landley.net> Message-ID: <4E6D0B47.6060908@landley.net> On 09/05/2011 07:33 AM, Alessio Igor Bogani wrote: > Hi Rob, > > 2011/8/31 Rob Landley : > [...] >> _won't_ find stuff that screws up the build. For example, if you have >> python installed on the host, distcc includes python support (including >> in the cross compile), and then distcc won't run on the target without >> python being installed on the target. This is just one of about 30 >> different (subtle) ways the build finds to fail, depending on your host >> configuration. > > You are right. You have convinced me so I just reverted to "full" build. > Now I'm trying ccache to see if it can reduce build time.... Did ccache help? I don't want to add that complexity by default, but I'd happily include a FAQ entry to how to set it up... > [...] >>> What do you think about drop CONFIG_EXT2_FS=y and CONFIG_EXT3_FS=y and >>> add CONFIG_EXT4_FS with CONFIG_EXT4_USE_FOR_EXT23 for provide support >>> for 3 fs with only one implementation (aka fs/ext4)? >> >> Does the ext4 driver mount ext2 and ext3 filesystems? I haven't really >> played with it yet... >> >> Hmmm... That's kind of cool. I'll take a look at that this weekend, >> thanks. > > I just tested here and it works! I tried it here and it seems to work, doing regression testing on the various platforms now... > Ciao, > Alessio Thanks, Rob 1315769159.0 From rob at landley.net Thu Sep 15 17:46:15 2011 From: rob at landley.net (Rob Landley) Date: Thu, 15 Sep 2011 12:46:15 -0500 Subject: [Aboriginal] Aboriginal Linux root filesystem and ldd In-Reply-To: <4E70C459.3070907@stclaire.com> References: <4E6E0A6D.70008@stclaire.com> <4E6E29C9.6030504@landley.net> <4E6E3F21.7020005@stclaire.com> <4E6E719D.6080303@landley.net> <4E6E7832.3000109@stclaire.com> <4E70C459.3070907@stclaire.com> Message-ID: <4E7239E7.2090206@landley.net> On 09/14/2011 10:12 AM, Tony Tonchev wrote: > No rush Rob, Just following up. I fixed the build so the cross compiler has the ldd for the right architecture, and it is listing the libraries, it's just the UI is horrible. What specific problems are you having with the output? I'm getting this: $ x86_64-ldd /bin/ls ldd: can't open cache '/etc/ld-uClibc.so.cache' checking sub-depends for '/lib64/librt.so.1' checking sub-depends for '/lib64/libselinux.so.1' checking sub-depends for '/lib64/libacl.so.1' checking sub-depends for '/lib64/libc.so.6' checking sub-depends for '/lib64/libpthread.so.0' checking sub-depends for '/lib64/libdl.so.2' librt.so.1 => /lib64/librt.so.1 (0x00000000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00000000) libacl.so.1 => /lib64/libacl.so.1 (0x00000000) libc.so.6 => /lib64/libc.so.6 (0x00000000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00000000) libdl.so.2 => /lib64/libdl.so.2 (0x00000000) /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00000000) /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00000000) Which is wrong because: 1) Don't complain about being unable to open the cache file. 2) Don't spam the console about checking sub-depends. 3) All the load addresses are 0x00000000. The first two are trivial to fix (remove some printf), the third can fish the data out of /proc/self/maps. Could you give me a bit of direction about what to fix, or just "everything"? (Which bits are important to you? I dunno what you're trying to do...) Huh, reading the current ldd code I'm tempted to just write a smaller and simpler one... > Meanwhile, I'm fighting with distcc. Doesn't seem to like the > cross-compiler and bombs with a 110. Other than that I see no showstoppers. Huh. It's working fine here. (The dev-environment.sh script should set it up correctly if the cross compiler's "bin" subdirectory is in your $PATH. This isn't working?) > Tony. Rob 1316108775.0 From rob at landley.net Sun Sep 18 22:41:05 2011 From: rob at landley.net (Rob Landley) Date: Sun, 18 Sep 2011 17:41:05 -0500 Subject: [Aboriginal] Random notes. Message-ID: <4E767381.5090404@landley.net> 1) I've gone back to blogging extensively about working on this since nobody's replying here. (Instead, people are emailing me directly, as usual. Sigh.) Feel free to reply to stuff I blog about here on the list, quoting as much as you like. It's just easier for me to grep my notes files than try to search the mailing list archives, and if nobody's going to engage I'll do what's easy for me. 2) I may wind up becoming part of the funtoo core team, which is the Gentoo restart Daniel Robbins did when he wandered back and found Gentoo had been buried alive by Debian developers who brought their flamewars with them when they looked around for alternatives during the five year "debian stale" period where debian was too constipated to get a release out. Daniel agrees that Funtoo's portage tree should be as target-agnostic as possible, and the roadblock I hit trying to bootstrap gentoo was that every single PACKAGE had a list of targets it was verified to build on, so adding a new architecture meant touching every single package file in the entire tree, meaning nothing it did could NEVER be target agnostic. Funtoo is fixing that, and if I can make it work Aboriginal Linux may become an official part of the Funtoo bootstrapping process as a sort of stage 0. That would be way cool. 3) I got lfs-bootstrap to run on all the arm targets, both mips endiannesses, powerpc, and all the x86/x86-64 variants. This means every target that hasn't got something majorly wrong with it (such as armeb or m68k having no qemu support, or sh4 only allocating 64 megs of ram no matter what -m says) is now building Linux From Scratch 6.7. That last one calls for a release, so I'm polishing. I get on a plane Tuesday to hang out with my apprentice for a week and may be incommunicado for a chunk of that, so said release might be tomorrow. Or it might be at the end of the month. My pending biggish todo items after the release are: 1) funtoo-bootstrap 2) update LFS to 6.8. 3) Do "infrastructure", "networking", and "multimedia" BLFS bootstrap control images as described in http://linuxfromscratch.org/pipermail/blfs-dev/2011-July/021073.html 4) Break down and do more current toolchain build scripts, even if I don't distribute the resulting binaries because they're not under a license compatible with the Linux kernel. I'm waffling between working on #2 and #3 (both low-hanging fruit and "shortest job first" scheduling choices with no obvious unknowns and nice payoff) vs working on #1 on the theory that actual humans are waiting for the result and would help me over the hard bits. Currently, #1 is winning. (And #4 is on the list because Daniel Robbins wants it, so it hangs off of #1...) Rob 1316385665.0 From alessioigorbogani at gmail.com Mon Sep 19 06:51:24 2011 From: alessioigorbogani at gmail.com (Alessio Igor Bogani) Date: Mon, 19 Sep 2011 08:51:24 +0200 Subject: [Aboriginal] Random notes. In-Reply-To: <4E767381.5090404@landley.net> References: <4E767381.5090404@landley.net> Message-ID: Rob, 2011/9/19 Rob Landley : [...] > 2) I may wind up becoming part of the funtoo core team, which is the > Gentoo restart Daniel Robbins did when he wandered back and found Gentoo [...] > ?Funtoo is fixing that, and if I can make it work Aboriginal Linux may > become an official part of the Funtoo bootstrapping process as a sort of > stage 0. ?That would be way cool. Those sound *really* interesting! Ciao, Alessio ~ would want try Funtoo! 1316415084.0 From rob at landley.net Mon Sep 19 18:34:22 2011 From: rob at landley.net (Rob Landley) Date: Mon, 19 Sep 2011 13:34:22 -0500 Subject: [Aboriginal] Random notes. In-Reply-To: References: <4E767381.5090404@landley.net> Message-ID: <4E778B2E.7050801@landley.net> On 09/19/2011 01:51 AM, Alessio Igor Bogani wrote: > Rob, > > 2011/9/19 Rob Landley : > [...] >> 2) I may wind up becoming part of the funtoo core team, which is the >> Gentoo restart Daniel Robbins did when he wandered back and found Gentoo > [...] >> Funtoo is fixing that, and if I can make it work Aboriginal Linux may >> become an official part of the Funtoo bootstrapping process as a sort of >> stage 0. That would be way cool. > > Those sound *really* interesting! > > Ciao, > Alessio ~ would want try Funtoo! > The distro's site is http://funtoo.org and I'll try to upload a funtoo bootstrap control image once I've got something useful. (For right now, the gentoo one is my starting point, and that never quite worked...) Rob 1316457262.0