You are not logged in.

#1 2009-01-24 05:36:25

methuselah
Member
Registered: 2007-10-02
Posts: 570

How do I create a md5sum for my edited patch?[SOLVED]

I have a question about making a md5sum for some files. See, I make my own parallel kernel.


What I do is I edit the ABS kernel26.preset file, and the ABS kernel26.install file.... then I download the -ARCH patch with "wget -c" and edit the -ARCH patch to use the name -ARCHtest (using mousepad and "ctrl + h"),


My files are re-named "kernel26test.preset" and "kernel26test.install" and are edited to use the names "-ARCHtest" and "26test" (like 2.6.28.1-ARCHtest and vmlinuz26test....)


I change the name of the -ARCH patch to use the new name like this:


patch-2.6.28.1-1-ARCHtest

So everything in all of my edited files work perfectly except the md5sums part of the PKGBUILD.... which I can build without..... but I would prefer to learn the correct way to create new md5sum numbers for my edited files so I can add the new md5sums numbers to my PKGBUILD.


That way I can share my PKGBUILD, my edited -ARCHtest patch, my kernel26test.preset, and my kernel26test.install files with others to build parallel kernels.

Last edited by methuselah (2009-01-24 21:38:47)

Offline

#2 2009-01-24 05:41:17

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,403
Website

Re: How do I create a md5sum for my edited patch?[SOLVED]

The command to create md5sums is.....   md5sum!  Using "makepkg -g" will do it for all files for you automatically.

Offline

#3 2009-01-24 05:53:32

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: How do I create a md5sum for my edited patch?[SOLVED]

Allan wrote:

The command to create md5sums is.....   md5sum!  Using "makepkg -g" will do it for all files for you automatically.

Thank you, I've never made a md5sum before.... just checked them when downloading ISO images from distros....

So makepkg -g will create new numbers for the files that I changed? (the ones that fail the old md5sum check)

Last edited by methuselah (2009-01-24 05:55:41)

Offline

#4 2009-01-24 06:04:22

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: How do I create a md5sum for my edited patch?[SOLVED]

makepkg -g spits out the md5sum=() array that the PKGBUILD needs, copy pasta ready to serve.


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#5 2009-01-24 06:05:31

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: How do I create a md5sum for my edited patch?[SOLVED]

Thanks again it works nicely now:

  -> Found patch-2.6.28.1-1-ARCHtestAMD2 in build dir
  -> Found config.x86_64 in build dir
  -> Found kernel26testAMD2.preset in build dir
  -> Found kernel26testAMD2.install in build dir
==> Validating source files with md5sums...
    linux-2.6.28.tar.bz2 ... Passed
    patch-2.6.28.1-1-ARCHtestAMD2 ... Passed
    config.x86_64 ... Passed
    kernel26testAMD2.preset ... Passed
    kernel26testAMD2.install ... Passed
==> Extracting Sources...

You know, I'm embarrassed at how I read the man pages wrong.... and then searched for info in the wrong way.... when the simplest command was all I needed to do.


So does anybody think I should share my -ARCHtest files as an AUR package that makes a parallel kernel? (if you like to use the custom settings like AMD)

Last edited by methuselah (2009-01-24 06:14:29)

Offline

#6 2009-01-24 09:29:52

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How do I create a md5sum for my edited patch?[SOLVED]

You haven't given any details about your ARCHtest kernel, and how it differs from the stock kernel, so it will be hard for people to answer that question.

Actually... if I'm reading your first post correctly, you have simply changed the patch, install, and preset files so that your kernel has a differnet name. If that's the case, I don't think you need to submit it to the AUR. Alternative kernel packages are only required when different patchsets are used in the build e.g. kernel26ice, kernel26rt, etc.

And for my own curiosity - what do you use this kernel for, given that it is functionally identical to the stock kernel?

Offline

#7 2009-01-24 18:17:40

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: How do I create a md5sum for my edited patch?[SOLVED]

tomk wrote:

You haven't given any details about your ARCHtest kernel, and how it differs from the stock kernel, so it will be hard for people to answer that question.

