Hope to resolve some issues for me and for other Windows users who want to compile in their windows machines.
For a Guide for those who want to install VirtualBox and contribute with their programming skills go here:
http://www.magiclantern.fm/forum/index.php?topic=6783.0For solutions to the following problems just skip the Quick Guide:
1. Cannot empty trash
2. How to set up Shared Folders between Windows 7 Host and my guest Ubuntu
3. How to add Virtual Hard Drive to VM
4. How to re-size the VirtualBox HD (found on post no. 5) here: http://www.magiclantern.fm/forum/index.php?topic=7579.msg66782#msg66782
5. "make install" command found here: http://www.magiclantern.fm/forum/index.php?topic=7579.msg77314#msg77314
Quick Guide HOWTO VirtualBox1. Downloaded the VirtualBox here:
http://nanomad.magiclantern.fm/Development%20Box/VirtualBox/MagicLantern.zip2. Downloaded Oracle VirtualBox here:
http://download.virtualbox.org/virtualbox/4.2.16/VirtualBox-4.2.16-86992-Win.exe3. Installed VirtualBox on Windows 7 ultimate 64 bit
4. Unzipped the contents of MagicLantern.zip
5. Ran VirtualBox, click on New, Typed a name, Selected Type: Linux, Version: Unbutu
6. On next screen set Memory to 1024 (I have 12 GB)
7. On next screen clicked on Use an existing virtual hard drive file, clicked on the folder icon, and selected the MagicLantern.vdi
8. Now I have the new machine on the left menu in VBox.
9. Click on Start and accept all default settings.
10. Now I have Unbutu Running
11. Double click on Home (Top left)
12. Right-mouse click on magic-lantern and select open terminal here
13. Type
hg pull14. When done type
hg update15. Double click on magic-lantern folder
16. Double click on
Makefile.user file
17. After GCC_VERSION= add
"-" sign should now read:
GCC_VERSION=-4.7.3
18. Below the GCC add:
CONFIG_TCC = Y
CONFIG_MODULES = y
CONFIG_PICOC = Y19. I had also added
CONFIG_MEMCHECK = y but this gave me some errors so I took it out! (Is it needed?)
20. Under File menu click on
save and then
quit.
21. Now Click on magiclantern on the left side with the home symbol
22. Right mouse click on the magic-lantern folder on the right and select
Open Terminal Here23. Type:
make clean and when done
make 5D324. It should work. It compiled.
25. Now go back to the File Manager and open the
magic-lantern folder and then the
modules folder26. Right-mouse click on each module that you want to use and select the Open Terminal Here
27. For each one do a
make clean and when finished type
make.
28. When done.. Go to File Manager, open
magic-lantern folder and
platform folder and
5D3.113 folder
29. Copy the
5D3_113.sym and the
autoexec.bin files to ... USB drive.
Here I had some problems but these problems were solved in the following way.. Insert the usb drive and close the windows automatic usb recognition. Then go to VBOX click on
Devices,
USB Devices, and select the USB drive inserted. Now Vbox adds this drive to the File manager.
30. Open the USB drive shown on the File manager. When you see the drive then proceed as follows:
31. Select the
5D3_113.sym and the
autoexec.bin files, right-mouse and click on
send: select the usb drive.
32. Click on
magic-lantern folder (above the main window), double click on
Modules.
33. Go into each module generated and copy each
xxx.mo by selecting it (right-mouse click) and sending it to the usb drive.
34. When done click on Devices, USB Devices, and on the usb drive. This removes the drive from the Vbox. In my system then Windows recognizes the USB drive, and then I can copy and transfer these files to the card reader.
------------------------- Solutions found --->>>>1. Cannot empty trash..I am not sure why this happen but I suspect it has to do with deleting files in USB stick, then removing the stick (from linux) without emptying the trash, and then deleting all files under windows including the hidden .Trash-1000 hidden file which is created by linux.
1. With VM running use Terminal and run command: sudo rm -rf ~/.local/share/Trash
2. Go to Virtualbox menu and click on Machine, ACPI Shutdown.
3. Start the same machine.
4. A new screen will appear that informs of an error press continue and the (I think) press the F to fix the error. After a while the machine will reboot and the Trash can will have been fixed.
5. My problem is that I never shutdown the machine so the system could not fix the problems.
Conclusions:
a. If you delete files from USB stick, empty the trash before you disconnect it from Linux.
b. It is always a good idea to shutdown or reset the machine when trying to fix some of the problems.
------------------------- Solutions found --->>>>2. How to set up Shared Folders between Windows 7 Host and my guest UbuntuTo install the guest additions first you have to get the required files not included in the system!
1. Open Terminal
2. type the following command and hit enter:
apt-get install dkms build-essential linux-headers-generic... this will download and install the required packages.
More questions answered here:
https://forums.virtualbox.org/viewtopic.php?t=156793. When finished type in the terminal and hit enter
sudo sh ./VBoxLinuxAdditions.runThis will install the Guest Additions in the machine...
4. Go to Devices, Shared Folders, click on Machine folders and click on the green folder icon with a + sign.
5.Click on Folder Path, Other, and select the folder in Windows that you want to share. Can be an entire drive if you just select the drive letter.
6. Type a simple folder name i.e shared
6. Select Automount and Make Permanent, ok
7. In the terminal now type:
sudo mount -t vboxsf name-of-folder /mediaMake sure the
name-of-the-folder (this is the name that you type when adding the shared folders in 5. above) has no spaces then leave a space after it and before
/media/media is the directory where the shared folder will be mounted. Could be any other directory.
This will mount the shared windows folder to the media folder which is inside the File System.
More questions about this subject answered here:
https://forums.virtualbox.org/viewtopic.php?t=15868To remove a previously shared dir shut down the machine and remove the shared folder in the settings of the VM. The run the VM and use rmdir sf_nameofdir command to remove it from the
/media directory.
AUTO LOADING AT BOOTThe above mounting procedure (7.) will have to be repeated every time the machine is started form
shutdown condition. If you want to to auto loaded then it is necessary to add the mount command to the file /etc/r.local with:
sudo nano /etc/rc.local (This allows to edit the rc.local)
note: If this is the first time take out the # sign on the first line
add..
sudo mount -t vboxsf name-of-folder /mediabefore the last line i.e. exit 0
Ctrl+x to close
y to save
enter to write
The nano terminal should close saving the change.
Reset the machine and test it.. Make sure that the sudo command on 7. is working (shared folder is available in linux) before you add the command to the rc.local file.
------------------------- Solutions found --->>>>3. How to add Virtual Hard Drive to VM:Since I am still struggling to get more space added to my virtualbox, I have opted to add a second hard drive to my machines so I have the necessary space when I can process videos in linux.
This is not absolutely necessary if you use the shared folders on your windows machine to store all of your big stuff. Additionally you can run the linux raw2dng, cr2hdr, and mlv_dump in the shared folders.
But if you still want to add a second virtual hard drive to the VM the follow these instructions.
1. Open Oracle VM Virtualbox Manager and click
New2. Name : 50GB-HD, Type:
Linux, Version
:Ubuntu, Click
Next3. In Memory size just click
Next4. In Hard drive, select
Create a virtual hard drive now, click
Create5. Select the
VDI (VirtualBox Disk Image), click
Next6. Select
Dynamically allocated, click Next
7. With the slider change the size of the disk and click Create.
This will put a VM-disk on the list.
8. Next step is to add this disk to our MagicLantern machine. Select the MagicLantern VM machine. Make sure this machine is Powered Off. If your machine is not Powered Off: selected it, right mouse click, and select the Discard saved state icon. Can also be done from the main menu.
9. Click on
Settings in main menu.
10. Click on
Storage and the new screen will show the drives mounted on the right.
11. Select the hard drive controller (not the disk) where you want to add, usually the one that already has the virtual machine.
12. Note that there are two icons right of the controller, the first one is to add a CD/DVD and the second is to add Hard Disk. If you hoover your mouse over these icons, the description will show. C
lick on the add Hard Disk plus Icon.
13. Select Choose existing disk now navigate to the directory to where you saved the disk created in step 7. In my machine this is stored in C:\Users\RE\VirtualBox VMs\10gb-hd. There will be a .vdi file with the name of the hard drive form step 2. ie 50GB-HD. Click
Open.14. The new HD is added to the machine and it is automatically assigned to the controller. Click
OK and now Click on
Start in the main menu.
The new drive is added to the machine but it needs to be formatted.
15. First we need to confirm that the HD has been added and where it is located.
Open Terminal and type:
sudo fdisk -l <<-- is a minus (L) no-caps
You will need to enter the password for magiclantern: 123456
16. This will bring up the disk and partitions detail of the machine:
--------------------------
Disk /dev/sda: 21.0 GB, 20971520000 bytes
255 heads, 63 sectors/track, 2549 cylinders, total 40960000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b6f22
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 12582911 6290432 83 Linux
/dev/sda2 14682102 18872311 2095105 5 Extended
/dev/sda5 14682104 18872311 2095104 82 Linux swap / Solaris
Disk /dev/sdb: 54.8 GB, 54766731264 bytes
255 heads, 63 sectors/track, 6658 cylinders, total 106966272 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdb doesn't contain a valid partition table
--------------------------------
Notice the last line:
Disk
/dev/sdb doesn't contain a valid partition table
This is the new disk that has installed but does not have a partition, the disk is installed in the directory /dev and the name is sdb i.e. /dev/sdb
17. In Terminal and type:
mkfs -t ext3 /dev/sdb (In your case type whatever the fdisk command showed for the dirve on the last line.)
18. After the password the terminal will ask you that /dev/sdb is enire device, not just one partition!
Proceed anyway (y,n)
Type y
now ...the drive will be formated for you
When done the drive will appear on the desktop and in the file system
19. to confirm installation right-mouse click on the new drive and open. It should automatically mount and open.
20. Notice that you cannot copy or paste any files to this disk.... As a windows user I want total access to this drive so I will change! the read write permissions to this drive. I thought this would be easy but noooooo!!! This is linux.. everything is hard.. get used to it. I tried so many things but nothing worked until I installed this nautilus utility.
21. Open Terminal type: sudo apt-get install nautilus
22. I dont remember all of the details about the installation but when done reset your machine, open terminal and type:
sudo gksu nautilus23. Navegate to the /media folder in the file system
24. Right click on the drive and open Properties
25. Under the Permissions tab change permissions to read/write
25. Same place change the owner and group to MagicLantern and magiclanter respectively. These should be selectable from drop down menu.
26. Click Apply permissions to enclosed folders.
27. Whala! check your new drive by creating a new folder o copying something to it.
This drive will act as a External drive to any VM machine. So if you want to add this HD to another VM just do steps 8. through 14.