LANGUAGE_CHOOSER on the root disk
Hi!
I managed to change the makefiles, so (almost) all things needed for
LANGUAGE_CHOOSER are placed on the root floppy.
I'm attaching a patch.
Currently only the following things still have to be done by hand IIRC:
- copy unifont-reduced.bgf to the root dir on the root floppy
- MAKEDEV fb on the floppy
- change inittab so that instead of /sbin/dbootstrap, init runs
LC_CTYPE=C.UTF-8 LD_PRELOAD=/lib/libutf8_plug.so /sbin/bterm -f /unifont-reduced.bgf /sbin/dbootstrap
(Just uncompress the image, loop mount it, make the changes, umount and gzip
it back)
Also run 'make utils' before everything else - some things don't yet depend
on everything they should
Should I commit it to CVS? I tried to avoid changing anything that is run
without USE_LANGUAGE_CHOOSER=true
However this has some problems, namely bterm segfaults on the root floppy.
Gdb says:
Core was generated by /sbin/bterm -f /unifont-reduced.bgf'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libutf8_plug.so...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/ld-linux.so.2...done.
#0 0x8049314 in main (argc=3, argv=0xbffffe84) at bterm.c:245
245 FD_SET(ptyfd, &fds);
(gdb) where
#0 0x8049314 in main (argc=3, argv=0xbffffe84) at bterm.c:245
This means I need help again (i don't know much about ptys).
regards
Marcin
--
+--------------------------------+ The reason we come up with new versions
|Marcin Owsiany | is not to fix bugs. It's the stupidest
|porridge@pandora.info.bielsko.pl| reason to buy a new version
+--------------------------------+ I ever heard. - Bill Gates
Index: config
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/config,v
retrieving revision 1.46
diff -u -r1.46 config
--- config 2000/08/24 06:24:35 1.46
+++ config 2000/10/21 16:34:04
@@ -82,7 +88,7 @@
##
# whether to use the language chooser in dbootstrap, `true' or `false'
-USE_LANGUAGE_CHOOSER := false
+export USE_LANGUAGE_CHOOSER := true
ifeq ($(USE_LANGUAGE_CHOOSER),true)
ifneq ($(LINGUA),C)
Index: rootdisk.sh
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/rootdisk.sh,v
retrieving revision 1.169
diff -u -r1.169 rootdisk.sh
--- rootdisk.sh 2000/10/15 06:43:40 1.169
+++ rootdisk.sh 2000/10/21 16:34:07
@@ -10,6 +10,8 @@
export LANG=C
+linguas="cs en es fr hu ja pt sk tr de eo fi hr it pl ru sv"
+
# configuration
fstype=ext2
if [ ${arch} = i386 -o ${arch} = m68k ]; then
@@ -131,6 +133,13 @@
make_tmpdir $mnt
+if [ "$USE_LANGUAGE_CHOOSER" = "true" ]
+then
+ info "this disk will contain language chooser"
+ info "increasing blocks number by 1000"
+ blocks=$[$blocks+1000]
+fi
+
info "making disk image loop filesystem, size ${blocks}k"
# zero the entire disk, so that when we compress the raw disk image,
@@ -437,6 +446,11 @@
info "determining set of required libraries"
LIBRARIES=""
EXECUTABLES="$R/bin/* $R/sbin/* $R/usr/bin/* ./utilities/busybox/busybox ./utilities/dbootstrap/dbootstrap"
+if [ "$USE_LANGUAGE_CHOOSER" = "true" ]
+then
+ EXECUTABLES="$EXECUTABLES ./utilities/bogl/bterm"
+ LIBRARIES="$LIBRARIES ./utilities/bogl/libutf8_plug.so"
+fi
# ldconfig.new is statically linked
EXECUTABLES=`echo $EXECUTABLES | sed s%$R/sbin/ldconfig.new%%g`
@@ -492,8 +506,20 @@
cp utilities/dbootstrap/dbootstrap $R/sbin/
mkdir -p $R/etc
-make -C utilities/dbootstrap/po $language.trm
-cp utilities/dbootstrap/po/$language.trm $R/etc/messages.trm
+if [ "$USE_LANGUAGE_CHOOSER" = "true" ]
+then
+ cp utilities/bogl/bterm $R/sbin/
+ cp utilities/bogl/libutf8_plug.so $R/lib
+ make -C utilities/dbootstrap/po all-utf
+ #linguas defined at the beginning of the script
+ for lang in $linguas
+ do
+ cp utilities/dbootstrap/po/utf/$lang.trm $R/etc/messages.$lang
+ done
+else
+ make -C utilities/dbootstrap/po $language.trm
+ cp utilities/dbootstrap/po/$language.trm $R/etc/messages.trm
+fi
# no keymaps for BVME and MVME
if [ "$system" != bvme6000 -a "$system" != mvme16x -a "$system" != mvme147 ]; then
@@ -540,14 +566,14 @@
-D__username__="${MAINTAINER}" \
>$R/release_notes.en
- for lang in `awk '{ print $$1 }' < $scripts/messages/languages`
+ for lang in `awk '{ print $1 }' < $scripts/messages/languages`
do
m4 $scripts/messages/$lang/release_notes \
-D__debianversion__=$debianversion \
-D__date__="`date +%Y-%m-%d`" \
-D__floppyversion__="`dpkg-parsechangelog | awk -- '/^Version/ {print $2}'`" \
-D__username__="${MAINTAINER}" |
- iconv -f `grep "^$lang " $scripts/messages/languages | awk '{ print $$2 }'` -t utf-8 > $R/release_notes.$lang
+ iconv -f `grep "^$lang " $scripts/messages/languages | awk '{ print $2 }'` -t utf-8 > $R/release_notes.$lang
done
else
m4 $scripts/messages/$language/release_notes \
Index: scripts/rootdisk/messages/Makefile
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/scripts/rootdisk/messages/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- scripts/rootdisk/messages/Makefile 2000/08/29 18:56:15 1.3
+++ scripts/rootdisk/messages/Makefile 2000/10/21 16:34:15
@@ -1,6 +1,6 @@
# This file allows installation of UTF versions of release_notes...
-RN_TARGET_DIR=
+RN_TARGET_DIR ?=
available_languages = $(shell awk '{ print $$1 }' < languages)
dests = $(addprefix $(RN_TARGET_DIR)/release_notes.,$(available_languages))
Index: utilities/Makefile
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/utilities/Makefile,v
retrieving revision 1.34
diff -u -r1.34 Makefile
--- utilities/Makefile 2000/10/12 21:35:59 1.34
+++ utilities/Makefile 2000/10/21 16:34:16
@@ -26,7 +26,7 @@
$(MAKE) -j4 -C $@ KVER=${KVER} KERNEL_VERSION_CODE=${KERNEL_VERSION_CODE}
clean:
- rm -f *.o *.bak
+ rm -f *.o *.bak po.utf rn.utf all.utf
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
distclean: clean
Index: utilities/bogl/Makefile
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/utilities/bogl/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- utilities/bogl/Makefile 2000/10/12 21:36:46 1.19
+++ utilities/bogl/Makefile 2000/10/21 16:34:16
@@ -39,8 +39,25 @@
GENERATED = helvB10.c helvB12.c helvR10.c timBI18.c tux75.c
-all: depend $(LIB) bterm bdftobogl libutf8_plug.so
+all: depend $(LIB) bterm bdftobogl libutf8_plug.so unifont-reduced.bgf
+unifont-reduced.bgf: bdftobogl unifont-reduced.bdf
+ ./bdftobogl -b unifont-reduced.bdf > unifont-reduced.bgf
+
+unifont-reduced.bdf: ../../../bf-utf/unifont.bdf ../all.utf libutf8_plug.so reduce-font
+ LD_PRELOAD=./libutf8_plug.so LC_CTYPE=C.UTF-8 ./reduce-font $< < ../all.utf > $@
+
+../all.utf: ../po.utf ../rn.utf
+ cat $^ > $@
+
+../po.utf:
+ $(MAKE) -C ../dbootstrap/po all-po-utf
+ cat ../dbootstrap/po/utf/*.po > $@
+
+../rn.utf:
+ $(MAKE) RN_TARGET_DIR=. -C ../../scripts/rootdisk/messages install-utf
+ cat ../../scripts/rootdisk/messages/release_notes.* > $@
+
$(LIB): $(OBJECTS)
rm -f $(LIB)
ar rcs $(LIB) $(OBJECTS)
@@ -71,7 +88,7 @@
$(CPP) $(CFLAGS) -M $(SOURCES_DEP) > .depend
clean:
- rm -rf reduce-font libutf8_plug.so bterm bdftobogl pngtobogl *.o $(GENERATED) *-test lang.h tmp.*.c bowl-boxes $(LIB)
+ rm -rf reduce-font libutf8_plug.so bterm bdftobogl pngtobogl *.o $(GENERATED) *-test lang.h tmp.*.c bowl-boxes $(LIB) unifont-reduced.bgf unifont-reduced.bdf
distclean: clean
rm -f $(LIB) .depend *~ .nfs*
Reply to: