From: "AlessandroPPC" <aleppcrossi@libero.it>
To: <linuxppc-embedded@lists.linuxppc.org>
Subject: self image
Date: Wed, 10 Dec 2003 12:09:33 +0100 [thread overview]
Message-ID: <004f01c3bf0e$1839e2c0$0400a8c0@eurostudio.local> (raw)
[-- Attachment #1: Type: text/plain, Size: 2210 bytes --]
Dear Wolfgang Denk,
I'm just looking at the SELF image and I observed that when I extract the
image and try to rebuild it
(without adding or removing any files) the dimension of result file is about
9KByte greater than the original.
I have followed the procedure "How to increase the Size of ramdisk" to
generate an 8MByte ramdisk thus I
was expecting a small increase of the bytes amount, but never as reported.
Do you think I'm wrong somewhere?
Here enclosed is the script file.
any helps would be apreciated.
Many thanks
Alessandro.
[root@pegaso SELF]# ll
totale 1380
-rw-r--r-- 1 root root 1400262 dic 10 11:35 pRamdisk
-rwxr-xr-x 1 pegaso pegaso 1835 dic 10 11:17 self1.sh
-rwxr-xr-x 1 pegaso pegaso 1189 dic 10 12:01 self.sh
[root@pegaso SELF]# ./self.sh pRamdisk
entrati 21878+1 record
usciti 21878+1 record
ramdisk.gz: 66.6% -- replaced with ramdisk
entrati 8+0 record
usciti 8+0 record
mke2fs 1.27 (8-Mar-2002)
new_ramdisk is mounted; mke2fs forced anyway. Hope /etc/mtab is incorrect.
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
2048 inodes, 8192 blocks
0 blocks (0.00%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
tune2fs 1.27 (8-Mar-2002)
Setting maximal mount count to -1
............................................................................
............................................................................
............................................................................
............................................................................
....................................................
630 blocks
Image Name: DexGate SELF image
Created: Wed Dec 10 12:01:37 2003
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
Data Size: 1408989 Bytes = 1375.97 kB = 1.34 MB
Load Address: 0x00000000
Entry Point: 0x00000000
[root@pegaso SELF]#
[-- Attachment #2: self.sh --]
[-- Type: application/octet-stream, Size: 859 bytes --]
#!/bin/bash
SOURCE=ramdisk
OLD=tmp
NEW=new
NEWRAMDISK=new_ramdisk
RESULT=/tftpboot/ramdisk.self
if [ -z "$1" ] ; then
echo 'usage: self.sh ramdisk_filename'
exit 1
fi
if [ ! -e "$1" ] ; then
echo "file $1 does not exist."
exit 1
fi
SELFIMAGE=$1
mkdir -p $OLD
mkdir -p $NEW
dd if=$SELFIMAGE bs=64 skip=1 of=$SOURCE.gz
gunzip -v $SOURCE.gz
mount -o loop $SOURCE $OLD
dd if=/dev/zero of=$NEWRAMDISK bs=1024k count=8
/sbin/mke2fs -F -m0 $NEWRAMDISK
/sbin/tune2fs -c 0 $NEWRAMDISK
mount -o loop $NEWRAMDISK $NEW
cd $OLD
find . -depth -print | cpio -VBpdum ../$NEW
cd ..
umount $OLD
umount $NEW
gzip -9 $NEWRAMDISK
/opt/eldk/usr/bin/mkimage -T ramdisk -C gzip -n "DexGate SELF image" -d $NEWRAMDISK.gz $RESULT
rm -rf $NEWRAMDISK.gz
rm -rf $SOURCE.gz
rm -rf $SOURCE
rmdir $NEW
rmdir $OLD
next reply other threads:[~2003-12-10 11:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-10 11:09 AlessandroPPC [this message]
2003-12-10 21:06 ` self image Wolfgang Denk
2003-12-11 17:20 ` R: " AlessandroPPC
2003-12-11 17:36 ` Dan Kegel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='004f01c3bf0e$1839e2c0$0400a8c0@eurostudio.local' \
--to=aleppcrossi@libero.it \
--cc=linuxppc-embedded@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).