diff options
Diffstat (limited to 'backend/modules/gentoo_portage/build.php')
-rw-r--r-- | backend/modules/gentoo_portage/build.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backend/modules/gentoo_portage/build.php b/backend/modules/gentoo_portage/build.php index 693a85c..f23408f 100644 --- a/backend/modules/gentoo_portage/build.php +++ b/backend/modules/gentoo_portage/build.php @@ -70,6 +70,18 @@ function gentoo_portage_build(&$build, &$opts, &$W) { // mkisofs -J -R -l ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ${clst_target_path} execute_command('Create ISO image', "mkisofs -J -R -l -V 'Ingenue Build $build->id' -o '$W/image.iso' -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table '$W/cd'"); rename("$W/image.iso", COMPLETED.'/build-'.$build->id.'.iso') || throw_exception('rename failed'); + } elseif ($imgtype == 'jffs2') { + execute_command('Create JFFS2 image', "mkfs.jffs2 -x lzo -n -e 0x20000 -l -p -r '$W/image' -o '$W/image.jffs2'"); + rename("$W/image.jffs2", COMPLETED.'/build-'.$build->id.'.jffs2') || throw_exception ('rename failed'); + } elseif ($imgtype == 'ext2') { + execute_command('Make blank file for ext2 image', "dd if=/dev/zero of='$W/image.ext2' bs=1024 count=1048576"); + execute_command('Make ext2 filesystem', "mke2fs -t ext2 -F '$W/image.ext2'"); + makedir('ext2'); + execute_command('Mount ext2 image', "mount -o loop -t ext2 '$W/image.ext2' '$W/ext2'"); + execute_command('Copy files to ext2', "cp -va '$W/image/*' '$W/ext2/'"); + execute_command('Unmount ext2 image', "umount '$W/ext2'"); + execute_command('Compress ext2 image', "gzip '$W/image.ext2'"); + rename("$W/image.ext2.gz", COMPLETED.'/build-'.$build->id.'.ext2.gz') || throw_exception('rename failed'); } else { throw_exception('invalid image type: '.$imgtype); } |