Xathrya Sabertooth |
- Linux Boot Process – BIOS
- Linux Kernel Configuration
- Installing RetroPie on Raspberry Pi
- Installing Pidora on Raspberry Pi
- Raspberry Pi GPIO Reference
- Installing OpenELEC on Raspberry Pi
- Formatting QEMU Disk Image with Specific Filesystem
Posted: 25 Aug 2013 10:19 AM PDT In order for a computer to successfully boot into device we know, a computer should pass some process which we refer as boot process. The BIOS, operating system, and harware components must all be working properly. Failure of any of these three elemens will likely result in a failed boot sequence. BIOS is a abbreviation of Basic Input Output. It is a firmware, software written into special chip on motherboard. Whenever a machine is powered on , the 1st program to run is BIOS. Primary jobs of BIOS are:
The BIOS job has finished and the control goes to whatever code written on the disk boot sector. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Posted: 25 Aug 2013 10:07 AM PDT Having Linux kernel source code allow us to open possibility to customize / configure the kernel as you wish. Main kernel image is built as a static image, and some part of linux kernel image is also built as loadable modules (device driver). The image is always resident in memory while some services are added to the kernel at runtime in the form of modules. Complete kernel image constitute static kernel image plus run-time loadable modules. Linux kernel configuration allows you to decide , which feature you want to include in linux kernel image , which feature you do not want to include or which service you want to make as a loadable kernel module etc. This article will try to cover all important ones for configuring Linux kernel. Text Based Configuration1. Interactive ConfigurationKernel has provide an interactive text based kernel configuration utility using Makefile. If you use ‘make config’, it will configure itself. In fact, it is useful for quite experienced kernel developers and not for the beginners. The result of this command is shown below: # make config scripts/kconfig/conf arch/x86/Kconfig * * Linux Kernel Configuration * * * General setup * Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [N/y/?] y Local version – append to kernel release (LOCALVERSION) [] y Automatically append version information to the version string (LOCALVERSION_AUTO) [N/y/?] y Kernel compression mode > 1. Gzip (KERNEL_GZIP) 2. Bzip2 (KERNEL_BZIP2) 3. LZMA (KERNEL_LZMA) 4. LZO (KERNEL_LZO) choice[1-4?]: 1 Support for paging of anonymous memory (swap) (SWAP) [N/y/?] y System V IPC (SYSVIPC) [N/y/?] y BSD Process Accounting (BSD_PROCESS_ACCT) [N/y/?] y BSD Process Accounting version 3 file format (BSD_PROCESS_ACCT_V3) [N/y/?] (NEW) y * * RCU Subsystem * RCU Implementation > 1. Tree-based hierarchical RCU (TREE_RCU) 2. UP-only small-memory-footprint RCU (TINY_RCU) choice[1-2]: 1 Enable tracing for RCU (RCU_TRACE) [N/y/?] y Tree-based hierarchical RCU fanout value (RCU_FANOUT) [32] This command starts an interactive kernel configuration script. Once invoked, it will continuously prompts for user input at every step . User can enter any one of the four options:
Script prompts for each and every option and expects the input for each of the options. There are so many options available so it is very tedious and time consuming way. Now you can guess the reason why it not a preferred way to configure linux kernel. 2. Predefined Configuration TargetTell the Makefile to use predefined configuration target. There are some predefined configuration, which are: defconfig, oldconfig, randconfig, allmodconfig, allyesconfig, allnoconfig. 2.1 defconfigUse default configuration to configure kernel. make defconfig It’s easy and you would not expecting much other than default parts. This utility generates default configuration for linux kernel. This default configuration is based on the configuration options preferred and used by linux kernel maintainers on their own machines. Once the task done, you can view and modify the configuration as you wish. 2.2 oldconfigTechnically speaking, it updates the current kernel configuration by using the current .config file and prompting for any new options that have been added to the kernel. make oldconfig If you think your old configuration is fit to your condition, you can always use this. Like defconfig, you can view and modify the configuration once the configuration finished. There is also a variant to this, silentoldconfig, which prints nothing to screen except a question. 2.3 randconfigGenerates a new kernel configuration with random answers to all of the different option. make randconfig 2.4 allmodconfigGenerates a new kernel configuration in which modules are enabled whenever possible. make allmodconfig 2.6 allyesconfigGenerates a new kernel configuration with all options set to yes. make allyesconfig 2.7 allnoconfigenerates a new kernel configuration with all options set to no. make allnoconfig Console Based ConfigurationThe very popular way of configuring kernel. Still using command line interface, but it’s at least graphically on terminal (using ncurses). make menuconfig It will opens a graphical console in which all kernel configuration options are arranged into categories. These categories are further categorized into subcategories. Just browse through and keep on selecting options until you reach the specific configuration option you need to modify. This method is easier than the methods we have covered so far. If you think you have it enough, you can select < Exit > to exit the configuration. You can also exit without doing any modification. A configuration, .config file, will be created / updated. GUI Based Configuration1. X11 Based ConfigurationUsing help of X window system. make xconfig Make xconfig is X11-based graphical configuration utility. It arranges all the configuration options into left and right pane. You can easily browse through and select different options easily. 2. GTK Based ConfigurationUsing GTK+ based system. Make sure you have GTK libraries installed. make gconfig OtherOther method to configure kernel. It doesn’t use Makefile like other methods we have discussed, but instead we directly modify the configuration file. Configuration is saved as a file “.config” without quote. The configuration file is located in the root of the kernel source tree. It consists of some lines, usually in the format VARIABLE=value The variable are the kernel options where the value can be y, n and other value defined for that options. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Installing RetroPie on Raspberry Pi Posted: 25 Aug 2013 08:33 AM PDT Raspberry Pi, a small computer powered by ARM architecture is a very interesting board for learning embedded system. From Media center into a simple server, Raspberry Pi has opened wide possibility to be explored. Who knows, Pi now can also be used as “Game Console“? What we talk here is Raspberry Pi now can be used as a Game Emulator to play many game console platform. For this article I use following:
You can use either Linux (in this article, Slackware) or Windows (in this article Windows 8). Just pick one and follow the rest of article for your choice. Obtain the MaterialsThe Operating System images I used is RetroPie, which can be downloaded from RetroPie site. This is huge image, around 1.3GB for it. When extracted, it occupy around 2GB storage space. The RetroPie software is basically EmulationStation and a stripped down version of Raspbian. Prepare the Disk (SD Card)To boot the Raspberry Pi, an installation media and storage media is needed. All we need is a single SD card. The bigger space, the better. You need space for OS and additional space to hold your ROMS. On this article I use my 8GB SD card. You can use any SD card you want, but I recommend to use at least 4GB SD card. The image we download on previous section will be stored on this card and later installed. Make sure you have a way to write on SD card. Windows-based InstructionFor Windows user, you can follow this section to “burn” the image. For this purpose you need additional software for writing to SD card, such as Win32DiskImager utility.
Beside Win32DiskImager, you can also use other tool such as Flashnul.
At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage. Linux-based InstructionWriting image on Linux is easier, in my opinion. The utility we use is “dd” which is already bundled on most distro. Make sure you know the correct device file for your SD card. In my machine I use a built in card reader and detect my SD card as /dev/sdb. It might be different on your system so better check it. For this article I use /dev/sdb to refer to SD card.
If you hesitate to use terminal and prefer to use GUI method, here is the tutorial. Note that we
At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage. Booting Up and ConfiguringRetroPie differs from other distribution I have written so far. The connection for audio and video are same to other, the difference comes to the configuration it has. You will be asked to configure your controller. This isn’t the calibration that is needed to control the various games that you will be playing, this is to configure your retro controller, joystick or even keyboard to navigate the EmulationStation software. Once you are done, tap the button or key you set as Menu, and select Exit. This will quit out of EmulationStation and go back to the command line. From there, it’s like other OSes, you should enter GUI manually using startx The GUI will be launched, enabling us to make necessary changes to controller configuration. In the file manager, open RetroPie\Configs\all and runretroarch.cfg in the text editor. Things might different for each controller available in the market, adjust with your needs. Running the PiTo resize the SD card after installation, you can follow this article. To log in on your Raspberry pi you can use the default login, which is:
Have fun | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Installing Pidora on Raspberry Pi Posted: 25 Aug 2013 05:08 AM PDT Raspberry Pi, a small computer powered by ARM architecture is a very interesting board for learning embedded system. In this article we will discuss about how to install how to install Pidora on Raspberry Pi. For this article I use following:
You can use either Linux (in this article, Slackware) or Windows (in this article Windows 8). Just pick one and follow the rest of article for your choice. Obtain the MaterialsThe Operating System images I used is Pidora which use hard-float system ABI provided by Raspberry Pi on their download page. The version I use is latest version at time of writing this article (per August 24th, 2013) and only use hard-float ABI. You can either direct download on this link, or download by torrent by this link. Prepare the Disk (SD Card)To boot the Raspberry Pi, an installation media and storage media is needed. All we need is a single SD card. On this article I use my 8GB SD card. You can use any SD card you want, but I recommend to use at least 4GB SD card. The image we download on previous section will be stored on this card and later installed. Make sure you have a way to write on SD card. Windows-based InstructionFor Windows user, you can follow this section to “burn” the image. For this purpose you need additional software for writing to SD card, such as Win32DiskImager utility.
Beside Win32DiskImager, you can also use other tool such as Flashnul.
At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage. Linux-based InstructionWriting image on Linux is easier, in my opinion. The utility we use is “dd” which is already bundled on most distro. Make sure you know the correct device file for your SD card. In my machine I use a built in card reader and detect my SD card as /dev/sdb. It might be different on your system so better check it. For this article I use /dev/sdb to refer to SD card.
If you hesitate to use terminal and prefer to use GUI method, here is the tutorial. Note that we
At this point, you have successfully written image to your SD card. And I assume you are. You can proceed to next stage. Running the PiYou have write image and at this point your raspberry pi is ready. Now set up raspberry pi to boot: insert your SD card back to raspberry pi, put on power, plug video output (either HDMI or RCA). To resize the SD card after installation, you can follow this article. To log in on your Raspberry pi you can use the default login, which is:
Have fun | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Posted: 25 Aug 2013 05:03 AM PDT This is reference to Raspberry Pi GPIO. GPIO or General Purpose Input/Output is a generic pin on a chip whose behavior (including whether it is an input or output pin) can be controlled (programmed) through software. One pin can be act as either Input or Output but can’t be both at a time, means it cannot send and receive data at same time. GPIO pins have no special purpose defined, and go unused by default. The Raspberry Pi allows peripherals and expansion boards (such as Rpi Gertboard) to access the CPU by exposing the inputs and outputs. Quick CheatsheetOnly covers P1 Header HardwareP1 HeaderRaspberry Pi (both model A and B) has 26 pin 2.54mm (100 mil) expansion header, marked as P1, arranged in a 2×13 strip. They provide 8 GPIO pins plus access to I²C, SPI, UART, as well as +3.3 V, +5 V and GND supply lines. Pin one is the pin in the first column and on the bottom row. The GPIO pin-header layout, seen from top. Three pins changed between PCB rev.1 and rev.2. GPIO voltage levels are 3.3 V and are not 5V tolerant. There is no over voltage protection on the board. Thus, you should use an external board with buffers, level conversion, and analog I/O rather than soldering directly onto the main board. All the GPIO pins can be reconfigured to provide alternate functions, SPI, PWM, I²C, and so. At reset only pins GPIO 14 & 15 are assigned to the alternate function UART, those two can be switched back to GPIO to provide a total of 17 GPIO pins. Each GPIO can interrup, high/low/rise/fall/change. There is currently no support for GPIO interrupts in the official kernel. However there is a patch, requiring compilation of modified source tree. GPIO input hysteresis (Schmitt trigger) can be on or off, output slew rate can be fast or limited, and source and sink current is configurable from 2mA up to 16mA. The chipset GPIO pins 0-27 are in the same block and these properties are set per block, not per pin. R-Pi PCB Revision 2 UPDATE: The R-Pi Rev.2 board being rolled out starting in September 2012 adds 4 more GPIO on a new connector called P5, and changes some of the existing P1 GPIO pinouts. On Rev2, GPIO_GEN2 [BCM2835/GPIO27] is routed to P1 pin 13, and changes what was SCL0/SDA0 to SCL1/SDA1: SCL1 [BCM2835/GPIO3] is routed to P1 pin 5, SDA1 [BCM2835/GPIO2] is routed to P1 pin 3. Also the power and ground connections previously marked “Do Not Connect” on P1 will remain as connected, specifically: P1-04:+5V0, P1-09:GND, P1-14:GND, P1-17:+3V3, P1-20:GND, P1-25:GND. P1 Header Pin, top row:
P1 header Pin, bottom row:
Legend:
Pin 3 (SDA0) and Pin 5 (SCL0) are preset to be used as an I²C interface. So there are 1.8 kilohm pulls up resistors on the board for these pins. Pin 12 supports PWM . It is also possible to reconfigure GPIO connector pins P1-7, 15, 16, 18, 22 (chipset GPIOs 4 and 22 to 25) to provide an ARM JTAG interface. However ARM_TMS isn’t available on the GPIO connector (chipset pin 12 or 27 is needed). Chipset pin 27 is available on S5, the CSI camera interface however. It is also possible to reconfigure GPIO connector pins P1-12 and 13 (chipset GPIO 18 and 21) to provide an I2S (a hardware modification may be required) or PCM interface. However, PCM_FS and PCM_DIN (chipset pins 19 and 20) are needed for I2S or PCM. A second I²C interface (GPIO02_ALT0 is SDA1 and GPIO03_ALT0 is SCL1) and two further GPIOs (GPIO05_ALT0 is GPCLK1, and GPIO27) are available on S5, the CSI camera interface. Power pinsThe maximum permitted current draw from the 3.3V pins is 50mA. Maximum permitted current draw from the 5V pin is the USB Input current (usually 1A) minus any current draw from the rest of the board.
Be very careful with the 5 V pins P1-02 and P1-04. If you short 5 V to any other P1 pin you may permanently damage your RasPi. Before probing P1, it’s a good idea to strip short pieces of insulation off a wire and push them over the 5 V pins so you don’t accidentally short them with a probe. GPIO Hardware HackingThe complete list of chipset GPIO pins are available on the GPIO connector is: 0, 1, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 21, 22, 23, 24, 25 (On the Revision2.0 Raspberry Pis, this list changes to 2, 3, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 22, 23, 24, 25, 27, with 28, 29, 30, 31 additionally available on the P5 header). P1-03 and P1-05 (SDA0 and SCL0 / SDA1 and SCL1) have 1.8 kiloohm pull-up resistors to 3.3V. If 17 GPIOs aren’t sufficient for your project, there are a few other signals potentially available, with varying levels of software and hardware (soldering iron) hackery skills: GPIO02, 03, 05 and 27 are available on S5 (the CSI interface) when a camera peripheral is not connected to that socket, and are configured by default to provide the functions SDA1, SCL1, CAM_CLK and CAM_GPIO respectively. SDA1 and SCL1 have 1K6 pull-up resistors to 3.3 V. GPIO06 is LAN_RUN and is available on pad 12 of the footprint for IC3 on the Model A. On Model B, it is in use for the Ethernet function. There are a few other chipset GPIO pins accessible on the PCB but are in use:
Raspberry Pi BCM2835 DatasheetBased on BCM2835 datasheet, including any relevant errata, with a couple of extra columns. Any GPIOs that aren’t connected on the RaspberryPi Model B revision 1.0 circuit board are GPIO Pins Alternative Function Assignment
As in the table above, the GPIOs available on the GPIO Connector (P1) are in bold, with their default function (according to the schematics) in bold italics. Special function legend:
P2 HeaderP2 header is the VideoCore JTAG and use only during the production of the board. It cannot be used as the ARM JTAG. This connector is unpopulated in Rev 2.0 boards. Usefule P2 pins:
P3 HeaderP3 header, inpopulated, is the LAN9512 JTAG. This header is located directly next to P2 header. Usefule P3 pins:
P5 HeaderAdded with the release of the Revision 2.0 PCB design. This pins located directly next to P1 header. (Seen from the back of the board). P5 header pin out, top row:
P5 header pin out, bottom row:
Note that the connector is intended to be mounted on the bottom of the PCB, so that for those who put the connector on the top side, the pin numbers are swapped. Pin 1 and pin 2 are swapped, etc. P6 HeaderP6 header was added with the release of the Revision 2.0 PCB design. This header is located next to HDMI output. P6 pinout:
A reset button can be attached to the P6 header, with which the Pi can be reset. Momentarily shorting the two pins of P6 together will cause a soft reset of the CPU (which can also ‘wake’ the Pi from halt/shutdown state). Internal Pull-Ups and Pull-DownsThe GPIO ports include the ability to enable and disable internal pull-up or pull-down resistors (see below for code examples/support of this). Pull-up is Min. 50K Ohm, Max 65 KOhm. Pull-down is Min. 50K Ohm, Max 60 KOhm. SoftwareThe foundation (Raspberry Pi Foundation) will not include a GPIO driver in the initial release. However the standard Linux GPIO drivers should work with minimal modification. The community implemented SPI and I²C drivers, which will be integrated with the new Linux pinctrl. Further reference | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Installing OpenELEC on Raspberry Pi Posted: 25 Aug 2013 04:43 AM PDT Raspberry Pi, a small computer powered by ARM architecture is a very interesting board for learning embedded system. In this article we will discuss about how to install how to install OpenELEC on Raspberry Pi. For this article I use following:
You can use either Linux (in this article, Slackware) or Windows (in this article Windows 8). Just pick one and follow the rest of article for your choice. The installation process will be divide the content into three section according to the host platform:
What is OpenELEC?OpenELEC is an embedded operating system built around XBMC, the open source entertainment media hub. Home Theatre PCs are known to be hard to install and configure and can take a massive amount of time to keep running. OpenELEC, on the other hand, is designed to be as lightweight as possible in terms of size and complexity meaning your HTPC becomes no harder to configure than satellite box or DVD player. With it’s small footprint, OpenELEC is also ideal for small systems based on Atom or Fusion platforms so we won’t need a whole computer in your living room! OpenELEC is designed to be lightweight. It support many system such as NVIDIA’s ION platform, AMD’s Fusion platform, and Broadcom’s Crystal HD chip. OpenELEC can support high definition content on machines with low-powered processors by offloading video content to supported graphics cards and decoders. This means we can build (or buy) small, silent machines to be effectively used as a media center. Obtain the MaterialsThe Operating System images I used is latest version of OpenELEC. The version I use is latest version, at time of writing this article (per August 25th, 2013), and can be download from their official site here. Verify your package, you should have a tarball package (file that ends in .tar.bz2) with correct checksum. Exploring the PackageExtract the content and you will have a folder with some content on it. For the latest package we download (version 3.1.6) there will be three directory four plaintext, one shell script file, and one image file. The three directories are:
The shell script (name: create_sdcard) is used to create SD Card. If you read the script, you will see that the script will create two partition. One partition is using FAT32 and the other uses ext2. The FAT32 partition (first partition) is set to 16 cylinders or approximately 130MB. This is interesting information. Prepare the Disk (SD Card)To boot the Raspberry Pi, an installation media and storage media is needed. All we need is a single SD card. On this article I use my 8GB SD card. You can use any SD card you want, but I recommend to use at least 4GB SD card. The image we download on previous section will be stored on this card and later installed. Make sure you have a way to write on SD card. Installation(1) Automated Installation on LinuxInsert SD Card your Linux system. Look for what device it is recognized as. It can be /dev/sdX, /dev/mmcblk0, etc. Invoke following command with root privilege: ./create_sdcard /dev/sdX # /dev/sdX is your device It is very important to make sure you have the right device as it will be wiped as part of the process. (2) Installation on WindowsThere is no batch script or vbscript (or similar to that) for Windows so we should do manually. Formatting the SD CardOpenELEC needs properly formatted SD Card. It requires two partition with one of theme is formatted with an ext4 filesystem. A third party such as the MiniTool® Partition Wizard can be used for this purpose. The Home Edition is free for home use only. After inserting the SD card and starting Partition Wizard, you will get something like this: Delete all existing partition and create two partitions. Both are primary partition. The first partition is parted as FAT32 with capacity of 130MB. Give the rest SD Card storage to EXT2 (or other EXT) partition. Name the first as Boot and the later as System. Last but important part, create bootloader configuration. Create a file ‘cmdline.txt’ on the SD card with following content: boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 quiet Copying OpenELEC to SD Card.Now mount the first partition (the FAT32 one) to your Windows. Copy the target/KERNEL as kernel.img to partition. Also copy the target/SYSTEM. Next, copy the content of 3rdparty\bootloader folder also to that partition. Also copy openelec.ico and README.md. At this point you should have following items on your partition:
Running the PiYou have write image and at this point your raspberry pi is ready. Now set up raspberry pi to boot: insert your SD card back to raspberry pi, put on power, plug video output (either HDMI or RCA). To resize the SD card after installation, you can follow this article. Finally, you can login to Raspberry Pi using
If you do not have a USP Input device, you can enable XBMC wifi remote access (via Android/iOS etc) by editing config files directly. Happy hacking | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Formatting QEMU Disk Image with Specific Filesystem Posted: 25 Aug 2013 03:19 AM PDT Testing and debugging an operating system require an environment. Many people prefer to use emulator and virtualization software like QEMU, VMware, or VirtualBox for this job. If you have read my previous article about mounting QEMU Hard Disk Image, you should note that the partition should already have been formatted with a specific filesystem. This is bad if we just create a fresh QEMU disk image. This article will discuss about how to format the partition inside QEMU disk image. The assumption made here is the disk image is fresh and no more operation than partitioning it. I assume you have at least one partition (such as FAT32, Linux, etc. Any!). In this article I use:
I also provide a small empty raw image for play around (see next section). Obtain the MaterialsYou can download an empty disk image here The compressed image size is 2MB and the extracted (the image itself) is 2GB. The disk image has two partition (as seen on fdisk):
There is nothing special about this image. The process I did is common and you can achieve it by yourself:
We also need a Linux ISO image. We will use Slackware mini install which can be obtained here. In the rest of this article, we will refer this as minislack.iso. ProcessWhat we will do are:
FormattingBoot the disk with QEMU and Slackware as first boot qemu-system-i386 xath-testsuite-ext3.img -cdrom minislack.iso -boot d Once booted, just press enter. Press enter again when you are asked for keyboard layout. You will be brought to a terminal. Login as root with no password. Our disk image is recognized as /dev/sda. To format a partition as FAT32 use mkfs.vfat and to format it as EXT4 use mkfs.ext4. We will try the second one and I will leave you with the first one for you to play with mkfs.ext4 /dev/sda2 FinishingNow for final touch. Still using the Slackware on QEMU, mount the /dev/sda1 and /dev/sda2. Your goal now is to remove the content. After this point, we can finally say “done!”. Congratulation! |
You are subscribed to email updates from Xathrya Sabertooth To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
Tidak ada komentar:
Posting Komentar