• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Prevail Kernel Ramdisk Packer

that's not the shabby's init.rc i have. the one i downloaded in kpack has disable oneshot after the sysinit line. or is that your edit?


it is possible I made a mistake, but I am pretty sure I unpacked Shabby RC1 to that folder

you could get the boot.img file from the Shabby RC1 and copy to the kpack folder

./split_bootimg.pl boot.img

then extract the gz file, then extract the cpio file and you will have the files

I just dont see how I could of made a mistake because the lines

service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
enable
oneshot

is not in the stock init.rc or in the Shabby test kernel I had, and I never added that line
is it possible there is more than one version of Shabby RC1, and maybe I downloaded the old one or something
 
i just unzipped and split and extracted the RC1 file I downloaded and checked the init.rc and that line says disabled, so if there is a version of it out there that has it as enabled than there is more than one version of rc1
 
that's not the shabby's init.rc i have. the one i downloaded in kpack has disable oneshot after the sysinit line. or is that your edit?

i just unzipped and split and extracted the RC1 file I downloaded and checked the init.rc and that line says disabled, so if there is a version of it out there that has it as enabled than there is more than one version of rc1
Sorry guys I should have clarified, that is my edit.

I have not tested it to find if it works yet. I am attempting to put together a cwm flashable zip with that included.
 
I am sure you guys know this already, but if you are gonna do google searches to look for mods you can do you may find more info if you search for initramfs mods

the ramdisk is probably more widely known as initramfs
 
i don't think you will be able to take modules from other kernels and use them in our initramfs, I may be wrong but I did try taking ext4.ko and jb2.ko from a different kernel and they did not work

so I used the source of our kernel and copied the

kernel/arch/arm/configs/SPH-M820_defconfig
to
kernel/.config

ran

make menuconfig

loaded alternate configuration and chose .config

in files systems i selected ext4 and ext4 debugging as modules
saved the configuration

ran
make

when it was done i took the ext4.ko from
kernel/fs/ext4
and the jdb2.ko from
kernel/fs/jdb2

i then made the modded initramfs with these modules and the init.d stuff I added

you can probably compile some compatible modules with the source the same way, but there is little room

maybe we can take out that hotspoteventmonitoring module, i am not too sure what it is for

if you get Shabby's way of doing init.d to work, than we can remove my init.d files and free up a little space

just ideas i am throwing at you guys
 
Those are good ideas I have only done menu config on one linux distro and it will take some looking into before I am ready to attempt it here.
kernel.org has been down though so I can not even look into the source.
 
Those are good ideas I have only done menu config on one linux distro and it will take some looking into before I am ready to attempt it here.
kernel.org has been down though so I can not even look into the source.

you have to use the source from

https://opensource.samsung.com/



or else it wont work, you wont be able to make a bootable zImage but you can make the modules

just go there and search for sph-m820
 
I have 2 questions, now that I see this new info.

First the jbd.ko for ext4 wont work with ext3?

for example if you want ext3 and ext4 could you just use the one jbd.ko?

and second from the way you say it became too big is it because of the 2 extra .ko modules? or would even one make it too big?

Can you upload the compiled ext3 that you have I would like to look at a few things.

There might be other areas to trim down maybe.

sorry some how i missed this post earlier

jdb.ko is ext3 debugging and jdb2.ko is ext4 debugging

when i tried to add all four it was too big, so I decided to drop ext3 since it is pretty much crap anyway

i have since deleted those files, i have deleted and recreated my kernel source directory numerous times trying to make a bootable zImage

i would prefer you guys compile the modules, the main reason I am doing this, is to get more people messing with kernel dev stuff

Shabby is understandably too busy latley to work on this, and trying to make a new zImage has stumped me.

I am willing to share what I have tried and what my ideas are, but the more people we have working on this the sooner we will make progress.
 
Thanks, good information.
and I agree, there are a few real talented people here. I hope some of the theme guys take an interest, I too think the more people looking into it the better.
 