The only differences (other than the name adjustments) are that my PKGBUILD uses the "make menuconfig" command and has a different "kernver" line with a different "patchset" line to make the kernel build with the new name..... the only reason I did this was so I could easily run "makepkg" and have a kernel that I could easily configure for my own hardware with the menuconfig.... and so it would create it's own files..... so that it doesn't overwrite the original "/lib/modules/2.6.28-ARCH" or "/usr/src/linux-2.6.28-ARCH".... and so it doesn't overwrite the "vmliuz26" and the "System.map26" as well as other files in mkinitcpio.d..... I also use the same procedure to try other patches instead of -ARCH like the -mm patch. I had originally started all of this to use the -zen patch instead of building the AUR -zengit or -zenmm because they were missing the "Zen Tune" and "Ricer" sections, as well as not having the 432HZ setting. (I have stopped using the -zen patch recently and want to learn how to modify the -ARCH patch to use those configurations.... as a way to learn more about Linux).

Pictures to explain what I mean:
http://i480.photobucket.com/albums/rr16 … cd2eb3.png
http://i480.photobucket.com/albums/rr16 … 832b68.png
http://i480.photobucket.com/albums/rr16 … 75b268.png
http://i480.photobucket.com/albums/rr16 … 3fbf61.png


tomk wrote:

Actually... if I'm reading your first post correctly, you have simply changed the patch, install, and preset files so that your kernel has a differnet name. If that's the case, I don't think you need to submit it to the AUR. Alternative kernel packages are only required when different patchsets are used in the build e.g. kernel26ice, kernel26rt, etc.

Yes, as well as the other changes to the PKGBUILD to use "make menuconfig" and the usage of a different "kernver" "patchset" to use the new names so you don't overwrite your original kernel's /lib/modules and /usr/src. The only reason I considered sharing these files to the AUR is because I frequently read posts in the kernel section of the forum about making a custom kernel that are installed parallel to the stock -ARCH kernel..... so that they don't ruin their default -ARCH kernel or it's files.... and so that they always have a working backup kernel that can update it's binary on it's own..... just in case they do something wrong with the settings in their compiled "test" kernel using the make menuconfig command.


I always wanted to help those posts, but explaining all of the ways to change the kernel26 ABS files would always confuse the matter.


What I found even more confusing was the ArchWiki page for building kernels, I never had luck using those methods.... and i see others run into problems with that all of the time. I tried every way in the ArchWiki.....  it's what originally made me make my own files since I couldn't get those ones to work correctly. I found that the ABS tree had the best written files, all they need was a bit of editing to build the new "test" kernel with a different name that wouldn't overwrite any of the original -ARCH files.


And the kernels available in the AUR are all specialized except for the the vanillia -ARCH one, and that one overwrites your default -ARCH kernel if you build it since it use the "-ARCH" name..... so you will always have to rebuild it with your own configurations after every kernel update.


My idea was to have an easy AUR PKGBUILD that uses the "make menuconfig" command for people who want to specialize for their hardware specs (AMD64/Intel Duo).... while still having the exact -ARCH patch (just a different name).... and having this build with out any damage to the original -ARCH kernel and it's files. The only thing changed in the .config would be the (-ARCHtest) local version..... everything else would be up to the person using make menuconfig for their hardware....


It just would be easy to answer those questions with a link to an AUR package, that all they had to do was run "makepkg" and then choose their settings in the menuconfig, install with pacman -U and then add a new section in their /boot/grub/menu.lst...... 



tomk wrote:

And for my own curiosity - what do you use this kernel for, given that it is functionally identical to the stock kernel?

This is not a "test" kernel for strange purposes.... I only used that name because it was short.... I could make it named -ARCHcustom or -ARCHbuild or -ARCHparallel.....


As for what I use this kernel for.... it is only my laptop kernel.... I am not a developer or a programmer or anything important.... I am just a Linux beginner that wanted a way to use the AMD64 settings instead of the Generic settings, as well as a way to learn a bit more about my system by tinkering with it..... I also have the rest of my computer built from source using C[XX]FLAGS specific to my AMD Turion X 64 TL-60.... so why not have the kernel AMD64 also......


