WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Firefox for piCore 11  (Read 811 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12269
Re: Firefox for piCore 11
« Reply #15 on: July 19, 2020, 09:28:44 AM »
I am guessing that would require compiling on Raspberry Pi itself to not have to cross compile and attempting to do it on a Raspberry Pi Zero with no networking option isn't an acceptable device to compile it on.

If you're going to compile something like firefox, it would be better to borrow an RPi3/RPi4 - as I recall, webkit took 187h on an RPi3..

Offline ashfame

  • Full Member
  • ***
  • Posts: 103
Re: Firefox for piCore 11
« Reply #16 on: July 19, 2020, 09:41:30 AM »
Hi ashfame
According to:
http://tinycorelinux.net/11.x/armv7/tcz/epiphany.tcz.dep
you will also need to copy over  webkitgtk4.tcz.

That's as far down the dependency tree I checked. Copy those 2 extensions and their  .dep  files to your  tce/optional  directory. Then
Code: [Select]
tce-load -i epiphanyWatch for  not found  messages to see if any other dependencies are missing.

Hi Rich,

I actually tried that and `alsa-modules-4.9.22-piCore-v7.tcz` is the one that I found missing. Not sure if there are more.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 7943
Re: Firefox for piCore 11
« Reply #17 on: July 19, 2020, 09:55:23 AM »
Hi ashfame
... I actually tried that and `alsa-modules-4.9.22-piCore-v7.tcz` is the one that I found missing. ..
That's because in ARMv6:
http://tinycorelinux.net/11.x/armv6/tcz/
it's called  alsa-modules-4.19.81-piCore.tcz.  Anytime you see numbers like that in an extension name, they are referring to the
kernel version which must match the kernel you are running.

Offline ashfame

  • Full Member
  • ***
  • Posts: 103
Re: Firefox for piCore 11
« Reply #18 on: July 19, 2020, 10:00:22 AM »
I am guessing that would require compiling on Raspberry Pi itself to not have to cross compile and attempting to do it on a Raspberry Pi Zero with no networking option isn't an acceptable device to compile it on.

If you're going to compile something like firefox, it would be better to borrow an RPi3/RPi4 - as I recall, webkit took 187h on an RPi3..

Oh damn, that's not practical at all. Either cross compilation or figure something else out like getting either epiphany or some old build to work. Failing on all that, I would have to give up on Raspberry Pi Zero and move to a newer model where I desolder wifi/bluetooth module (which is what I wanted to avoid as that would act as a barrier for a lot of people attempting to use my open source project to DIY their air-gapped device)

Offline ashfame

  • Full Member
  • ***
  • Posts: 103
Re: Firefox for piCore 11
« Reply #19 on: July 19, 2020, 10:07:26 AM »
Hi ashfame
... I actually tried that and `alsa-modules-4.9.22-piCore-v7.tcz` is the one that I found missing. ..
That's because in ARMv6:
http://tinycorelinux.net/11.x/armv6/tcz/
it's called  alsa-modules-4.19.81-piCore.tcz.  Anytime you see numbers like that in an extension name, they are referring to the
kernel version which must match the kernel you are running.

Hi Rich,

oh, good to know, I will try that. Currently I have Xorg, flwm_topside, wbar & epiphany loading up. But all I see is wallpaper and ability to invoke things from right click context menu. wbar doesn't show up, nor epiphany gets listed in right click menu (probably due to the missing depdency). I remember firefox showed up there on wbar and in right click context menu without me having to do anything. Do you know what I might be doing wrong in invoking them?

Offline ashfame

  • Full Member
  • ***
  • Posts: 103
Re: Firefox for piCore 11
« Reply #20 on: July 19, 2020, 10:12:35 AM »
Do you know what I might be doing wrong in invoking them?

Nevermind, I figured out my silly mistake. I was able to get the wbar loaded and launch the browser too. Going to put that missing dependency in & figure out launching it in kiosk mode etc.
« Last Edit: July 19, 2020, 10:19:15 AM by ashfame »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 7943
Re: Firefox for piCore 11
« Reply #21 on: July 19, 2020, 10:13:56 AM »
Hi ashfame
You won't see epiphany load until all of its dependencies have loaded.

Offline ashfame

  • Full Member
  • ***
  • Posts: 103
Re: Firefox for piCore 11
« Reply #22 on: July 19, 2020, 10:22:22 AM »
Hi ashfame
You won't see epiphany load until all of its dependencies have loaded.

Hi Rich, It actually did load. Everything is pretty sluggish but atleast it loaded. I am guessing it will probably crash when that missing dependency is invoked at some point.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 7943
Re: Firefox for piCore 11
« Reply #23 on: July 19, 2020, 04:38:10 PM »
Hi ashfame
... Either cross compilation or ...
On the topic of cross compilation, I found this pre built toolchain that supports Pi Zero:
https://github.com/Pro/raspi-toolchain

It's a 460 Mbyte tarball that gets installed under /opt.

Offline ashfame

  • Full Member
  • ***
  • Posts: 103
Re: Firefox for piCore 11
« Reply #24 on: July 19, 2020, 09:46:24 PM »
Hi ashfame
... Either cross compilation or ...
On the topic of cross compilation, I found this pre built toolchain that supports Pi Zero:
https://github.com/Pro/raspi-toolchain

It's a 460 Mbyte tarball that gets installed under /opt.

That's a great find Rich! I will use that if this epiphany browser doesn't work out.

Offline ashfame

  • Full Member
  • ***
  • Posts: 103
Re: Firefox for piCore 11
« Reply #25 on: July 20, 2020, 03:01:50 AM »
Hi ashfame
You won't see epiphany load until all of its dependencies have loaded.

Hi Rich,

I am not sure if the epiphany browser is not functional or I am running out of memory. Sometimes it will load a simple js file just fine, sometimes it will crash. Sometimes it gets stuck trying to load the html file, possibly due to parsing of JS files.

I tried launching it via terminal and saw messages regarding "memory pressure", but when I check free memory by running `free -m`, it tells me ~12M is free but over 300M is cached, which as per my understanding can be released by kernel when required, unless in TinyCore RAM based file system is shown under cached and that's actually not freeable memory?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12269
Re: Firefox for piCore 11
« Reply #26 on: July 20, 2020, 03:30:37 AM »
epiphany works on a 1gb RPi3 and 4gb RPi4 without problems - how much ram do you have?

Offline ashfame

  • Full Member
  • ***
  • Posts: 103
Re: Firefox for piCore 11
« Reply #27 on: July 20, 2020, 04:30:41 AM »
epiphany works on a 1gb RPi3 and 4gb RPi4 without problems - how much ram do you have?

Hi Juanito,

I have 512MB RAM (Raspberry Pi Zero), and additional need to use copy2fs.flg which takes up even more space in memory as I require to run an air-gapped device which runs an immutable OS state with the ability of ejecting the bootable media.

Additionally, I just tried removing the copy2fs.flg to free some space in the memory and browser was able to function. So browser isn't the culprit here, I am just running out of memory here. I am going to order a newer RPi model which has 1-2GB of RAM to use, but I would like to explore other options as well - full-fledged browsers which may not be this heavy in terms of disk space or running cost on memory. Any ideas about midori / Vivaldi?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12269
Re: Firefox for piCore 11
« Reply #28 on: July 20, 2020, 04:46:57 AM »
Like epiphany, midori uses webkitgtk, so I'm not sure how much better it will be - I haven't tried vivaldi.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 7943
Re: Firefox for piCore 11
« Reply #29 on: July 20, 2020, 07:02:33 AM »
Hi ashfame
I am not sure if the epiphany browser is not functional or I am running out of memory ...
Spoiler alert. Web browsers are selfish and inconsiderate programs. In their attempt to cache every last byte of data they sucked
in, they will consume most/all of your RAM. Epiphany may also be caching stuff to disk (/home/tc/) which in your case also resides
in RAM.

Quote
... I tried launching it via terminal and saw messages regarding "memory pressure", but when I check free memory by running `free -m`, it tells me ~12M is free ...
I would call that  "out of memory territory".

Quote
... but over 300M is cached, which as per my understanding can be released by kernel when required, unless in TinyCore RAM based file system is shown under cached and that's actually not freeable memory?
I've noticed that even if you tell the system to clear the cache, it never goes to zero. That suggests that not everything that is currently
cached can be released.

I believe you disabled the  zswap  to free up RAM.  You could try adding a little back to see if it relieves the pressure any. Maybe try
adding about 50 Mbytes:

... By default, Tinycore uses 25% of your RAM for  zswap (swap space in RAM). If you want to change the amount used, try this:

First, boot using the  nozswap  boot code.
Then
Code: [Select]
sudo su
# remove all existing swap
swapoff -a

# Set the size to 50000 K bytes
echo "50000K" > /sys/block/zram0/disksize

# Create the swap file
mkswap /dev/zram0 >/dev/null 2>&1

# Update fstab.
echo "/dev/zram0  swap         swap    defaults,noauto   0       0" >> /etc/fstab # Lets swapoff -a work

# Enable this swap device first so it has priority.
swapon /dev/zram0

# Enable any remaining swap devices.
swapon -a
exit

To see the status of your swap devices:
Code: [Select]
cat /proc/swaps
If this does what you want, then add it to your  /opt/bootsync.sh  file before the line that calls  /opt/bootlocal.sh.  Do not include
the lines that say  sudo su  or  exit.