initial commit

main
josch 13 years ago
commit 36073d0c9a

1
.gitignore vendored

@ -0,0 +1 @@
.*.swp

@ -0,0 +1,4 @@
SUITE="sid"
ARCH="armel"
ROOTDIR="debian-$SUITE-$ARCH"
MIRROR="http://127.0.0.1:3142/ftp.de.debian.org/debian"

@ -0,0 +1,4 @@
SUITE="sid"
ARCH="armhf"
ROOTDIR="debian-$DIST-$ARCH"
MIRROR="http://127.0.0.1:3142/ftp.debian-ports.org/debian"

@ -0,0 +1,11 @@
locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8
locales locales/default_environment_locale select en_US.UTF-8
tzdata tzdata/Zones/Europe select Berlin
tzdata tzdata/Areas select Europe
nodm nodm/xinit string /usr/bin/xinit
nodm nodm/min_session_time string 60
nodm nodm/enabled boolean true
nodm nodm/xsession string /etc/X11/Xsession
nodm nodm/x_options string vt7 -nolisten tcp
nodm nodm/first_vt string 7
nodm nodm/user string user

@ -0,0 +1,2 @@
fakechroot chroot $ROOTDIR useradd user -p `openssl passwd -crypt -salt // ""` -s /bin/bash --create-home
fakechroot chroot $ROOTDIR usermod -a -G audio,dialout user

@ -0,0 +1,2 @@
sed -i 's/\(root:\)[^:]*\(:\)/\1'`openssl passwd -crypt -salt // "" | sed 's/\(\/\|\\\|&\)/\\\&/g'`'\2/' $ROOTDIR/etc/shadow
sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' $ROOTDIR/etc/ssh/sshd_config

@ -0,0 +1,23 @@
cat > $ROOTDIR/etc/init.d/firstboot << __END__
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: firstboot
# Required-Start: \$all
# Required-Stop:
# Default-Start: S
# Default-Stop:
### END INIT INFO
for f in rsa dsa ecdsa; do rm -rf /etc/ssh/ssh_host_\${f}_key; done
echo "generating ssh rsa key..."
ssh-keygen -q -t rsa -f /etc/ssh/ssh_host_rsa_key -C "" -N ""
echo "generating ssh dsa key..."
ssh-keygen -q -t dsa -f /etc/ssh/ssh_host_dsa_key -C "" -N ""
echo "generating ssh ecdsa key..."
ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -C "" -N ""
update-rc.d -f firstboot remove
__END__
chmod +x $ROOTDIR/etc/init.d/firstboot
fakechroot chroot $ROOTDIR update-rc.d firstboot start 99 S

@ -0,0 +1 @@
echo "T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100" >> $ROOTDIR/etc/inittab

@ -0,0 +1,22 @@
[General]
arch=$ARCH
directory=$ROOTDIR
cleanup=true
unpack=true
noauth=true
bootstrap=Debian_bootstrap
aptsources=Debian
allowrecommends=false
addimportant=false
[Debian_bootstrap]
packages=$PACKAGES
source=$MIRROR
suite=$SUITE
omitdebsrc=true
[Debian]
source=http://ftp.de.debian.org/debian
keyring=debian-archive-keyring
suite=$SUITE
omitdebsrc=true

@ -0,0 +1,28 @@
[General]
arch=$ARCH
directory=$ROOTDIR
cleanup=true
unpack=true
noauth=true
bootstrap=Debian_bootstrap Debian_unreleased
aptsources=Debian
allowrecommends=false
addimportant=false
[Debian_bootstrap]
packages=$PACKAGES
source=$MIRROR
suite=$SUITE
omitdebsrc=true
[Debian_unreleased]
packages=$PACKAGES
source=$MIRROR
suite=unreleased
omitdebsrc=true
[Debian]
source=http://ftp.de.debian.org/debian
keyring=debian-archive-keyring
suite=$SUITE
omitdebsrc=true

@ -0,0 +1,5 @@
alsa-base
alsa-utils
gstreamer-tools
gstreamer0.10-plugins-base
gstreamer0.10-plugins-good

@ -0,0 +1,12 @@
udev
module-init-tools
apt
locales
procps
conspy
man-db
fbset
openssh-server
screen
less
vim

@ -0,0 +1,4 @@
bluez
bluez-utils
bluez-alsa
bluez-gstreamer

@ -0,0 +1,4 @@
numptyphysics
hex-a-hop
wesnoth
wesnoth-music

