On Tue, Jul 14, 2009 at 4:11 PM, Rudolf Kutina<rudolf.kutina at sun.com> wrote:
> Hi All,
>
> Sparc live-cd is twice size of x86 with 32bit env only.
>
> Because JeOS address only sun4v arch I am using this script to stripe out
> SUN4U arch, Live-CD ISO size is getting from 236MB to 194MB.
>
> Nice day
> Rudolf Kutina (VirtualGuru)
It was suggested by Dave and also myself to split sun4v and sun4u,
among other space-saving things.
Martin
>
> -----------------------------------------------------------------------------------------------------------
>
> #!/bin/ksh
>
> # You can continue DC from this script by:
> # cd /usr/share/distro_const/virt_assist
> # distro_const build -r im-va-sun4v va_sparc_live-cd.xml 2>&1 | tee
> lastbuild.log
>
> # Based on pkg:/SUNWdistro-const at 0.5.11,5.11-0.111:20090508T153914Z
> # ? ? ? ? ?pkg:/SUNWslim-utils at 0.5.11,5.11-0.111:20090508T163550Z
> # ? ? ? ? ?pkg:/slim_cd at 0.5.11,5.11-0.111:20090508T165037Z
>
> RM=/bin/rm
> MV=/usr/bin/mv
> MKDIR=/usr/bin/mkdir
> CP=/usr/bin/cp
> GCP=/usr/gnu/bin/cp
> SED=/usr/bin/sed
> CAT=/usr/bin/cat
> CHMOD=/usr/bin/chmod
> NAWK=/usr/bin/nawk
> PYTHON=/usr/bin/python
> LN=/usr/bin/ln
> FIND=/usr/bin/find
> GREP=/usr/xpg4/bin/grep
> EGREP=/usr/bin/egrep
> XARGS=/usr/bin/xargs
>
> if [ "$#" != "5" ] ; then
> ? ? ? print -u2 "Usage: $0: pre_bootroot_pkg_image_mod: Requires 5 args:"
> ? ? ? print -u2 " ? ?Reader socket, pkg_image area, tmp_dir, " \
> ? ? ? ? ? "bootroot build area, media area"
> ? ? ? exit 1
> fi
>
> PKG_IMG_PATH=$2
> if [ ! -d $PKG_IMG_PATH ] ; then
> ? ? ? print -u2 "$0: Image package area $PKG_IMG_PATH is not valid"
> ? ? ? exit 1
> fi
>
> ISA_INFO=`/sbin/uname -p`
>
> echo "INFO: We are on platform: $ISA_INFO"
>
> if [ $ISA_INFO = "sparc" ]
> then
>
> # Links SPARC bootarchives, workaround for current DC Live-CD process
> cd ${PKG_IMG_PATH}/platform
> #ln -s ../../boot/boot_archive sun4u/
> ln -s ../../boot/boot_archive sun4v/
>
> # For Live-CD we don't really need wanboot
> # ${RM} ${PKG_IMG_PATH}/platform/sun4u/wanboot
> ${RM} ${PKG_IMG_PATH}/platform/sun4v/wanboot
>
> # Hack out all architectures other then sun4v
> # Original SPARC Live-CD have 228MB, while similar x86 arch has 101 MB ???
> # Its done direclty on pkg area, because we need to clean /usr/platform too
>
> ### ls -l /platform/ | awk '{print "### "$9" "$10" "$11}'
> ###
> ### SUNW,A70
> ### SUNW,Netra-210 -> SUNW,Sun-Fire-V240
> ### SUNW,Netra-240 -> SUNW,Sun-Fire-V240
> ### SUNW,Netra-440 -> SUNW,Sun-Fire-V440
> ### SUNW,Netra-CP2300
> ### SUNW,Netra-CP3010
> ### SUNW,Netra-CP3060
> ### SUNW,Netra-CP3260 -> sun4v
> ### SUNW,Netra-T12
> ### SUNW,Netra-T2000 -> SUNW,Sun-Fire-T200
> ### SUNW,Netra-T4
> ### SUNW,Netra-T5220 -> sun4v
> ### SUNW,Netra-T5440 -> sun4v
> ### SUNW,SPARC-Enterprise
> ### SUNW,SPARC-Enterprise-T1000 -> sun4v
> ### SUNW,SPARC-Enterprise-T2000 -> SUNW,Sun-Fire-T200
> ### SUNW,SPARC-Enterprise-T3120 -> sun4v
> ### SUNW,SPARC-Enterprise-T5120 -> sun4v
> ### SUNW,SPARC-Enterprise-T5220 -> sun4v
> ### SUNW,Serverblade1
> ### SUNW,Sun-Blade-100
> ### SUNW,Sun-Blade-1000
> ### SUNW,Sun-Blade-1500
> ### SUNW,Sun-Blade-2500
> ### SUNW,Sun-Blade-T6300 -> sun4v
> ### SUNW,Sun-Blade-T6320 -> sun4v
> ### SUNW,Sun-Blade-T6340 -> sun4v
> ### SUNW,Sun-Fire
> ### SUNW,Sun-Fire-15000
> ### SUNW,Sun-Fire-280R
> ### SUNW,Sun-Fire-480R
> ### SUNW,Sun-Fire-880
> ### SUNW,Sun-Fire-T1000 -> sun4v
> ### SUNW,Sun-Fire-T200
> ### SUNW,Sun-Fire-V210 -> SUNW,Sun-Fire-V240
> ### SUNW,Sun-Fire-V215
> ### SUNW,Sun-Fire-V240
> ### SUNW,Sun-Fire-V245 -> SUNW,Sun-Fire-V215
> ### SUNW,Sun-Fire-V250
> ### SUNW,Sun-Fire-V440
> ### SUNW,Sun-Fire-V445
> ### SUNW,Sun-Fire-V490 -> SUNW,Sun-Fire-480R
> ### SUNW,Sun-Fire-V890 -> SUNW,Sun-Fire-880
> ### SUNW,T5140 -> sun4v
> ### SUNW,T5240 -> sun4v
> ### SUNW,T5440 -> sun4v
> ### SUNW,USBRDT-5240 -> sun4v
> ### SUNW,Ultra-2
> ### SUNW,Ultra-250
> ### SUNW,Ultra-30
> ### SUNW,Ultra-4
> ### SUNW,Ultra-5_10
> ### SUNW,Ultra-60
> ### SUNW,Ultra-80
> ### SUNW,Ultra-Enterprise
> ### SUNW,Ultra-Enterprise-10000
> ### SUNW,UltraAX-i2
> ### SUNW,UltraSPARC-IIe-NetraCT-40
> ### SUNW,UltraSPARC-IIe-NetraCT-60
> ### SUNW,UltraSPARC-IIi-Netract
> ### TAD,SPARCLE
> ### sun4u
> ### sun4u-opl
> ### sun4u-us3
> ### sun4v
>
> # Remove sun4u architecture related files
> cd ${PKG_IMG_PATH}
>
> ${FIND} platform/* usr/platform/* -print |${EGREP} -v -e
> "sun4v|T10|T20|T3|T5|T6|USBRDT|CP32" | ${XARGS} ${RM} -rf
>
> # Back link an ufs boot block in sun4u so I don't need to change DC boot
> archive sript for now
>
> ${MKDIR} -p $PKG_IMG_PATH/platform/sun4u/lib/fs/hsfs/
>
> ${CP} $PKG_IMG_PATH/platform/sun4v/lib/fs/hsfs/bootblk \
> ?/platform/sun4u/lib/fs/hsfs/bootblk
>
> ${MKDIR} -p $PKG_IMG_PATH/usr/platform/sun4u/lib/fs/ufs/
>
> ${CP} $PKG_IMG_PATH/usr/platform/sun4v/lib/fs/ufs/bootblk \
> ?$PKG_IMG_PATH/usr/platform/sun4u/lib/fs/ufs/bootblk
>
> else
> echo "This script is dummy on x86 architectures (skiping)"
> fi
>
> exit 0
>
> _______________________________________________
> caiman-discuss mailing list
> caiman-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
>