If you have a BeagleBone and want to play with my MachineKit image but are stuck on Windows without a handy Linux system (other than the 'Bone itself), here's how to do it.
WARNING: These instructions are meant to be easy to follow, but are not targeted at the complete Linux novice. If this is your first experience with the Linux command line, find a friend with a Linux machine and get them to make you an SD Card image. If you don't have any friends with Linux machines, Google a bit to find a LUG or maker space near you, and offer to buy someone a beer if they'll burn an SD image for you. Presto! You now have friends with a Linux box! :)
OK, let's get started. First, gather up all the supplies you need:
- Download my MachineKit image (start it now, it takes a while)
- A 4G or larger USB Key, with at least 3G or so of free space
- A USB SD-Card Reader
- A 4G or larger SD card plugged into the SD-Card reader. This is the SD card that will contain the MachineKit install when you are finished.
- A USB Hub with a power cord. Trying to power the hub from the BeagleBone will not work reliably.
Plug a USB hub with your USB Key and SD Card reader into your BeagleBone with the BeagleBone TURNED OFF (USB hot-plug is broken on several early versions of the AM335x kernel, so this makes sure you will be able to see your devices).
Power up and boot your BeagleBone as usual and obtain a command prompt. You can do this stand-alone with a keyboard and HDMI monitor (Black only), tethered via USB, using a serial-port cable, via ssh, etc. If you can't get to a command prompt on your BeagleBone stop now, go read the BeagleBone documentation, and don't come back until you can tell me how much free space is left on your root filesystem by running 'df' at a command prompt.
So go ahead and run the df command. Recent BeagleBone images should auto-mount the USB storage into the /media directory. Here's what it looks like on my 'Black:
Note the four lines at the bottom. In order, they are:root@beaglebone:~# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 1738184 1297492 350728 79% / /dev/root 1738184 1297492 350728 79% / devtmpfs 255216 0 255216 0% /dev tmpfs 255320 4 255316 1% /dev/shm tmpfs 255320 236 255084 1% /run tmpfs 255320 0 255320 0% /sys/fs/cgroup tmpfs 255320 4 255316 1% /tmp /dev/mmcblk0p1 71133 55179 15955 78% /media/BEAGLEBONE /dev/sda 3919868 2737024 1182844 70% /media/CRUZER 4G /dev/sdb2 15116684 2892476 11449656 21% /media/rootfs /dev/sdb1 66396 0 66396 0% /media/BOOT
This is the BeagleBone boot partition
My 4G USB Key
- /dev/sdb1 & /dev/sdb2 These are two existing partitions on my SD card.
Now change to the directory where you extracted the image.tar.xz file. In my case, that is "/media/CRUZER 4G/MachineKit/". You will know you are in the right place if you see the setup_sdcard.sh script:umount /dev/sdb1 umount /dev/sdb2
Now all you have to do is run the setup_sdcard.sh script with the proper options. The --mmc device should be the base device of your SD Card (WITHOUT any trailing partition number!), and the --uboot option should always be bone_dtb, so for my setup, I run:root@beaglebone:~# cd /media/CRUZER\ 4G/MachineKit/ root@beaglebone:/media/CRUZER 4G/MachineKit# ls debian-7.0.0-machinekit-armhf-2013-06-14 root@beaglebone:/media/CRUZER 4G/MachineKit# cd debian-7.0.0-machinekit-armhf-2013-06-14 3.7.10-x12-dtbs.tar.gz uInitrd-3.2.42-psp27 3.8.13xenomai-bone20-dtbs.tar.gz uInitrd-3.7.10-x12 armhf-rootfs-debian-wheezy.tar uInitrd-3.8.13xenomai-bone20 hwpack user_password.list initrd.img-3.2.42-psp27 vmlinuz-3.2.42-psp27 initrd.img-3.7.10-x12 vmlinuz-3.7.10-x12 initrd.img-3.8.13xenomai-bone20 vmlinuz-3.8.13xenomai-bone20 setup_sdcard.sh
Review the partitions CAREFULLY and if everything looks OK, let the script continue on. Once the script completes, you can power down and you should have an SD Card you can boot from that runs the MachineKit Debian install with LinuxCNC.# bash ./setup_sdcard.sh --mmc /dev/sdb --uboot bone_dtb I see... /sbin/fdisk -l: Disk /dev/mmcblk0: 1920 MB, 1920991232 bytes Disk /dev/mmcblk0boot1: 1 MB, 1048576 bytes Disk /dev/mmcblk0boot0: 1 MB, 1048576 bytes Disk /dev/sda: 4022 MB, 4022337024 bytes Disk /dev/sdb: 15.9 GB, 15931539456 bytes