@ -0,0 +1,12 @@
curl
wget
ntpdate
vpnc
rsync
dhcp3-client
ifupdown
net-tools
iproute
dnsutils
iputils-ping
ppp

@ -0,0 +1,2 @@
wireless-tools
wpasupplicant

@ -0,0 +1,5 @@
xserver-xorg-input-evdev
xserver-xorg
xserver-xorg-video-fbdev
xterm
nodm

@ -0,0 +1,8 @@
# <file system> <mount point> <type> <options> <dump> <pass>
rootfs / auto defaults,errors=remount-ro,noatime 0 1
proc /proc proc defaults 0 0
tmpfs /tmp tmpfs defaults,noatime 0 0
tmpfs /var/lock tmpfs defaults,noatime 0 0
tmpfs /var/run tmpfs defaults,noatime 0 0
tmpfs /var/log tmpfs defaults,noatime 0 0
tmpfs /etc/network/run tmpfs defaults,noatime 0 0

@ -0,0 +1,2 @@
127.0.0.1 localhost
127.0.0.1 default

@ -0,0 +1,2 @@
# supply ld.so.conf for fake ldd (running libc6 postinst script will fail)
include /etc/ld.so.conf.d/*.conf

@ -0,0 +1,2 @@
auto lo
iface lo inet loopback

@ -0,0 +1,3 @@
#!/bin/sh -e
exit

@ -0,0 +1,201 @@
#!/usr/bin/perl
# fakeldd
#
# Replacement for ldd with usage of objdump
#
# (c) 2003-2010 Piotr Roszatycki <dexter@debian.org>, LGPL
use strict;
my @Libs = ();
my %Libs = ();
my $Status = 0;
my $Dynamic = 0;
my $Format = '';
my $Ldsodir = "/lib";
my @Ld_Library_Path = qw(/usr/lib /lib /usr/lib32 /lib32 /usr/lib64 /lib64);
sub ldso {
my ($lib) = @_;
return if $Libs{$lib};
my $path;
if ($lib =~ /^\//) {
$path = $lib;
}
else {
foreach my $dir (@Ld_Library_Path) {
next unless -f "$dir/$lib";
my $badformat = 0;
local *PIPE;
open PIPE, "objdump -p '$dir/$lib' 2>/dev/null |";
while (my $line = <PIPE>) {
if ($line =~ /file format (\S*)$/) {
$badformat = 1 unless $1 eq $Format;
last;
}
}
close PIPE;
next if $badformat;
$path = "$dir/$lib";
last;
}
}
push @Libs, $lib;
if (-f $path) {
$Libs{$lib} = $path;
objdump($path);
}
}
sub objdump {
my (@files) = @_;
foreach my $file (@files) {
local *PIPE;
open PIPE, "objdump -p '$file' 2>/dev/null |";
while (my $line = <PIPE>) {
$line =~ s/^\s+//;
if ($line =~ /file format (\S*)$/) {
if (not $Format) {
$Format = $1;
if ($^O eq 'linux') {
if ($Format =~ /^elf64-/) {
push @Libs, 'linux-vdso.so.1';
$Libs{'linux-vdso.so.1'} = '';
}
else {
push @Libs, 'linux-gate.so.1';
$Libs{'linux-gate.so.1'} = '';
}
}
foreach my $lib (split /:/, $ENV{LD_PRELOAD}||'') {
ldso($lib);
}
}
else {
next unless $Format eq $1;
}
}
if (not $Dynamic and $line =~ /^Dynamic Section:/) {
$Dynamic = 1;
}
next unless $line =~ /^ \s* NEEDED \s+ (.*) \s* $/x;
my $needed = $1;
if ($needed =~ /^ld(-linux)?(\.|-)/) {
$needed = "$Ldsodir/$needed";
}
ldso($needed);
}
close PIPE;
}
}
sub load_ldsoconf {
my ($file) = @_;
local *FH;
open FH, $file;
while (my $line = <FH>) {
chomp $line;
$line =~ s/#.*//;
next if $line =~ /^\s*$/;
if ($line =~ /^include\s+(.*)\s*/) {
my $include = $1;
foreach my $incfile (glob $include) {
load_ldsoconf($incfile);
}
next;
}
unshift @Ld_Library_Path, $line;
}
close FH;
}
MAIN: {
my @args = @ARGV;
if (not @args) {
print STDERR "fakeldd: missing file arguments\n";
exit 1;
}
if (not `which objdump`) {
print STDERR "fakeldd: objdump: command not found: install binutils package\n";
exit 1;
}
load_ldsoconf('/etc/ld.so.conf');
unshift @Ld_Library_Path, split(/:/, $ENV{LD_LIBRARY_PATH}||'');
while ($args[0] =~ /^-/) {
my $arg = $args[0];
shift @ARGV;
last if $arg eq "--";
}
foreach my $file (@args) {
%Libs = ();
$Dynamic = 0;
if (@args > 1) {
print "$file:\n";
}
if (not -f $file) {
print STDERR "ldd: $file: No such file or directory\n";
$Status = 1;
next;
}
objdump($file);
if ($Dynamic == 0) {
print "\tnot a dynamic executable\n";
$Status = 1;
}
elsif (scalar %Libs eq "0") {
print "\tstatically linked\n";
}
my $address = '0x' . '0' x ($Format =~ /^elf64-/ ? 16 : 8);
foreach my $lib (@Libs) {
if ($lib =~ /^\//) {
printf "\t%s (%s)\n", $lib, $address;
}
elsif (defined $Libs{$lib}) {
printf "\t%s => %s (%s)\n", $lib, $Libs{$lib}, $address;
}
else {
printf "\t%s => not found\n", $lib;
}
}
}
}
END {
$? = $Status;
}

