diff --git a/create_install_iso.sh b/create_install_iso.sh index 7ef9c79..95b58ea 100755 --- a/create_install_iso.sh +++ b/create_install_iso.sh @@ -197,7 +197,7 @@ Valid options are: Method 3 can produce bootable images without super user rights. -n, --nosudo - Do not use sudo command + Do not use sudo command (untested, unsupported) -v, --verify Do not skip verifications (slow down image creation) -h, --help Print this message and exit @@ -218,6 +218,7 @@ exit_with_cmd_err() { unset cmd_par_app cmd_par_iso test_name ver_opt cr_method || exit_with_error "Can't unset variable" ver_opt='--noverify' +inject_kexts='no' while [[ -n "$1" ]]; do case "$1" in -a | --app | --application ) cmd_par_app="$2" @@ -233,6 +234,7 @@ while [[ -n "$1" ]]; do --method* ) cr_method="method${1#--method}"; shift ;; -n | --nosudo ) allow_sudo='no'; shift ;; -v | --verify ) unset ver_opt; shift ;; + -k ) inject_kexts='yes'; shift ;; -h | --h | --help ) print_help; exit 0 ;; -V | --version ) print_version; exit 0 ;; *) exit_with_cmd_err "Unknown option \"$1\"" @@ -433,7 +435,7 @@ if [[ "$cr_method" == "method1" ]] || [[ "$cr_method" == "method2" ]]; then stage_start_nl "Mounting writable image" OSX_inst_img_rw_mnt="$tmp_dir/OS_X_Install_img_rw_mnt" - hdiutil attach "$OSX_inst_img_rw" -readwrite -nobrowse -mountpoint "$OSX_inst_img_rw_mnt" ${ver_opt+-noverify} || exit_with_error "Can't mount writable image" + hdiutil attach "$OSX_inst_img_rw" -readwrite -nobrowse -mountpoint "$OSX_inst_img_rw_mnt" ${ver_opt+-noverify} -owners on || exit_with_error "Can't mount writable image" stage_end_ok "Mounting succeed" elif [[ "$cr_method" == "method3" ]]; then stage_start_nl "Creating blank writable image" @@ -529,6 +531,26 @@ cd "$OSX_inst_img_rw_mnt" cd "$work_dir" stage_end_ok +# Inject kext(s) into ISO image +if [[ "$inject_kexts" == "yes" ]]; then + stage_start "Injecting kext(s) into ISO image (unsupported)" + cd "$OSX_inst_img_rw_mnt" + + kext_name="QemuUSBTablet1011.kext" + cp -a "$script_dir/kexts/$kext_name" ./System/Library/Extensions/ + chmod -R 755 ./System/Library/Extensions/$kext_name + chown -R root:wheel ./System/Library/Extensions/$kext_name + + kext_name="FakeSMC.kext" + cp -a "$script_dir/kexts/$kext_name" ./System/Library/Extensions/ + chmod -R 755 ./System/Library/Extensions/$kext_name + chown -R root:wheel ./System/Library/Extensions/$kext_name + + touch ./System/Library/Extensions + cd "$work_dir" + stage_end_ok +fi + stage_start "Replacing Packages symlink with real files" rm -f "$OSX_inst_img_rw_mnt/System/Installation/Packages" || exit_with_error "Deleting Packages symlink failed" cp -pPR "$OSX_inst_inst_dmg_mnt/Packages" "$OSX_inst_img_rw_mnt/System/Installation/" || exit_with_error "Copying Packages failed" diff --git a/kexts/QemuUSBTablet1011.kext/Contents/Info.plist b/kexts/QemuUSBTablet1011.kext/Contents/Info.plist new file mode 100644 index 0000000..308c7a1 --- /dev/null +++ b/kexts/QemuUSBTablet1011.kext/Contents/Info.plist @@ -0,0 +1,83 @@ + + + + + BuildMachineOSBuild + 15G31 + CFBundleDevelopmentRegion + en + CFBundleExecutable + QemuUSBTablet1011 + CFBundleIdentifier + eu.dennis-jordan.driver.QemuUSBTablet + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + QemuUSBTablet1011 + CFBundlePackageType + KEXT + CFBundleShortVersionString + 1.2 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1.2 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 7D1014 + DTPlatformVersion + GM + DTSDKBuild + 15E60 + DTSDKName + macosx10.11 + DTXcode + 0731 + DTXcodeBuild + 7D1014 + IOKitPersonalities + + QemuUSBTabletHIDDevice + + AbsoluteAxisBoundsRemovalPercentage + 0 + CFBundleIdentifier + eu.dennis-jordan.driver.QemuUSBTablet + HIDDefaultBehavior + + IOClass + eu_dennis_jordan_driver_QemuUSBTablet1011 + IOProviderClass + IOUSBHostInterface + bConfigurationValue + 1 + bInterfaceNumber + 0 + idProduct + 1 + idVendor + 1575 + + + NSHumanReadableCopyright + Copyright © 2016 Phil & Laura Dennis-Jordan. Provided under the GNU Lesser General Public License Version 3 + OSBundleLibraries + + com.apple.driver.usb.IOUSBHostHIDDevice + 1.0 + com.apple.iokit.IOHIDFamily + 1.0 + com.apple.kpi.iokit + 15.0 + com.apple.kpi.libkern + 15.0 + com.apple.kpi.mach + 15.0 + + + diff --git a/kexts/QemuUSBTablet1011.kext/Contents/MacOS/QemuUSBTablet1011 b/kexts/QemuUSBTablet1011.kext/Contents/MacOS/QemuUSBTablet1011 new file mode 100755 index 0000000..0cb9581 Binary files /dev/null and b/kexts/QemuUSBTablet1011.kext/Contents/MacOS/QemuUSBTablet1011 differ diff --git a/kexts/QemuUSBTablet1011.kext/Contents/_CodeSignature/CodeResources b/kexts/QemuUSBTablet1011.kext/Contents/_CodeSignature/CodeResources new file mode 100644 index 0000000..0710b40 --- /dev/null +++ b/kexts/QemuUSBTablet1011.kext/Contents/_CodeSignature/CodeResources @@ -0,0 +1,105 @@ + + + + + files + + files2 + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + +