6 # Created by Chris Suter on 5/3/15.
13 if [[ "$SDKROOT" =~ macosx
]] ; then
14 if [ ! "$KERNEL_PATH" ] ; then
15 KERNEL_PATH
=$SDKROOT/System
/Library
/Kernels
/kernel.development
18 EXTS_PATH
="`dirname \"$KERNEL_PATH\"`"/..
/Extensions
20 kextutil
-no-load -t -k "$KERNEL_PATH" -no-authentication "$BUILT_PRODUCTS_DIR/HFSEncodings.kext" -d "$EXTS_PATH/System.kext"
21 kextutil
-no-load -t -k "$KERNEL_PATH" -no-authentication "$BUILT_PRODUCTS_DIR/HFS.kext" -d "$EXTS_PATH/System.kext" -d "$BUILT_PRODUCTS_DIR/HFSEncodings.kext"
23 if [ "$XNU_PATH" ] ; then
24 extra_args
=(-C "$XNU_PATH/BUILD/dst" .
)
26 gnutar
--owner 0 --group 0 --transform 's|^([^/]+.kext)|System/Library/Extensions/\1|x' -C "$BUILT_PRODUCTS_DIR" HFS.kext HFSEncodings.kext
"${extra_args[@]}" -cjf "$BUILT_PRODUCTS_DIR/hfs-root.tbz"
27 echo "Created $BUILT_PRODUCTS_DIR/hfs-root.tbz"
28 ln -sf $BUILT_PRODUCTS_DIR/hfs
-root.tbz
/tmp
/
30 ~
/bin
/copy
-kernel-cache-builder
31 pushd /tmp
/KernelCacheBuilder
32 if [ "$XNU_PATH" ] ; then
33 extra_args
=(KERNEL_PATH
="$XNU_DST_PATH")
34 extra_kext_paths
="$BUILT_PRODUCTS_DIR $XNU_PATH/BUILD/dst/System/Library/Extensions"
36 extra_kext_paths
="$BUILT_PRODUCTS_DIR"
38 env
-i make TARGETS
="$DEVICES" "${extra_args[@]}" BUILDS
=development VERBOSE
=YES SDKROOT
=iphoneos.internal EXTRA_KEXT_PATHS
="$BUILT_PRODUCTS_DIR $XNU_PATH/BUILD/dst/System/Library/Extensions" EXTRA_BUNDLES
=com.apple.filesystems.hfs.kext
2> >(sed -E '/^.*duplicate BUNDLE_IDS$/d' 1>&2)