@ -0,0 +1,3 @@
#!/bin/sh
echo "sysvinit: All runlevel operations denied by policy" >&2
exit 101

@ -0,0 +1,4 @@
SUITE="sid"
ARCH="armel"
ROOTDIR="debian-$SUITE-$ARCH"
MIRROR="http://127.0.0.1:3142/ftp.de.debian.org/debian"

@ -0,0 +1,11 @@
locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8
locales locales/default_environment_locale select en_US.UTF-8
tzdata tzdata/Zones/Europe select Berlin
tzdata tzdata/Areas select Europe
nodm nodm/xinit string /usr/bin/xinit
nodm nodm/min_session_time string 60
nodm nodm/enabled boolean true
nodm nodm/xsession string /etc/X11/Xsession
nodm nodm/x_options string vt7 -nolisten tcp
nodm nodm/first_vt string 7
nodm nodm/user string user

@ -0,0 +1 @@
../../default/hooks/create_user

@ -0,0 +1 @@
../../default/hooks/empty_password

@ -0,0 +1 @@
../../default/hooks/firstboot

@ -0,0 +1,2 @@
mkimage -A arm -O linux -T kernel -C none -n uImage -a 0x00008000 -e 0x00008000 -d $ROOTDIR/boot/vmlinuz-*-kirkwood $ROOTDIR/boot/uImage
mkimage -A arm -O linux -T ramdisk -C none -n uInitrd -d $ROOTDIR/boot/initrd.img-*-kirkwood $ROOTDIR/boot/uInitrd

@ -0,0 +1 @@
../../default/hooks/serial_tty

@ -0,0 +1,22 @@
[General]
arch=$ARCH
directory=$ROOTDIR
cleanup=true
unpack=true
noauth=true
bootstrap=Debian_bootstrap
aptsources=Debian
allowrecommends=false
addimportant=false
[Debian_bootstrap]
packages=$PACKAGES
source=$MIRROR
suite=$SUITE
omitdebsrc=true
[Debian]
source=http://ftp.de.debian.org/debian
keyring=debian-archive-keyring
suite=$SUITE
omitdebsrc=true

@ -0,0 +1 @@
../../default/packages/base

@ -0,0 +1 @@
linux-image-kirkwood

@ -0,0 +1 @@
../../default/packages/net

@ -0,0 +1 @@
../../../../../default/root/etc/apt/apt.conf.d/99no-install-recommends

@ -0,0 +1 @@
../../../../../default/root/etc/apt/apt.conf.d/99no-pdiffs

@ -0,0 +1,8 @@
# <file system> <mount point> <type> <options> <dump> <pass>
rootfs / auto defaults,errors=remount-ro,noatime 0 1
proc /proc proc defaults 0 0
tmpfs /tmp tmpfs defaults,noatime 0 0
tmpfs /var/lock tmpfs defaults,noatime 0 0
tmpfs /var/run tmpfs defaults,noatime 0 0
tmpfs /var/log tmpfs defaults,noatime 0 0
tmpfs /etc/network/run tmpfs defaults,noatime 0 0

@ -0,0 +1,2 @@
127.0.0.1 localhost
127.0.0.1 kirkwood

@ -0,0 +1 @@
ROOT=UUID=9eada77a-5f84-49a4-838e-06abe95c8513

@ -0,0 +1 @@
../../../default/root/etc/ld.so.conf

@ -0,0 +1,2 @@
auto lo
iface lo inet loopback

