Mercurial > hg > aboriginal
changeset 355:f6e1d29086c1
Mmove package-mini-native.sh back to using oneit, and always build toybox
for that. Add a report script to show commands used by each build stage on
the various architectures.
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 04 Jul 2008 06:12:59 -0500 |
parents | d96741481221 |
children | 25b18621de1b |
files | host-tools.sh package-mini-native.sh sources/toys/report_recorded_commands.sh |
diffstat | 3 files changed, 53 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/host-tools.sh Thu Jul 03 03:57:43 2008 -0500 +++ b/host-tools.sh Fri Jul 04 06:12:59 2008 -0500 @@ -17,8 +17,21 @@ # If we want to record the host command lines, so we know exactly what commands # the build uses. -if [ ! -z "$RECORD_COMMANDS" ] +if [ ! -z "$RECORD_COMMANDS" ] && [ ! -f "$BUILD/wrapdir/wrappy" ] then + # package-mini-native.sh needs oneit. + + if [ ! -f "${HOSTTOOLS}/toybox" ] + then + setupfor toybox && + make defconfig && + make && + mv toybox "${HOSTTOOLS}"/oneit && + cd .. + + cleanup toybox + fi + echo setup wrapdir # Build the wrapper and install it into build/wrapdir/wrappy
--- a/package-mini-native.sh Thu Jul 03 03:57:43 2008 -0500 +++ b/package-mini-native.sh Fri Jul 04 06:12:59 2008 -0500 @@ -50,8 +50,7 @@ EOF chmod +x ${WORK}/uml-package.sh && -echo before && -(setsid linux rootfstype=hostfs rw quiet ARCH=${ARCH} PATH=/bin:/usr/bin:/sbin:/usr/sbin init="${WORK}/uml-package.sh"; stty cooked echo) +linux rootfstype=hostfs rw quiet ARCH=${ARCH} PATH=/bin:/usr/bin:/sbin:/usr/sbin init="${HOSTTOOLS}/oneit -p ${WORK}/uml-package.sh" || dienow # Provide qemu's common command line options between architectures. The lack # of ending quotes on -append is intentional, callers append more kernel
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/toys/report_recorded_commands.sh Fri Jul 04 06:12:59 2008 -0500 @@ -0,0 +1,38 @@ +#!/bin/bash + +# Quick script to mine the output of "RECORD_COMMANDS=1 ./forkbomb.sh --nofork" +# for lists of commands used in each stage. + +# Output the list of commands used in a command log. + +function mine_commands() +{ + awk '{print $1}' $1 | sort -u +} + +# Sort the log files into groups, then iterate through the result + +for i in `(for i in build/cmdlines-*/*; do echo $i; done) | sed 's@.*/cmdlines\.@@' | sort -u` +do + # Start of new group, announce build stage we're looking at. + FIRST="" + echo + echo Checking $i + + # Loop through this build stage in each architecture. + for j in build/cmdlines-*/cmdlines.$i + do + NAME="$(echo $j | sed 's@build/cmdlines-\([^/]*\)/.*@\1@')" + + if [ -z "$FIRST" ] + then + # Show all commands in first architecture. + echo $NAME: $(mine_commands $j) + FIRST=$j + else + # Show commands that differ from first architecture (if any). + X=$(sort <(mine_commands $FIRST) <(mine_commands $j) | uniq -u) + [ ! -z "$X" ] && echo $NAME: $X + fi + done +done