WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Trying now to maximize memory on the pi.  (Read 2925 times)

Offline patrikg

  • Sr. Member
  • ****
  • Posts: 329
Trying now to maximize memory on the pi.
« on: January 19, 2017, 03:48:03 AM »
Hello, my project going on.

And now to clean the system to maximize system memory.

First just set the shared gpu/cpu mem to min to gpu in config.txt.
gpu_mem_256=16

Working very well.

And now lists the kernel modules loaded in boot, to see what modules i can remove.
lsmod

Now i can remove them via blacklist boot args.
blacklist=evdev,i2c_dev,bcm2835_gpiomem,bcm2835_wdt

Seams going like my correct path.

But now to the problem, now I can see that i2c_dev is loaded anyway.
Have tried to figure out what's loading that.
Have also in config.txt added these lines, to see if the device-tree loading this.

dtparam=i2c=off,spi=off,i2s=off
dtparam=i2c_arm=off

But it's not working...my bad.. maybe... don't figure out where it's loaded.

I can remove the module with rmmod i2c_dev... but i want to do i't the correct way... not just like a workaround.

Sorry don'r mention my system is... here it is.
piCore-8.1.3.zip

tc@box:~$ uname -a
Linux box 4.4.39-piCore+ #1 Mon Dec 26 11:48:10 UTC 2016 armv6l GNU/Linux

 
Thanks in advanced.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7035
    • My Community Forum
Re: Trying now to maximize memory on the pi.
« Reply #1 on: January 19, 2017, 04:42:50 AM »
There are two I2C buses. i2c_arm is just an alias for i2c so they are the same. The other bus is i2c_vc used to communicate to the GPU.

Read /mnt/mmcblk0p1/overlays/README for details.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline patrikg

  • Sr. Member
  • ****
  • Posts: 329
Re: Trying now to maximize memory on the pi.
« Reply #2 on: January 19, 2017, 05:01:45 AM »
Thanks for fast reply.

Ok.. communication with gpu... okey.. it may stay there, it's not taking so lot of mem.
I downloaded your last ver of picore and can find the same error message i dmesg.
I wish i have some tool to get whats loading this...i2c_dev module.
Trying out my best.. with loglevel=7...and can see it's loading.. maybe i have to blacklist all alias to i2c_dev.

Do you maybe know where it comes from ?
[    9.110043] F2FS-fs (loop14): Can't find valid F2FS filesystem in 2th superblock

And when i take a backup with filetool.sh it's the same error message as before.
/usr/bin/filetool.sh: line 188: can't create /etc/sysconfig/backup_device: Permission denied

I think it's when you doing the squashed root some of the files have some issues with correct permissions.

Are you doing all thing with hand ??
Or do you do have some scripting for making the hole picore ??
Sorry for asking this questions.
 
On my very stripped version i get
Code: (bash) [Select]
             total       used       free     shared    buffers     cached
Mem:           228         23        205          9          0          9
-/+ buffers/cache:         14        214
Swap:           49          0         49
tc@box:~$

So it's very small... just 50M...
I have pi with 256M

And thanks a lot that you make this.
I wish that somebody can take over your thoughts regarding making the same with the NTC-Chip.
So we in the community also have something calling chipcore.
 

Best regards
//Patrik
« Last Edit: January 19, 2017, 05:14:20 AM by patrikg »

Offline patrikg

  • Sr. Member
  • ****
  • Posts: 329
Re: Trying now to maximize memory on the pi.
« Reply #3 on: January 19, 2017, 07:53:19 AM »
Has also find that busybox has support for i2c with commands like...
i2cdetect  i2cdump    i2cget     i2cset

Maybe it's busybox thats load the i2c_dev.



Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7035
    • My Community Forum
Re: Trying now to maximize memory on the pi.
« Reply #4 on: January 19, 2017, 08:50:31 AM »
Has also find that busybox has support for i2c with commands like...
i2cdetect  i2cdump    i2cget     i2cset

Maybe it's busybox thats load the i2c_dev.

No, if you are not running these commands.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline patrikg

  • Sr. Member
  • ****
  • Posts: 329
Re: Trying now to maximize memory on the pi.
« Reply #5 on: January 19, 2017, 02:40:13 PM »
I can find/have some problems with busybox don't have the stat command.
When compiling and maybe some another scripts can't lookup the permissions for files and directory's.
Do you specify what commands being compiled with in busybox ??

I presume that cp uses stat...i getting these errors.

cp: can't stat '/usr/local/share/bash/.bashrc': No such file or directory


Offline patrikg

  • Sr. Member
  • ****
  • Posts: 329
Re: Trying now to maximize memory on the pi.
« Reply #6 on: January 19, 2017, 03:14:08 PM »
OOOOOOhhhh sorry my fault... found that stat is in coreutils.tcz.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8135
Re: Trying now to maximize memory on the pi.
« Reply #7 on: January 19, 2017, 05:28:54 PM »
Hi patrikg
Do you specify what commands being compiled with in busybox ??
There is a config utility that lets you specify which commands get compiled into busybox. If you want to know which commands
are compiled into busybox, just enter  busybox  at the command line and it will print out a list.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Trying now to maximize memory on the pi.
« Reply #8 on: January 19, 2017, 10:06:18 PM »
I think  bash.tcz  is just missing the default config files, thus spitting out this error.
AFAICT it can be ignored though.
Download a copy and keep it handy: Core book ;)

Online curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10274
Re: Trying now to maximize memory on the pi.
« Reply #9 on: January 20, 2017, 01:47:09 AM »
cp's error refers to stat() the function, not the tool.
The only barriers that can stop you are the ones you create yourself.

Offline patrikg

  • Sr. Member
  • ****
  • Posts: 329
Re: Trying now to maximize memory on the pi.
« Reply #10 on: January 22, 2017, 12:03:34 PM »
Bela.... Now i have found whats loading the i2c-dev...module.
I was reading an another thread...and found that just that line with modprobe...is there..

http://forum.tinycorelinux.net/index.php/topic,19801.msg122815.html#msg122815

It have take let say .... 4..days...now... lets see in the /opt/bootlocal.sh...

There it is..

Many hours late......

But learning a lot meanwhile, how to make more logs to debug....and so on.

Thanks a lot @curaga @Misalf @Rich to answer my another questions.

Offline patrikg

  • Sr. Member
  • ****
  • Posts: 329
Re: Trying now to maximize memory on the pi.
« Reply #11 on: January 23, 2017, 07:07:39 AM »
And now what line working for serial ttyAMA0 in inittab, for more standard starting the terminal.
Here it is:
Code: (bash) [Select]
ttyAMA0::respawn:/sbin/getty -L 115200 /dev/ttyAMA0 vt100

And don't know.but suspect that works also with Raspberry Pi 3 Model with this line

Code: (bash) [Select]
ttyS0::respawn:/sbin/getty -L 115200 /dev/ttyS0 vt100