xpdf Module for SCLive

July 27, 2006 Leave a comment

Introduction

This module will allow you to view pdf documents. It’s a very light module (In the spirit of SCLive) and therefore you should not expect something in par with Adobe’s pdf reader. Still it’s good enough for generic usage.

Details

The module once installed will copy its executable inside the /usr/bin directory.

To invoke xpdf, simply type: xpdf <filename> as a command inside a terminal window.

You can also configure firefox to automatically open pdf documents by associating pdf documents with the executable located at /usr/bin/xpdf .

Downloading

The module can be downloaded HERE.

Installing

The easiest way to install the module is to download it from within SCLive then type:

uselivemod ~/Desktop/<modulename>

Note: As I am sure you realize ~/Desktop is the default location for the downloaded files from firefox.

Alternatively you can add the module inside the /modules directory of your SCLive ISO file and burn a new ISO file.

Et voila!

David Cabanis.

Midnight Commander’s Editor

July 26, 2006 2 comments

For those of you who are vim, emacs et alias aficionados you may have noticed that those tools are missing from the SCLive distribution. As you know I have tried to keep this distribution lean and focused on SystemC as a result I had to make some compromise regarding the selection of tools available on this distribution. In exchange though the SCLive is small enough to be burnt on a USB stick or a mini CD as well as being run inside a virtual environment such as QEMU or VMware player.

Rejoice! Although the SCLive does not have vi, vim or emacs it has a perfectly good alternative called Midnight Commander.

Midnight Commander has a large following in the Linux / UNIX world as it is a very light but fully featured file management tool that has an equally powerful file editor inside it.

To invoke Midnight Commander, type: mc

The editor part of Midnight Commander runs as a text based interface, very much like vi or nano and is very easy to utilize. It features:

Block copy, move, delete, cut, paste; key for key undo; pull-down menus; file insertion; macro definition; regular expression search and replace (and our own scanf-printf search and replace); shift-arrow MSW-MAC text highlighting (for the linux console only); insert-overwrite toggle; word-wrap; a variety of tabbing options; syntax highlighting for various file types such as C++.

To invoke the Midnight Commander’s editor, type: mcedit

Alternatively if you are already inside a Midnight Commander window you can select the file you want to edit and then press F4.

Using the editor is very intuitive and you can even configure it to work like emacs. One little tip though; In addition to the functions that can be access directly via the Function keys, don’t forget to press F9 to have access to the top menu bar from which you can do a myriad of operations.

That’s it, give it a go you will see how suprisingly easy it is to use. You can use the command:

mcedit sc_main.cpp

mcedit
David Cabanis

Categories: Tips and Tricks

Customizing SCLive using Linux command lines

July 24, 2006 Leave a comment

The SystemC liveCD is based on the Linux operating system. As a result the provided ISO file can easily customized with just a few command lines. This how-to will detail the steps required to mount the SCLive ISO file, modify it to fit your own requirements and eventually, recreate a new ISO file containing your alterations.

  • The first step is to mount the original SCLive-x.x.iso file this can be achieved with the command:

sudo mount -o loop -t iso9660 SCLive-1.0.iso /mnt/loop

  • The next step will be to create a temporary directory and copy the content of /mnt/loop inside it:

mkdir ~/mySCLive

  • We can now move to the temporary directory and copy the content of the ISO in there:

cd ~/mySCLive

sudo mkdir /mnt/loop

sudo cp -r /mnt/loop .

  • We now need to change the permissions to ‘write’:

sudo chmod -R +w *

  • You can now add or remove modules form the temporary directory. Typically you will navigate to the modules directory and add or remove .mo files from here.

cd ~/mySCLive/loop/modules

sudo rm Geany_0_7_1.mo

sudo cp ~/SciTE_1_66.mo .

  • In this example we are replacing the geany IDE with SciTE. These modules can be found at http://www.slax.org/modules.php
  • Once your alterations are done we will need to recreate the ISO file with the following commands:

cd ~/mySCLive/loop
sudo cp -f boot/isolinux.bi_ boot/isolinux.bin

sudo mkisofs -o mySCLive.iso -v -J -R -D -A "mySCLive" -V "mySCLive" \
-no-emul-boot -boot-info-table -boot-load-size 4 \
-b boot/isolinux.bin -c boot/isolinux.boot .

Et Voila. You should now be able the burn the newly created ISO file with your favorite CD burning software or by following one the the how-tos on burning ISO files.

Just a last recommendation, use a CD-RW or even better a virtual environment (See the Virtual Machines how-to) when creating your own ISO image since it usually takes a few iterations before you get it just right.

David Cabanis

SystemC on a USB Stick

July 21, 2006 Leave a comment

The SCLive Linux distribution is kept purposely to a size <200 MB so that it can easily be used on a USB memory stick. This how-to will detail the steps required to put this distribution onto a USB memory stick.

Now, the first thing you need to have is a copy of MySLAX Creator installed ( available HERE ). When MSC comes up, you’ll see a bunch of scrolling text. You can read it or not as you choose, but when you’re ready to start, press the “Next>” button.

Here you’ll be presented with some options. I’m working with the SCLive ISO, so I choose the radio button beside ISO-Default. Choose where the ISO file is on your hard drive, and press “Mount.” When it’s mounted, you will see several new buttons appear.

Pressing “USB Stick” will net you the “Create a bootable USB Slax stick” screen. Now, select the USB drive you want to use (providing you already have connected your stick).

Note: Some USB stick are not bootable. If you don’t see your stick in the list then it means just that !

Assuming you have selected your stick, you can now press “Create USB Stick”. This process should take just a few minutes; After completion you can press the “Next>” button if you want to try your new creation straight away!

Et Voila, you now have a bootable stick with a fully blown Linux OS and your favorite SystemC development environment.

David Cabanis

Categories: Burning ISO Files, How-tos

Using cdrecord

July 19, 2006 Leave a comment

This how-to describes the steps required for burning an ISO file using linux command lines.

The easiest way to burn an ISO file onto a CD is to use cdrecord. These operation will have to be done with root privileges (use sudo if needs be).

First find the address of the CD writer:

cdrecord -scanbus

This will show the devices connected to your syste. The SCSI address of each device is the three numbers in the left most column, say 0,3,0 . Now you can burn the CD with:

cdrecord dev=0,3,0 -v SCLive-1.0.iso

Voila!

David Cabanis

Categories: Burning ISO Files, How-tos

Using K3b for Customizing SCLive

July 17, 2006 1 comment

This HowTo details the steps to add modules to a SCLive ISO, under its /modules directory.

Note: The original how-to was written by jayseye.

From the main K3b window, pull down the Tools menu, choose Burn CD Image, and navigate to your downloaded SCLive .iso file, by clicking on the blue folder icon, under and to the right of Image to Burn. It may take a minute for the checksum to be confirmed.

Below that, on the Options tab, select the “Verify written data” checkbox to have K3b re-read the CD after it is written.

Then, on the Advanced tab, enable the “Start multisession CD” checkbox. This step is essential to allow re-burning the CD.

Insert a blank CD-R, then click on the Start button in the upper right corner, to begin burning. After the CD is written, K3b will briefly eject it, and then automatically load it again, to begin verification.

When that’s complete, K3b will eject the CD again. If all went well, “Success.” will be reported, to the left of the red KIIIB icon, and you can Close the dialog.

Wait, there’s more! To add modules, re-insert the CD, and choose New Data CD Project, either from the icon in the bottom half of K3b’s main screen, or from its File menu. Then select Import Session… under the Project menu.

At that point the CD’s filesystem is effectively open for adding files via drag-and-drop. It’s also possible to modify and even remove files.

Once you add the desired modules files, Burn the changes to the CD.

Voila !

David Cabanis

Using MySLAX Creator

July 17, 2006 12 comments

As you may know, SCLive was created from the brilliant SLAX distribution. As such we can use all the tools meant for SLAX with the SCLive distribution. In this article I will illustrate how to use the MySLAX utility to build your very own version of SCLive.

Note: The original author of this How-to is JKWood.

There are a few things you should know when starting out with MySLAX Creator. First, the operating system files for Slax are contained within files known as modules (*.mo.) These are actually files that contain a whole partition image of the SquashFS compressed filesystem type. It’s comparable to .iso files, which are uncompressed files containing a CDFS filesystem (Compact Disc File System.) As far as I know, there is no way to read from the SquashFS from Windows, although I’m sure it would be easy enough. What I do know is that you can write to SquashFS files by using a program called MySLAX Modulator (henceforth referred to as MSM), which comes with MySLAX Creator (henceforth referred to as MSC).

The nice thing about using MSC is that you don’t have to know how to build your own modules in Windows OR in Slax, as long as you have what you need already available in module form. This is where MSC comes in.

For the purposes of this how-to, we will create a Slax livecd containing the editor Vim. The aim here is to demonstrate the flexibility of MSC, so I’m going to add a module freely available from this website to show how easy it is to add to SCLive. As far as creating new modules from source, pre-rolled software, or packages in other formats such as .tgz or .rpm, that’s beyond the scope of this tutorial.

Now, the first thing you need to have is a copy of MySLAX Creator installed. When MSC comes up, you’ll see a bunch of scrolling text. You can read it or not as you choose, but when you’re ready to start mastering your cd, press the “Next>” button.

Here you’ll be presented with some options. I’m working with the SCLive ISO, so I choose the radio button beside ISO-Default. You can use a preburned cd, but it will be a little slower. In any case, choose where the ISO file is on your hard drive, and press “Mount.” When it’s mounted, you will see several new buttons appear, which we won’t concern ourselves with at this point. At a later point, you can mount your remastered version and choose to burn onto a USB stick.

Pressing “Next>” will net you the “Adding Modules” screen. Now, I save all my modules to the same place as my ISOs, so that I have a list of all my modules that can be installed already at my disposal in the center window. If you don’t see any modules, use the file browser to find where you’ve put your modules.

At this point, we have some choices. Since all we’re doing is adding the vim module, I’ll click that one and then click “Add =>.” In the tab marked “/modules,” my vim module appears. We’re done adding modules, so click “Next>.”

Here, we find the “Remove Modules” screen. You can use this scree to remove existing modules from the SCLive ISO file. For this how-to we will leave the ISO as is. Now, click “Next>.”

Here, we find the “Boot Options” screen. I’ve been running Slax for a while now, and I know some of the cheat codes I use frequently. If you know that you’ll be working with AT LEAST 256 MB of RAM when you use this particular remaster, then I recommend checking “copy2ram.” If you’re not sure about any of these cheatcodes, then don’t select anything; if you need them later, you can always type them in at boot time, and if you want to remaster your remaster later, then you’re free to.

Another click of the “Next>” button brings us to the last screen I generally use, the “Create MySLAX ISO” screen. If you’re satisfied with you configuration so far, you can click “Create ISO.”, and then we wait for the ISO to be created. You’ll see a progress bar and a size estimate of the finished project, and then a dialog informing you that your ISO was successfully created. Click “OK.”

At this point, you have a couple of choices. You can burn the ISO file if want to, but I definitely recommend using rewritable CDs, especially while developing on your customized remaster. I personally quit out of the program and use a program like Nero to write the ISO. Use your favorite burning application, and you’ll have something that you can play with.

Another option is to bypass the CD-burning entirely and put your copy of SCLive on a USB stick. I’ve had good success with this, and it’s very simple. The program will prompt you for your USB stick, at which point the Windows format utility will ask to format it. Unless you have access to the world’s first 8 GB USB stick, the shortcomings of the FAT32 filesystem will not affect us, so let it format. After this, MSC will install SCLive on the stick, and you will have a bootable form of SCLive which will let you save files on it, although you have to specify for it to write to sda_removable (once again, beyond the scope of this tutorial.)

Voila !

David Cabanis

Using MagicISO

May 18, 2006 Leave a comment

This article describes how to use MagicISO to create your own version of the SystemC Live Distribution by adding and removing modules from the ISO source file.

MagicISO has ability to create ISO image file. You can directly add/delete/rename files or folder in CD image file(s) with MagicISO.

The following step will describe the procedure for modifying the provided ISO file and recreate a new one.

  1. Download MagicISO from here .
  2. Install the application as instructed.
  3. Run MagicISO and go to the menu File->Open
  4. Navigate the the location of your SCLive-x.x.iso file and load it in.
  5. In the displayed ISO directory structure, you should see a directory called “modules”.
  6. Open the directory called “modules” and add or remove .mo (module) files from there.
  7. Once done go to File->Save to save the new image.
  8. Finaly you can write burn your new ISO file on a CD by following the instructions detailed in How-to Burning ISO Files.

Note: To create your own module files (.mo), take a look at the how-to “Customizing SCLive”.

SCLive Inside QEMU

May 7, 2006 Leave a comment

This document describes the steps required in order to run the SystemC Live distribution from within the QEMU virtual environment.

QEMU is a FAST! processor emulator using dynamic translation to achieve good emulation speed. Using this program you can run your SystemC Live distribution from within windows XP.

To run QEMU you will have to follow those detailed steps:

  1. Download QEMU from here .
  2. Install QEMU by following the program's instructions.
  3. Copy the SystemC Live image ( SCLive-X.X.iso ) inside the QEMU's install directory (e.g. C:\Program Files\Qemu ).
  4. Execute the batch file called QEMUMenu.bat.
  5. Press M to setup the memory requirements and enter the value 256.
  6. Press I to indicate the name of the ISO file you want to load in then drag and drop the SystemC Live image ( SCLive-X.X.iso ) inside the command window.
  7. To the question "boot from this file ?" answer Y.
  8. Press C to create a QEMU image.
  9. Enter a chosen name for your QEMU image file ( e.g. SCLive-1.0 ).
  10. Enter a size of 500.
  11. Enter 2 for the image type (QEMU type).
  12. Press 1 to boot your newly created QEMU image.

Et voila !

That should start your SystemC Live distribution inside a new window. press the keys Ctrl+Alt to come out of the window's capture.

 David Cabanis.

Categories: How-tos, Virtual Machines

SCLive Inside VMWare

May 7, 2006 Leave a comment

This document details the steps required in order to run the SCLive distribution inside a VMWare virtual machine.

The VMWare player is a free application from the VMWAre people that allows you to run Operating Systems from within a host OS. For the purpose of SCLive we will cover how to run the distribution from within Windows XP.

  1. Get a copy of VMWare player from here .
  2. Install the player
  3. Create a directory in which you will put a copy of the SCLive ISO file.
  4. Inside the same directory create a file that you may want to call something like: SCLive.vmx
  5. Copy the code bellow inside the file SCLive.vmx .
  6. Change the name of the ISO file (sclive-1.0.iso) to match the name of the version of the SCLive ISO file you have copied inside the current directory (Step 3).
  7. Save and exit.

## cut start ##
config.version = "8"
virtualHW.version = "4"
scsi0.present = "FALSE"
memsize = "256"
ide1:0.present = "TRUE"
ide1:0.fileName = "sclive-1.0.iso"
ide1:0.deviceType = "cdrom-image"
floppy0.present = "FALSE"
ethernet0.present = "TRUE"
usb.present = "TRUE"
sound.present = "TRUE"
sound.virtualDev = "es1371"
displayName = "SCLive"
guestOS = "other26xlinux"
nvram = "other26xlinux.nvram"
ethernet0.addressType = "generated"

ethernet0.generatedAddress = "00:0c:29:b6:13:a0"
uuid.location = "56 4d 4f 8c 6d 38 d0 48-61 e9 a4 65 7f b6 13 a0"
uuid.bios = "56 4d 4f 8c 6d 38 d0 48-61 e9 a4 65 7f b6 13 a0"
tools.remindInstall = "TRUE"
ethernet0.generatedAddressOffset = "0"

usb.autoConnect.device0 = ""
checkpoint.vmState = "sclive.vmss"

usb.autoConnect.device1 = ""

ethernet0.connectionType = "bridged"

## cut end ##

Now that is left for you to do is to double-click on the SCLive.vmx file you have just created to start the VMWare player.

David Cabanis.

Categories: How-tos, Virtual Machines
Design a site like this with WordPress.com
Get started