Minimyth build, now how do I make changes

Help with using MiniMyth's build system

Moderator: Pablo

Glidos
Contributor
Posts: 164
Joined: Tue Sep 02, 2008 8:50 am

Minimyth build, now how do I make changes

Post by Glidos »

I've just built minimyth, and now I want to make changes to mythtv. What's the best way? I noticed a set of patches in script/smyth-0.21/mythtv/files. Should I add to those, or can editing the source directly also work? I'd like to use the minimyth build system as a sort of development environement if possible, but I'm guessing that it might not be designed for that type of use.

I'm also confused as to what build commands are needed for a subsequent builds - will it spot what has changed and rebuild all dependencies? Also, if adding to the set of patches, what sort of strategy is best for avoiding conflict between the patches, and what determines the order in which they are applied?
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Minimyth build, now how do I make changes

Post by Pablo »

Glidos wrote:I've just built minimyth, and now I want to make changes to mythtv. What's the best way? I noticed a set of patches in script/smyth-0.21/mythtv/files. Should I add to those, or can editing the source directly also work? I'd like to use the minimyth build system as a sort of development environement if possible, but I'm guessing that it might not be designed for that type of use.
You are correct, the build system is not designed for that type of use, but it can be done.
I'm also confused as to what build commands are needed for a subsequent builds - will it spot what has changed and rebuild all dependencies?
Unfortunately, the GAR build system used by MiniMyth does not spot changes. As a minimum, you will need to run 'make clean' in the directories of the packages impacted by the change, including the changed package and any packages that depend on the changed package.

Some packages that I tend to update/change more regularly support 'make clean-all'. Unlike 'make clean' which only removes the files in the package's work directory, 'make clean-all' removes the package's files installed in the staging directory. You can run 'make clean-all' in the 'myth/myth' directory.

After you run 'make clean' or 'make clean-all' in the impacted package directories, you can run 'make clean' followed by 'make build' in the 'meta/minimyth' package directory in order to rebuild the MiniMyth distribution.
Also, if adding to the set of patches, what sort of strategy is best for avoiding conflict between the patches, and what determines the order in which they are applied?
In order to add a patch to a package (e.g. myth-0.21/mythtv), you need to do three things.

First, you need to add the patch file to the package's files directory. If there is no files directory for the particular package, then you will need to create one.

Second, you need to add an MD5 checksum for the patch file to the checksums file.

Third, you need to add the patch file to the list of patches to be applied. This is done by adding it to the PATCHFILES variable in the package's Makefile. If the package has no PATCHFILES variable in it's Makefile, then you will need to add one.

When you create a patch, the patch needs to apply correctly when running

Code: Select all

patch -p1 < {patch-file}
in the extracted source directory.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Glidos
Contributor
Posts: 164
Joined: Tue Sep 02, 2008 8:50 am

Post by Glidos »

I'm still a little confused. I've never used this type of build system before. I'm not sure what "staging directory" means. I'm guessing that you have a clean copy of source in one place, and then a second version which gets patched and built. Is that right? I can see copies in

gar-minimyth/script

and in

gar-minimyth/script/meta/minimyth/work/main.d/minimyth-0.21.0-64/source/gar-minimyth/script

Is the latter the stagging directory?

Also I've read somewhere in the instructions that some source is downloaded. Does that go directly to the staggin directory? I'm wondering where to make changes in a way that wont get overwritten during the build, or deleted by a clean command.

Sorry if the questions don't make sense. I haven't quite undestood the working of this yet.
Glidos
Contributor
Posts: 164
Joined: Tue Sep 02, 2008 8:50 am

Post by Glidos »

I clearly don't quite understand how this all works yet. As a first step, I'm trying to add the patch that allows x2 deinterlacers when the test would fail because of rounding errors. It requires a change to vsync.cpp. I can see two copies in the build system. I've tried changing one copy then the other, rebuilding each time, but on both occasions my changes disappeared. I used

make clean-all in myth/myth followed by make clean; make build in meta/minimyth.

What am I doing wrong?
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

Glidos wrote:I clearly don't quite understand how this all works yet. As a first step, I'm trying to add the patch that allows x2 deinterlacers when the test would fail because of rounding errors. It requires a change to vsync.cpp. I can see two copies in the build system. I've tried changing one copy then the other, rebuilding each time, but on both occasions my changes disappeared. I used

make clean-all in myth/myth followed by make clean; make build in meta/minimyth.

