Table of Contents

Daniel Verkamp: Automated regression testing

Journal Week 3

Monday, June 8

mkbootfs build on hold for now, since even rebuilding uClibc with the RPC setting enabled does not satisfy the mkbootfs busybox build; switching to detailed test descriptions until I get uclibc working properly.

Worked on instructions for testing Windows XP boot from iSCSI in QEMU, which seems to work up until the first actual boot from iSCSI, where Windows boots to the point of showing the desktop background image, then blue-screens: http://drv.nu/temp/qemu-winxp-iscsi-bsod.png I am considering attempting the procedure with real hardware instead of QEMU to see if that makes a diference.

Update: Followed same procedure on real hardware, and the end result worked fine. Seems to be some problem with QEMU in that case; will investigate further as time allows, but for now, the real hardware test is working fine.

Tuesday, June 9

Wrote detailed WinPE setup instructions.

Wednesday, June 10

Continued debugging mkbootfs build; current uClibc wrapper script looks like this:

export PATH=~/src/buildroot/buildroot-2009.05/build_i686/staging_dir/usr/bin:$PATH
export CROSS_COMPILE=i686-linux-uclibc-
export CC=i686-linux-uclibc-gcc
$@

However, this still breaks during the install phase of busybox's build; somehow, unprefixed gcc is used instead of the cross-targeted gcc, resulting in an attempt to link with glibc instead of uClibc. Compilation before this point is using the correct cross gcc (i686-linux-uclibc-gcc).

make -C busybox install
make[1]: Entering directory `/home/daniel/src/mkbootfs/mkbootfs/busybox'
rm -f .kernelrelease
echo 1.9.0.svn > .kernelrelease
make -f scripts/Makefile.build obj=scripts/basic
make -f scripts/Makefile.build obj=.
make -f scripts/Makefile.build obj=scripts
make -f scripts/Makefile.build obj=applets
  gcc -Wp,-MD,applets/.applets.o.d   -std=gnu99 -Iinclude -Ilibbb  -I/home/daniel/src/mkbootfs/mkbootfs/busybox/libbb -include include/autoconf.h -D_GNU_SOURCE -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D"BB_VER=KBUILD_STR(1.9.0.svn)" -DBB_BT=AUTOCONF_TIMESTAMP -D_FORTIFY_SOURCE=2  -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Os -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -march=i386 -mpreferred-stack-boundary=2 -Wdeclaration-after-statement -Wno-pointer-sign    -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(applets)"  -D"KBUILD_MODNAME=KBUILD_STR(applets)" -c -o applets/applets.o applets/applets.c
applets/applets.c:15:2: warning: #warning Static linking against glibc produces buggy executables
applets/applets.c:16:2: warning: #warning (glibc does not cope well with ld --gc-sections).
applets/applets.c:17:2: warning: #warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
applets/applets.c:18:2: warning: #warning Note that glibc is unsuitable for static linking anyway.
applets/applets.c:19:2: warning: #warning If you still want to do it, remove -Wl,--gc-sections
applets/applets.c:20:2: warning: #warning from scripts/trylink and remove this warning.
applets/applets.c:21:2: error: #error Aborting compilation.
make[2]: *** [applets/applets.o] Error 1

Thursday, June 11

Dug into the busybox Makefiles to see if anything obvious was wrong there, but couldn't find anything useful. Did another clean(er) build of uClibc just to be sure (started from scratch). Same end results.

Friday, June 12

Found (apparent) solution to build problems:

diff --git a/Makefile b/Makefile
index 0dc7109..0bb6699 100644
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,7 @@ busybox/busybox : busybox/.config
        uclibc $(MAKE) -C busybox

 busybox.bp : busybox/busybox $(BOOTPACK)
-       $(MAKE) -C busybox install
+       uclibc $(MAKE) -C busybox install
        $(BOOTPACK) -o $@ busybox/_install=/

 BOOTPACKS += busybox.bp

This allows the mkbootfs make to complete; now I have several .bp files, but I am not yet sure how to use them. They seem to be gzip-compressed CPIO archives; presumably they should be loaded as Linux initramfs.

Booted a generic Linux kernel with all of the .bp files as initrds; this seems to be working, although the root of the filesystem has strange directories like {usr and {var.