@ -0,0 +1 @@
../../../../default/root/etc/ssh/ssh_host_dsa_key

@ -0,0 +1 @@
../../../../default/root/etc/ssh/ssh_host_ecdsa_key

@ -0,0 +1 @@
../../../../default/root/etc/ssh/ssh_host_rsa_key

@ -0,0 +1 @@
../../../default/root/sbin/ldconfig

@ -0,0 +1 @@
../../../../default/root/usr/bin/ldd

@ -0,0 +1 @@
../../../../default/root/usr/sbin/policy-rc.d

@ -0,0 +1,58 @@
#!/bin/sh -ex
dir_depth() {
dir="$1"
while [ "$dir" != "." ] && [ "$dir" != "/" ]; do
dir=`dirname "$dir"`
echo -n ../
done
}
if [ "$#" -ne 1 ]; then
echo "you have to specify the new target name"
exit
fi
PLATFORM="$1"
if [ -e "$PLATFORM" ]; then
echo "target already exists"
exit
fi
mkdir -p $PLATFORM/
mkdir -p $PLATFORM/packages/
mkdir -p $PLATFORM/root/etc/network/
mkdir -p $PLATFORM/hooks/
cp default/config $PLATFORM
cp default/multistrap.conf $PLATFORM
cp default/debconfseed.txt $PLATFORM
for f in packages/base \
root/usr/sbin/policy-rc.d \
root/usr/bin/ldd \
root/etc/apt/apt.conf.d/99no-install-recommends \
root/etc/apt/apt.conf.d/99no-pdiffs \
root/etc/ld.so.conf \
root/etc/ssh/ssh_host_ecdsa_key \
root/etc/ssh/ssh_host_rsa_key \
root/etc/ssh/ssh_host_dsa_key \
root/sbin/ldconfig \
hooks/create_user \
hooks/serial_tty \
hooks/firstboot \
hooks/empty_password; do
mkdir -p `dirname $PLATFORM/$f`
ln -s `dir_depth $f`default/$f $PLATFORM/$f
done
cat << __END__ > $PLATFORM/root/etc/hosts
127.0.0.1 localhost
127.0.0.1 $PLATFORM
__END__
echo $PLATFORM > $PLATFORM/root/etc/hostname
cp default/root/etc/fstab $PLATFORM/root/etc/
cp default/root/etc/network/interfaces $PLATFORM/root/etc/network/

@ -0,0 +1,4 @@
SUITE="sid"
ARCH="armel"
ROOTDIR="debian-$SUITE-$ARCH"
MIRROR="http://127.0.0.1:3142/ftp.de.debian.org/debian"

@ -0,0 +1,11 @@
locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8
locales locales/default_environment_locale select en_US.UTF-8
tzdata tzdata/Zones/Europe select Berlin
tzdata tzdata/Areas select Europe
nodm nodm/xinit string /usr/bin/xinit
nodm nodm/min_session_time string 60
nodm nodm/enabled boolean true
nodm nodm/xsession string /etc/X11/Xsession
nodm nodm/x_options string vt7 -nolisten tcp
nodm nodm/first_vt string 7
nodm nodm/user string user

@ -0,0 +1 @@
../../default/hooks/create_user

@ -0,0 +1 @@
../../default/hooks/empty_password

@ -0,0 +1 @@
../../default/hooks/firstboot

@ -0,0 +1 @@
curl --silent http://mister-muffin.de/adam/modules.tar.gz | tar -xz -C $ROOTDIR

@ -0,0 +1,22 @@
[General]
arch=$ARCH
directory=$ROOTDIR
cleanup=true
unpack=true
noauth=true
bootstrap=Debian_bootstrap
aptsources=Debian
allowrecommends=false
addimportant=false
[Debian_bootstrap]
packages=$PACKAGES
source=$MIRROR
suite=$SUITE
omitdebsrc=true
[Debian]
source=http://ftp.de.debian.org/debian
keyring=debian-archive-keyring
suite=$SUITE
omitdebsrc=true

@ -0,0 +1 @@
../../default/packages/base

@ -0,0 +1 @@
../../default/packages/net

@ -0,0 +1 @@
../../default/packages/wlan

@ -0,0 +1 @@
../../default/packages/xorg

@ -0,0 +1 @@
../../../../../default/root/etc/apt/apt.conf.d/99no-install-recommends

@ -0,0 +1 @@
../../../../../default/root/etc/apt/apt.conf.d/99no-pdiffs

