Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

Commit

Permalink
Update to 0.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronsor committed Nov 26, 2019
1 parent 63e3e58 commit 739f054
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 8 deletions.
7 changes: 4 additions & 3 deletions stage1/main.iss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma include __INCLUDE__ + ";" + "idp\"
[Setup]
AppName = ra1nstorm
AppVerName = 0.9.3
AppVersion = 0.9.3
AppVerName = 0.9.4
AppVersion = 0.9.4
DefaultDirName = {sd}\ra1nstorm
DefaultGroupName = ra1nstorm
DisableDirPage = yes
Expand All @@ -23,7 +23,8 @@ begin
CreateDir(ExpandConstant('{localappdata}\ra1nlinux'));
idpAddFile('https://github.com/hakuna-m/wubiuefi/releases/download/18042r333/wubi18042r333.exe', ExpandConstant('{localappdata}\ra1nlinux\wubi.exe'));
idpAddFile('http://ftp.ussg.iu.edu/linux/xubuntu/18.04/release/xubuntu-18.04.2-desktop-amd64.iso', ExpandConstant('{localappdata}\ra1nlinux\xubuntu-18.04.2-desktop-amd64.iso'));
idpAddMirror('http://ftp.ussg.iu.edu/linux/xubuntu/18.04/release/xubuntu-18.04.2-desktop-amd64.iso', 'https://mirror.us.leaseweb.net/ubuntu-cdimage/xubuntu/releases/18.04/release/xubuntu-18.04.2-desktop-amd64.iso');
idpAddMirror('http://ftp.ussg.iu.edu/linux/xubuntu/18.04/release/xubuntu-18.04.2-desktop-amd64.iso', 'https://www.mirrorservice.org/sites/cdimage.ubuntu.com/cdimage/xubuntu/releases/18.04/release/xubuntu-18.04.2-desktop-amd64.iso');
idpDownloadAfter(wpReady);
end;
4 changes: 4 additions & 0 deletions stage2/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ <h1>ra1nstorm</h1>
<p style="color:red">
<b>ra1nstorm is BETA software. Ronsor Labs takes no responsibility for
any damages incurred.</b>
<b>Please note Intel VT-d (or AMD SR-IOV) is NOT THE SAME AS THE GENERIC "VIRTUALIZATION TECHNOLOGY."</b>
</p>
<p>
<b><a href="https://yaddu.pw/c/ra1nstorm">Official Forum</a> - <a href="https://github.com/ra1nstorm/ra1nstorm-helper">Homepage & FAQ</a>
</p>
<p>
<small>checkra1n &copy; 2019 qwertyoruiop, axi0mx, et al.</small>
Expand Down
12 changes: 10 additions & 2 deletions stage2/libzenity.awk
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
function zenity(arg) {
return "zenity " arg
function zenity(arg,\
usr,usra) {
# Don't run zenity as root anymore
if (ENVIRON["HOME"] ~ /\/home\//) {
split(ENVIRON["HOME"], usra, "/")
usr = usra[3]
} else {
usr = "nobody"
}
return "sudo -u "usr" zenity " arg
}

function zenity_html(file, title, other) {
Expand Down
8 changes: 5 additions & 3 deletions stage2/main.awk
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function wiz_configiommu(\
pciid = ""
while (pciid == "") {
print "# Locating USB controller..." | h
pciid = find_usb_controller("ipheth")
pciid = new_find_usb_controller("05ac")
print "debug! pciid="pciid
if (!pciid) {
system("sleep 1")
Expand All @@ -166,7 +166,9 @@ function wiz_configiommu(\
}
print "45" | h
print "# Patching GRUB..." | h
ok = system("cp /etc/modules /etc/modules.bak && cp /etc/default/grub /etc/default/grub.bak && echo vfio >> /etc/modules && echo vfio_iommu_type1 >> /etc/modules && echo vfio_pci >> /etc/modules && echo vfio_virqfd >> /etc/modules &&" \
ok = system("cp /etc/modules.bak /etc/modules && cp /etc/default/grub.bak /etc/default/grub &&" \
"cp /etc/modules /etc/modules.bak && cp /etc/default/grub /etc/default/grub.bak &&" \
" echo vfio >> /etc/modules && echo vfio_iommu_type1 >> /etc/modules && echo vfio_pci >> /etc/modules && echo vfio_virqfd >> /etc/modules &&" \
"sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=\"/GRUB_CMDLINE_LINUX_DEFAULT=\"iommu=pt amd_iommu=on intel_iommu=on /' /etc/default/grub &&" \
"echo 'options vfio-pci ids=" pciid "' > /etc/modprobe.d/vfio.conf &&" \
"echo 'options vfio_iommu_type1 allow_unsafe_interrupts=1' >> /etc/modprobe.d/vfio.conf &&" \
Expand Down Expand Up @@ -251,7 +253,7 @@ function main_menu(\
}

BEGIN {
RA1NVER = "0.9.3"
RA1NVER = "0.9.4"
gtitle = "ra1nstorm"
gzenity = "--width 800 --height 480"
split("python qemu uml-utilities virt-manager dmg2img git wget libguestfs-tools", REQPKGS, " ")
Expand Down
17 changes: 17 additions & 0 deletions stage2/usbutil.awk
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# What an innovative name! new_find_usb_controller!
function new_find_usb_controller(vendorid,\
lscmd,rdlnk,status,devn,fullpath) {
lscmd = "ls /sys/bus/usb/devices/*/idVendor | xargs grep -E '^"vendorid"$' | cut -d ':' -f1 | sed 's,/idVendor,,'"
lscmd | getline devn
status = close(lscmd)
if (status != 0) return ""
if (devn == "") return ""
rdlnk = "readlink -f " devn
rdlnk | getline fullpath
status = close(rdlnk)
if (status != 0) return ""
# /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0
match(fullpath, /\/[^/]+\/0000:([^/]+)\/usb/, a)
return a[1]
}

function find_usb_controller(driver,\
lscmd,rdlnk,status,devn,fullpath) {
lscmd = "ls -d /sys/bus/usb/drivers/" driver "/*:*"
Expand Down

0 comments on commit 739f054

Please sign in to comment.