What am I doing wrong?
The patch should be put in in gar-minimyth/script/myth-0.21/mythtv/files/, the md5sum should be added to gar-minimyth/script/myth-0.21/mythtv/checksums and the PATCHFILES variable in gar-minimyth/script/myth-0.21/mythtv/Makefile should be modified to include the name of the patch file.

After that, you should run 'make clean-all' in gar-minimyth/script/myth/myth and 'make clean' in gar-minimyth/script/meta/minimyth.

By the way, what patch is this? If it is useful to others and doesn't break anything, then I can add it to MiniMyth.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Glidos
Contributor
Posts: 164
Joined: Tue Sep 02, 2008 8:50 am

Post by Glidos »

I was intending to use patches in the future, but for now, I was trying just to make direct changes to the source. Can it be done like that? I realise it would need to be in patch form if it were to be added to minimyth permenantly. I was just looking for a quick way to test things for now.

What I'm looking to work on is a software field order deinterlacer. I believe that's what is needed to get best quality when playing interlaced content with a matching interlaced display mode. It's the only thing lacking from my current set up.
Glidos
Contributor
Posts: 164
Joined: Tue Sep 02, 2008 8:50 am

Post by Glidos »

Pablo wrote:By the way, what patch is this? If it is useful to others and doesn't break anything, then I can add it to MiniMyth.
It's all done now. I've added a fieldorder deinterlacer. Seems to work great with my X1250 based system. I now, at last, get image quality and playback smoothness from MythTv as good as my old DVRs.

The two patches are uploaded to Ticket #6391 and #2903.

2903 is controversial apparently.
Glidos
Contributor
Posts: 164
Joined: Tue Sep 02, 2008 8:50 am

Post by Glidos »

Glidos wrote:The two patches are uploaded to Ticket #6391 and #2903.

2903 is controversial apparently.
2903 has just been committed to trunk, so perhaps it's not so controversial.
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

The patch in 6391 claims to be against MythTV 0.21. However, it fails to apply to the latest MythTV 0.21 fixes branch.

It appears to assume that the opengl patch (which is included as part of the vdpau patch) is required.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Glidos
Contributor
Posts: 164
Joined: Tue Sep 02, 2008 8:50 am

Post by Glidos »

Pablo wrote:The patch in 6391 claims to be against MythTV 0.21. However, it fails to apply to the latest MythTV 0.21 fixes branch.
I can rebase it on fixes if you like, but I was hoping it was just right for minimyth how it is because it was generated from mythtv source from minimyth after a build, hence with all the minimyth patches applied.

I've just built v65 of minimyth including it and the 2903 patch... unless I uploaded an old version, I guess that's possible.
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

Glidos wrote:
Pablo wrote:The patch in 6391 claims to be against MythTV 0.21. However, it fails to apply to the latest MythTV 0.21 fixes branch.
I can rebase it on fixes if you like, but I was hoping it was just right for minimyth how it is because it was generated from mythtv source from minimyth after a build, hence with all the minimyth patches applied.

I've just built v65 of minimyth including it and the 2903 patch... unless I uploaded an old version, I guess that's possible.
It builds fine with MiniMyth. However, that is because MiniMyth includes the VDPAU patch witch includes the OpenGL patch.

However, anyone who might download it from the MythTV TRAC system might find it frustrating that it does not apply to 0.21. Maybe just information on the ticket that the OpenGL patch (which is included in the VDPAU patch) is required for it to apply.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

I have added these patches to MiniMyth. They have been committed to SVN and will be in the next test build. As long as they to not cause problems for others (they do not cause problems for me), I will leave them in.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Glidos
Contributor
Posts: 164
Joined: Tue Sep 02, 2008 8:50 am

Post by Glidos »

Great, thanks. Looks like I'll be back to downloading minimyth again for a while, rather than building my own. :D
Glidos
Contributor
Posts: 164
Joined: Tue Sep 02, 2008 8:50 am

Post by Glidos »

Mark Kendall has committed 6391 to trunk, while making a few improvements. I've backported his version to fixes and to fixes plus vdpau and opengl. I've attached the improved patches to the original ticket.
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

Jean-Yves Avenard has included the latest patches from tickets 2903 and 6391 in his latest VDPAU patch for MythTV 0.21 fixes. I have updated to this latest patch and everything builds fine. It will be in the next test build (66b5).
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Post Reply