| Written by: | | | | you should add it manually. Detailed instructions can |
| Alexandr Dodatko, | | | | be found here: |
| Junior Software Developer of Device Team | | | | I've put the fixed version of this script into the |
| Apriorit Inc. | | | | attachments to this article. It lets user to change disk |
| Table of content | | | | for installation and also is free from the limitations for |
| Introduction | | | | the emulator. |
| 1. SDK Installation | | | | To start the fixed script you shoud get it on the |
| 2. Start to work with Linux | | | | device using the wget command. To organize file |
| 3. Program Installation | | | | exchange with the device you can install ftp server |
| 4. System foldes review | | | | on your computer or other computer in your local |
| 4.1 Standard system directories | | | | network. |
| 4.2 Specific Directories of Web OS | | | | After entering the command wget ftp://192.168.0.60 |
| 5. Work with FTP on the Palm Pre | | | | optware-bootstrap-edited.shthe file will be uploaded |
| 5.1. Data exchage procedure | | | | to the device ???? to the current directory (ip adress |
| 5.2 Work with console client ncftp | | | | should be of the computer with ftp server of cause). |
| Referrences | | | | DON'T use symbol names of the machines (for |
| Introduction | | | | example wget ftp://my_computer_name |
| Palm company released ( the new smartphone | | | | optware-bootstrap-edited.sh |
| managed by GNU Linux based operating system. This | | | | |
| product becomes more and more popular due to the | | | | ) as far as Web OS won't be able to convert them |
| cute GUI, well-documented SDK and easy start on | | | | to the address correctly. |
| the development. But nevertheless many low-level | | | | So, we have executed the script and installed a lot |
| features of this system is poorly documented. | | | | of useful programs. Now we have package manager |
| This article will be useful for those who start working | | | | and so we'll be able to install all missing programs. To |
| with the console interface of GNU Linux generally and | | | | do it, use the following command: ipkg-opt install |
| Palm Web OS in particular. It may be useful also for | | | | <parckage name>. |
| the developers who need more capabilities than Mojo | | | | For example ipkg-opt install file |
| SDK provides to solve their task. | | | | The list of the packages can be browsed by the |
| In this article we'll consider such questions: | | | | command ipkg-opt listor by following the link: |
| 1. SDK installation and configuration. | | | | Developers and enthusiasts may want to install gcc |
| 2. Accessing Linux using "novacom" utility. Basic Linux | | | | compiler, gdb debugger, make utility, python |
| commands. | | | | interpreter and other great things. The presence of |
| 3. Installation of additional utilities (sudo, package | | | | these utilities allows program installation by means of |
| manager etc.). Configuration of the virtual machine | | | | building from the source texts. |
| (virtualbox). Install\remove packages. | | | | 4. System foldes review |
| 4. Short description of the system files and | | | | Let's start from the folders that are common for all |
| directories specific for Palm Pre. | | | | Linux systems. |
| 5. Work with FTP on Palm Pre, review of some files | | | | 4.1 Standard system directories |
| content. | | | | 1. /bin, /lib, /home, |
| This article is some kind of review. | | | | These are folders for standard utilities from Linux |
| 1. SDK Installation | | | | package, shared libraries (Windows *.dll analogues) |
| I used emulator from the Palm Mojo SDK package to | | | | and user files correspondingly. |
| research the features of Web OS. | | | | 2. /mnt, /media, /lost+found |
| You can download it from the official site: | | | | The access points to the external data storages |
| Or use this link (no registration): | | | | (floppies, hard disks, optical disks) are stored in these |
| Choose the platform you need on the download | | | | directories. In the Palm memory card (micro sd) can |
| page (Fig.1) and then follow the instuctions on the | | | | be mounted to this directory. And there is nothing |
| site and in Install Wizard. It's better to install Java | | | | interesting there on the emulator. |
| first, thenVirtualBox, and thenSDK. Such order | | | | Note: The lost+found directory is specific for the |
| decrease the possibility of errors. | | | | extX (ext1, ext2, ext3, ext4) file systems. |
| | | | 3. /dev |
| Figure 1: Choosing platform | | | | Device files are stored here. |
| During the installation the virtual machine for Palm | | | | /dev/hd[a..z][1..N] – logical partitions of hard disk |
| Web OS will be created. You don't have to create it | | | | /dev/hda1 – root file directory |
| manually. | | | | /dev/hdc – bootloader |
| 2. Start to work with Linux | | | | /dev/hdb – the section we created earlier or the |
| To start work with Web OS Linux start the | | | | physical data storage of the real device – 8GB |
| emulator. You can use either the shortcut created by | | | | (~7GB user available)ttyN – console devices.null |
| installation program (fig.2) or VirtualBox | | | | – «black hole», eating all information that is |
| interface(fig.3). | | | | entered into it. |
| | | | 4.2 Specific Directories of Web OS |
| Figure 2: Start with shortcut | | | | 1. /var/luna/data/dbdata/ |
| | | | There are databases used by high-level applications |
| Figure 3: Start from Virtualbox | | | | of Web OS. |
| If verything is ok then you'll see the Emulator | | | | Bases PalmDatabase.db3 and |
| window (fig.4). We'll need the Internet connection for | | | | PalmAccountDatabase.db3 is in sqlite format. There |
| the further work. It should be configured only in the | | | | are data of such applications as mail accounts, notes, |
| host system (in our case it's Windows) . | | | | calendar, chat, memo stored in them. |
| You can check ff there is Internet on Emulator | | | | They can be browsed by any sqlite viewer (see [9]). |
| simply starting Web Browser. To do it choose | | | | I would like to advise this one |
| Programs (right bottom icon) => Web. After that | | | | We will discuss how to exchange files with Palm Pre |
| try to open some site just like on the computer. | | | | in the next section. |
| Search something for example (fig.5). | | | | 2. /var/luna/data/mediadb.db3 |
| | | | The data about the locations of images, music, |
| Figure 4: Palm Emulator | | | | movies etc. are stored here. After analysis I can say |
| | | | that these data are stored in the directories: /media |
| Figure 5: Palm Web Browser | | | | internal/, /usr/palm/ and their subdirectories. |
| Now we should use the novacom.exe utility to | | | | 3. /var/luna/data/emails |
| connect to the device. To get the full information | | | | The text of email messages is stored in this directory |
| about this program options enter novacom.exe --help | | | | in html and ascii formats. |
| The command novacom.exe -t open tty://opens the | | | | 4. /usr/share/dbus-1/system-services |
| Linux terminal window. | | | | Here you can find Java services (or, if yo like, |
| | | | deamons). Using them the application developed with |
| Figure 6: Linux Console | | | | the usage of Mojo SDK can get access to the |
| Note: like in the usual Linux, more than one terminal | | | | low-level components of the system. |
| can be opened in Web OS. | | | | 5. /usr/lib/luna/java |
| First lets browse the file system. ls command is used | | | | Here java library files (*.jar) are stored, they are |
| for this. After entering it we see the content of the | | | | used by services. |
| current directory (root by default). | | | | 5. Work with FTP on the Palm Pre |
| | | | 5.1. Data exchage procedure |
| Figure 7: Results of the ls command | | | | Well, now we know what and where is situated. But |
| To distinguish files from directories we an use option | | | | it's not very convenient to research file content |
| ls -F | | | | directly on Palm Pre. So we have a task of getting |
| | | | files from the device. |
| Figure 8: Results of the ls -F command | | | | One of the methods is FTP protocol. And so you |
| Directories now have / symbol at the end. So as you | | | | should: |
| see we have only three files in the root directory: | | | | 1. Install FTP server (for example this one ) to the |
| wget, log.txt, md5sums. | | | | one of the computers in the local network you work |
| When using ls -F some other symbols can occur at | | | | in (for example on your own one). |
| the end of the file names. | | | | 2. Install the FTP client on your computer. It can be |
| Suffics | | | | the plugin for Far Manager or Total Commander, or it |
| Meaning | | | | can be separated application – for example |
| @ | | | | FileZilla ftp client ( ). |
| Symbol link | | | | 3. Install FTP client to the Palm Pre:ipkg-opt install |
| * | | | | ncftp |
| Executable file | | | | 4. Use ncftp to transmit data to the server (it will be |
| / | | | | described later). |
| Directory | | | | 5. Get data from FTP server to your computer. |
| = | | | | 5.2 Work with console client ncftp |
| Socket | | | | To connect to the server enter ncftp <url>. |
| You can see the examples by entering commands: ls | | | | Or ncftpopen <url> |
| -F /bin ls -F /tmp | | | | Remember that <url> = ftp://<Ip Address> |
| More detailed information about the file system | | | | symbol names are not allowed |
| element type can be obtained by means of file utility. | | | | <url> = <bookmark name> |
| This utility is disabled in Palm Web OS by default. | | | | When the connection is established the current local |
| Later we'll consider how to install it. | | | | directory is «frozen». Instead of working with the |
| To browse the file content use the command cat | | | | directory all commands of navigation in the file |
| <filename>. | | | | system are translated in the commands of the FTP |
| For example, cat md5sums | | | | and processed by the server. |
| To obtain the full information about the command | | | | |
| enter <command> --help, or search the Internet | | | | Figure 9: Server navigation with ncftp |
| with keywords "man <command>". You can also | | | | Now, after you choosed the necessary remote |
| read the help in the full Linux version entering "man | | | | directory data exchange can be performed: put |
| <command>". | | | | <filename>get <filename> |
| I propose reader to learn also such commands as rm | | | | You can also use some mask instead of the |
| (remove files\directories), mkdir (make directory), | | | | argument. For example, put *.txt |
| touch(create file), cp (copy), pwd (get current path). | | | | |
| 3. Program Installation | | | | Figure 10: Transmission of the several files using the |
| The process of the program installation for Linux is a | | | | mask |
| bit different from this process in Windows. Unlike | | | | To send the directory use the command put -R |
| other systems Linux has repositories. Repository can | | | | <dir_name> |
| be considered as the database that contains | | | | |
| program, libraries, and relations between them. There | | | | Figure 11: Sending the directory with ncftp |
| is some special software that manages repositories | | | | Ncftp also supports such commands as mkdir, rm, |
| and install software on the local computer. Such | | | | rmdir, pwd. |
| software is called “package manager”. The | | | | The same commands but with l- prefix are used to |
| package manager compares software versions on | | | | navigate in the local file system: for example lmkdir, |
| the computer and in the repository, download | | | | lls, lpwd etc. |
| software, resolve conflicts between packages. More | | | | You can find the full list of the commands on the |
| information about package managers can be found in | | | | official program site: |
| the articles [4],[5],[6],[7]. | | | | Download scripts sources. |
| By default, Palm Web OS does not have a package | | | | Referrences: |
| manager. To install it use the guide | | | | |
| The script optware-bootstrap.sh performs the | | | | 1. |
| following: | | | | 2. |
| 1. Formats /dev/hdb for its needs | | | | 3. |
| 2. Installs package manager ipkg-opt | | | | 4. |
| 3. Creates the list of repositories /opt/etc/ipkg | | | | 5. |
| optware.conf | | | | 6. |
| 4. Installs the sudo program, creates the user with | | | | 7. |
| the root (administrator) rights | | | | 8. |
| 5. Installs ssh, sftp server. | | | | 9. |
| In the original script some of the mentioned actions | | | | 10. |
| cannot be performed on the emulator (for example | | | | 11. |
| (4)). It's also required to have /dev/hdb device. By | | | | 12. |
| default, there is no such device on the emulator so | | | | |