Well I found out why they do them differently.

I also found why hroarks require S* to boot.

In Shabbys init.rc has this line

Code:
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
    enable
    oneshot
Which if im not mistaken, (and I sure could be) init.d is called by busybox as part of the addons in something like android kitchen.
and hroarks uses a script

Code:
#!/tmp/busybox sh

if cd /system/etc/init.d >/dev/null 2>&1 ; then
    for file in S* ; do
        if ! ls "$file" >/dev/null 2>&1 ; then continue ; fi
        /system/bin/sh "$file"
    done
fi
also from busybox but in a tmp location, more of a hack on I guess you may call it. and as you can see the script calls for S* in order to run.

that's not the shabby's init.rc i have. the one i downloaded in kpack has disable oneshot after the sysinit line. or is that your edit?


Sorry guys I should have clarified, that is my edit.

I have not tested it to find if it works yet. I am attempting to put together a cwm flashable zip with that included.
well after lots of testing I found that I can not make shabby's version use init.d
however I did find a slightly more elegant way to make hroaks work.
in the code

Code:
#!/tmp/busybox sh

if cd /system/etc/init.d >/dev/null 2>&1 ; then
    for file in S* ; do
        if ! ls "$file" >/dev/null 2>&1 ; then continue ; fi
        /system/bin/sh "$file"
    done
fi

change /tmp/busybox sh
to
/system/xbin/busybox sh

remember when you root it busybox is put into xbin in the system folder so there really is no need to run it from 2 places, the /tmp folder and the /system/xbin

That also saves you from needing the su subfolder in /tmp.

I also changed the minfree's in init.rc to match what the v6 script gives, so its like having it without needing to.
I also removed the IQ service and related but that still does not stop it. As found out by blood it is still getting called in the framework, but I figure if you remove the service and then use his no CIQ framework you should have no conflicts like I had before.
 
i recreated some of the modules with debug symobols stripped off, it seems to work ok for me, can you guys test them too

if they pass your testing, it should save some memory and room to add more stuff

the modules that will be different are ext4.ko jbd2.ko dhd.ko and hotspot_event_monitoring.ko

the dhd.ko and the hotspot_event_monitoring.ko are the wifi drivers

i was not able to do the rfs and fsr files because we dont have source for them

i included all the modules for competeness

MEGAUPLOAD - The leading online storage and file delivery service
 
I need a little bit of help with this. I just broke my VM trying to update python from 2.6 to 2.7 because I couldn't get kpack to spit out an odinkrnl.tar that odin would not report as an invalid image. The old system was Ubuntu 10.4 with Java 6 JDK, the android repository following the instructions here: Initializing a Build Environment | Android Open Source (with a mirror of the Kernel environment found on an HTC forum), Eclipse and the Android SDK following the instructions from Installing the SDK | Android Developers, and the source files from samsung.

I'm now starting over with Ubuntu 11.4, I've installed Sun java6 JDE and I'm currently in the process of installing Eclipse. Is there any 'gotchas' I need to be aware of that could mess me up?
 
I can unpack/pack boot.img but would love to have this instead of adb mounting the boot.img (for multiple phones). What might I need to do to make this work on other devices (port kpack)? Thanks in advance.

Rob
 
I can unpack/pack boot.img but would love to have this instead of adb mounting the boot.img (for multiple phones). What might I need to do to make this work on other devices (port kpack)? Thanks in advance.

Rob

well there is a folder in this zip that is called cwmfiles that is used to generate a CWM flashable kernel

DO NOT USE THAT WITH OTHER PHONES, it will most likely brick them becuase the update binary file is coded for the partition structure of the prevail phone, and the update script is set to flash our partitions, you can use that script as an example to make your own script

If CWM is available for your phone, you may be able to find the equivlent files somewhere

most of the files in here are just perl scripts, the main thing that would need to be edited in them is the base address of your kernel
 
Back
Top Bottom