├── .gitignore
├── TinyLinux
├── TinyLinux.entitlements
└── Command.swift
├── Makefile
├── LICENSE
├── README.md
└── TinyLinux.xcodeproj
├── xcshareddata
└── xcschemes
│ └── TinyLinux.xcscheme
└── project.pbxproj
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .build/
3 | project.xcworkspace/
4 | xcuserdata/
5 |
--------------------------------------------------------------------------------
/TinyLinux/TinyLinux.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.virtualization
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | NAME = TinyLinux
2 |
3 | BUILD_PATH = .build
4 |
5 | XCODE_PROJECT_PATH = $(NAME).xcodeproj
6 | XCODE_SCHEME = $(NAME)
7 | XCODE_ARCHIVE_PATH = $(BUILD_PATH)/$(NAME).xcarchive
8 |
9 | .PHONY: all
10 | all: build
11 |
12 | .PHONY: claen
13 | clean:
14 | git clean -dfX
15 |
16 | .PHONY: build
17 | build:
18 | xcodebuild \
19 | -project "$(XCODE_PROJECT_PATH)" \
20 | -scheme "$(XCODE_SCHEME)" \
21 | -derivedDataPath "$(BUILD_PATH)" \
22 | -archivePath "$(XCODE_ARCHIVE_PATH)" \
23 | archive
24 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2021 Yoshimasa Niwa
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | TinyLinux
2 | =========
3 |
4 | Really a tiny minimum implementation of [Virtualization framework](https://developer.apple.com/documentation/virtualization) to boot Linux.
5 |
6 | Prerequisites
7 | -------------
8 |
9 | - macOS Big Sur or later
10 | - Xcode 12.3 or later
11 |
12 | Usage
13 | -----
14 |
15 | Prepare Linux kernel and ramdisk file that works on each Intel or Apple Silicon architecture.
16 |
17 | For example, if you're using Apple Silicon Mac and booting Ubuntu Server for ARM, follow the next steps.
18 |
19 | First, clone this repository.
20 |
21 | In the repository directory, download an iso file from [Ubuntu Server for ARM](https://ubuntu.com/download/server/arm). The following URL and file name of the iso file includes version may vary, so please check it at the download page.
22 |
23 | ```sh
24 | curl -O 'https://cdimage.ubuntu.com/releases/20.04/release/ubuntu-20.04.3-live-server-arm64.iso'
25 | ```
26 |
27 | Then, mount downloaded iso file. You need to use `mount` instead of double-click the iso file. Extract Linux kernel (and ungzip,) and ramdisk.
28 |
29 | ```sh
30 | # Create a mounting point.
31 | mkdir -p ubuntu
32 | # Attach and mount the iso file
33 | hdiutil attach -nomount ubuntu-20.04.3-live-server-arm64.iso
34 | mount -t cd9660 /dev/disk4 ubuntu # disk4 may vary depends on your environment, see output of `hdiutil`
35 | # Copy linux kernel and ungzip
36 | cp ubuntu/casper/vmlinuz vmlinux.gz
37 | gzip -d vmlinux.gz
38 | # Copy ramdisk
39 | cp ubuntu/casper/initrd ./
40 | # Unmount and detach the iso file
41 | umount ubuntu
42 | hdiutil detach disk4 # Same here.
43 | # Remove the mounting point.
44 | rm -rf ubuntu
45 | ```
46 |
47 | Build TinyLinux then boot.
48 |
49 | ```sh
50 | # Build TinyLinux
51 | make
52 | # Boot Linux
53 | .build/TinyLinux.xcarchive/Products/usr/local/bin/TinyLinux \
54 | --vmlinux vmlinux \
55 | --initrd initrd \
56 | --commandline "console=hvc0 root=/dev/vda1" \
57 | --image ubuntu-20.04.3-live-server-arm64.iso
58 | ```
59 |
60 | If you're using Intel Mac, you can use Ubuntu Desktop iso image and follow same steps as above for Apple Silicon Mac.
61 | It is not necessary to run `gzip -d` to ungzip `vmlinuz` but you can use that bzImage file directly for `--vmlinux` argument.
62 |
63 | ### Serial device
64 |
65 | TinyLinux connects standard input and output to the serial device.
66 | To make it works on the terminal emulator, you may need to disable the line discipline used for the current terminal emulator
67 | by using `stty raw` prior to use TinyLinux and restore state after using it.
68 |
69 | For example, make a following shell script and use it instead.
70 |
71 | ```sh
72 | #!/bin/sh
73 | # Save current state
74 | save_state=$(stty -g)
75 | # Make it raw
76 | stty raw
77 | # Boot Linux
78 | .build/TinyLinux.xcarchive/Products/usr/local/bin/TinyLinux ...
79 | # Restore original state
80 | stty "$save_state"
81 | ```
82 |
83 | See `stty(3)` as well.
84 |
--------------------------------------------------------------------------------
/TinyLinux/Command.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Command.swift
3 | // TinyLinux
4 | //
5 | // Created by Yoshimasa Niwa on 1/12/21.
6 | //
7 |
8 | import ArgumentParser
9 | import Foundation
10 | import Virtualization
11 |
12 | @main
13 | struct Command: ParsableCommand {
14 | @Option(help: "path to ungziped linux kernel.")
15 | var vmlinux: String
16 |
17 | @Option(help: "path to ramdisk.")
18 | var initrd: String?
19 |
20 | @Option(help: "kernel command-line parameters")
21 | var commandline: String = "console=hvc0"
22 |
23 | @Option(help: "number of CPUs.")
24 | var cpuCount: Int = 1
25 |
26 | @Option(help: "memory size in megabyte")
27 | var memorySize: Int = 512
28 |
29 | @Option(help: "path to disk image")
30 | var image: [String] = []
31 |
32 | mutating func run() throws {
33 | let bootLoader = VZLinuxBootLoader(kernelURL: URL(fileURLWithPath: vmlinux))
34 | if let initrd = initrd {
35 | bootLoader.initialRamdiskURL = URL(fileURLWithPath: initrd)
36 | }
37 | bootLoader.commandLine = commandline
38 |
39 | let serialPort = VZVirtioConsoleDeviceSerialPortConfiguration()
40 | serialPort.attachment = VZFileHandleSerialPortAttachment(
41 | fileHandleForReading: FileHandle.standardInput,
42 | fileHandleForWriting: FileHandle.standardOutput
43 | )
44 |
45 | let entropyDevice = VZVirtioEntropyDeviceConfiguration()
46 | let memoryBalloonDevice = VZVirtioTraditionalMemoryBalloonDeviceConfiguration()
47 |
48 | let storageDevices = try image.map { image -> VZVirtioBlockDeviceConfiguration in
49 | let attachment = try VZDiskImageStorageDeviceAttachment(url: URL(fileURLWithPath: image), readOnly: true)
50 | return VZVirtioBlockDeviceConfiguration(attachment: attachment)
51 | }
52 |
53 | let networkDevice = VZVirtioNetworkDeviceConfiguration()
54 | networkDevice.attachment = VZNATNetworkDeviceAttachment()
55 |
56 | let configuration = VZVirtualMachineConfiguration()
57 | configuration.bootLoader = bootLoader
58 | configuration.memorySize = UInt64(memorySize * 1024 * 1024)
59 | configuration.cpuCount = cpuCount
60 | configuration.entropyDevices = [entropyDevice]
61 | configuration.memoryBalloonDevices = [memoryBalloonDevice]
62 | configuration.networkDevices = [networkDevice]
63 | configuration.serialPorts = [serialPort]
64 | configuration.storageDevices = storageDevices
65 |
66 | try configuration.validate()
67 |
68 | let machine = VZVirtualMachine(configuration: configuration)
69 | machine.start { result in
70 | switch result {
71 | case .success:
72 | break
73 | case .failure(let error):
74 | print(error)
75 | }
76 | }
77 |
78 | RunLoop.main.run()
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/TinyLinux.xcodeproj/xcshareddata/xcschemes/TinyLinux.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
45 |
51 |
52 |
53 |
54 |
60 |
62 |
68 |
69 |
70 |
71 |
73 |
74 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/TinyLinux.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 52;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 54DE076425B2CD98008AA3BF /* Command.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54DE076225B2CD98008AA3BF /* Command.swift */; };
11 | 54DE076925B2CDCA008AA3BF /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = 54DE076825B2CDCA008AA3BF /* ArgumentParser */; };
12 | /* End PBXBuildFile section */
13 |
14 | /* Begin PBXCopyFilesBuildPhase section */
15 | 54DE075525B2CD56008AA3BF /* CopyFiles */ = {
16 | isa = PBXCopyFilesBuildPhase;
17 | buildActionMask = 2147483647;
18 | dstPath = /usr/share/man/man1/;
19 | dstSubfolderSpec = 0;
20 | files = (
21 | );
22 | runOnlyForDeploymentPostprocessing = 1;
23 | };
24 | /* End PBXCopyFilesBuildPhase section */
25 |
26 | /* Begin PBXFileReference section */
27 | 54347EE1285558F400169485 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; };
28 | 54DE075725B2CD56008AA3BF /* TinyLinux */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TinyLinux; sourceTree = BUILT_PRODUCTS_DIR; };
29 | 54DE076225B2CD98008AA3BF /* Command.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Command.swift; sourceTree = ""; };
30 | 54DE076325B2CD98008AA3BF /* TinyLinux.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = TinyLinux.entitlements; sourceTree = ""; };
31 | /* End PBXFileReference section */
32 |
33 | /* Begin PBXFrameworksBuildPhase section */
34 | 54DE075425B2CD56008AA3BF /* Frameworks */ = {
35 | isa = PBXFrameworksBuildPhase;
36 | buildActionMask = 2147483647;
37 | files = (
38 | 54DE076925B2CDCA008AA3BF /* ArgumentParser in Frameworks */,
39 | );
40 | runOnlyForDeploymentPostprocessing = 0;
41 | };
42 | /* End PBXFrameworksBuildPhase section */
43 |
44 | /* Begin PBXGroup section */
45 | 54DE074E25B2CD56008AA3BF = {
46 | isa = PBXGroup;
47 | children = (
48 | 54347EE1285558F400169485 /* README.md */,
49 | 54DE075925B2CD56008AA3BF /* TinyLinux */,
50 | 54DE075825B2CD56008AA3BF /* Products */,
51 | );
52 | sourceTree = "";
53 | };
54 | 54DE075825B2CD56008AA3BF /* Products */ = {
55 | isa = PBXGroup;
56 | children = (
57 | 54DE075725B2CD56008AA3BF /* TinyLinux */,
58 | );
59 | name = Products;
60 | sourceTree = "";
61 | };
62 | 54DE075925B2CD56008AA3BF /* TinyLinux */ = {
63 | isa = PBXGroup;
64 | children = (
65 | 54DE076225B2CD98008AA3BF /* Command.swift */,
66 | 54DE076325B2CD98008AA3BF /* TinyLinux.entitlements */,
67 | );
68 | path = TinyLinux;
69 | sourceTree = "";
70 | };
71 | /* End PBXGroup section */
72 |
73 | /* Begin PBXNativeTarget section */
74 | 54DE075625B2CD56008AA3BF /* TinyLinux */ = {
75 | isa = PBXNativeTarget;
76 | buildConfigurationList = 54DE075E25B2CD56008AA3BF /* Build configuration list for PBXNativeTarget "TinyLinux" */;
77 | buildPhases = (
78 | 54DE075325B2CD56008AA3BF /* Sources */,
79 | 54DE075425B2CD56008AA3BF /* Frameworks */,
80 | 54DE075525B2CD56008AA3BF /* CopyFiles */,
81 | );
82 | buildRules = (
83 | );
84 | dependencies = (
85 | );
86 | name = TinyLinux;
87 | packageProductDependencies = (
88 | 54DE076825B2CDCA008AA3BF /* ArgumentParser */,
89 | );
90 | productName = TinyLinux;
91 | productReference = 54DE075725B2CD56008AA3BF /* TinyLinux */;
92 | productType = "com.apple.product-type.tool";
93 | };
94 | /* End PBXNativeTarget section */
95 |
96 | /* Begin PBXProject section */
97 | 54DE074F25B2CD56008AA3BF /* Project object */ = {
98 | isa = PBXProject;
99 | attributes = {
100 | LastSwiftUpdateCheck = 1230;
101 | LastUpgradeCheck = 1230;
102 | TargetAttributes = {
103 | 54DE075625B2CD56008AA3BF = {
104 | CreatedOnToolsVersion = 12.3;
105 | LastSwiftMigration = 1230;
106 | };
107 | };
108 | };
109 | buildConfigurationList = 54DE075225B2CD56008AA3BF /* Build configuration list for PBXProject "TinyLinux" */;
110 | compatibilityVersion = "Xcode 9.3";
111 | developmentRegion = en;
112 | hasScannedForEncodings = 0;
113 | knownRegions = (
114 | en,
115 | Base,
116 | );
117 | mainGroup = 54DE074E25B2CD56008AA3BF;
118 | packageReferences = (
119 | 54DE076725B2CDCA008AA3BF /* XCRemoteSwiftPackageReference "swift-argument-parser" */,
120 | );
121 | productRefGroup = 54DE075825B2CD56008AA3BF /* Products */;
122 | projectDirPath = "";
123 | projectRoot = "";
124 | targets = (
125 | 54DE075625B2CD56008AA3BF /* TinyLinux */,
126 | );
127 | };
128 | /* End PBXProject section */
129 |
130 | /* Begin PBXSourcesBuildPhase section */
131 | 54DE075325B2CD56008AA3BF /* Sources */ = {
132 | isa = PBXSourcesBuildPhase;
133 | buildActionMask = 2147483647;
134 | files = (
135 | 54DE076425B2CD98008AA3BF /* Command.swift in Sources */,
136 | );
137 | runOnlyForDeploymentPostprocessing = 0;
138 | };
139 | /* End PBXSourcesBuildPhase section */
140 |
141 | /* Begin XCBuildConfiguration section */
142 | 54DE075C25B2CD56008AA3BF /* Debug */ = {
143 | isa = XCBuildConfiguration;
144 | buildSettings = {
145 | ALWAYS_SEARCH_USER_PATHS = NO;
146 | CLANG_ANALYZER_NONNULL = YES;
147 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
148 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
149 | CLANG_CXX_LIBRARY = "libc++";
150 | CLANG_ENABLE_MODULES = YES;
151 | CLANG_ENABLE_OBJC_ARC = YES;
152 | CLANG_ENABLE_OBJC_WEAK = YES;
153 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
154 | CLANG_WARN_BOOL_CONVERSION = YES;
155 | CLANG_WARN_COMMA = YES;
156 | CLANG_WARN_CONSTANT_CONVERSION = YES;
157 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
158 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
159 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
160 | CLANG_WARN_EMPTY_BODY = YES;
161 | CLANG_WARN_ENUM_CONVERSION = YES;
162 | CLANG_WARN_INFINITE_RECURSION = YES;
163 | CLANG_WARN_INT_CONVERSION = YES;
164 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
165 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
166 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
167 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
168 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
169 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
170 | CLANG_WARN_STRICT_PROTOTYPES = YES;
171 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
172 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
173 | CLANG_WARN_UNREACHABLE_CODE = YES;
174 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
175 | COPY_PHASE_STRIP = NO;
176 | DEBUG_INFORMATION_FORMAT = dwarf;
177 | ENABLE_STRICT_OBJC_MSGSEND = YES;
178 | ENABLE_TESTABILITY = YES;
179 | GCC_C_LANGUAGE_STANDARD = gnu11;
180 | GCC_DYNAMIC_NO_PIC = NO;
181 | GCC_NO_COMMON_BLOCKS = YES;
182 | GCC_OPTIMIZATION_LEVEL = 0;
183 | GCC_PREPROCESSOR_DEFINITIONS = (
184 | "DEBUG=1",
185 | "$(inherited)",
186 | );
187 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
188 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
189 | GCC_WARN_UNDECLARED_SELECTOR = YES;
190 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
191 | GCC_WARN_UNUSED_FUNCTION = YES;
192 | GCC_WARN_UNUSED_VARIABLE = YES;
193 | MACOSX_DEPLOYMENT_TARGET = 11.0;
194 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
195 | MTL_FAST_MATH = YES;
196 | ONLY_ACTIVE_ARCH = YES;
197 | SDKROOT = macosx;
198 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
199 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
200 | };
201 | name = Debug;
202 | };
203 | 54DE075D25B2CD56008AA3BF /* Release */ = {
204 | isa = XCBuildConfiguration;
205 | buildSettings = {
206 | ALWAYS_SEARCH_USER_PATHS = NO;
207 | CLANG_ANALYZER_NONNULL = YES;
208 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
209 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
210 | CLANG_CXX_LIBRARY = "libc++";
211 | CLANG_ENABLE_MODULES = YES;
212 | CLANG_ENABLE_OBJC_ARC = YES;
213 | CLANG_ENABLE_OBJC_WEAK = YES;
214 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
215 | CLANG_WARN_BOOL_CONVERSION = YES;
216 | CLANG_WARN_COMMA = YES;
217 | CLANG_WARN_CONSTANT_CONVERSION = YES;
218 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
219 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
220 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
221 | CLANG_WARN_EMPTY_BODY = YES;
222 | CLANG_WARN_ENUM_CONVERSION = YES;
223 | CLANG_WARN_INFINITE_RECURSION = YES;
224 | CLANG_WARN_INT_CONVERSION = YES;
225 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
226 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
227 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
228 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
229 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
230 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
231 | CLANG_WARN_STRICT_PROTOTYPES = YES;
232 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
233 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
234 | CLANG_WARN_UNREACHABLE_CODE = YES;
235 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
236 | COPY_PHASE_STRIP = NO;
237 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
238 | ENABLE_NS_ASSERTIONS = NO;
239 | ENABLE_STRICT_OBJC_MSGSEND = YES;
240 | GCC_C_LANGUAGE_STANDARD = gnu11;
241 | GCC_NO_COMMON_BLOCKS = YES;
242 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
243 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
244 | GCC_WARN_UNDECLARED_SELECTOR = YES;
245 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
246 | GCC_WARN_UNUSED_FUNCTION = YES;
247 | GCC_WARN_UNUSED_VARIABLE = YES;
248 | MACOSX_DEPLOYMENT_TARGET = 11.0;
249 | MTL_ENABLE_DEBUG_INFO = NO;
250 | MTL_FAST_MATH = YES;
251 | SDKROOT = macosx;
252 | SWIFT_COMPILATION_MODE = wholemodule;
253 | SWIFT_OPTIMIZATION_LEVEL = "-O";
254 | };
255 | name = Release;
256 | };
257 | 54DE075F25B2CD56008AA3BF /* Debug */ = {
258 | isa = XCBuildConfiguration;
259 | buildSettings = {
260 | CLANG_ENABLE_MODULES = YES;
261 | CODE_SIGN_ENTITLEMENTS = TinyLinux/TinyLinux.entitlements;
262 | CODE_SIGN_STYLE = Automatic;
263 | LD_RUNPATH_SEARCH_PATHS = (
264 | "$(inherited)",
265 | "@executable_path/../Frameworks",
266 | "@loader_path/../Frameworks",
267 | );
268 | PRODUCT_NAME = "$(TARGET_NAME)";
269 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
270 | SWIFT_VERSION = 5.0;
271 | };
272 | name = Debug;
273 | };
274 | 54DE076025B2CD56008AA3BF /* Release */ = {
275 | isa = XCBuildConfiguration;
276 | buildSettings = {
277 | CLANG_ENABLE_MODULES = YES;
278 | CODE_SIGN_ENTITLEMENTS = TinyLinux/TinyLinux.entitlements;
279 | CODE_SIGN_STYLE = Automatic;
280 | LD_RUNPATH_SEARCH_PATHS = (
281 | "$(inherited)",
282 | "@executable_path/../Frameworks",
283 | "@loader_path/../Frameworks",
284 | );
285 | PRODUCT_NAME = "$(TARGET_NAME)";
286 | SWIFT_VERSION = 5.0;
287 | };
288 | name = Release;
289 | };
290 | /* End XCBuildConfiguration section */
291 |
292 | /* Begin XCConfigurationList section */
293 | 54DE075225B2CD56008AA3BF /* Build configuration list for PBXProject "TinyLinux" */ = {
294 | isa = XCConfigurationList;
295 | buildConfigurations = (
296 | 54DE075C25B2CD56008AA3BF /* Debug */,
297 | 54DE075D25B2CD56008AA3BF /* Release */,
298 | );
299 | defaultConfigurationIsVisible = 0;
300 | defaultConfigurationName = Release;
301 | };
302 | 54DE075E25B2CD56008AA3BF /* Build configuration list for PBXNativeTarget "TinyLinux" */ = {
303 | isa = XCConfigurationList;
304 | buildConfigurations = (
305 | 54DE075F25B2CD56008AA3BF /* Debug */,
306 | 54DE076025B2CD56008AA3BF /* Release */,
307 | );
308 | defaultConfigurationIsVisible = 0;
309 | defaultConfigurationName = Release;
310 | };
311 | /* End XCConfigurationList section */
312 |
313 | /* Begin XCRemoteSwiftPackageReference section */
314 | 54DE076725B2CDCA008AA3BF /* XCRemoteSwiftPackageReference "swift-argument-parser" */ = {
315 | isa = XCRemoteSwiftPackageReference;
316 | repositoryURL = "https://github.com/apple/swift-argument-parser";
317 | requirement = {
318 | kind = exactVersion;
319 | version = 1.1.2;
320 | };
321 | };
322 | /* End XCRemoteSwiftPackageReference section */
323 |
324 | /* Begin XCSwiftPackageProductDependency section */
325 | 54DE076825B2CDCA008AA3BF /* ArgumentParser */ = {
326 | isa = XCSwiftPackageProductDependency;
327 | package = 54DE076725B2CDCA008AA3BF /* XCRemoteSwiftPackageReference "swift-argument-parser" */;
328 | productName = ArgumentParser;
329 | };
330 | /* End XCSwiftPackageProductDependency section */
331 | };
332 | rootObject = 54DE074F25B2CD56008AA3BF /* Project object */;
333 | }
334 |
--------------------------------------------------------------------------------