Jump to content


Photo

Build deep customized image (possible?)


  • Please log in to reply
19 replies to this topic

#1 dax

  • Senior Member
  • 228 posts

0
Neutral

Posted 20 November 2016 - 16:07

Hi, i'm looking for build a customized image for my solo2 from master-next branch. I create a 'dax-enigma2-image' where i add softcams, skin (thanks Beeker), dvb-t usb drivers and the build process works fine.
Now, if is possible, i would build an image with the following customization:

-change default language (italiano)

-my ip address (modify file /etc/network/interfaces)
-my dns (modify file /etc/resolv.conf)
-my password
-add a file to /etc/enigma2/ (epg.conf)
-a custom /etc/enigma2/setting file in order to skip the first setup (video mode, video rate, etc.)
-other stuff, work in progress...
Is it possible?



Re: Build deep customized image (possible?) #2 dax

  • Senior Member
  • 228 posts

0
Neutral

Posted 24 November 2016 - 22:20

Nobody?

Re: Build deep customized image (possible?) #3 Taapat

  • PLi® Core member
  • 2,332 posts

+120
Excellent

Posted 24 November 2016 - 22:54

Why do you need it?
You can simply build a standard image and all that you need install from the settings backup in the start wizard.


Re: Build deep customized image (possible?) #4 dax

  • Senior Member
  • 228 posts

0
Neutral

Posted 24 November 2016 - 23:14

Why do you need it?

At first to expand my knowledge...
And above all, is it possible?

Re: Build deep customized image (possible?) #5 WanWizard

  • PLi® Core member
  • 68,309 posts

+1,719
Excellent

Posted 24 November 2016 - 23:17

I agree with Taapat, the best option is to have a backup available as part of the image that you build, which will be restored and implemented at first boot.

 

The biggest advantage of this is that you don't have to hardcode any changes in the source, which will make it easier to keep track of changes we make. Hardcoding is always a bad idea.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Build deep customized image (possible?) #6 Taapat

  • PLi® Core member
  • 2,332 posts

+120
Excellent

Posted 25 November 2016 - 09:02

Yes, of course, that it is possible.
You need to make changes in enigma2 and in buildsystem.
But if you have such a question, then I think that your knowledge does not allow to make it easy.
And I do not think that someone would be so much time to explain it all to you.


Re: Build deep customized image (possible?) #7 dax

  • Senior Member
  • 228 posts

0
Neutral

Posted 25 November 2016 - 15:36

Hardcoding is always a bad idea.

I agree with you, but it is a good start point for learning about

Yes, of course, that it is possible.
You need to make changes in enigma2 and in buildsystem.
But if you have such a question, then I think that your knowledge does not allow to make it easy.

Agree also with you, but i'm not scared

And I do not think that someone would be so much time to explain it all to you.

Not with hurry... Maybe a step every day? Or a step every week? :D :D

Re: Build deep customized image (possible?) #8 dax

  • Senior Member
  • 228 posts

0
Neutral

Posted 29 November 2016 - 09:33

Ok, the first step was done!!!

I change default volume from 50 to 100:

-download enigma2 zip file from here

-extract and modify ../lib/python/Components/VolumeControl.py

-create a patch

git diff  old file  new file  > image_dax.patch

-edit the path in order to have

diff --git a/lib/python/Components/VolumeControl.py b/lib/python/Components/VolumeControl.py
index e68ab56..7a39a48 100644
--- a/lib/python/Components/VolumeControl.py
+++ b/lib/python/Components/VolumeControl.py
@@ -21,7 +21,7 @@ class VolumeControl:
 		VolumeControl.instance = self
 
 		config.audio = ConfigSubsection()
-		config.audio.volume = ConfigInteger(default = 50, limits = (0, 100))
+		config.audio.volume = ConfigInteger(default = 100, limits = (0, 100))
 
 		self.volumeDialog = session.instantiateDialog(Volume)
 		self.muteDialog = session.instantiateDialog(Mute)

- now put your patch in ../meta-openpli/recipes-openpli/enigma2/enigma2 and add to enigma2.bb

SRC_URI += "file://0001-picload.cpp-adapt-to-newer-giflib-version.patch"
SRC_URI += "file://image_dax.patch"

 Build an image and if you don't get check if the patch was applied at

../build/tmp/sysroots/vusolo2/usr/lib/enigma2/python/Components

Maybe i'm going in the wrong way but... It works!

Now, if is possible, i would build an image with the following customization:

-change default language (italiano)

-my ip address (modify file /etc/network/interfaces)
-my dns (modify file /etc/resolv.conf)
-my password
-add a file to /etc/enigma2/ (epg.conf)

