Linux for EMMC install

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
Post Reply
jimeney
Posts: 122
Joined: Thu Oct 13, 2011 6:08 pm

Linux for EMMC install

Post by jimeney »

I've had a good trawl through the General / Software forum looking for a linux distribution suitable for installing using the Reflashing tool, directly to EMMC.

My requirements are fairly minimal, I'd like to boot to desktop (LXDE would be my preference) and be able to then install Chromium or Midori - basically I intend on giving a joggler to each of my IT support team at my workplace, and use them as a heads up display showing server stats and issues (all web based using Zabbix which is a network monitoring package).

Is there such a build? - or can someone give me some basic instructions for removing SqueezePlay from the sqPOS and having a basic desktop environment instead? - I'm fairly comfortable around the command line, but didn't want to uninstall SqueezePlay and find I'm unable to get a desktop.
User avatar
pete
Posts: 2961
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Linux for EMMC install

Post by pete »

Personally I would start from scratch and try to build a basic x windows / Chromium setup on a USB stick using ext4. Make it smaller than 1Gb (that will be a bit of a trick). Then do an img of the stick and copy it over to some fat32 stick. Buzz's Ubuntu basic little build is just a tad over 1.3 Gb. You might be able to thin it out a bit more? That said write the SP build on a stick and mount it first looking at the build via a linux boot. Removing the SP stuff from it and just boot up to a command line with a keyboard and add your stuff to it.

Then boot up in say Buzz's USB Linux boot and DD the image over to the MMC. I have done this but with the Openframe 2 2 Gb MMC partition and it works well for XBMC. I have made XBMC a bit smaller than the posted build and it is working fine today.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
-=xXx=-
Posts: 147
Joined: Tue Mar 15, 2011 11:26 am

Re: Linux for EMMC install

Post by -=xXx=- »

As I wrote in another tread Chromium with flash worked good on SP OS , for the desktop I tried couple versions but with no luck they all crash...
User avatar
pete
Posts: 2961
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Linux for EMMC install

Post by pete »

xxx,

Tell me your step by step and I will try to replicate it.

Here I upgraded the MMC OS build and added Chromium. I still have some 400 Mb's of free space.

Here is what I have done so far:

1 - Wrote the current Joggler Squeezebox player OS to the MMC chip
2 - SSH'd to the Joggler and upgraded the OS build
3 - added a few things plus Chromium

Still here at around 400 Mb of free space.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
-=xXx=-
Posts: 147
Joined: Tue Mar 15, 2011 11:26 am

Re: Linux for EMMC install

Post by -=xXx=- »

400mb from your 2Gb ? or 1Gb...
And what are you trying to do ? regarding desktop I already get LXDE working but after all libraries installed I get around 150-200Mb(free) I now have launched xbmc and it seems to be working normally...I think instead of desktop I will add menus with items in squeezeplayer(maybe through some kind of windows manager).

I created one more menu in additional features to launch xterm and from it I'm launching other programs... After some test I will try installing all in internal flash.
User avatar
pete
Posts: 2961
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Linux for EMMC install

Post by pete »

This is on a new Joggler with 1 Gb of MMC (taken out of the box yesterday).

I am trying to replicate what you are looking to do to help a bit with your endeavor.

Personally I am not really using the 1Gb MMC on the O2 jogglers except for PnP3 and Squeezbox. I am using 16Gb SSD via the zif to pata port for the rest of the Jogglers. I am though using the 2Gb MMC on the Openframe 2 just to see how much faster it is; but will probably move to an SD or ZIF drive there as I know my constant writing and rewriting will take its toll on the 2Gb soldered in MMC.

So you have LXDE, XBMC and Squeezebox player on the 1Gb stick to replicate the 1 gb MMC built into the O2 Joggler.

I don't push the built in MMC as its a tad slow and soldered in place. I did rebuild the XBMC 2Gb build such that I am at 300mb free and now faster using the Broadcom Crystal HD mini pcie card. (that said it will not be probably staying on the 2Gb built in MMC).
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
-=xXx=-
Posts: 147
Joined: Tue Mar 15, 2011 11:26 am

Re: Linux for EMMC install

Post by -=xXx=- »

I needed to find way to install programs and to run them from internal flash ...
I install them through ssh and add menu items in squeezeplay to launch them... running good chrome xbmc skype with video, for desktop i used jwm. I need to find some other browser because chrome takes 150mb
User avatar
pete
Posts: 2961
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Linux for EMMC install

Post by pete »

Lately more into using XBMC.

And playing with the Openpeak and openframe 2 devices which are really different from the Openpeak O2 Joggler devices.

That said while using the Squeezebox player OS on the Openpeak O2 Joggler I haven't ventured into modifying the menu items.

How do I add my installed chromium into one of the menu items on the squeezebox player?

Curious because I do have a Squeezeplayer build, updated (video drivers, audio et al) and Chromium installed and still have some 300mb left over on the MMC.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
-=xXx=-
Posts: 147
Joined: Tue Mar 15, 2011 11:26 am

Re: Linux for EMMC install

Post by -=xXx=- »

you can open squeezeplay lua menu files and edit one of the existing items adding:

callback = function(event, menuItem)
os.execute("chromium-browser")
end

and when you'll press menu function will be executed.
User avatar
pete
Posts: 2961
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Linux for EMMC install

Post by pete »

Thank you XXX.

Being lazy now...where does the lua menu files reside?
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
-=xXx=-
Posts: 147
Joined: Tue Mar 15, 2011 11:26 am

Re: Linux for EMMC install

Post by -=xXx=- »

\opt\squeezeplay\share\jive\applets\
User avatar
pete
Posts: 2961
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Linux for EMMC install

Post by pete »

Thanks XXX.

Getting a failed to parse on the "my Apps" gallery or menu items.

Really bad as I am not familiar at all with SP / language config stuff.

Working on a side thing today changing over all my outdoor security cams to POE HD IP cams.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
User avatar
pete
Posts: 2961
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Linux for EMMC install

Post by pete »

Still working on one outdoor HD camera here and its starting to bug me. That said I haven't had a chance yet to do anything with squeeze.

Curious (again being lazy) can you post the modded lua file for squeezeplayer.

Off on a tangent here is what I am doing. I think I am running into a cat5 issue issue as its buried underground (now some 10 years).

Moving from SD to HD now is becoming a bit of a pita. I do have a second run cat5e and may have to utilize that one.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
jimeney
Posts: 122
Joined: Thu Oct 13, 2011 6:08 pm

Re: Linux for EMMC install

Post by jimeney »

Here's the contents of JogglerPowerApplet.lua which is the menu that appears when you choose 'Quit'

Code: Select all


--[[
=head1 NAME

applets.JogglerPower.JogglerPowerApplet

=head1 DESCRIPTION

JogglerPower v1.00 (10th April 2012)

This applet replaces the standard Quit applet on the Joggler, providing more options.

=cut
--]]


-- Things we might be using.
local setmetatable, tonumber, tostring = setmetatable, tonumber, tostring

local os                     = require("os")
local io                     = require("io")
local oo                     = require("loop.simple")
local math                   = require("math")
local string                 = require("string")
local table                  = require("jive.utils.table")
local debug                  = require("jive.utils.debug")

local Applet                 = require("jive.Applet")
local System                 = require("jive.System")
local Checkbox               = require("jive.ui.Checkbox")
local Choice                 = require("jive.ui.Choice")
local Framework              = require("jive.ui.Framework")
local Event                  = require("jive.ui.Event")
local Icon                   = require("jive.ui.Icon")
local Label                  = require("jive.ui.Label")
local Button                 = require("jive.ui.Button")
local Popup                  = require("jive.ui.Popup")
local Group                  = require("jive.ui.Group")
local RadioButton            = require("jive.ui.RadioButton")
local RadioGroup             = require("jive.ui.RadioGroup")
local SimpleMenu             = require("jive.ui.SimpleMenu")
local Slider                 = require("jive.ui.Slider")
local Surface                = require("jive.ui.Surface")
local Textarea               = require("jive.ui.Textarea")
local Textinput              = require("jive.ui.Textinput")
local Window                 = require("jive.ui.Window")
local ContextMenuWindow      = require("jive.ui.ContextMenuWindow")
local Timer                  = require("jive.ui.Timer")

local appletManager = appletManager
local jiveMain		= jiveMain

module(..., Framework.constants)
oo.class(_M, Applet)


