Update of /cvsroot/leaf/src/bering-uclibc4/buildtool
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv25736
Modified Files:
buildpacket.pl
Log Message:
Migration for initrd from gzipped minix to initramfs (cpio.gz)
Index: buildpacket.pl
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc4/buildtool/buildpacket.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** buildpacket.pl 11 Jun 2010 16:48:00 -0000 1.4
--- buildpacket.pl 12 Jun 2010 16:26:03 -0000 1.5
***************
*** 398,416 ****
print "Setting up temp-dir\n" if $verbose;
! if ($buildInitrd) {
! my $package_filename = $p_h_package->{'packagefilename'};
!
! $initrdImage = "$package_dir/$package_filename";
! my $mountpoint = $p_h_options->{'mountpoint'};
! my $initrdsize = exists($p_h_package->{'initrdsize'}) ?
$p_h_package->{'initrdsize'} : 1500;
!
! system_exec("dd if=/dev/zero of=$initrdImage bs=1k
count=$initrdsize", "failed to create $initrdImage");
! system_exec($options->{'mkminixfs'} . " $initrdImage
4096","failed to create minix filesystem on $initrdImage");
! system_exec("$mountcmd -t minix -o loop $initrdImage
$mountpoint","failed to mount $initrdImage on $mountpoint");
! $tempDIR = $mountpoint;
! } else {
eval {
$tempDIR = File::Temp::tempdir(
--- 398,416 ----
print "Setting up temp-dir\n" if $verbose;
! # if ($buildInitrd) {
! # my $package_filename = $p_h_package->{'packagefilename'};
! #
! # $initrdImage = "$package_dir/$package_filename";
! # my $mountpoint = $p_h_options->{'mountpoint'};
! # my $initrdsize = exists($p_h_package->{'initrdsize'}) ?
$p_h_package->{'initrdsize'} : 1500;
! #
! # system_exec("dd if=/dev/zero of=$initrdImage bs=1k
count=$initrdsize", "failed to create $initrdImage");
! # system_exec($options->{'mkminixfs'} . " $initrdImage
4096","failed to create minix filesystem on $initrdImage");
! # system_exec("$mountcmd -t minix -o loop $initrdImage
$mountpoint","failed to mount $initrdImage on $mountpoint");
! # $tempDIR = $mountpoint;
! # } else {
eval {
$tempDIR = File::Temp::tempdir(
***************
*** 422,426 ****
confess("Unable to create temporary directory. $@");
}
! }
return($tempDIR);
}
--- 422,426 ----
confess("Unable to create temporary directory. $@");
}
! # }
return($tempDIR);
}
***************
*** 429,445 ****
print "Cleaning up dir $tmpDir\n" if $verbose;
! if ($buildInitrd) {
! if ($initrdImage) {
! system_exec("$umountcmd $tmpDir","failed to unmount
$tmpDir/",1);
! system_exec("rm $initrdImage",,1);
! $initrdImage = 0;
! }
! } else {
confess("Temp dir undefined") unless defined($tmpDir);
confess("Will not delete root dir") if
File::Spec->canonpath($tmpDir) eq File::Spec->rootdir();
system("rm -rf $tmpDir");
rmdir($tmpDir);
! }
}
--- 429,445 ----
print "Cleaning up dir $tmpDir\n" if $verbose;
! # if ($buildInitrd) {
! # if ($initrdImage) {
! # system_exec("$umountcmd $tmpDir","failed to unmount
$tmpDir/",1);
! # system_exec("rm $initrdImage",,1);
! # $initrdImage = 0;
! # }
! # } else {
confess("Temp dir undefined") unless defined($tmpDir);
confess("Will not delete root dir") if
File::Spec->canonpath($tmpDir) eq File::Spec->rootdir();
system("rm -rf $tmpDir");
rmdir($tmpDir);
! # }
}
***************
*** 900,908 ****
$initrdImage = "$package_dir/$package_filename";
my $mountpoint = $tmpDir;
! system_exec("sync;sync;sync");
! system_exec("umount $mountpoint","failed to unmount $mountpoint/");
! system_exec("$initrd_pkr -9 $initrdImage","failed to $initrd_pkr -9
$initrdImage");
! system_exec("mv $initrdImage.$initrd_ext $initrdImage.lrp","failed to
mv $initrdImage.$initrd_ext $initrdImage.lrp");
system_exec("chown -h $lrp_owner:$lrp_group $initrdImage.lrp","chown
failed on $initrdImage.lrp ");
$initrdImage = 0;
--- 900,911 ----
$initrdImage = "$package_dir/$package_filename";
my $mountpoint = $tmpDir;
+ my $cmd ="cd $tmpDir ; ls; find . -print | cpio -o -H newc | gzip -9 -c
- > $package_dir/$package_filename.lrp ";
! system_exec($cmd,"Creating lrp package failed.");
!
! # system_exec("sync;sync;sync");
! # system_exec("umount $mountpoint","failed to unmount $mountpoint/");
! # system_exec("$initrd_pkr -9 $initrdImage","failed to $initrd_pkr -9
$initrdImage");
! # system_exec("mv $initrdImage.$initrd_ext $initrdImage.lrp","failed to
mv $initrdImage.$initrd_ext $initrdImage.lrp");
system_exec("chown -h $lrp_owner:$lrp_group $initrdImage.lrp","chown
failed on $initrdImage.lrp ");
$initrdImage = 0;
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits