Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bda5bd7f10 | ||
|
|
81906ef8b9 | ||
|
|
ee8cd323f5 | ||
|
|
e788fa9720 | ||
|
|
232b31a5a1 | ||
|
|
41f8a96478 | ||
|
|
4ff01ee9eb | ||
|
|
e09664a715 |
12
.gitignore
vendored
12
.gitignore
vendored
@@ -1,5 +1,7 @@
|
||||
build/
|
||||
vendor/
|
||||
vendor-bin/
|
||||
composer.lock
|
||||
vendor/*
|
||||
build/
|
||||
vendor/
|
||||
vendor-bin/
|
||||
composer.lock
|
||||
vendor/*
|
||||
.vs/
|
||||
obj/
|
||||
|
||||
10
README.md
Normal file
10
README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
## console-app
|
||||
|
||||
Template for creating .NET core console applications in PHP.
|
||||
|
||||
### How to run
|
||||
1. Install peachpie templates
|
||||
2. `dotnet new console -lang PHP`
|
||||
3. `dotnet restore`
|
||||
4. Modify `program.php` (optional)
|
||||
5. `dotnet run`
|
||||
498
RoboFile.php
Executable file → Normal file
498
RoboFile.php
Executable file → Normal file
@@ -1,250 +1,250 @@
|
||||
|
||||
<?php
|
||||
|
||||
require_once(__DIR__."/vendor/autoload.php"); // Pull in Composer Autoload
|
||||
|
||||
define("APPNAME", "tononixOS Kernel Update Client"); // Define the application name so our universal application stub can find it.
|
||||
|
||||
/**
|
||||
* Application Name: tononixOS Kernel Update Client
|
||||
* Application Desc: Allows tononixOS devices to update their kernel via source with no user intervention, similar to Gentoo's Genkernel
|
||||
* Application Ver: v1.0.2
|
||||
*/
|
||||
|
||||
/**
|
||||
* TODO: Device detection
|
||||
* TODO: Use of device-configs for cloning kernel repositories
|
||||
* TODO: Build own tononixOS self-update mechanism
|
||||
*/
|
||||
|
||||
class RoboFile extends \Robo\Tasks
|
||||
{
|
||||
|
||||
public $dir;
|
||||
public $device_name;
|
||||
public $device_manufacturer;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
\Robo\Robo::loadConfiguration([__DIR__."/config.yml",getenv("HOME")."/.local/system/etc/tononixOS/config.yml","/etc/tononixOS/config.yml"]);
|
||||
$this->dir = array("kernel-source" => \Robo\Robo::Config()->get("tononix.directories.kernel-source"),
|
||||
"kernel-source-symlink" => \Robo\Robo::Config()->get("tononix.directories.kernel-source-symlink"),
|
||||
"kernel-install" => \Robo\Robo::Config()->get("tononix.directories.kernel-install"),
|
||||
"kernel-device" => \Robo\Robo::Config()->get("tononix.device.boot-partiton"));
|
||||
|
||||
if(!empty(\Robo\Robo::Config()->get("tononix.debug"))) define("DEBUG", true);
|
||||
$device_info = \AndroidDevice::__getDeviceInfo();
|
||||
if($device_info == false) {
|
||||
$this->device_name = \Robo\Robo::Config()->get("tononix.device.name");
|
||||
$this->device_manufacturer = \Robo\Robo::Config()->get("tononix.device.manufacturer");
|
||||
} else {
|
||||
$this->device_name = $device_info['device_name'];
|
||||
$this->device_manufacturer = $device_info['device_manufacturer'];
|
||||
}
|
||||
}
|
||||
|
||||
public function kernelSourceRetrieve($opts = ['branch' => "flo", 'repository' => "https://tonoxisisle.services/git/tononixOS/ubports_kernel_google_msm", 'kernel-name' => '3.4.y-tononixOS-flo'])
|
||||
{
|
||||
$genkernel = true;
|
||||
if (!file_exists(getenv("HOME")."/.local/system/etc/genkernel.conf")) {
|
||||
$this->say("Gentoo Prefix not detected, not using Genkernel to build kernel...");
|
||||
$genkernel = false;
|
||||
}
|
||||
if($genkernel == false)
|
||||
{
|
||||
if(!file_exists($this->dir['kernel-source']."/".$opts['kernel-name'])) {
|
||||
$this->say("Retrieving kernel sources from: ".$opts['repository']." using branch ".$opts['branch']."...");
|
||||
$this->taskGitStack()
|
||||
->stopOnFail()
|
||||
->cloneRepo($opts['repository'], $this->dir['kernel-source'].$opts['kernel-name'], $opts['branch'])
|
||||
->run();
|
||||
} else {
|
||||
$this->say("Updating kernel sources from: ".$opts['repository']." using branch ".$opts['branch']."...");
|
||||
$this->taskGitStack()
|
||||
->stopOnFail()
|
||||
->dir($this->dir['kernel-source']."/".$opts['kernel-name'])
|
||||
->pull("origin", $opts['branch'])
|
||||
->run();
|
||||
}
|
||||
$this->_symlink($this->dir['kernel-source'].$opts['kernel-name'], $this->dir['kernel-source-symlink']);
|
||||
} else {
|
||||
if(!file_exists(getenv("HOME")."/.local/system/usr/src/".$opts['kernel-name'])) {
|
||||
$this->say("Retrieving kernel sources from: ".$opts['repository']." using branch ".$opts['branch']."...");
|
||||
$this->taskGitStack()
|
||||
->stopOnFail()
|
||||
->cloneRepo($opts['repository'], getenv("HOME")."/.local/system/usr/src/".$opts['kernel-name'], $opts['branch'])
|
||||
->run();
|
||||
} else {
|
||||
$this->say("Updating kernel sources from: ".$opts['repository']." using branch ".$opts['branch']."...");
|
||||
$this->taskGitStack()
|
||||
->stopOnFail()
|
||||
->dir(getenv("HOME")."/.local/system/usr/src/".$opts['kernel-name'])
|
||||
->pull("origin", $opts['branch'])
|
||||
->run();
|
||||
}
|
||||
$this->_symlink(getenv("HOME")."/.local/system/usr/src/".$opts['kernel-name'], $this->dir['kernel-source-symlink']);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function kernelSourceBuild()
|
||||
{
|
||||
$genkernel = true;
|
||||
if(!file_exists($this->dir['kernel-source-symlink'])) {
|
||||
$this->say("Kernel source was not found in ".$this->dir['kernel-source-symlink'].", pulling down kernel sources for device...");
|
||||
$this->kernelSourceRetrieve();
|
||||
}
|
||||
if(!file_exists(getenv("HOME")."/.local/system/etc/genkernel.conf"))
|
||||
{
|
||||
$this->say("Gentoo Prefix not detected, not using Genkernel to build kernel...");
|
||||
$genkernel = false;
|
||||
}
|
||||
$this->say("Building kernel....");
|
||||
if($genkernel == true) {
|
||||
$this->_exec("genkernel --config=".getenv("HOME")."/.local/system/etc/genkernel.conf bzImage");
|
||||
} else {
|
||||
if(!$this->device_name)
|
||||
{
|
||||
$this->_copy($this->dir['kernel-source-symlink']."/arch/arm/configs/tononixos_defconfig", $this->dir['kernel-source-symlink']."/.config");
|
||||
} else {
|
||||
$this->_copy($this->dir['kernel-source-symlink']."/arch/arm/configs/tononixos_".$this->device_name."_defconfig", $this->dir['kernel-source-symlink']."/.config");
|
||||
}
|
||||
putenv("ARCH=arm");
|
||||
putenv("SUBARCH=arm");
|
||||
$this->taskExec("make -j4")->dir($this->dir['kernel-source-symlink'])->run();
|
||||
$this->_copy($this->dir['kernel-source-symlink']."/arch/arm/boot/zImage", $this->dir['kernel-install']."/kernel");
|
||||
}
|
||||
}
|
||||
|
||||
public function kernelInstall($opts = ['flash_kernel' => false, 'keep-image-after-flash' => true])
|
||||
{
|
||||
$genkernel = true;
|
||||
if(!file_exists(getenv("HOME")."/.local/system/etc/genkernel.conf"))
|
||||
{
|
||||
$genkernel = false;
|
||||
$this->say("Gentoo Prefix not detected, ignoring prefix assumptions...");
|
||||
} else {
|
||||
$bootdir = getenv("HOME")."/.local/system/boot";
|
||||
}
|
||||
\Robo\Robo::loadConfiguration([getenv("HOME")."/.config/tononix/device-configs/".$this->device_manufacturer."/".$this->device_name."yml",getenv("HOME")."/.local/system/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml","/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml",__DIR__."/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml"]);
|
||||
$kernelBootPartiton = \Robo\Robo::Config()->get("device.partition_info.boot").\AndroidDevice::__getBootSlot();
|
||||
if(\AndroidDevice::__getBootSlot())
|
||||
{
|
||||
$this->say("Extracting inital ramdisk from current boot image in boot-slot: ".\AndroidDevice::__getBootSlot()."...");
|
||||
if($genkernel == false)
|
||||
{
|
||||
$this->_exec("dd if=".$kernelBootPartition." of=".$this->dir['kernel-install']."/boot_current-krnlupdate.img");
|
||||
$this->taskExec("abootimg -x boot_current-krnlupdate.img")->dir($this->dir['kernel-install'])->run();
|
||||
$this->_remove([$this->dir['kernel-install']."/zImage"]);
|
||||
if(!file_exists($this->dir['kernel-install']."/kernel")) {
|
||||
$this->yell("No kernel has been build yet.. Kicking off kernel build...");
|
||||
$this->kernelSourceBuild();
|
||||
}
|
||||
$this->say("Creating new boot.img with new kernel image...");
|
||||
$this->taskExec("abootimg --create newboot.img -f ./bootimg.cfg -k ./kernel -r ./initrd.img")->dir($this->dir['kernel-install'])->run();
|
||||
if($opts['flash-kernel'] == true)
|
||||
{
|
||||
$this->kernelFlash(array("boot-image"=>$this->dir['kernel-install']."/newboot.img"));
|
||||
$this->_move($this->dir['kernel-install']."/newboot.img", $this->dir['kernel-install']."/boot.img");
|
||||
}
|
||||
} else {
|
||||
$this->_exec("dd if=".$kernelBootPartition." of=".getenv("HOME")."/.local/system/boot/boot_current-krnlupdate.img");
|
||||
$this->taskExec("abootimg -x boot_current-krnlupdate.img")->dir($this->dir['kernel-install'])->run();
|
||||
$this->_remove([getenv("HOME")."/.local/system/boot/zImage"]);
|
||||
if(!file_exists(getenv("HOME")."/.local/system/boot/kernel")) {
|
||||
$this->yell("No kernel has been built yet... Kicking off kernel build using GenKernel...");
|
||||
$this->kernelSourceBuild();
|
||||
}
|
||||
$this->say("Creating new boot.img with new kernel image...");
|
||||
$this->taskExec("abootimg --create newboot.img -f ./bootimg.cfg -k ./kernel -r ./initrd.img")->dir(getenv("HOME")."/.local/system/boot")->run();
|
||||
if($opts['flash-kernel'] == true)
|
||||
{
|
||||
$this->kernelFlash(array("boot-image"=>getenv("HOME")."/.local/system/boot/newboot.img"));
|
||||
$this->_move(getenv("HOME")."/.local/system/boot/newboot.img",getenv("HOME")."/.local/system/boot/boot.img");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function kernelFlash($opts = ['boot-image' => "", 'boot-partition' => ""])
|
||||
{
|
||||
\Robo\Robo::loadConfiguration([getenv("HOME")."/.config/tononix/device-configs/".$this->device_manufacturer."/".$this->device_name."yml",getenv("HOME")."/.local/system/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml","/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml",__DIR__."/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml"]);
|
||||
$kernelBootPartition = \Robo\Robo::Config()->get("device.partition_info.boot").\AndroidDevices::__getBootSlot();
|
||||
$genkernel = true;
|
||||
if (!file_exists(getenv("HOME")."/.local/system/etc/genkernel.conf")) {
|
||||
$genkernel = false;
|
||||
$this->say("Gentoo Prefix not detected, ignoring prefix assumptions...");
|
||||
}
|
||||
if($genkernel == false)
|
||||
{
|
||||
$bootImage = $this->dir['kernel-install']."/boot.img";
|
||||
|
||||
} else {
|
||||
$bootImage = getenv("HOME")."/.local/system/boot/boot.img";
|
||||
}
|
||||
if(!empty($opts['boot-image'])) $bootImage = $opts['boot-image'];
|
||||
if(!empty($opts['boot-partition'])) $kernelBootPartition = $opts['boot-partition'];
|
||||
$this->say("Writing kernel boot image: ".$bootImage." to: ".$kernelBootPartition);
|
||||
$this->taskExec("dd if=".$bootImage." of=".$kernelBootPartition);
|
||||
}
|
||||
|
||||
public function kernelBackup($opts = ['boot-partition' => ""])
|
||||
{
|
||||
$genkernel = true;
|
||||
if (!file_exists(getenv("HOME")."/.local/system/etc/genkernel.conf")) {
|
||||
$genkernel = false;
|
||||
$this->say("Gentoo Prefix not detected, ignoring prefix assumptions...");
|
||||
}
|
||||
if($genkernel == false)
|
||||
{
|
||||
$bootImage = $this->dir['kernel-install']."/boot.img";
|
||||
|
||||
} else {
|
||||
$bootImage = getenv("HOME")."/.local/system/boot/boot.img";
|
||||
}
|
||||
\Robo\Robo::loadConfiguration([getenv("HOME")."/.config/tononix/device-configs/".$this->device_manufacturer."/".$this->device_name."yml",getenv("HOME")."/.local/system/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml","/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml",__DIR__."/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml"]);
|
||||
$kernelBootPartition = \Robo\Robo::Config()->get("device.partition_info.boot").\AndroidDevice::__getBootSlot();
|
||||
if(!empty($opts['boot-partition'])) $kernelBootPartition = $opts['boot-partition'];
|
||||
$this->say("Creating backup of currently working kernel and configuration (if available)....");
|
||||
if($genkernel == false)
|
||||
{
|
||||
if(!file_exists($this->dir['kernel-install']."/backups")) $this->_mkdir($this->dir['kernel-install']."/backups");
|
||||
} else {
|
||||
if(!file_exists(getenv("HOME")."/.local/system/boot/backups")) $this->_mkdir(getenv("HOME")."/.local/system/boot/backups");
|
||||
}
|
||||
$collection = $this->collectionBuilder();
|
||||
$tmpDir = $collection->tmpDir()->getPath();
|
||||
$collection->say("Making a copy of working kernel configuration...");
|
||||
$collection->taskFilesystemStack()->copy("/proc/config.gz", "$tmpDir/config.gz");
|
||||
$collection->say("Copying the current boot image...");
|
||||
$collection->taskExec("dd if=".$kernelBootPartition." of=$tmpDir/boot.img");
|
||||
if ($genkernel == false) {
|
||||
$collection->say("Packaging kernel backup in ".$this->dir['kernel-install']."/backups/...");
|
||||
$collection->taskPack($this->dir['kernel-install']."/backups/boot.img-".date("mdY-gha").".tar.gz")
|
||||
->add("$tmpDir/config.gz")
|
||||
->add("$tmpDir/boot.img");
|
||||
} else {
|
||||
$collection->say("Packaging kernel backup in ".getenv("HOME")."/.local/system/boot/backups/...");
|
||||
$collection->taskPack(getenv("HOME")."/.local/system/boot/backups/boot.img-".date("mdY-gha").".tar.gz")
|
||||
->add("$tmpDir/config.gz")
|
||||
->add("$tmpDir/boot.img");
|
||||
}
|
||||
$collection->run();
|
||||
}
|
||||
|
||||
public function kernelRestore($opts = ['backup-package' => "", 'boot-partition' => ""])
|
||||
{
|
||||
\Robo\Robo::loadConfiguration([getenv("HOME")."/.config/tononix/device-configs/".$this->device_manufacturer."/".$this->device_name."yml",getenv("HOME")."/.local/system/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml","/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml",__DIR__."/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml"]);
|
||||
$kernelBootPartition = \Robo\Robo::Config()->get("device.partition_info.boot").\AndroidDevice::__getBootSlot();
|
||||
if(!empty($opts['boot-partition'])) $kernelBootPartition = $opts['boot-partition'];
|
||||
if(!empty($opts['backup-package'])) {
|
||||
$this->yell("No package specified, cannot proceed.");
|
||||
die();
|
||||
}
|
||||
die("TODO: This function has not been implemented yet...");
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
require_once(__DIR__."/vendor/autoload.php"); // Pull in Composer Autoload
|
||||
|
||||
define("APPNAME", "tononixOS Kernel Update Client"); // Define the application name so our universal application stub can find it.
|
||||
|
||||
/**
|
||||
* Application Name: tononixOS Kernel Update Client
|
||||
* Application Desc: Allows tononixOS devices to update their kernel via source with no user intervention, similar to Gentoo's Genkernel
|
||||
* Application Ver: v1.0.2
|
||||
*/
|
||||
|
||||
/**
|
||||
* TODO: Device detection
|
||||
* TODO: Use of device-configs for cloning kernel repositories
|
||||
* TODO: Build own tononixOS self-update mechanism
|
||||
*/
|
||||
|
||||
class RoboFile extends \Robo\Tasks
|
||||
{
|
||||
|
||||
public $dir;
|
||||
public $device_name;
|
||||
public $device_manufacturer;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
\Robo\Robo::loadConfiguration([__DIR__."/config.yml",getenv("HOME")."/.local/system/etc/tononixOS/config.yml","/etc/tononixOS/config.yml"]);
|
||||
$this->dir = array("kernel-source" => \Robo\Robo::Config()->get("tononix.directories.kernel-source"),
|
||||
"kernel-source-symlink" => \Robo\Robo::Config()->get("tononix.directories.kernel-source-symlink"),
|
||||
"kernel-install" => \Robo\Robo::Config()->get("tononix.directories.kernel-install"),
|
||||
"kernel-device" => \Robo\Robo::Config()->get("tononix.device.boot-partiton"));
|
||||
|
||||
if(!empty(\Robo\Robo::Config()->get("tononix.debug"))) define("DEBUG", true);
|
||||
$device_info = \AndroidDevice::__getDeviceInfo();
|
||||
if($device_info == false) {
|
||||
$this->device_name = \Robo\Robo::Config()->get("tononix.device.name");
|
||||
$this->device_manufacturer = \Robo\Robo::Config()->get("tononix.device.manufacturer");
|
||||
} else {
|
||||
$this->device_name = $device_info['device_name'];
|
||||
$this->device_manufacturer = $device_info['device_manufacturer'];
|
||||
}
|
||||
}
|
||||
|
||||
public function kernelSourceRetrieve($opts = ['branch' => "flo", 'repository' => "https://tonoxisisle.services/git/tononixOS/ubports_kernel_google_msm", 'kernel-name' => '3.4.y-tononixOS-flo'])
|
||||
{
|
||||
$genkernel = true;
|
||||
if (!file_exists(getenv("HOME")."/.local/system/etc/genkernel.conf")) {
|
||||
$this->say("Gentoo Prefix not detected, not using Genkernel to build kernel...");
|
||||
$genkernel = false;
|
||||
}
|
||||
if($genkernel == false)
|
||||
{
|
||||
if(!file_exists($this->dir['kernel-source']."/".$opts['kernel-name'])) {
|
||||
$this->say("Retrieving kernel sources from: ".$opts['repository']." using branch ".$opts['branch']."...");
|
||||
$this->taskGitStack()
|
||||
->stopOnFail()
|
||||
->cloneRepo($opts['repository'], $this->dir['kernel-source'].$opts['kernel-name'], $opts['branch'])
|
||||
->run();
|
||||
} else {
|
||||
$this->say("Updating kernel sources from: ".$opts['repository']." using branch ".$opts['branch']."...");
|
||||
$this->taskGitStack()
|
||||
->stopOnFail()
|
||||
->dir($this->dir['kernel-source']."/".$opts['kernel-name'])
|
||||
->pull("origin", $opts['branch'])
|
||||
->run();
|
||||
}
|
||||
$this->_symlink($this->dir['kernel-source'].$opts['kernel-name'], $this->dir['kernel-source-symlink']);
|
||||
} else {
|
||||
if(!file_exists(getenv("HOME")."/.local/system/usr/src/".$opts['kernel-name'])) {
|
||||
$this->say("Retrieving kernel sources from: ".$opts['repository']." using branch ".$opts['branch']."...");
|
||||
$this->taskGitStack()
|
||||
->stopOnFail()
|
||||
->cloneRepo($opts['repository'], getenv("HOME")."/.local/system/usr/src/".$opts['kernel-name'], $opts['branch'])
|
||||
->run();
|
||||
} else {
|
||||
$this->say("Updating kernel sources from: ".$opts['repository']." using branch ".$opts['branch']."...");
|
||||
$this->taskGitStack()
|
||||
->stopOnFail()
|
||||
->dir(getenv("HOME")."/.local/system/usr/src/".$opts['kernel-name'])
|
||||
->pull("origin", $opts['branch'])
|
||||
->run();
|
||||
}
|
||||
$this->_symlink(getenv("HOME")."/.local/system/usr/src/".$opts['kernel-name'], $this->dir['kernel-source-symlink']);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function kernelSourceBuild()
|
||||
{
|
||||
$genkernel = true;
|
||||
if(!file_exists($this->dir['kernel-source-symlink'])) {
|
||||
$this->say("Kernel source was not found in ".$this->dir['kernel-source-symlink'].", pulling down kernel sources for device...");
|
||||
$this->kernelSourceRetrieve();
|
||||
}
|
||||
if(!file_exists(getenv("HOME")."/.local/system/etc/genkernel.conf"))
|
||||
{
|
||||
$this->say("Gentoo Prefix not detected, not using Genkernel to build kernel...");
|
||||
$genkernel = false;
|
||||
}
|
||||
$this->say("Building kernel....");
|
||||
if($genkernel == true) {
|
||||
$this->_exec("genkernel --config=".getenv("HOME")."/.local/system/etc/genkernel.conf bzImage");
|
||||
} else {
|
||||
if(!$this->device_name)
|
||||
{
|
||||
$this->_copy($this->dir['kernel-source-symlink']."/arch/arm/configs/tononixos_defconfig", $this->dir['kernel-source-symlink']."/.config");
|
||||
} else {
|
||||
$this->_copy($this->dir['kernel-source-symlink']."/arch/arm/configs/tononixos_".$this->device_name."_defconfig", $this->dir['kernel-source-symlink']."/.config");
|
||||
}
|
||||
putenv("ARCH=arm");
|
||||
putenv("SUBARCH=arm");
|
||||
$this->taskExec("make -j4")->dir($this->dir['kernel-source-symlink'])->run();
|
||||
$this->_copy($this->dir['kernel-source-symlink']."/arch/arm/boot/zImage", $this->dir['kernel-install']."/kernel");
|
||||
}
|
||||
}
|
||||
|
||||
public function kernelInstall($opts = ['flash_kernel' => false, 'keep-image-after-flash' => true])
|
||||
{
|
||||
$genkernel = true;
|
||||
if(!file_exists(getenv("HOME")."/.local/system/etc/genkernel.conf"))
|
||||
{
|
||||
$genkernel = false;
|
||||
$this->say("Gentoo Prefix not detected, ignoring prefix assumptions...");
|
||||
} else {
|
||||
$bootdir = getenv("HOME")."/.local/system/boot";
|
||||
}
|
||||
\Robo\Robo::loadConfiguration([getenv("HOME")."/.config/tononix/device-configs/".$this->device_manufacturer."/".$this->device_name."yml",getenv("HOME")."/.local/system/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml","/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml",__DIR__."/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml"]);
|
||||
$kernelBootPartiton = \Robo\Robo::Config()->get("device.partition_info.boot").\AndroidDevice::__getBootSlot();
|
||||
if(\AndroidDevice::__getBootSlot())
|
||||
{
|
||||
$this->say("Extracting inital ramdisk from current boot image in boot-slot: ".\AndroidDevice::__getBootSlot()."...");
|
||||
if($genkernel == false)
|
||||
{
|
||||
$this->_exec("dd if=".$kernelBootPartition." of=".$this->dir['kernel-install']."/boot_current-krnlupdate.img");
|
||||
$this->taskExec("abootimg -x boot_current-krnlupdate.img")->dir($this->dir['kernel-install'])->run();
|
||||
$this->_remove([$this->dir['kernel-install']."/zImage"]);
|
||||
if(!file_exists($this->dir['kernel-install']."/kernel")) {
|
||||
$this->yell("No kernel has been build yet.. Kicking off kernel build...");
|
||||
$this->kernelSourceBuild();
|
||||
}
|
||||
$this->say("Creating new boot.img with new kernel image...");
|
||||
$this->taskExec("abootimg --create newboot.img -f ./bootimg.cfg -k ./kernel -r ./initrd.img")->dir($this->dir['kernel-install'])->run();
|
||||
if($opts['flash-kernel'] == true)
|
||||
{
|
||||
$this->kernelFlash(array("boot-image"=>$this->dir['kernel-install']."/newboot.img"));
|
||||
$this->_move($this->dir['kernel-install']."/newboot.img", $this->dir['kernel-install']."/boot.img");
|
||||
}
|
||||
} else {
|
||||
$this->_exec("dd if=".$kernelBootPartition." of=".getenv("HOME")."/.local/system/boot/boot_current-krnlupdate.img");
|
||||
$this->taskExec("abootimg -x boot_current-krnlupdate.img")->dir($this->dir['kernel-install'])->run();
|
||||
$this->_remove([getenv("HOME")."/.local/system/boot/zImage"]);
|
||||
if(!file_exists(getenv("HOME")."/.local/system/boot/kernel")) {
|
||||
$this->yell("No kernel has been built yet... Kicking off kernel build using GenKernel...");
|
||||
$this->kernelSourceBuild();
|
||||
}
|
||||
$this->say("Creating new boot.img with new kernel image...");
|
||||
$this->taskExec("abootimg --create newboot.img -f ./bootimg.cfg -k ./kernel -r ./initrd.img")->dir(getenv("HOME")."/.local/system/boot")->run();
|
||||
if($opts['flash-kernel'] == true)
|
||||
{
|
||||
$this->kernelFlash(array("boot-image"=>getenv("HOME")."/.local/system/boot/newboot.img"));
|
||||
$this->_move(getenv("HOME")."/.local/system/boot/newboot.img",getenv("HOME")."/.local/system/boot/boot.img");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function kernelFlash($opts = ['boot-image' => "", 'boot-partition' => ""])
|
||||
{
|
||||
\Robo\Robo::loadConfiguration([getenv("HOME")."/.config/tononix/device-configs/".$this->device_manufacturer."/".$this->device_name."yml",getenv("HOME")."/.local/system/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml","/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml",__DIR__."/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml"]);
|
||||
$kernelBootPartition = \Robo\Robo::Config()->get("device.partition_info.boot").\AndroidDevices::__getBootSlot();
|
||||
$genkernel = true;
|
||||
if (!file_exists(getenv("HOME")."/.local/system/etc/genkernel.conf")) {
|
||||
$genkernel = false;
|
||||
$this->say("Gentoo Prefix not detected, ignoring prefix assumptions...");
|
||||
}
|
||||
if($genkernel == false)
|
||||
{
|
||||
$bootImage = $this->dir['kernel-install']."/boot.img";
|
||||
|
||||
} else {
|
||||
$bootImage = getenv("HOME")."/.local/system/boot/boot.img";
|
||||
}
|
||||
if(!empty($opts['boot-image'])) $bootImage = $opts['boot-image'];
|
||||
if(!empty($opts['boot-partition'])) $kernelBootPartition = $opts['boot-partition'];
|
||||
$this->say("Writing kernel boot image: ".$bootImage." to: ".$kernelBootPartition);
|
||||
$this->taskExec("dd if=".$bootImage." of=".$kernelBootPartition);
|
||||
}
|
||||
|
||||
public function kernelBackup($opts = ['boot-partition' => ""])
|
||||
{
|
||||
$genkernel = true;
|
||||
if (!file_exists(getenv("HOME")."/.local/system/etc/genkernel.conf")) {
|
||||
$genkernel = false;
|
||||
$this->say("Gentoo Prefix not detected, ignoring prefix assumptions...");
|
||||
}
|
||||
if($genkernel == false)
|
||||
{
|
||||
$bootImage = $this->dir['kernel-install']."/boot.img";
|
||||
|
||||
} else {
|
||||
$bootImage = getenv("HOME")."/.local/system/boot/boot.img";
|
||||
}
|
||||
\Robo\Robo::loadConfiguration([getenv("HOME")."/.config/tononix/device-configs/".$this->device_manufacturer."/".$this->device_name."yml",getenv("HOME")."/.local/system/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml","/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml",__DIR__."/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml"]);
|
||||
$kernelBootPartition = \Robo\Robo::Config()->get("device.partition_info.boot").\AndroidDevice::__getBootSlot();
|
||||
if(!empty($opts['boot-partition'])) $kernelBootPartition = $opts['boot-partition'];
|
||||
$this->say("Creating backup of currently working kernel and configuration (if available)....");
|
||||
if($genkernel == false)
|
||||
{
|
||||
if(!file_exists($this->dir['kernel-install']."/backups")) $this->_mkdir($this->dir['kernel-install']."/backups");
|
||||
} else {
|
||||
if(!file_exists(getenv("HOME")."/.local/system/boot/backups")) $this->_mkdir(getenv("HOME")."/.local/system/boot/backups");
|
||||
}
|
||||
$collection = $this->collectionBuilder();
|
||||
$tmpDir = $collection->tmpDir()->getPath();
|
||||
$collection->say("Making a copy of working kernel configuration...");
|
||||
$collection->taskFilesystemStack()->copy("/proc/config.gz", "$tmpDir/config.gz");
|
||||
$collection->say("Copying the current boot image...");
|
||||
$collection->taskExec("dd if=".$kernelBootPartition." of=$tmpDir/boot.img");
|
||||
if ($genkernel == false) {
|
||||
$collection->say("Packaging kernel backup in ".$this->dir['kernel-install']."/backups/...");
|
||||
$collection->taskPack($this->dir['kernel-install']."/backups/boot.img-".date("mdY-gha").".tar.gz")
|
||||
->add("$tmpDir/config.gz")
|
||||
->add("$tmpDir/boot.img");
|
||||
} else {
|
||||
$collection->say("Packaging kernel backup in ".getenv("HOME")."/.local/system/boot/backups/...");
|
||||
$collection->taskPack(getenv("HOME")."/.local/system/boot/backups/boot.img-".date("mdY-gha").".tar.gz")
|
||||
->add("$tmpDir/config.gz")
|
||||
->add("$tmpDir/boot.img");
|
||||
}
|
||||
$collection->run();
|
||||
}
|
||||
|
||||
public function kernelRestore($opts = ['backup-package' => "", 'boot-partition' => ""])
|
||||
{
|
||||
\Robo\Robo::loadConfiguration([getenv("HOME")."/.config/tononix/device-configs/".$this->device_manufacturer."/".$this->device_name."yml",getenv("HOME")."/.local/system/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml","/etc/tononixOS/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml",__DIR__."/device-configs/".$this->device_manufacturer."/".$this->device_name.".yml"]);
|
||||
$kernelBootPartition = \Robo\Robo::Config()->get("device.partition_info.boot").\AndroidDevice::__getBootSlot();
|
||||
if(!empty($opts['boot-partition'])) $kernelBootPartition = $opts['boot-partition'];
|
||||
if(!empty($opts['backup-package'])) {
|
||||
$this->yell("No package specified, cannot proceed.");
|
||||
die();
|
||||
}
|
||||
die("TODO: This function has not been implemented yet...");
|
||||
}
|
||||
|
||||
}
|
||||
32
box.json
32
box.json
@@ -1,17 +1,17 @@
|
||||
{
|
||||
|
||||
"main": "init.php",
|
||||
"output": "build/krnlupdate.phar",
|
||||
"files": ["init.php",
|
||||
"RoboFile.php",
|
||||
"VERSION"],
|
||||
"directories": ["device-configs/","lib","vendor"],
|
||||
"blacklist": ["build"],
|
||||
"banner": [
|
||||
"This file is a part of the tononixOS application suite.",
|
||||
"",
|
||||
"(c) Richard Blair <dreamcaster23@gmail.com>",
|
||||
""
|
||||
]
|
||||
|
||||
{
|
||||
|
||||
"main": "init.php",
|
||||
"output": "build/krnlupdate.phar",
|
||||
"files": ["init.php",
|
||||
"RoboFile.php",
|
||||
"VERSION"],
|
||||
"directories": ["device-configs/","lib","vendor"],
|
||||
"blacklist": ["build"],
|
||||
"banner": [
|
||||
"This file is a part of the tononixOS application suite.",
|
||||
"",
|
||||
"(c) Richard Blair <dreamcaster23@gmail.com>",
|
||||
""
|
||||
]
|
||||
|
||||
}
|
||||
20
build.sh
Executable file → Normal file
20
build.sh
Executable file → Normal file
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
composer install
|
||||
if [[ $1 != "" ]]; then
|
||||
bumpver update $1
|
||||
else
|
||||
bumpver update --patch
|
||||
fi
|
||||
vendor/bin/box compile
|
||||
cp VERSION build/VERSION
|
||||
#!/bin/bash
|
||||
|
||||
composer install
|
||||
if [[ $1 != "" ]]; then
|
||||
bumpver update $1
|
||||
else
|
||||
bumpver update --patch
|
||||
fi
|
||||
vendor/bin/box compile
|
||||
cp VERSION build/VERSION
|
||||
|
||||
30
bumpver.toml
30
bumpver.toml
@@ -1,15 +1,15 @@
|
||||
[bumpver]
|
||||
current_version = "v1.0.2"
|
||||
version_pattern = "vMAJOR.MINOR[.PATCH][-TAG]"
|
||||
commit_message = "bump version {old_version} -> {new_version}"
|
||||
commit = true
|
||||
tag = true
|
||||
push = false
|
||||
|
||||
[bumpver.file_patterns]
|
||||
"VERSION" = [
|
||||
'{version}'
|
||||
]
|
||||
"RoboFile.php" = [
|
||||
' * Application Ver: {version}'
|
||||
]
|
||||
[bumpver]
|
||||
current_version = "v1.0.2"
|
||||
version_pattern = "vMAJOR.MINOR[.PATCH][-TAG]"
|
||||
commit_message = "bump version {old_version} -> {new_version}"
|
||||
commit = true
|
||||
tag = true
|
||||
push = false
|
||||
|
||||
[bumpver.file_patterns]
|
||||
"VERSION" = [
|
||||
'{version}'
|
||||
]
|
||||
"RoboFile.php" = [
|
||||
' * Application Ver: {version}'
|
||||
]
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
{
|
||||
"name": "tononixos/tononixos_application_krnlupdate",
|
||||
"description": "Updates kernel images on tononixOS devices.",
|
||||
"type": "project",
|
||||
"minimum-stability": "dev",
|
||||
|
||||
"authors": [
|
||||
{
|
||||
"name": "Tonoxis",
|
||||
"email": "toxus@tonoxisisle.services"
|
||||
}
|
||||
],
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://tonoxisisle.services/git/tononixOS/tononixOS_library_android-devices"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"consolidation/robo": "^3.0",
|
||||
"tononixos/tononixos_library_android-devices": "master"
|
||||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.4"
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "tononixos/tononixos_application_krnlupdate",
|
||||
"description": "Updates kernel images on tononixOS devices.",
|
||||
"type": "project",
|
||||
"minimum-stability": "dev",
|
||||
|
||||
"authors": [
|
||||
{
|
||||
"name": "Tonoxis",
|
||||
"email": "toxus@tonoxisisle.services"
|
||||
}
|
||||
],
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://tonoxisisle.services/git/tononixOS/tononixOS_library_android-devices"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"consolidation/robo": "^3.0",
|
||||
"tononixos/tononixos_library_android-devices": "master"
|
||||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
device:
|
||||
friendly_name: Nexus 7 (2013) LTE
|
||||
name: deb
|
||||
manufacturer: asus
|
||||
|
||||
repositories:
|
||||
kernel: https://tonoxisisle.services/git/TononixOS/ubports_kernel_google_msm
|
||||
kernel-branch: flo # The Nexus 7 LTE uses the same kernel as the Nexus 7 WiFi
|
||||
partition_info:
|
||||
boot: /dev/disk/by-partlabel/boot
|
||||
device:
|
||||
friendly_name: Nexus 7 (2013) LTE
|
||||
name: deb
|
||||
manufacturer: asus
|
||||
|
||||
repositories:
|
||||
kernel: https://tonoxisisle.services/git/TononixOS/ubports_kernel_google_msm
|
||||
kernel-branch: flo # The Nexus 7 LTE uses the same kernel as the Nexus 7 WiFi
|
||||
partition_info:
|
||||
boot: /dev/disk/by-partlabel/boot
|
||||
system: /dev/disk/by-partlabel/system
|
||||
@@ -1,11 +1,11 @@
|
||||
device:
|
||||
friendly_name: Nexus 7 (2013) WiFi
|
||||
name: flo
|
||||
manufacturer: asus
|
||||
|
||||
repositories:
|
||||
kernel: https://tonoxisisle.services/git/TononixOS/ubports_kernel_google_msm
|
||||
branch: flo
|
||||
partition_info:
|
||||
boot: /dev/disk/by-partlabel/boot
|
||||
device:
|
||||
friendly_name: Nexus 7 (2013) WiFi
|
||||
name: flo
|
||||
manufacturer: asus
|
||||
|
||||
repositories:
|
||||
kernel: https://tonoxisisle.services/git/TononixOS/ubports_kernel_google_msm
|
||||
branch: flo
|
||||
partition_info:
|
||||
boot: /dev/disk/by-partlabel/boot
|
||||
system: /dev/disk/by-partlabel/system
|
||||
72
init.php
Executable file → Normal file
72
init.php
Executable file → Normal file
@@ -1,37 +1,37 @@
|
||||
|
||||
<?php
|
||||
require_once(__DIR__."/RoboFile.php");
|
||||
// If we're running from phar load the phar autoload file.
|
||||
$pharPath = \Phar::running(true);
|
||||
if ($pharPath) {
|
||||
$autoloaderPath = "$pharPath/vendor/autoload.php";
|
||||
} else {
|
||||
if (file_exists(__DIR__.'/vendor/autoload.php')) {
|
||||
$autoloaderPath = __DIR__.'/vendor/autoload.php';
|
||||
} elseif (file_exists(__DIR__.'/../../autoload.php')) {
|
||||
$autoloaderPath = __DIR__ . '/../../autoload.php';
|
||||
} else {
|
||||
die("Could not find autoloader. Run 'composer install'.");
|
||||
}
|
||||
}
|
||||
$classLoader = require $autoloaderPath;
|
||||
|
||||
|
||||
// Customization variables
|
||||
$appName = APPNAME;
|
||||
$appVersion = trim(file_get_contents(__DIR__ . '/VERSION'));
|
||||
$commandClasses = [ \RoboFile::class ];
|
||||
$selfUpdateRepository = 'tononixos/tononix_application_krnlupdate';
|
||||
$configurationFilename = 'config.yml';
|
||||
|
||||
// Define our Runner, and pass it the command classes we provide.
|
||||
$runner = new \Robo\Runner($commandClasses);
|
||||
$runner
|
||||
// ->setSelfUpdateRepository($selfUpdateRepository) // This is now disabled as tononixOS uses the Tonoxis Isle Git service for it's code storage.
|
||||
->setConfigurationFilename($configurationFilename)
|
||||
->setClassLoader($classLoader);
|
||||
|
||||
// Execute the command and return the result.
|
||||
$output = new \Symfony\Component\Console\Output\ConsoleOutput();
|
||||
$statusCode = $runner->execute($argv, $appName, $appVersion, $output);
|
||||
|
||||
<?php
|
||||
require_once(__DIR__."/RoboFile.php");
|
||||
// If we're running from phar load the phar autoload file.
|
||||
$pharPath = \Phar::running(true);
|
||||
if ($pharPath) {
|
||||
$autoloaderPath = "$pharPath/vendor/autoload.php";
|
||||
} else {
|
||||
if (file_exists(__DIR__.'/vendor/autoload.php')) {
|
||||
$autoloaderPath = __DIR__.'/vendor/autoload.php';
|
||||
} elseif (file_exists(__DIR__.'/../../autoload.php')) {
|
||||
$autoloaderPath = __DIR__ . '/../../autoload.php';
|
||||
} else {
|
||||
die("Could not find autoloader. Run 'composer install'.");
|
||||
}
|
||||
}
|
||||
$classLoader = require $autoloaderPath;
|
||||
|
||||
|
||||
// Customization variables
|
||||
$appName = APPNAME;
|
||||
$appVersion = trim(file_get_contents(__DIR__ . '/VERSION'));
|
||||
$commandClasses = [ \RoboFile::class ];
|
||||
$selfUpdateRepository = 'tononixos/tononix_application_krnlupdate';
|
||||
$configurationFilename = 'config.yml';
|
||||
|
||||
// Define our Runner, and pass it the command classes we provide.
|
||||
$runner = new \Robo\Runner($commandClasses);
|
||||
$runner
|
||||
// ->setSelfUpdateRepository($selfUpdateRepository) // This is now disabled as tononixOS uses the Tonoxis Isle Git service for it's code storage.
|
||||
->setConfigurationFilename($configurationFilename)
|
||||
->setClassLoader($classLoader);
|
||||
|
||||
// Execute the command and return the result.
|
||||
$output = new \Symfony\Component\Console\Output\ConsoleOutput();
|
||||
$statusCode = $runner->execute($argv, $appName, $appVersion, $output);
|
||||
exit($statusCode);
|
||||
16
krnlupdate.msbuildproj
Normal file
16
krnlupdate.msbuildproj
Normal file
@@ -0,0 +1,16 @@
|
||||
<Project Sdk="Peachpie.NET.Sdk/1.0.6">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<StartupObject>init.php</StartupObject>
|
||||
<Description>A build system that provides build and update services to tononixOS.</Description>
|
||||
<PackageId>tononixOS_krnlupdate</PackageId>
|
||||
<Authors>Rick Blair <ShadowEO@outlook.com></Authors>
|
||||
<Company>Tonoxis Isle Services</Company>
|
||||
<Product>tononixOS Kernel Build/Update System</Product>
|
||||
<Copyright>Tonoxis Isle Services (c) 2018-*</Copyright>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="**/*.php" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,37 +1,37 @@
|
||||
<?php
|
||||
|
||||
class AndroidDevice
|
||||
{
|
||||
|
||||
/**
|
||||
* @name __getBootSlot
|
||||
* @param void
|
||||
* @description Attempts to determine the current bootslot for Treble compatibile devices.
|
||||
* @return false The system is not a treble compatible device
|
||||
* @return a|b System Bootslot
|
||||
*/
|
||||
public static function __getBootSlot()
|
||||
{
|
||||
if(empty(`which getprop`))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$bootSlot = trim(`getprop ro.boot.slot_suffix`);
|
||||
if(empty($bootSlot))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return $bootSlot;
|
||||
}
|
||||
|
||||
public static function __getDeviceInfo()
|
||||
{
|
||||
if(empty(`which getprop`))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$device = array("device_name" => trim(`getprop ro.product.vendor.name`),
|
||||
"device_manufacturer" => trim(`getprop ro.product.vendor.manufacturer`));
|
||||
return $device;
|
||||
}
|
||||
<?php
|
||||
|
||||
class AndroidDevice
|
||||
{
|
||||
|
||||
/**
|
||||
* @name __getBootSlot
|
||||
* @param void
|
||||
* @description Attempts to determine the current bootslot for Treble compatibile devices.
|
||||
* @return false The system is not a treble compatible device
|
||||
* @return a|b System Bootslot
|
||||
*/
|
||||
public static function __getBootSlot()
|
||||
{
|
||||
if(empty(`which getprop`))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$bootSlot = trim(`getprop ro.boot.slot_suffix`);
|
||||
if(empty($bootSlot))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return $bootSlot;
|
||||
}
|
||||
|
||||
public static function __getDeviceInfo()
|
||||
{
|
||||
if(empty(`which getprop`))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$device = array("device_name" => trim(`getprop ro.product.vendor.name`),
|
||||
"device_manufacturer" => trim(`getprop ro.product.vendor.manufacturer`));
|
||||
return $device;
|
||||
}
|
||||
}
|
||||
47
tos-packaging/package.class.php
Normal file
47
tos-packaging/package.class.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Packaging\Tasks;
|
||||
|
||||
class Package extends \Robo\Tasks
|
||||
{
|
||||
/**
|
||||
* Installs the package
|
||||
*
|
||||
* @option prefix Location to install package to
|
||||
*/
|
||||
function packageInstall($opts = ['prefix' => "/usr"])
|
||||
{
|
||||
|
||||
if(!file_exists(getcwd()."/build/krnlupdate.phar"))
|
||||
{
|
||||
$this->packageBuild();
|
||||
}
|
||||
$this->_copy(getcwd()."/build/krnlupdate.phar", $opts['prefix']."/usr/sbin/krnlupdate.phar");
|
||||
}
|
||||
/**
|
||||
* Removes the package
|
||||
*
|
||||
* @option prefix Location to remove package from
|
||||
*/
|
||||
function packageRemove($opts = ['prefix' => "/usr"])
|
||||
{
|
||||
$this->_remove($opts['prefix']."/usr/sbin/krnlupdate.phar");
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the package
|
||||
*/
|
||||
function packageBuild()
|
||||
{
|
||||
|
||||
|
||||
$this->taskComposerInstall()
|
||||
->dir(getcwd())
|
||||
->args("--quiet")
|
||||
->run();
|
||||
$this->taskExec("box compile")
|
||||
->printOutput(false)
|
||||
->run();
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user