I will investigate further to the above questions, but any push will be very appreciated, also like 'look at file xyz'...

I know, i'm only in the beginning...

Thanks



Re: Build deep customized image (possible?) #9 dax

  • Senior Member
  • 228 posts

0
Neutral

Posted 1 December 2016 - 23:20

Ok, a step ahead

diff --git a/mytest.py b/mytest.py
index c003a36..08a853e 100644
--- a/mytest.py
+++ b/mytest.py
@@ -59,7 +59,7 @@ config.misc.prev_wakeup_time = ConfigInteger(default=0)
 #config.misc.prev_wakeup_time_type is only valid when wakeup_time is not 0
 config.misc.prev_wakeup_time_type = ConfigInteger(default=0)
 # 0 = RecordTimer, 1 = ZapTimer, 2 = Plugins, 3 = WakeupTimer
-config.misc.epgcache_filename = ConfigText(default = "/hdd/epg.dat")
+config.misc.epgcache_filename = ConfigText(default = "/media/usb/epg.dat")
 
 def setEPGCachePath(configElement):
 	enigma.eEPGCache.getInstance().setCacheFile(configElement.value)
diff --git a/skin.py b/skin.py
index 5c3168b..9613803 100644
--- a/skin.py
+++ b/skin.py
@@ -76,7 +76,7 @@ def skin_user_skinname():
 
 # example: loadSkin("nemesis_greenline/skin.xml")
 config.skin = ConfigSubsection()
-DEFAULT_SKIN = "PLi-HD/skin.xml"
+DEFAULT_SKIN = "DMConcinnity-HD-m-mod/skin.xml"
 # on SD hardware, PLi-HD will not be available
 if not fileExists(resolveFilename(SCOPE_SKIN, DEFAULT_SKIN)):
 	# in that case, fallback to Magic (which is an SD skin)
diff --git a/lib/python/Components/SetupDevices.py b/lib/python/Components/SetupDevices.py
index 083ea37..f47c942 100644
--- a/lib/python/Components/SetupDevices.py
+++ b/lib/python/Components/SetupDevices.py
@@ -23,7 +23,7 @@ def InitSetupDevices():
 		language.activateLanguage(configElement.value)
 
 	config.osd = ConfigSubsection()
-	config.osd.language = ConfigText(default = "en_EN");
+	config.osd.language = ConfigText(default = "it_IT");
 	config.osd.language.addNotifier(languageNotifier)
 
 	config.parental = ConfigSubsection();
diff --git a/lib/python/Components/VolumeControl.py b/lib/python/Components/VolumeControl.py
index e68ab56..7a39a48 100644
--- a/lib/python/Components/VolumeControl.py
+++ b/lib/python/Components/VolumeControl.py
@@ -21,7 +21,7 @@ class VolumeControl:
 		VolumeControl.instance = self
 
 		config.audio = ConfigSubsection()
-		config.audio.volume = ConfigInteger(default = 50, limits = (0, 100))
+		config.audio.volume = ConfigInteger(default = 100, limits = (0, 100))
 
 		self.volumeDialog = session.instantiateDialog(Volume)
 		self.muteDialog = session.instantiateDialog(Mute)
diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py
index 743c4b0..2b1f48a 100644
--- a/lib/python/Components/UsageConfig.py
+++ b/lib/python/Components/UsageConfig.py
@@ -37,7 +37,7 @@ def InitUsageConfig():
 	config.usage.servicelist_column = ConfigSelection(default="-1", choices=choicelist)
 	config.usage.servicelist_column.addNotifier(refreshServiceList)
 