As for my own specific settings..... I have messed with the Timer (1000HZ) and recently went back to 300HZ (I prefer the 432HZ that the -zen patch uses but I stopped using the zen sources and want to learn how to modify the -ARCH patch to use the 432HZ setting). I like the AMD64 settings and other things like the "-Os" optimize for kernel size setting.... as well as losing some modules that I don't need.... and trying some other things that were offered in the kernel config as new and experimental.



...... And to finish this up..... I only considered sharing this because I have been maintaining my custom kernels like this for myself for the last 5 months.... so now that I could have the proper md5sums on the PKGBUILD I was thinking that I could just as easily share this to the AUR and maintain it.

Last edited by methuselah (2009-01-24 21:38:24)

Offline

#8 2009-01-24 20:39:54

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: How do I create a md5sum for my edited patch?[SOLVED]

yo, thumbnails ftw!  this thread took *forever* to load.

there are already a couple of custom kernel PKGBUILDS, though i like your method better.  however, with your method, once everything's modified, there are no new changes to the PKGBUILD, and almost all the changes from the one old string to the one new string.

what might be more useful is a small batch script, using sed, that makes the changes... moving files to new names and changing the strings inside the files.

btw, mark as solved, por favor.


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#9 2009-01-24 21:29:30

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: How do I create a md5sum for my edited patch?[SOLVED]

kludge wrote:

yo, thumbnails ftw!  this thread took *forever* to load.

there are already a couple of custom kernel PKGBUILDS, though i like your method better.  however, with your method, once everything's modified, there are no new changes to the PKGBUILD, and almost all the changes from the one old string to the one new string.

I'll change the pics to links. And I'll mark this solved.

As for the PKGBUILD, the only change is the use of "make menuconfig" instead of "yes "" | make config", and also the way I made this part:

_kernver="${_basekernel}${_patchset}"

Instead of downloading the -ARCH patch it would be included as -ARCHtest or whatever name is best (I like -ARCHparallel now) and the name would be in this section:

_patchset="-ARCHtest"
kludge wrote:

what might be more useful is a small batch script, using sed, that makes the changes... moving files to new names and changing the strings inside the files.

btw, mark as solved, por favor.

I'm still new to Linux.... I can problem solve through trial and error to make something work like this ABS kernel26 PKGBUILD edit..... but I really have no experience with writing my own bash scripts yet. I believe someone has made some sort of srcipt that does something like that.... I just have been using this way for the last 5 months with different patches like -zen, -mm, and the -ARCHtest..... and it's really easy to change the "_patchset=" and the other files.


I just thought the absolute easiest way would be to download an AUR tarball that contains the PKGBUILD, the -ARCHtest patch, the kernel26test.preset, the kernel26test.install, and both the config and config.x86_64 with the only changes being the Local Version name of (-ARCHtest) instead of (-ARCH).


Then all you have to do is download the tarball, extract to a folder, and run "makepkg". Configure the menu, then install the finished kernel while adding it to the menu.lst in /boot/grub.

Last edited by methuselah (2009-01-24 21:35:25)

Offline

#10 2009-01-24 21:39:55

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How do I create a md5sum for my edited patch?[SOLVED]

Thanks for the explanation. If you had mentioned the addition of make menuconfig in your first post, I'd have left you alone. smile

Offline

#11 2009-01-24 22:19:01

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: How do I create a md5sum for my edited patch?[SOLVED]

tomk wrote:

Thanks for the explanation. If you had mentioned the addition of make menuconfig in your first post, I'd have left you alone. smile

No sweat.

Offline

#12 2009-01-27 08:12:04

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: How do I create a md5sum for my edited patch?[SOLVED]

tomk wrote:

Thanks for the explanation. If you had mentioned the addition of make menuconfig in your first post, I'd have left you alone. smile

I just uploaded the AUR package for my kernel26parallel: http://aur.archlinux.org/packages.php?ID=23467


You can check it out and tell me if you see anything that needs changing. Thanks again.

Offline

Board footer

Powered by FluxBB