1 00:00:01,230 --> 00:00:01,670 OK. 2 00:00:01,740 --> 00:00:08,730 Let’s build and test the project in mac os. As you see, I have copied the boot folder in the desktop. 3 00:00:09,870 --> 00:00:12,810 We have all the files we need in this folder. 4 00:00:12,810 --> 00:00:15,180 The boot image file is the blank 10 mb image 5 00:00:15,180 --> 00:00:21,390 we created in lecture working with mac os. Be sure to place the image in the boot folder 6 00:00:21,390 --> 00:00:23,130 before building the project. 7 00:00:24,420 --> 00:00:25,950 Now we open the terminal. 8 00:00:30,230 --> 00:00:33,070 And chang the directory to the boot directory. 9 00:00:36,790 --> 00:00:38,800 and type ./build.sh 10 00:00:40,090 --> 00:00:40,750 Press enter. 11 00:00:42,560 --> 00:00:46,280 OK, the binary file is copied into boot.img 12 00:00:49,540 --> 00:00:51,340 In the bochs configuration file. 13 00:00:54,400 --> 00:00:58,180 we can see the image path is pointing to the boot image file. 14 00:01:01,110 --> 00:01:01,500 OK. 15 00:01:03,170 --> 00:01:03,920 In Terminal, 16 00:01:05,370 --> 00:01:06,300 we type bochs 17 00:01:07,680 --> 00:01:08,310 press enter. 18 00:01:10,930 --> 00:01:15,940 and the default number is 6, which is begin simulation, so we press enter. 19 00:01:18,980 --> 00:01:22,160 in the command prompt, we type c to continue. 20 00:01:27,570 --> 00:01:29,460 And hello is printed on screen. 21 00:01:32,760 --> 00:01:34,320 write boot image to the USB thumb drive. 22 00:01:35,070 --> 00:01:42,840 So we insert a USB thumb drive, and in the terminal we check the device list using the command diskutil. 23 00:01:43,140 --> 00:01:45,180 . 24 00:01:48,820 --> 00:01:52,870 The name of the device in this example is dev disk2 25 00:01:54,840 --> 00:01:56,490 We use the same command, dd 26 00:01:58,120 --> 00:02:07,970 The input file, boot.img and output file dev disk2 and the block size is set to 512 bytes. 27 00:02:08,020 --> 00:02:10,720 We write 1 block of data into boot image. 28 00:02:11,800 --> 00:02:14,070 Once again, we need to check the output file is the correct one, 29 00:02:14,080 --> 00:02:14,920 , 30 00:02:17,560 --> 00:02:20,650 and press enter. 31 00:02:22,550 --> 00:02:23,990 Here we need to add sudo. 32 00:02:26,370 --> 00:02:27,090 And press enter. 33 00:02:34,120 --> 00:02:34,510 OK. 34 00:02:34,750 --> 00:02:38,920 The boot image has been written into the USB thumb drive, and we are done. 35 00:02:44,760 --> 00:02:47,100 With USB flash drive ready to use, we insert it into the test computer and boot the computer. 36 00:02:47,250 --> 00:02:53,190 Because we are running in legacy bios mode, 37 00:02:53,340 --> 00:03:00,660 we have to make sure the csm support is enable if the motherboard has uefi system, 38 00:03:00,660 --> 00:03:02,370 which should be enabled by default. 39 00:03:03,090 --> 00:03:06,210 As you can see, this is the BIOS interface in my computer. 40 00:03:07,020 --> 00:03:09,420 We navigated to BIOS option. 41 00:03:10,470 --> 00:03:16,890 And CSM is enabled. Also BIOS interface could be different in your machine, 42 00:03:16,890 --> 00:03:20,250 so you need to check whether the CSM option is at in your computer. 43 00:03:21,090 --> 00:03:23,760 OK, we exit and reboot the computer. 44 00:03:31,010 --> 00:03:37,220 Since we didn't set up boot device priority, we open boot menu. In this menu, 45 00:03:37,220 --> 00:03:38,680 we choose which device we want to boot. 46 00:03:39,140 --> 00:03:45,230 Since this is a test computer which has no hard disk, the only option is the USB flash drive 47 00:03:45,260 --> 00:03:46,370 I just inserted. 48 00:03:47,090 --> 00:03:48,170 So we press enter. 49 00:03:52,300 --> 00:03:54,080 If everything goes as expected, we will see 50 00:03:54,100 --> 00:03:55,110 hello is printed. 51 00:03:56,180 --> 00:03:57,530 That's it for this lecture. 52 00:03:57,620 --> 00:03:59,090 See you in the next video.