-	config.usage.service_icon_enable = ConfigYesNo(default = False)
+	config.usage.service_icon_enable = ConfigYesNo(default = True)
 	config.usage.service_icon_enable.addNotifier(refreshServiceList)
 	config.usage.servicelist_cursor_behavior = ConfigSelection(default = "standard", choices = [
 		("standard", _("Standard")),
@@ -210,7 +210,7 @@ def InitUsageConfig():
 		choicelist.append((str(i), ngettext("%d minute", "%d minutes", m) % m))
 	config.usage.timeshift_start_delay = ConfigSelection(default = "0", choices = choicelist)
 
-	config.usage.alternatives_priority = ConfigSelection(default = "0", choices = [
+	config.usage.alternatives_priority = ConfigSelection(default = "1", choices = [
 		("0", "DVB-S/-C/-T"),
 		("1", "DVB-S/-T/-C"),
 		("2", "DVB-C/-S/-T"),
diff --git a/lib/python/Components/AVSwitch.py b/lib/python/Components/AVSwitch.py
index ede4472..3008965 100644
--- a/lib/python/Components/AVSwitch.py
+++ b/lib/python/Components/AVSwitch.py
@@ -118,7 +118,7 @@ def InitAVSwitch():
 			policy_choices.update({"auto": _("Auto")})
 	except:
 		pass
-	config.av.policy_43 = ConfigSelection(choices=policy_choices, default = "pillarbox")
+	config.av.policy_43 = ConfigSelection(choices=policy_choices, default = "scale")
 	config.av.tvsystem = ConfigSelection(choices = {"pal": _("PAL"), "ntsc": _("NTSC"), "multinorm": _("multinorm")}, default="pal")
 	config.av.wss = ConfigEnableDisable(default = True)
 	config.av.generalAC3delay = ConfigSelectionNumber(-1000, 1000, 5, default = 0)
diff --git a/lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py b/lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py
index 0fcc74e..ad0686d 100644
--- a/lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py
@@ -2,7 +2,7 @@ from Screens.Screen import Screen
 from Plugins.Plugin import PluginDescriptor
 from Components.config import getConfigListEntry, config, ConfigBoolean
 
-config.misc.firstrun = ConfigBoolean(default = True)
+config.misc.firstrun = ConfigBoolean(default = False)
 
 def NetworkWizardMain(session, **kwargs):
 	session.open(NetworkWizard)
diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/ImageWizard.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/ImageWizard.py
index 60a59cf..32f11b8 100755
--- a/lib/python/Plugins/SystemPlugins/SoftwareManager/ImageWizard.py
+++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/ImageWizard.py
@@ -14,7 +14,7 @@ from enigma import eEnv
 from Components.config import config, getConfigListEntry, ConfigSubsection, ConfigText, ConfigLocations, ConfigBoolean
 from Components.Harddisk import harddiskmanager
 
-config.misc.firstrun = ConfigBoolean(default = True)
+config.misc.firstrun = ConfigBoolean(default = False)
 config.plugins.configurationbackup = ConfigSubsection()
 config.plugins.configurationbackup.backuplocation = ConfigText(default = '/media/hdd/', visible_width = 50, fixed_size = False)
 config.plugins.configurationbackup.backupdirs = ConfigLocations(default=[eEnv.resolve('${sysconfdir}/enigma2/'), '/etc/network/interfaces', '/etc/wpa_supplicant.conf', '/etc/wpa_supplicant.ath0.conf', '/etc/wpa_supplicant.wlan0.conf', '/etc/resolv.conf', '/etc/default_gw', '/etc/hostname'])
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py
index c108434..25805fe 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py
@@ -8,7 +8,7 @@ from Components.Sources.StaticText import StaticText
 
 from VideoHardware import video_hw
 
-config.misc.videowizardenabled = ConfigBoolean(default = True)
+config.misc.videowizardenabled = ConfigBoolean(default = False)
 
 class VideoSetup(Screen, ConfigListScreen):
 
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
index 780c266..119c1da 100644
--- a/lib/python/Screens/InfoBarGenerics.py
+++ b/lib/python/Screens/InfoBarGenerics.py
@@ -637,7 +637,7 @@ class InfoBarNumberZap:
 		service, bouquet = self.searchNumber(number)
 		self.selectAndStartService(service, bouquet)
 
-config.misc.initialchannelselection = ConfigBoolean(default = True)
+config.misc.initialchannelselection = ConfigBoolean(default = False)
 
 class InfoBarChannelSelection:
 	""" ChannelSelection - handles the channelSelection dialog and the initial
diff --git a/lib/python/Screens/StartWizard.py b/lib/python/Screens/StartWizard.py
index fced62e..853aac2 100644
--- a/lib/python/Screens/StartWizard.py
+++ b/lib/python/Screens/StartWizard.py
@@ -12,8 +12,8 @@ from Components.Pixmap import Pixmap, MovingPixmap, MultiPixmap
 from Components.config import config, ConfigBoolean, configfile, ConfigSubsection
 from LanguageSelection import LanguageWizard
 
-config.misc.firstrun = ConfigBoolean(default = True)
-config.misc.languageselected = ConfigBoolean(default = True)
+config.misc.firstrun = ConfigBoolean(default = False)
+config.misc.languageselected = ConfigBoolean(default = False)
 config.misc.do_overscanwizard = ConfigBoolean(default = OverscanWizard and config.skin.primary_skin.value == "PLi-FullNightHD/skin.xml")
 
 class StartWizard(WizardLanguage, Rc):

my next step (really hard for me) is a patch that set

config.av.videorate.1080p=multi
config.av.videomode.DVI=1080p
config.av.videoport=DVI

VideoHardware.py and plugin.py

See you soon



Re: Build deep customized image (possible?) #10 WanWizard

  • PLi® Core member
  • 68,309 posts

+1,719
Excellent

Posted 2 December 2016 - 11:35

You are making it yourself extremely hard. Instead of all these changes, simply set the firstrun flag so the wizard doesn't start, and provide a settings file with the settings you need.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Build deep customized image (possible?) #11 dax

  • Senior Member
  • 228 posts

0
Neutral

Posted 2 December 2016 - 12:37

You are making it yourself extremely hard.

Maybe, but it's the only way that i know

Instead of all these changes, simply set the firstrun flag so the wizard doesn't start

Done

and provide a settings file with the settings you need.

I don' t understand... Could you explain me what i have to do? Do you mean stop enigma and put my setting file in /etc/enigma2?

Edited by dax, 2 December 2016 - 12:39.


Re: Build deep customized image (possible?) #12 WanWizard

  • PLi® Core member
  • 68,309 posts

+1,719
Excellent

Posted 2 December 2016 - 17:17

What I mean is include the /etc/enigma2/settings file in the image you are compiling, with all the settings you require. You can also disable the wizard in those settings. Saves you from changing any code.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Build deep customized image (possible?) #13 dax

  • Senior Member
  • 228 posts

0
Neutral

Posted 2 December 2016 - 19:18

What I mean is include the /etc/enigma2/settings file in the image you are compiling, with all the settings you require. You can also disable the wizard in those settings. Saves you from changing any code.

Of course, i ask also in my first post! But i don't know how can i do...

Re: Build deep customized image (possible?) #14 WanWizard

  • PLi® Core member
  • 68,309 posts

+1,719
Excellent

Posted 2 December 2016 - 21:26

Instead of looking at the code, look at the build process, and the way files are included.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Build deep customized image (possible?) #15 dax

  • Senior Member
  • 228 posts

0
Neutral

Posted 2 December 2016 - 22:27

Instead of looking at the code, look at the build process, and the way files are included.

C'mon, don' t be stingy :D

The files are included through a bitbake recipe, so i think that i have to add a 'magic string' to enigma2.bb



Re: Build deep customized image (possible?) #16 WanWizard

  • PLi® Core member
  • 68,309 posts

+1,719
Excellent

Posted 2 December 2016 - 23:55

I'm not "stingy", I have no clue how bitbake works. But I do know that is the correct place to make the change.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Build deep customized image (possible?) #17 dax

  • Senior Member
  • 228 posts

0
Neutral

Posted 18 December 2016 - 19:39

Probably i'm very close, just last step: build an image with my own settings file in /etc/enigma2. I can build the image with a recipe, i flash the image but the settings file is not present, only the default file.
Does enigma2 a "factory reset" at first boot? Can i inhibit?
My recipe

DESCRIPTION = "Install settings files"
PV = "1.0"
SRC_URI = "file://*"
PACKAGES = "${PN}"
MAINTAINER = "DAX"

require conf/license/openpli-gplv2.inc

FILES_${PN} = "/etc"
S = "${WORKDIR}"

do_install() {
	install -d ${D}/etc/enigma2
	install -m 0644 ${S}/settings ${D}/etc/enigma2/settings
	install -m 0644 ${S}/epgimport.conf ${D}/etc/enigma2/epgimport.conf
	cp -r ${S}/lame* ${D}/etc/enigma2
	cp -r ${S}/user* ${D}/etc/enigma2
	cp -r ${S}/bouq* ${D}/etc/enigma2
	cp -r ${S}/white* ${D}/etc/enigma2
	cp -r ${S}/black* ${D}/etc/enigma2
}

And a dir settings-dax in  meta-openpli/recipes-openpli/enigma2/ with the files.

I'm wrong?



Re: Build deep customized image (possible?) #18 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 19 December 2016 - 00:18

I guess the package is not installed by default. Add package to openpli-image.bb
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Build deep customized image (possible?) #19 dax

  • Senior Member
  • 228 posts

0
Neutral

Posted 19 December 2016 - 10:38

I guess the package is not installed by default. Add package to openpli-image.bb

Thanks, i will try



Re: Build deep customized image (possible?) #20 dax

  • Senior Member
  • 228 posts

0
Neutral

Posted 19 December 2016 - 21:45

I guess the package is not installed by default. Add package to openpli-image.bb

It works, thanks a lot :D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users