[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: futher adventures in initrd shrinking



Moving them out was easy:

diff --git a/scripts/mk-images b/scripts/mk-images
index da9b508..cda2e1c 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -365,6 +365,21 @@ makeproductfile() {
     fi
 }
 
+makelangs() {
+    root=$1
+    destdir=$2
+
+    for d in $root/usr/share/locale/*; do
+        if [ ! -d $d ]; then
+            continue
+        fi
+
+        lang=$(basename $d)
+        ( cd $root ; find usr/share/locale/$lang | cpio -c -o | gzip -9 > $destdir/$lang.img )
+        rm -rf $d
+    done
+}
+
 makeinitrd() {
     INITRDMODULES=""
     KEEP=""
@@ -468,6 +483,11 @@ elif [ "$BUILDARCH" = "sparc" -o "$BUILDARCH" =
"sparcv9" -o "$BUILDARCH" = "spa
     arches="sparc64"
 fi
 
+# Split the languages out into their own support images before building the
+# initrd.
+mkdir -p $TOPDESTPATH/images/langs
+makelangs $IMGPATH $TOPDESTPATH/images/langs
+
 foundakernel=""
 for KERNELARCH in $arches; do
     for kernelvers in $kerneltags; do

clumens exeter:~/install/20100826/x86_64/os/images$ ls
boot.iso  efiboot.img  efidisk.img  langs/  pxeboot/
clumens exeter:~/install/20100826/x86_64/os/images$ ls -l pxeboot/
total 114892
-rw-r--r--. 2 root root 113547228 Aug 26 14:06 initrd.img
-rwxr-xr-x. 2 root root   3966416 Aug 26 14:06 vmlinuz*
clumens exeter:~/install/20100826/x86_64/os/images$ ls langs/
af.img  bn_IN.img  de.img  fi.img  hr.img   it.img   mk.img  ne.img pt.img     sk.img        sv.img  uk.img
ar.img  ca.img     el.img  fr.img  hu.img   ja.img   ml.img  nl.img pt_BR.img  sl.img        ta.img  vi.img
as.img  cs.img     es.img  gu.img  id.img   kn.img   mr.img  or.img ro.img     sl_SI.img     te.img  zh_CN.img
bg.img  cy.img     et.img  he.img  ilo.img  ko.img   ms.img  pa.img ru.img     sr.img        tg.img  zh_TW.img
bn.img  da.img     fa.img  hi.img  is.img   mai.img  nb.img  pl.img si.img     sr latin img  tr.img  zu.img

The boot.iso has the same layout, so no problem there.  Bringing them
back in will be a little harder, but I think pretty straightforward once
all the method stuff is gone.

Incidentally, boot.iso will now boot in a VM with as little as 500 MB of
memory.  That's a good improvement.

I haven't heard any significant problems on this plan yet but maybe I
should give it a day or two.  It might be nice to get a rel-eng opinion
on adding all these extra files to the langs/ directory.  Obviously,
this is F-15 timeframe.

- Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]