* [parisc-linux] boot-floppies (installer)
@ 2001-05-08 6:53 Richard Hirst
2001-05-08 14:30 ` Richard Hirst
0 siblings, 1 reply; 3+ messages in thread
From: Richard Hirst @ 2001-05-08 6:53 UTC (permalink / raw)
To: parisc-linux
Hi,
Paul L, Paul B and I are working on the installer. This is where
we are currently at...
I'm posting these diffs here rather than just dopping them in cvs because
I know they are not quite right, but hopefully others will pick them up
and try building.
First debootstrap, latest source is 0.1.7, and my diff is
================================== cut ===============================
diff -ur debootstrap-0.1.7.ori/functions debootstrap-0.1.7/functions
--- debootstrap-0.1.7.ori/functions Tue May 1 01:01:07 2001
+++ debootstrap-0.1.7/functions Fri May 4 10:13:05 2001
@@ -69,6 +69,8 @@
check_md5 () {
# args: dest md5 size
+ # always succeed, until busybox md5sum is fixed
+ return 0
local expmd5="$2"
local expsize="$3"
relmd5=`md5sum < "$1"`
diff -ur debootstrap-0.1.7.ori/woody debootstrap-0.1.7/woody
--- debootstrap-0.1.7.ori/woody Tue May 1 01:47:26 2001
+++ debootstrap-0.1.7/woody Mon May 7 22:11:56 2001
@@ -18,6 +18,22 @@
"arm")
base="$base setserial libgpmg1"
;;
+ "hppa")
+ base="$(without_package "apt-utils" "$base")"
+ base="$(without_package "console-common" "$base")"
+ base="$(without_package "console-data" "$base")"
+ base="$(without_package "console-tools" "$base")"
+ base="$(without_package "console-tools-libs" "$base")"
+ base="$(without_package "fdutils" "$base")"
+ base="$(without_package "liblockfile1" "$base")"
+ base="$base palo"
+ base="$base libstdc++3.0"
+ base="$base gcc-3.0-base"
+ required="$required libterm-stool-perl"
+ required="$required libterm-slang-perl"
+ required="$required base-config"
+ required="$(without_package "libstdc++2.10-glibc2.2" "$required")"
+ ;;
"i386")
required="$(without_package "libperl5.6" "$required") mbr"
base="$base lilo pciutils setserial syslinux" # pcmcia-cs
================================== cut ===============================
busybox md5sum is fixed in its master cvs, but that hasn't rippled down
to us yet. Paul L built a .deb with the fix, on pehc:~pjlahaie. Havn't
checked to see if I can now enable the md5sum tests.
The big list of things removed from base are more because I didn't have
.debs of them than because they were not needed. libterm* are probably
not actually needed.
Can't get this lot upstream until we figure out what the package list
should really be.
There is a file /sbin/termwrap needed in the root.bin produced from building
the boot-floppies, which doesn't appear to belong to any package. A quick
search showed other ports had hit the same problem. Here it is; add it to
your root.bin before trying to use it, and don't forget to chmod +x it.
================================== cut ===============================
#!/bin/sh
######################################################################
## Ignore some signals.
######################################################################
trap fail SIGTERM SIGINT
######################################################################
## Set some environment variables.
######################################################################
# reads /etc/environment.
test -f /etc/environment && . /etc/environment
# Set all locale related environment variables.
LC_ALL=$LANG
export LANG LC_ALL
######################################################################
## Display usage if no argument.
######################################################################
if [ -z "$1" ]; then
echo "usage: $0 [-nnt] <command> [...]"
echo "-nnt: don't run another terminal"
exit 0
fi
######################################################################
## Recognize terminal type.
######################################################################
case `/usr/bin/tty` in
/dev/tty|/dev/console|/dev/tty[1-9]*)
TERMINAL=console
;;
/dev/tty[p-za-e]*)
TERMINAL=pseudo
if [ ! -z "$DISPLAY" ]; then
TERMINAL=x
else
case $TERM in
rxvt|xterm*|kterm) TERMINAL=x;;
esac
fi
;;
/dev/tty[A-Z]*|/dev/cu*)
TERMINAL=serial
;;
esac
case $TERM in
dumb) TERMINAL=dumb
esac
export TERMINAL
# Why don't we use dpkg-architecture?
# Because it isn't in the base archive.
case $HOSTTYPE in
i386) /bin/grep -q 9800 /proc/version && SUBARCH=pc9800 ;;
esac
######################################################################
## Select suitable terminal as wrapper.
######################################################################
WRAPPER=""
case $LANG in
ja*)
case $TERMINAL in
x)
#WRAPPER="/usr/X11R6/bin/kterm -e"
WRAPPER="/usr/X11R6/bin/krxvt -e"
;;
console)
if [ "$SUBARCH" != pc9800 -a "$TERMINAL" = console ]; then
# Any plathome except PC9800 require jfbterm
# to display japanese fonts on console.
WRAPPER="/usr/bin/jfbterm -e"
fi
;;
# On pseudo and serial, we couldn't know
# that terminal can display japanese fonts...
esac
;;
esac
if [ "$1" = "-nnt" ]; then
WRAPPER=""
shift
fi
######################################################################
## Execute Wrapper.
######################################################################
if [ ! -z "$WRAPPER" -a -x "$WRAPPER" ]; then
$WRAPPER /bin/true && exec $WRAPPER $@
fi
exec $@
================================== cut ===============================
Next are my diffs to the boot-floppies package itself. These are against
pehc cvs. Some things will change - this hardwires it for serial
console, for example. If we can handle gzipped kernel images, we
maybe don't need the enw resc3700 size, for example.
================================== cut ===============================
diff -ur -x CVS boot-floppies.ori/Makefile boot-floppies/Makefile
--- boot-floppies.ori/Makefile Tue May 1 17:57:12 2001
+++ boot-floppies/Makefile Mon May 7 20:29:56 2001
@@ -147,7 +147,7 @@
$(MAKE) root.tar.gz
else
ifeq ($(architecture), hppa)
- $(MAKE) root.tar.gz
+ $(MAKE) root.tar.gz resc3700.bin drivers.tgz
else
echo unsupported architecture: $(architecture); false
endif
diff -ur -x CVS boot-floppies.ori/kernel.sh boot-floppies/kernel.sh
--- boot-floppies.ori/kernel.sh Tue May 1 17:19:00 2001
+++ boot-floppies/kernel.sh Mon May 7 18:05:49 2001
@@ -101,7 +101,7 @@
cp $extractdir/boot/vmlinux-* linux$subarch
cp $extractdir/boot/vmlinux.coff-* linux$subarch.coff
else
- cp $extractdir/boot/vmlinuz* linux$subarch
+ cp $extractdir/boot/vmlinuz* linux$subarch || cp $extractdir/boot/vmlinux* linux$subarch
fi
info "creating sys_map$subarch.gz"
diff -ur -x CVS boot-floppies.ori/make/hppa.vars boot-floppies/make/hppa.vars
--- boot-floppies.ori/make/hppa.vars Tue May 1 18:17:02 2001
+++ boot-floppies/make/hppa.vars Mon May 7 18:55:22 2001
@@ -5,6 +5,8 @@
# see 'checks'
tools_checks :=
+arch_rootdisk_deps := drivers.tgz resc3700.bin
+
# additional check rules to run, see 'checks'
arch_addl_checks :=
diff -ur -x CVS boot-floppies.ori/make/rescue boot-floppies/make/rescue
--- boot-floppies.ori/make/rescue Tue May 1 17:19:01 2001
+++ boot-floppies/make/rescue Mon May 7 18:45:04 2001
@@ -40,6 +40,14 @@
$(ROOTCMD) ./rescue.sh $(archive) "$*" $(kver) $< \
2880 $(debianversion) "" $(LINGUA) $(SFONT)
+resc3700%.bin: $(root_for_rescue) linux% rescue.sh $(arch_rescue_deps)
+ $(ROOTCMD) ./rescue.sh $(archive) "$*" $(kver) $< \
+ 3700 $(debianversion) "" $(LINGUA) $(SFONT)
+
+resc3700.bin: root.bin linux rescue.sh $(arch_rescue_deps)
+ $(ROOTCMD) ./rescue.sh $(archive) "$*" $(kver) $< \
+ 3700 $(debianversion) "" $(LINGUA) $(SFONT)
+
resc2880%.bin: $(root_for_rescue) linux% rescue.sh $(arch_rescue_deps)
$(ROOTCMD) ./rescue.sh $(archive) "$*" $(kver) $< \
2880 $(debianversion) "" $(LINGUA) $(SFONT)
diff -ur -x CVS boot-floppies.ori/release.sh boot-floppies/release.sh
--- boot-floppies.ori/release.sh Tue May 1 17:19:00 2001
+++ boot-floppies/release.sh Mon May 7 18:53:34 2001
@@ -68,10 +68,15 @@
cd $release
+ mkdir images-3.70
mkdir images-2.88
mkdir images-1.44
mkdir images-1.20
+ for f in resc3700*.bin; do
+ [ ! -f $f ] || mv $f images-3.70/rescue${f#resc3700}
+ done
+
for f in resc2880*.bin; do
[ ! -f $f ] || mv $f images-2.88/rescue${f#resc2880}
done
@@ -96,6 +101,7 @@
[ ! -f $f ] || mv $f images-1.20/driver${f#drv12}
done
+ rmdir images-3.70 2>/dev/null || true # in case empty
rmdir images-2.88 2>/dev/null || true # in case empty
rmdir images-1.44 2>/dev/null || true # in case empty
rmdir images-1.20 2>/dev/null || true # in case empty
@@ -145,6 +151,9 @@
ia64)
do_arch_ia64 $otherargs
;;
+ hppa)
+ do_arch_hppa $otherargs
+ ;;
*)
echo "Unsupported arch $arch"
exit 1
@@ -898,6 +907,11 @@
}
do_arch_ia64()
+{
+ echo "Nothing here yet!"
+}
+
+do_arch_hppa()
{
echo "Nothing here yet!"
}
diff -ur -x CVS boot-floppies.ori/scripts/rootdisk/SMALL_BASE_LIST_all boot-floppies/scripts/rootdisk/SMALL_BASE_LIST_all
--- boot-floppies.ori/scripts/rootdisk/SMALL_BASE_LIST_all Tue May 1 19:29:07 2001
+++ boot-floppies/scripts/rootdisk/SMALL_BASE_LIST_all Mon May 7 14:44:02 2001
@@ -1,6 +1,6 @@
bin/ash
bin/busybox
-usr/bin/nano
+bin/nano-tiny
etc/protocols
sbin/MAKEDEV
sbin/badblocks
diff -ur -x CVS boot-floppies.ori/utilities/dbootstrap/baseconfig.c boot-floppies/utilities/dbootstrap/baseconfig.c
--- boot-floppies.ori/utilities/dbootstrap/baseconfig.c Tue May 1 17:19:01 2001
+++ boot-floppies/utilities/dbootstrap/baseconfig.c Mon May 7 20:44:51 2001
@@ -412,6 +412,11 @@
update_console_info();
#endif
+/* Hmm, some are serial, some are graphical */
+#if #cpu (hppa)
+ update_console_info();
+#endif
+
/* If on serial console, get rid of kbd files and setserial startup.
The kbd package will be purged during final configuration. */
if (serialConsole >= 0)
diff -ur -x CVS boot-floppies.ori/utilities/dbootstrap/dbootstrap.h boot-floppies/utilities/dbootstrap/dbootstrap.h
--- boot-floppies.ori/utilities/dbootstrap/dbootstrap.h Tue May 1 17:19:01 2001
+++ boot-floppies/utilities/dbootstrap/dbootstrap.h Mon May 7 20:47:23 2001
@@ -298,6 +298,10 @@
# define NFSROOT /* network boot */
# define LOCALTIME /* ask for GMT or localtime clock setup */
+#elif #cpu (hppa)
+
+# define SERIAL_CONSOLE /* serial console recognized */
+
#endif
#ifdef DO_EJECT
================================== cut ===============================
One last thing, you need to grab debiandoc.decl from somewhere (I
found it on an x86 debian box) and put it in
boot-floppies/documentation/declaration/debiandoc.decl
so that the documentation part of the build works.
So, with that lot, and some luck, you should be able to build the
boot-floppies package.
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [parisc-linux] boot-floppies (installer)
2001-05-08 6:53 [parisc-linux] boot-floppies (installer) Richard Hirst
@ 2001-05-08 14:30 ` Richard Hirst
2001-05-09 13:26 ` Richard Hirst
0 siblings, 1 reply; 3+ messages in thread
From: Richard Hirst @ 2001-05-08 14:30 UTC (permalink / raw)
To: parisc-linux
Hi, this is an attempt to document how I'm making boot-floppies
at the moment, and to identify packages that need to get
fed through the buildd. There may well be things in the
list that we don't really need, but that debootstrap currently
references.
Packages I needed, not yet available from Debian mirrors. Some
of these were needed to build, rather than actually packaged
within the boot-floppies. Just about all are available from
pehc debs, base, ~pjlahaie, or ~bame, except for apt-uitls,
I think.
I have horrible problems with *slang*, *newt* in lib and usr/lib,
and how things such as dbootstrap and whiptail try to reference
libslang.so. At the moment I'm running with newer packages on
the build system, and older ones in the boot-floppies. Hopefully
a synchronised rebuild of the relevant packages will sort things
out there. Typical problem is that something references
/usr/lib/libslang.so, which doesn't exist (depending on what
vintage of packages you use).
Anyway, the packages I'd like to find in a debian mirror:
telnetd (just for my use, not part of b-f build)
gcc-3.0
libgcc300
cpp-3.0
libc6-dev
debootstrap but it needs my patch
kernel-package pb has one on pehc
kernel-image-2.4.0 pb has one, but doesn't contain modules
I build one below
apt
apt-utils
console-tools
console-tools-libs
exim
ldso
libc6
libldap2
libnewt0
libstdc++2.10
libstdc++2.10-glibc2.2
libstdc++3.0
man-db
modutils
ncurses-bin
netkit-inetd
netkit-ping
palo
slang1 pb's fix for .so link
slang1-dev
slang1-pic
whiptail whiptail_0.50.8-2_hppa.deb, pehc/base works
with the new slang above. Arghhh!
telnet
glibc-pic
libnewt
libnewt-dev
recode
sp (replaced by sgml-data??)
libsp1
librecode0
pointerize
libgd
libgd-dev
python-xml
busybox need new source from above
g++-3.0
libstdc++3.0-dev
===========================================================================
Build process, building on a500.
Install base.tgz from the 0.6 .iso.
Reboot
apt-get update
apt-get upgrade
# whiptail crashes lots, but seems ok once the upgrade is done
apt-get dist-upgrade
apt-get install gcc-3.0-base
apt-get install portmap
telnetd_0.17-9_hppa.deb # pehc/debs
apt-get install binutils
gcc-3.0_3.0-0pre010223_hppa.deb # pehc/newcompilers
libgcc300_3.0-0pre010223_hppa.deb # pehc/newcompilers
cpp-3.0_3.0-0pre010223_hppa.deb # pehc/newcompilers
libc6-dev_2.2.1-1_hppa.deb # pehc/newcompilers
apt-get install cvs
# hack /var/lib/dpkg/status to add perl5 entry.
apt-get install dpkg-dev gcc debhelper
cd /usr/src
cvs checkout boot-floppies
cd /usr/src/boot-floppies && <apply my patch>
mkdir documentation/declaration/
cp /share/debiandoc.decl documentation/declaration/
# /archive/debian/local/ holds our local deb archive
mkdir /archive
mkdir /archive/debian
mkdir /archive/debian/local
## need to build debootstrap with my patches
apt-get source debootstrap
# note, having applied the patch, remove the
# base="$(without_package "liblockfile1" "$base")"
# line that it added to woody.
cd /usr/src/debootstrap && <apply my patch>
dpkg-buildpackage -b -uc
cd /usr/src
cp debootstrap_0.1.7_hppa.deb /archive/debian/local/
dpkg -i debootstrap_0.1.7_hppa.deb # local
# need kernel-package to build kernel-image
dpkg -i /mnt/parisc/bame.debs/kernel-package_7.37-0pa2_all.deb # pehc/bame
## build kernel-image
cd /usr/src
cvs checkout linux
cd linux
make mrproper
# change defconfig to enable modules and include at least one
# module (probably just a make config would do...)
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y
CONFIG_PA7100=y
CONFIG_PA11=y
CONFIG_CHR_DEV_SG=m
make oldconfig
make-kpkg --revision 0rgh clean kernel_image
cp cp /usr/src/kernel-image-2.4.0_0rgh_hppa.deb /archive/debian/local # local
## create our http install tree
cd /usr/src
mkdir http-tree
mkdir http-tree/dists
mkdir http-tree/dists/woody
mkdir http-tree/dists/woody/main
mkdir http-tree/dists/woody/main/binary-hppa
mkdir http-tree/dists/woody/main/binary-hppa/base
mkdir http-tree/dists/woody/main/disks-hppa
mkdir http-tree/dists/woody/main/disks-hppa/current
mkdir http-tree/dists/woody/main/disks-hppa/current/images-1.44
cat > http-tree/dists/woody/Release << EOF
Origin: Debian
Label: Debian
Suite: testing
Codename: woody
Date: Wed, 04 Apr 2001 19:31:44 UTC
Architectures: hppa
Components: main
Description: Debian HPPA Testint distribution - Not Released
md5sum:f2e6f31ff5777f3961b7ee51c61ac409 73112 main/binary-hppa/Packages
EOF
## gather all the packages debootstrap will need to do the base install
# all referenced, anyway - may not all be needed, perhaps
# drop them in http-tree/dists/woody/main/binary-hppa/base
apt # pehc/base
apt-utils # n/a
at
base-config
base-files
base-passwd
bash
bsdmainutils
bsdutils
console-common
console-data
console-tools # pehc/debs
console-tools-libs # pehc/debs
cpio
cron
debconf
debianutils
diff
dpkg
e2fsprogs
ed
exim # pehc/debs
fdutils # n/a
fileutils
findutils
gcc-3.0-base
gettext-base
grep
groff
gzip
hostname
ifupdown
info
ipchains
ldso # pehc/debs
libc6 # pehc/newcompilers
libdb2
libgdbmg1
libident
libldap2 # pehc/debs
liblockfile1
libncurses4
libncurses5
libnewt0 # pehc/base, old one!
libopenldap-runtime
libopenldap1
libpam-modules
libpam-runtime
libpam0g
libpcre3
libperl5.6
libpopt0
libreadline4
libsasl7
libstdc++2.10 # pehc/base
libstdc++2.10-glibc2.2 # n/a
libstdc++3.0 # pehc/newcompilers
libterm-slang-perl
libterm-stool-perl
libwrap0
login
logrotate
mailx
makedev
man-db # pehc/debs
manpages
mawk
modconf
modutils # debian, but way out of date
mount
nano
ncurses-base
ncurses-bin # pehc/debs
net-tools
netbase
netkit-inetd # pehc/debs
netkit-ping # pehc/debs
nvi
palo # pehc/debs
passwd
perl-base
ppp
procps
sed
shellutils
slang1 # pehc/debs - pb's fix for .so link
sysklogd
sysvinit
tar
tasksel
tcpd
telnet # pehc/debs
textutils
update
util-linux
whiptail # whiptail_0.50.8-2_hppa.deb pehc/base
## Create the Packages file
cd /usr/src/http-tree
dpkg-scanpackages dists/woody/main/binary-hppa/base /dev/null > \
dists/woody/main/binary-hppa/Packages
## check we have all the packages for debootstrap
cd /usr/src
debootstrap woody /usr/src/debo.tmp file:/usr/src/http-tree 2>&1 | tee debo.log
# At this point you can play with debootstrap/woody script to
# experiment with the package set.
## install all the .debs we need to build boot-floppies
# First it wants pointerize, which I can find anywhere...
cd /usr/src
apt-get -b source pointerize
glibc-pic # libc6-pic, pehc/newcompilers
slang1-pic # pehc/debs, pb's fix for .so link
libnewt # new one from pehc/debs
libnewt-dev # pehc/debs
libpopt-dev
zlib1g-dev
recode # pehc/debs
gettext
m4
sp # pehc/debs (replaced by sgml-data??)
libsp1 # pehc/debs
sgml-base
debiandoc-sgml
libsgmls-perl
libtext-format-perl
sgmlspl
librecode0 # pehc/debs
slang1-dev # pehc/debs, pb's fix for .so link
libi18n-langtags-perl
libpaperg
gsfonts
libfreetype6
libjpeg62
libkpathsea3
libpng2
libtiff3g
libwww0
libxaw7
tetex-base
tetex-bin
tetex-extra
texinfo
xfree86-common
xlibs
libhtml-parser-perl
libhtml-tagset-perl
libmime-base64-perl
libnet-perl
liburi-perl
libwww-perl
perl-5.6
pointerize # local
libttf2
libgd # pehc/debs
libgd-dev # pehc/debs
bison
ash
dpkg-awk
flex
python-base
python-dev
python-xml # pehc/debs
busybox # pehc/pjl for md5sum fix
bf-utf-source
build-essential
g++-3.0 # pehc/newcompilers
libstdc++3.0-dev # pehc/newcompilers
g++
## fix libslang links (really necessary?)
cd /usr/lib && rm libslang.so
cd /lib && ln -s libslang.so.1 libslang.so
cd /usr/src
## add some more debs to our local archive. Old libnewt0 used here..
cd /usr/src/http-tree/dists/woody/main/binary-hppa/base
cp modconf_0.2.32_all.deb modutils_2.4.2-1_hppa.deb whiptail_0.50.8-2_hppa.deb \
console-data_1999.08.29-21_all.deb base-passwd_3.2.1_hppa.deb \
e2fsprogs_1.19-4_hppa.deb libnewt0_0.50.8-2_hppa.deb \
libpopt0_1.6.2-5_hppa.deb makedev_2.3.1-52_all.deb netbase_4.05_all.deb \
net-tools_1.60-1_hppa.deb slang1_1.4.4-2_hppa.deb libc6_2.2.1-1_hppa.deb \
net-tools_1.60-1_hppa.deb util-linux_2.11b-4_hppa.deb /archive/debian/local
ash
nano-tiny
pump
eject
busybox # pehc/pjl
## and build boot-floppies
cd /usr/src/boot-floppies
dpkg-buildpackage -b -uc 2>&1 | tee LOG
# currently dying in documentation build , but it worked better
# yesterday :( Anyway, all the important bits are built.
## populate the rest of the http-tree
cd /usr/src/boot-floppies
cp drivers.tgz /usr/src/http-tree/dists/woody/main/disks-hppa/current
cp resc3700.bin /usr/src/http-tree/dists/woody/main/disks-hppa/current/images-1.44
## fix up md5sum and size of Packages file in Release??
## Don't forget to add /sbin/termwrap to root.bin before you
## try to boot from it.
## Outstanding problems:
2nd stage install is _really_ slow - kernel scheduler bug?
When adding a user in the 2nd stage install:
/var/lib/dpkg/info/base-config.config: adduser: command not found
and
debconf: DbDriver "configdb" error: /var/cache/debconf/config.dat is \
locked by another process
followed by the 2nd stage installer starting again at the beginning.
Could be due to me ctrl-c-ing it when I thought it had hung.
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [parisc-linux] boot-floppies (installer)
2001-05-08 14:30 ` Richard Hirst
@ 2001-05-09 13:26 ` Richard Hirst
0 siblings, 0 replies; 3+ messages in thread
From: Richard Hirst @ 2001-05-09 13:26 UTC (permalink / raw)
To: parisc-linux
On Tue, May 08, 2001 at 03:30:29PM +0100, Richard Hirst wrote:
> ## Don't forget to add /sbin/termwrap to root.bin before you
> ## try to boot from it.
Doh! termwrap needs adding to the installed system, after install stage
1, but before booting from the disk to run stage 2.
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-05-09 13:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-08 6:53 [parisc-linux] boot-floppies (installer) Richard Hirst
2001-05-08 14:30 ` Richard Hirst
2001-05-09 13:26 ` Richard Hirst
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.