How to build new update

I know how to checkout a fresh copy for say, core141, and build it. When a new update comes out (in this case core142), I run into problems: running the build keeps netting me files for core141. I don’t know what I’m doing wrong and it doesn’t help that I’m not a developer.

Here are snippets from a little bash script I wrote to speed up the building steps:

sudo ./make.sh clean
echo "Switch git to $release branch"
git -C ipfire-2.x branch $release -t origin/$release
git -C ipfire-2.x checkout $release
pushd ipfire-2.x
sudo ./make.sh gettoolchain
sudo ./make.sh downloadsrc
sudo ./make.sh build

I’ve tried deleting the cache dir to force the download of the sources, but I still get the old sources!

What am I misunderstanding?

You forgot to run:

git pull

1 Like

Correct. “git pull” is the missing part.

Normal you should use the master (current stable) or next (the upcoming) branch
for developing. (If you want to send patches choose next!)
the core branches are only needed if you want to build for an old state.

I tried the git pull before I saw these replies actually, and I was still getting core141 built. But, I wasn’t using the master branch, either.

I ended up wiping the entire local copy and grabbing everything again. I started the build and it was all going great until it crapped out on building an snmp package. :confused:

I’ve switched to master now and I’m retrying the build.

With core142 builds, do I have to copy any patched modules and the locally built kernel to my ipfire system in order for it to load the patched module?

Which kernel files do I copy over? I believe it’s:

initramfs
vmlinuz

Anything else?

all files in boot that has the kernel version number.

initramfs, vmlinuz, config and map
and
/lib/modules/

Will give that a go with my patched bnx2x module and then report back.

I guess I wouldn’t have to re-run grub2-mkconfig after moving my locally built /boot files and kernel modules over to my ipfire box. But, wouldn’t I have to recreate the initramfs? What’s the command for that?

/usr/bin/mkinitrd – help

might give enough info to run it.

IPFire use dracut so mkinitrd will not build a correct initrd.

If you not use the pae kernel you can copy the initrd from the buildsystem.
for pae-kernel copy the kernel and the modules and run rebuild-initrd

Correct. “git pull” is the missing part.

So I did that in my bash script. Here are the specific lines:

git -C ipfire-2.x branch master -t origin/master
git -C ipfire-2.x checkout master
git -C ipfire-2.x pull

I run the first one to make sure it’s tracking master.

I ran the build and I’m now staring at image and ISO files for 144 instead of 143. What have I done wrong?

The “master” branch is already on core144 which will released next days.

oohhh…ok. I thought I screwed up again. I’m going to wait for the announcement and then finally try this custom build with the new kernel security in place.

The kernel is the same in core143 and core144.

My custom module loaded just fine with update 144. Thanks for all the help!! :slight_smile: