Go Down

Topic: How to import new modules to Python ? (Read 4946 times) previous topic - next topic

JLS1

Hi all

Is possible import new modules to linino python ? (like PySynth , Numpy, etc ...)

Thanks info

Kamil
http://jlswbs.blogspot.com

esbjerg

I think if you try

http://forum.arduino.cc/index.php?topic=193155.msg1427318

It might be a start for you!

JLS1

Many thanks working great !

One question - is possible install modules to SD card ?

Kamil
http://jlswbs.blogspot.com

sonnyyu

Rootfs on External Storage (extroot)

http://wiki.openwrt.org/doc/howto/extroot

Code: [Select]
#df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                15800240     85112  14905864   1% /
/dev/root                 7168      7168         0 100% /rom
tmpfs                    30568       312     30256   1% /tmp
tmpfs                      512         0       512   0% /dev
/dev/sda1             15800240     85112  14905864   1% /


Use 1% of rootfs, after I use  83 Mb.

JLS1

Thanks but this is very difficult for me.

Exist simplest step by step guide how to make SD extroot ?

Sorry i´m beginner with linux.

Many thanks help

Kamil
http://jlswbs.blogspot.com

sonnyyu

Code: [Select]
df

Code: [Select]
fdisk /dev/sda
reboot


Code: [Select]
umount -f  /mnt/sda1
mke2fs -t ext4 /dev/sda1
mkdir -p /mnt/sda1
mount  /dev/sda1 /mnt/sda1
mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda1 -xf -
umount /tmp/cproot
nano /etc/config/fstab


Code: [Select]
...
config mount
        option target        /
        option device        /dev/sda1
        option fstype        ext4
        option options       rw,sync
        option enabled       1
        option enabled_fsck  0


Code: [Select]
reboot
df



JLS1

4GB rootfs :-D

Many many thanks this working fine !!!  :-)

One simple question - is possible make small partition fat32 ?
I´m use 4GB SD card - my idea 3GB ext for rootfs and second 1GB fat32 (for my winxp read)

Thanks help

Kamil

http://jlswbs.blogspot.com

sonnyyu

Sure:

Code: [Select]
fdisk /dev/sda

make 2 partition:

/dev/sda1  3G
/dev/sda2  1G

Code: [Select]
mkdosfs -F 32 /dev/sda2
mke2fs -t ext4 /dev/sda1


http://forum.arduino.cc/index.php?topic=222069.msg1614584#msg1614584





JLS1

#8
Mar 27, 2014, 09:50 am Last Edit: Mar 27, 2014, 09:52 am by JLS1 Reason: 1
Test it and working but both me partition is only ext

1. fdisk and delete existing fat32 partition
2. make new primary aprox. 2G
3. make second primary 2G
4. write and quit fdisk

5. reboot

6. unmount sda1 and sda2 (test without this step and same result)
7. mkdosfs -F 32 /dev/sda2
8. mke2fs -t ext4 /dev/sda1

9. reboot

10. yes two partition but both linux ext - not fat32 !

please help thanks
http://jlswbs.blogspot.com

sonnyyu


sonnyyu

#10
Mar 27, 2014, 06:15 pm Last Edit: Mar 27, 2014, 06:16 pm by sonnyyu Reason: 1
Sometime windows doesn't  like Fat 32 as second partition. Use fdisk set up Fat 32 as first one.

Code: [Select]
fdisk -l

Code: [Select]
  Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    16779263     8388608    c  W95 FAT32 (LBA)
/dev/sda2        16779264    32372735     7796736   83  Linux


Code: [Select]
mkdosfs -F 32 /dev/sda1
mke2fs -t ext4 /dev/sda2


Code: [Select]
umount -f  /mnt/sda2
mkdir -p /mnt/sda2
mount  /dev/sda2 /mnt/sda2
mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda2 -xf -
umount /tmp/cproot
nano /etc/config/fstab


Code: [Select]
config mount
       option target        /
       option device        /dev/sda2
       option fstype        ext4
       option options       rw,sync
       option enabled       1
       option enabled_fsck  0

JLS1

Heeeeeej working !!!!!!

Many many thanks your time :-D

Kamil
http://jlswbs.blogspot.com

NewLine

I followed these steps (tnx) to get the OS on my /dev/sda1 partition , but I am confused about 1 thing.

Previously I used /mnt/sda1 to put all my arduino stuff that are used by the sketch. I see this is still available.
Does it mean both / and /mnt/sda1  are mounted on my SD card?

I have following mount output:

Code: [Select]
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=30560k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/sda1 on / type ext4 (rw,sync,relatime,user_xattr,barrier=1,data=ordered)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
/dev/sda2 on /mnt/sda2 type ext4 (rw,sync,relatime,user_xattr,barrier=1,data=ordered)
none on /proc/bus/usb type usbfs (rw,relatime)


it doesnt even mention /mnt/sda1, but I can write files to it...

federicofissore

It looks like you have a folder /mnt/sda1 but this is not bound to any sd card. I suggest you move those files away and remove the folder.

Instead, you're using the sd card to extend the disk space of the yun (good!) as row "/dev/sda1 on / type ext4" says

The "data" part of the sd card is available on /mnt/sda2. If you followed the tutorial for extending the disk space, typing
Code: [Select]
ls -la /mnt should show that /mnt/sd is indeed pointing to /mnt/sda2

NewLine

#14
May 25, 2014, 09:02 pm Last Edit: May 25, 2014, 09:04 pm by NewLine Reason: 1
I used this page as guidelines. I manually made 2 partitions (sda1 and sda2) and moved the OS to sda2. I didnt do anything with sda2.

These are the /mnt folders:

Code: [Select]
drwxr-xr-x    4 root     root          4096 May 25 09:44 .
drwxr-xr-x   18 root     root          4096 May 25 09:46 ..
lrwxrwxrwx    1 root     root             9 May 25 09:44 sd -> /mnt/sda1
drwxr-xr-x    2 root     root          4096 May 25 17:32 sda1
drwxr-xr-x    3 root     root          4096 May 25 09:22 sda2


sd is still pointing to sda1.

I still wonder where I am actually writing if I write to /mnt/sda1?
/mnt is a subdir of root /, so I guess /mnt/sda1 is also on the SD card?

Go Up