@ -0,0 +1,9 @@
# <file system> <mount point> <type> <options> <dump> <pass>
rootfs / auto defaults,errors=remount-ro,noatime 0 1
proc /proc proc defaults 0 0
tmpfs /tmp tmpfs defaults,noatime 0 0
tmpfs /var/lock tmpfs defaults,noatime 0 0
tmpfs /var/run tmpfs defaults,noatime 0 0
tmpfs /var/log tmpfs defaults,noatime 0 0
tmpfs /etc/network/run tmpfs defaults,noatime 0 0
/dev/mmcblk0p3 swap swap defaults 0 0

@ -0,0 +1,2 @@
127.0.0.1 localhost
127.0.0.1 notioninkadam

@ -0,0 +1 @@
../../../default/root/etc/ld.so.conf

@ -0,0 +1,2 @@
auto lo
iface lo inet loopback

@ -0,0 +1 @@
../../../../default/root/etc/ssh/ssh_host_dsa_key

@ -0,0 +1 @@
../../../../default/root/etc/ssh/ssh_host_ecdsa_key

@ -0,0 +1 @@
../../../../default/root/etc/ssh/ssh_host_rsa_key

@ -0,0 +1 @@
../../../default/root/sbin/ldconfig

@ -0,0 +1 @@
../../../../default/root/usr/bin/ldd

@ -0,0 +1 @@
../../../../default/root/usr/sbin/policy-rc.d

@ -0,0 +1,4 @@
SUITE="sid"
ARCH="armel"
ROOTDIR="debian-$SUITE-$ARCH"
MIRROR="http://127.0.0.1:3142/ftp.de.debian.org/debian"

@ -0,0 +1,11 @@
locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8
locales locales/default_environment_locale select en_US.UTF-8
tzdata tzdata/Zones/Europe select Berlin
tzdata tzdata/Areas select Europe
nodm nodm/xinit string /usr/bin/xinit
nodm nodm/min_session_time string 60
nodm nodm/enabled boolean true
nodm nodm/xsession string /etc/X11/Xsession
nodm nodm/x_options string vt7 -nolisten tcp
nodm nodm/first_vt string 7
nodm nodm/user string user

@ -0,0 +1 @@
../../default/hooks/create_user

@ -0,0 +1 @@
../../default/hooks/empty_password

@ -0,0 +1 @@
../../default/hooks/firstboot

@ -0,0 +1,2 @@
ln -s uImage.bin $ROOTDIR/boot/uImage-GTA02.bin
echo console=tty0 rootdelay=5 > $ROOTDIR/boot/append-GTA02

@ -0,0 +1 @@
../../default/hooks/serial_tty

@ -0,0 +1,28 @@
[General]
arch=$ARCH
directory=$ROOTDIR
cleanup=true
unpack=true
noauth=true
bootstrap=Debian_bootstrap Debian_pkgfso
aptsources=Debian
allowrecommends=false
addimportant=false
[Debian_bootstrap]
packages=$PACKAGES
source=$MIRROR
suite=$SUITE
omitdebsrc=true
[Debian_pkgfso]
packages=linux-image-2.6.37-qtmoko-gta02
source=http://pkg-fso.alioth.debian.org/debian/
suite=unstable
omitdebsrc=true
[Debian]
source=http://ftp.de.debian.org/debian
keyring=debian-archive-keyring
suite=$SUITE
omitdebsrc=true

@ -0,0 +1 @@
../../default/packages/audio

@ -0,0 +1 @@
../../default/packages/base

@ -0,0 +1 @@
../../default/packages/bluez

@ -0,0 +1 @@
../../default/packages/net

@ -0,0 +1 @@
../../default/packages/wlan

@ -0,0 +1 @@
../../../../../default/root/etc/apt/apt.conf.d/99no-install-recommends

@ -0,0 +1 @@
../../../../../default/root/etc/apt/apt.conf.d/99no-pdiffs

@ -0,0 +1,8 @@
# <file system> <mount point> <type> <options> <dump> <pass>
rootfs / auto defaults,errors=remount-ro,noatime 0 1
proc /proc proc defaults 0 0
tmpfs /tmp tmpfs defaults,noatime 0 0
tmpfs /var/lock tmpfs defaults,noatime 0 0
tmpfs /var/run tmpfs defaults,noatime 0 0
tmpfs /var/log tmpfs defaults,noatime 0 0
tmpfs /etc/network/run tmpfs defaults,noatime 0 0

@ -0,0 +1,2 @@
127.0.0.1 localhost
127.0.0.1 om-gta02

@ -0,0 +1 @@
../../../default/root/etc/ld.so.conf

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save