function menu(self, menuItem)

	local window = Window("text_list", self:string("TITLE"))
	
	platform = os.capture('sqp_JogglerPower.sh platform')
	
	headermsg = Textarea("help_text",  self:string("HEADER"))
	
	if platform ~= "sqpos" then
	
		menu = SimpleMenu("menu", {

			{
				text = self:string("QUIT"),
				style = 'item_choice',
				sound = "WINDOWSHOW",
				callback = function(event, menuItem)
					log:info(self:string("Quitting"))
					os.execute('sqp_JogglerPower.sh quit')
					Framework:quit()
				end
			},
		
			{
				text = self:string("REBOOT"),
				style = 'item_choice',
				sound = "WINDOWSHOW",
				callback = function(event, menuItem)
					log:info(self:string("Rebooting"))
					os.execute('sqp_JogglerPower.sh reboot')
				end
			},
		
			{
				text = self:string("SHUTDOWN"),
				style = 'item_choice',
				sound = "WINDOWSHOW",
				callback = function(event, menuItem)
					log:info(self:string("Shutting Down"))
					os.execute('sqp_JogglerPower.sh halt')
				end
			},
			
		})
		
	else
	
		menu = SimpleMenu("menu", {

			{
				text = self:string("RELAUNCH"),
				style = 'item_choice',
				sound = "WINDOWSHOW",
				callback = function(event, menuItem)
					log:info(self:string("Relaunching"))
					os.execute('sqp_JogglerPower.sh relaunch')
				end
			},
	
			{
				text = self:string("REBOOT"),
				style = 'item_choice',
				sound = "WINDOWSHOW",
				callback = function(event, menuItem)
					log:info(self:string("Rebooting"))
					os.execute('sqp_JogglerPower.sh reboot')
				end
			},
	
			{
				text = self:string("SHUTDOWN"),
				style = 'item_choice',
				sound = "WINDOWSHOW",
				callback = function(event, menuItem)
					log:info(self:string("Shutting Down"))
					os.execute('sqp_JogglerPower.sh halt')
				end
			},
			
{
				text = self:string("CHROME"),
				style = 'item_choice',
				sound = "WINDOWSHOW",
				callback = function(event, menuItem)
					log:info(self:string("Opening Chrome Browser"))
					os.execute('chromium-browser')
				end
			},
		
		})
	
	end
	
	self.timer = Timer(10000,
		function()
			jiveMain:closeToHome(true, Window.transitionPushRight)
			end,
			true)
	self.timer:start()
	
	window:addWidget(menu)
	menu:setHeaderWidget(headermsg)
	self:tieAndShowWindow(window)
	return window
		
end


-- Allows output of shell scripts to be captured.
function os.capture(cmd)
  local f = io.popen(cmd, 'r')
  local s = f:read('*a')
  f:close()
  return s
end


--[[

=head1 LICENSE

Created by Andy Davison
birdslikewires.co.uk

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

=cut
--]]
Attachments
JogglerPowerApplet.lua.txt
JogglerPowerApplet
(4.51 KiB) Downloaded 257 times
jimeney
Posts: 122
Joined: Thu Oct 13, 2011 6:08 pm

Re: Linux for EMMC install

Post by jimeney »

It adds an additional menu option CHROME which fires up a browser window, there's still further work to be done - there's no onscreen keyboard so the browser itself will need to be navigated to a suitable page in the command line options when calling it. I'm working on taking things one step further, launching it fullscreen on a specific page. The positioning also seems a little out, with the maximised window not covering the complete screen.
jimeney
Posts: 122
Joined: Thu Oct 13, 2011 6:08 pm

Re: Linux for EMMC install

Post by jimeney »

I'm aiming this question at Roobarb mainly, but can anyone shed any light on what the processes RtmpTimerTask and RtmpMimeTask are, on SqueezePlay OS? I've got as far as being able to install and boot to an LXDE desktop environment, but the screen keeps refreshing every 20 seconds or so, seemingly coinsiding with the two processes I mention above. Any ideas anyone?

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
781 joggler 20 0 45408 37m 8112 S 1 7.7 0:18.12 jive
783 joggler 20 0 6800 2660 2428 S 1 0.5 0:02.09 jive_alsa
628 root 20 0 0 0 0 S 0 0.0 0:00.46 RtmpTimerTask
629 root 20 0 0 0 0 S 0 0.0 0:00.28 RtmpMlmeTask
974 joggler 20 0 2484 1192 952 R 0 0.2 0:00.06 top
1 root 20 0 2868 1624 1212 S 0 0.3 0:02.02 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0 0.0 0:00.00 ksoftirqd/0
4 root 20 0 0 0 0 S 0 0.0 0:00.00 kworker/0:0
5 root 20 0 0 0 0 S 0 0.0 0:00.00 kworker/u:0
6 root RT 0 0 0 0 S 0 0.0 0:00.46 migration/0
7 root RT 0 0 0 0 S 0 0.0 0:00.51 migration/1
8 root 20 0 0 0 0 S 0 0.0 0:00.00 kworker/1:0
9 root 20 0 0 0 0 S 0 0.0 0:00.00 ksoftirqd/1
10 root 20 0 0 0 0 S 0 0.0 0:00.02 kworker/0:1
11 root 0 -20 0 0 0 S 0 0.0 0:00.00 cpuset
12 root 0 -20 0 0 0 S 0 0.0 0:00.00 khelper
Post Reply