Initrd for RCN kernel

Hi,

I am trying to build natively (on xM with Ubuntu) the preempt_rt
patched 3.6.2 kernel using
https://github.com/RobertCNelson/stable-kernel/blob/master/build_kernel.sh
script.
I've manage to build the kernel by adding corresponding patch command
to the build_kernel.sh. What I still did not understand is where to
get proper initrd (uInitrd) for the newly built kernel? Are there any
scripts to build it also? I am currently trying to build .deb with
build_deb.sh (not ready yet). Will it then include initrd? I would
appreciate any hints and explanations.

Thank you,
Andrey.

Hi,

I am trying to build natively (on xM with Ubuntu) the preempt_rt
patched 3.6.2 kernel using
stable-kernel/build_kernel.sh at master · RobertCNelson/stable-kernel · GitHub
script.
I've manage to build the kernel by adding corresponding patch command
to the build_kernel.sh. What I still did not understand is where to
get proper initrd (uInitrd) for the newly built kernel?

initrd's can only be generated from a running image... It's perfectly
fine/safe too boot with your new uImage and the old uInitrd, as long
as your modules are in the rootfs...

Once booted:

sudo update-initramfs -c -k `uname -r`
sudo mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs
-d /boot/initrd.img-`uname -r` /boot/uInitrd

Are there any
scripts to build it also? I am currently trying to build .deb with
build_deb.sh (not ready yet).

Oh, since about 2.6.38 or soo, the "build_deb.sh" doesn't work on it's
own, there's one critical patch in my patch.sh that you've missed by
not using my scripts as is. .:wink: Upstream submission had since stalled
since it regresses someones's 386 cross script on x64..

Regards,

I've manage to build the kernel by adding corresponding patch command
to the build_kernel.sh. What I still did not understand is where to
get proper initrd (uInitrd) for the newly built kernel?

initrd's can only be generated from a running image... It's perfectly
fine/safe too boot with your new uImage and the old uInitrd, as long
as your modules are in the rootfs...

Once booted:

Ah, so it might be something else which went wrong by me. When I was
trying to boot the new kernel it crashes telling something about smp
related functions (do not remember exactly what it was). Do you think
it is safe to disable SMP support at all for xM? My thought was that
it might be because of no proper uInitrd. So I have to look more
precisely on what is going wrong.

Oh, since about 2.6.38 or soo, the "build_deb.sh" doesn't work on it's
own, there's one critical patch in my patch.sh that you've missed by
not using my scripts as is. .:wink:

Actually, at least as I understand :slight_smile: , I do use your script almost
as is. I just add additional bzcat ... | patch line to the
patch_kernel function.

Thank you very much!
Andrey.

I've manage to build the kernel by adding corresponding patch command
to the build_kernel.sh. What I still did not understand is where to
get proper initrd (uInitrd) for the newly built kernel?

initrd's can only be generated from a running image... It's perfectly
fine/safe too boot with your new uImage and the old uInitrd, as long
as your modules are in the rootfs...

Once booted:

Ah, so it might be something else which went wrong by me. When I was
trying to boot the new kernel it crashes telling something about smp
related functions (do not remember exactly what it was). Do you think
it is safe to disable SMP support at all for xM? My thought was that
it might be because of no proper uInitrd. So I have to look more
precisely on what is going wrong.

That might be a sideeffect of the "preempt_rt" patchset... I know
we've seen issues in the past with "CONFIG_PREEMPT", but that was with
the mmc card, not smp.. (hence, CONFIG_PREEMPT_NONE is set by
default)..

But yes, if your only running on the xM, it's prefectly safe to
disable SMP (and might as well OMAP4 support) :wink:

Oh, since about 2.6.38 or soo, the "build_deb.sh" doesn't work on it's
own, there's one critical patch in my patch.sh that you've missed by
not using my scripts as is. .:wink:

Actually, at least as I understand :slight_smile: , I do use your script almost
as is. I just add additional bzcat ... | patch line to the
patch_kernel function.

This is the patch* that fixes cross arm deb generation on x86..

* https://github.com/RobertCNelson/stable-kernel/blob/master/patches/trivial/0001-kbuild-deb-pkg-set-host-machine-after-dpkg-gencontro.patch

Regards,