8 Replies Latest reply on Jan 21, 2014 9:37 AM by IRCAnonymous IRCAnonymous

    Linux install without access to Python

    IRCAnonymous IRCAnonymous

      I have installed the larger Linux image to my Galileo using this download :

      http://downloadmirror.intel.com/23171/eng/LINUX_IMAGE_FOR_SD_Intel_Galileo_v0.7.5.7z

      unzipping that 7z archive to my sd card, but I do not have a python interpreter in the installation

       

      The SD Card contains


      10/05/2013  12:35 PM    <DIR>          .

      10/05/2013  12:35 PM    <DIR>          ..

      10/05/2013  12:35 PM    <DIR>          boot

      09/30/2013  07:23 PM         2,113,856 bzImage

      09/30/2013  07:28 PM         1,441,609 core-image-minimal-initramfs-clanton.cpio.gz

      09/30/2013  07:25 PM       314,572,800 image-full-clanton.ext3

                     3 File(s)    318,128,265 bytes

                     3 Dir(s)  515,875,467,264 bytes free

       

      And after booting, and telneting to the system I see the following :

       

        Poky 9.0 (Yocto Project 1.4 Reference Distro) 1.4.1 clanton

       

        / # uname -a

          Linux clanton 3.8.7-yocto-standard #1 Mon Sep 16 14:59:19 IST 2013 i586 GNU/Linux

       

      When I then attempt to find python, I have no luck :

       

      / # ls /usr/bin/python

      ls: /usr/bin/python: No such file or directory

      / # python

      /bin/sh: python: not found

       

      I am clearly missing something. I'm not installing the "LITTLE" Linux installation, and I've been reading that the main linux installation for galileo contains goodies like python and node.js. Any help would be appreciated greatly.s to

        • 1. Re: Linux install without access to Python
          arduino_4_life

          yes, Python and node.js (among others packages) are on thew SD image. If you're not finding any python installation then your board isn't booting from SD. Did you do the firmware upgrade from the IDE? The board will not boot from SD if you haven't done the firmware upgrade.


          EDIT: Since you asked me to re-post the answer in this thread, I'm assuming that a firmware upgrade solved the problem?

          • 2. Re: Linux install without access to Python
            IRCAnonymous IRCAnonymous

            Yes, thanks. It was in fact the right answer.

             

            The system boots, and after logging in to ssh, note that I previously was forced to telnet, I get

            :/# python --version

            Python 2.7.3

             

            Best Regards,

            Gary

            • 3. Re: Linux install without access to Python
              IRCAnonymous IRCAnonymous

              I suppose I have a follow up question. If I was not logging in to the SD card based linux image previously, but I was logging into a linux installation, where was that image located ? Is it in flash ?

               

              How can I determine if I am logged into the sdcard based linux installation ?

              • 4. Re: Linux install without access to Python
                arduino_4_life

                the 'little' linux image is an 8MB image which is stored on the SPI flash chip. The only way I know how to check, is by trying to access the python interpreter by typing 'python' Let me ask the guy who worked on GRUB for Galileo, if there's a more deterministic way to check.

                I'll report back.

                • 5. Re: Linux install without access to Python
                  AlexT_Intel

                  In the meanwhile, a couple of places where you see the difference is /proc/cmdline, which is a kernel boot command line, which will be different for SD card and SPI images, and output of mount command - if you see /media/realroot there, you're booted off SD card or a USB thumbdrive, SPI image doesn't have this specific mount.

                   

                  Would be interesting to see if there's any other sign, let's see what arduino_4_life finds out :-)

                  1 of 1 people found this helpful
                  • 6. Re: Linux install without access to Python
                    arduino_4_life

                    Apparently 'dmesg' is enough to tell the difference. I'm at home and can't try it out on a board right now, I left my board in work today, but it has to do with the fact that; the when you're booting from the SPI flash, the root filesystem (filename is initramfs.cpio.gz or something like that) is mounted, and when you're booting from the SD then an .ext3 image is mounted.

                    I'll try it in the morning anyway.

                    • 7. Re: Linux install without access to Python
                      arduino_4_life

                      By the way, reading back earlier posts, I think it might be necessary to clarify that the 'firmware upgrade' is the little linux image. When you get the board it's actually already installed, you just need to upgrade to get the latest one.

                       

                      "I'm not installing the "LITTLE" Linux installation"

                       

                      Firmware upgrade from the IDE is actually the only way to install the 'little' linux image (unless you have a dediprog).

                      1 of 1 people found this helpful
                      • 8. Re: Linux install without access to Python
                        IRCAnonymous IRCAnonymous

                        ip.teswrote:

                         

                        By the way, reading back earlier posts, I think it might be necessary to clarify that the 'firmware upgrade' is the little linux image. When you get the board it's actually already installed, you just need to upgrade to get the latest one.

                         

                        "I'm not installing the "LITTLE" Linux installation"

                         

                        Firmware upgrade from the IDE is actually the only way to install the 'little' linux image (unless you have a dediprog).

                        This all really helps clarify the difference between the firmware Linux installation and the larger, uSDCard resident Linux installation.

                         

                        I've made some comparisons of command output between booting with and without the SDCard image present.

                         

                        With SD Card :

                        dmesg contains this block

                        [    3.168794] mmc0: new high speed SDHC card at address aaaa

                        [    3.197147] mmcblk0: mmc0:aaaa SU16G 14.8 GiB

                        [    3.237163]  mmcblk0: p1

                         

                        I've looked around and it looks like I'm mounting an mmc device as the root file system.

                         

                        root@clanton:/sys/block/mmcblk0# stat -c %d /

                        1792

                         

                        This seems to give me device major version 179, minor version 2

                         

                        root@clanton:/sys/block/mmcblk0# ls -l /dev/|grep 179

                        brw-rw----    1 root     root      179,   0 Jan  1 00:00 mmcblk0

                        brw-rw----    1 root     root      179,   1 Jan  1 00:00 mmcblk0p1

                         

                        Additionally, looking into sysfs I see the following :

                         

                        root@clanton:~# ls /sys/block/

                        loop0    loop1    mmcblk0  ram0

                         

                        Without SD Card (SPI Flash Installation)

                        I then rebooted without my sdcard in the system and checked dmesg and stat/

                        / # stat -c %d /

                        1

                         

                        This seems to give me device major version 1, minor version 0

                         

                        / # ls -al --color /dev|grep "1,"

                        ...

                        brw-rw----    1 root     root        1,   0 Jan  1 00:44 ram0

                        ...

                         

                        Additionally, looking into sysfs I find the following :

                        ~ # ls /sys/block/

                        loop0  loop1  ram0

                         

                        which indicates that the root file system is mounted to /dev/ram0 in the case that you've booted with the "little" linux installation on SPI flash.

                         

                        In summary, I think that checking the stat of / looks like it may be the easiest way to tell which medium the linux installation is running from. That's my two cents, but I'm definitely open to suggestions.

                         

                        Message was edited by: Gary Hendrick Following Alex_T's advice, I also found the following root@clanton:~# ls /media/realroot/ boot bzImage core-image-minimal-initramfs-clanton.cpio.gz image-full-clanton.ext3 Which shows both the cpio.gz and the ext3 images that arduino_4_life refered to. Thanks, Gary