[Q] compile own kernel? configuration - Galaxy Tab General

I used rotohammer's method for backing up the AT&T Galaxy Tab and it worked wonderfully. I compiled the GT-P1000_Kernel patched with SGH-I987_Kernel and did a standard make and then flashed the zImage onto the galaxy. It resulted in kernel panic. Does anyone know what parameters to use with make or configuration changes that need to be made?
Thanks
ps. when I used heimdall, I only "heimdall flash --kernel zImage".

I also couldn't find a config.gz in the /proc dir. Does anybody know why it is missing and what has taken its place?

success at last
Yay, it works now! thanks roto for the initramfs tip.

what kind of modification did u make to the kernel? do you mind sharing?

[Q] how did you compile your own kernel?
Hi,
I'm in disperate need to do this. I have downloaded the sources from samsung opensource -> followed the instruction in the README.txt -> compiled the kernel and the modules successfully -> used the initramfs from the stock zImage -> but when I flash the zImage (Size ~ 432 KB) I get kernel panic.
I do not think it is possible to boot in verbose mode or have a serial port console log.
letolkki: please share with us how you did it? how did you compile a zImage which boots.??????
share with us please!

I used make menuconfig to specify the location of the initramfs (compression to none). Do not use the build script above the root as that seemed to mess things up for me. The size of my kernel is approx ~5meg with the initramfs included and ~3 without. Then used Heimdall to push it on.

I didn't make any mods as of yet. Just a quest for knowledge and tinkering. Just making sure I can when I need to.

What exactly did you modify? Here's my config, as related to INITRAMFS:
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_INITRAMFS_COMPRESSION_NONE=y
# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
My kernel size is only 2.9 megs. What else did you specify that has your kernel at 5 megs?
Thanks

you don't have the initramfs source file specified. Put the complete path to the initramfs in the config.

Even when I specified the file location generated during the compile, it still didn't work...size only 3 meg. Are you using the ramdisk.img generated and output into Android/out/target/product/...? Or, did you pull boot.img from the device and split ramdisk.img from the kernel?

chuckbeasley said:
Even when I specified the file location generated during the compile, it still didn't work...size only 3 meg. Are you using the ramdisk.img generated and output into Android/out/target/product/...? Or, did you pull boot.img from the device and split ramdisk.img from the kernel?
Click to expand...
Click to collapse
yep, i pulled it from the device

Would you please tell me how you did it exactly? I've been attempting over the past several hours and haven't been able to find a tool that would split boot.img. They keep telling me that it's not a valid image, but I pulled it from the device.

chuckbeasley said:
Would you please tell me how you did it exactly? I've been attempting over the past several hours and haven't been able to find a tool that would split boot.img. They keep telling me that it's not a valid image, but I pulled it from the device.
Click to expand...
Click to collapse
I used the script from
http://forum.xda-developers.com/wiki/index.php?title=Extract_initramfs_from_zImage
to get the initramfs from the zImage pulled from the device.

Much appreciated! I'll try this later tonight. Right now, I need a break...

I used verizon_zImage from ClockworkMod, but it fails the extraction with a gzip invalid compressed data--format violated error. How can I pull the zImage directly from the phone? It seems that boot.img doesn't work either.
Thanks

Here are the error messages I'm receiving for both verizon_zImage and boot.img, which I pulled from the GT:
[email protected]:~/ramdisk$ ./extract_initramfs verizon_zImage
-I- Extracting kernel image from verizon_zImage (start = 13117)
gzip: stdin: decompression OK, trailing garbage ignored
5979431+0 records in
5979431+0 records out
5979431 bytes (6.0 MB) copied, 195.453 s, 30.6 kB/s
-I- Extracting compressed cpio image from kernel image (start = 5410216)
gzip: stdin: invalid compressed data--format violated
-I- Extracting initramfs image from /tmp/cpio.img (start = , end = 11)
dd: invalid number `'
[email protected]:~/ramdisk$ ./extract_initramfs boot.img
-I- Extracting kernel image from boot.img (start = 13117)
gzip: stdin: decompression OK, trailing garbage ignored
-I- Extracting compressed cpio image from kernel image (start = 5410216)
gzip: stdin: invalid compressed data--format violated
-I- Extracting initramfs image from /tmp/cpio.img (start = , end = 11)
dd: invalid number `'

Looks like the script had a bug and has been updated. Here's the link: http://forum.xda-developers.com/showthread.php?p=8679959
Here's the updated script that allowed me to extract initramfs.cpio from boot.img:
#!/bin/sh
# This is an update version of the script found at
# http://forum.xda-developers.com/wiki/index.php?title=Extract_initramfs_from_zImage
#
# The problem with that script is that the gzip magic number occasionally occur
# naturally, meaning that some non-compressed files get uncompressed.
zImage=$1
#========================================================
# find start of gziped kernel object in the zImage file:
#========================================================
pos=`grep -P -a -b -m 1 --only-matching $'\x1F\x8B\x08' $zImage | cut -f 1 -d :`
echo -n "-I- Extracting kernel image from $zImage (start = $pos)"
dd if=$zImage bs=1 skip=$pos | gunzip > /tmp/kernel.img
#==========================================================================
# find start and end of the "cpio" initramfs image inside the kernel object:
# ASCII cpio header starts with '070701'
# The end of the cpio archive is marked with an empty file named TRAILER!!!
#==========================================================================
start=`grep -a -b -m 1 --only-matching '070701' /tmp/kernel.img | head -1 | cut -f 1 -d :`
end=`grep -a -b -m 1 --only-matching 'TRAILER!!!' /tmp/kernel.img | head -1 | cut -f 1 -d :`
if [ $start = "" || $end = "" ]; then
#========================================================================
# the cpio archive must be archived
#========================================================================
echo "-I- Extracting compressed cpio image from kernel image (start = $pos)"
pos=`grep -P -a -b -m 1 --only-matching $'\x1F\x8B\x08' /tmp/kernel.img | cut -f 1 -d :`
dd if=/tmp/kernel.img bs=1 skip=$pos | gunzip > /tmp/cpio.img
start=`grep -a -b -m 1 --only-matching '070701' /tmp/cpio.img | head -1 | cut -f 1 -d :`
end=`grep -a -b -m 1 --only-matching 'TRAILER!!!' /tmp/cpio.img | head -1 | cut -f 1 -d :`
inputfile=/tmp/cpio.img
else
echo -n "-I- Already uncompressed cpio.img, not decompressing"
inputfile=/tmp/kernel.img
fi
end=$((end + 10))
count=$((end - start))
if (($count < 0)); then
echo "-E- Couldn't match start/end of the initramfs image."
exit
fi
echo "-I- Extracting initramfs image from $inputfile (start = $start, end = $end)"
dd if=$inputfile bs=1 skip=$start count=$count > initramfs.cpio

chuckbeasley said:
I used verizon_zImage from ClockworkMod, but it fails the extraction with a gzip invalid compressed data--format violated error. How can I pull the zImage directly from the phone? It seems that boot.img doesn't work either.
Thanks
Click to expand...
Click to collapse
I used rotohammer's backup method to pull the zImage from the device.
http://forum.xda-developers.com/showthread.php?t=850359&highlight=backup+install+kernel

So do you guys have working kernels ?
I know from my Nexus days that custom kernels can made a massive difference to performance on the beast, so I am looking forward to seeing what people can do with the TAB
Keep up the good work !

I've built my own kernel to see if I could work around the dialing limitation on my VZW tab. Right now, it crashes randomly, but it does boot! I'm looking into the difference between the international version of Onedram and Verizon's version and why Verizon includes a OnedramRecovery unit. My kernel doesn't reference OnedramRecovery and I made more mods. So, I haven't isolated what is causing the instability. Right now, I'm back to Koush's kernel. I'll keep you informed on my progress.
Sent from my SCH-I800 using XDA App

Related

Properly sync music between itunes and Android with rsync?

Hi all,
I've been trying hard to replicate the 'echo mode' of SyncToy (Microsoft freeware) using rsync. If you want to understand how this mode acts, here is an illustration:
ht***tp://ww***w.laboratoire-microsoft.org/articles/win/synctoy/images/echo.jpg (sorry, i can't publish urls from my noob account)
Basically, the DEST folder is never analysed and only the changes made on the SOURCE folder between date 1 and date 2 are repeated on DEST folder.
Assuming that i never make any manual modification to my DEST folder this is the perfect solution.
Actually, i presume iTunes acts exactly this way and that's why syncs are so faster with iphone and ipod.
Why do I want to replicate this mode?
My sdcard is a class2 and it's really sloooow. Each time I run rsync, it tries to analyse my mac partition (ssd) AND my sdcard, and compare the two directories....which takes at least 1h30 for my whole library even if only 2 files have been added to SOURCE folder between date 1 and date 2!!
SyncToy is a Windows program, I use a macbook
All my music library is on my mac partition
Note: for the moment i run synctoy through a virtual machine with my itunes library folder being shared. It's working but it's not the best solution...
So if there is any rsync guru here: do you think there is any possibility to recreate this 'echo mode' using rsync?
Is rsync really what you want, given you don't need any of the clever things it can do?
My shell scripting knowledge is very sparse, but wouldn't something like this do:
find $SourceDir -mtime +1 -mtime -4 -type f -exec cp {} $DestDir \;
where in this example it (maybe ) copies any file last modified between 2 & 4 days ago (inclusive & exclusive respectively) from $SourceDir to $DestDir.
NB This is untested, I'm clueless & it also might need to be a bit smarter to handle anything other than a flat file structure (in which case replace cp with something that will make each ancestor directory if absent from the destination & will then cp into that), so you have been warned.
[Edit:] Yes, you'd need something like cpio instead of cp. If you're interested search for info on "cpio -pd"
Otherwise I was thinking about making a script:
1. create a simple text file with lines like that "/full/path/to/file/filename.ext;SizeInByte;LastModificationTime" for each file file in SOURCE dir at date 1.
2. At date 2, create a new similar text file
3. Compare the 2 text files and keep only different lines
4. Differences coming from date1 text file are deleted from DEST dir and differences coming from date 2 file are copied/overwritten.
Does your command deletes files that have been deleted in SOURCE dir between the two dates?
Isn't cpio for archiving, like tar,gz2,etc...?
venezia64 said:
Otherwise I was thinking about making a script:
1. create a simple text file with lines like that "/full/path/to/file/filename.ext;SizeInByte;LastModificationTime" for each file file in SOURCE dir at date 1.
2. At date 2, create a new similar text file
3. Compare the 2 text files and keep only different lines
4. Differences coming from date1 text file are deleted from DEST dir and differences coming from date 2 file are copied/overwritten.
Does your command deletes files that have been deleted in SOURCE dir between the two dates?
Isn't cpio for archiving, like tar,gz2,etc...?
Click to expand...
Click to collapse
Deletes? No, that would be impossible if you aren't allowed to scan the destination folder, /unless/ you follow a plan such as you outline above. I didn't realise you required this.
cpio with the -p option (passthrough) is effectively just a copy command which maintains the directory hierarchy.
Your above strategy sounds best. For the stored records, I think I'd use:
find $Dir -type f -printf %p\\0%s\\0%A+\\0\\n > file.log
as you can rely on \0 not turning up in any of the fields it separates; the \n just added to tidy the log up should you wish to check it in a text editor. Oh & the %A+ date format so that if you need to order two dates a lexical comparison is adequate, whilst still being human readable.
That said, you don't appear to want to use the size or time fields, & not storing them would slightly simplify the code. <-- Sorry, that's rubbish on my part; how else would you notice when a file had changed.
Then probably compare them using diff:
diff -a file1.log file2.log > diff.log
Parsing diff.log should then be a trivial matter of checking each line in turn & for those commencing <, remove the named file; for those commencing >, copy the file over.
It's possible for a file to change resulting in both lines above appearing in diff.log for the one file. In that case you obviously need to process the removal first & it's not obvious to me if < will always appear in the log before >, so maybe safer to handle all the < removals first then handle the > copies.
OTOH if the above assumption is safe /&/ you modify the above to process the directories as well as files, you might be able to get away with making the diff.log parsing step a simple matter of applying a suitable regexp match & replace to each line in the diff.log, with the resulting output being a script that does the removals & copies. That'd be quite cool.
>> [That said, you don't appear to want to use the size or time fields, & not storing them would slightly simplify the code.]
Well, if I just add an albumart to my music file or change a tag, the filename will not necessarily change but the ModificationTime will, for sure.
I'll have a look at your shell commands.
Btw, thanks a lot for helping me
venezia64 said:
>> [That said, you don't appear to want to use the size or time fields, & not storing them would slightly simplify the code.]
Well, if I just add an albumart to my music file or change a tag, the filename will not necessarily change but the ModificationTime will, for sure.
Click to expand...
Click to collapse
I know. Stupid oversight on my part which I realised just before you posted
I edited my post to reflect this & had to resort to colouring the incorrect comment as xda-dev doesn't seem to support any strikethrough markup.
I managed do the script but there is still one issue: at the beginning, when I declare the path variable, I cannot include a path with one or more spaces. For the moment, I just created symbolic links.
Code:
left=$HOME"/Desktop/SyncAndroid/left"
right=$HOME"/Desktop/SyncAndroid/right"
temp=$HOME"/Desktop/SyncAndroid/temp"
rightSED=$(echo $right | sed -e 's/\//@@@/g')
leftSED=$(echo $left | sed -e 's/\//@@@/g')
mkdir "$temp"
cd $left
find . -type d -print | sort > $temp/LOG_leftD
cd $right
find . -type d -print | sort > $temp/LOG_rightD
cd $temp
diff -a LOG_leftD LOG_rightD > diffD
cat diffD | grep '^>' | sed -e 's/^\> \./rm -r \"'$rightSED'/' | sed -e 's/\(.\)$/\1\"/' | sed -e 's/@@@/\//g' | sed -e 's/\([$]\)/\\\1/g' > rmdir
cat diffD | grep '^<' | sed -e 's/^\< \./mkdir \"'$rightSED'/' | sed -e 's/\(.\)$/\1\"/' | sed -e 's/@@@/\//g' | sed -e 's/\([$]\)/\\\1/g' > mkdir
chmod +x rmdir
chmod +x mkdir
./rmdir
./mkdir
cd $left
find . -type f -ls | sed -e '/DS_Store/d' | sed -e 's/^ *[0-9]* *[0-9]* [-rwx]* *[0-9] [a-zA-Z]* *[a-z]* *//' | sort > $temp/LOG_left
cd $right
find . -type f -ls | sed -e '/DS_Store/d' | sed -e 's/^ *[0-9]* *[0-9]* [-rwx]* *[0-9] [a-zA-Z]* *[a-z]* *//' | sort > $temp/LOG_right
cd $temp
diff -a LOG_left LOG_right > diff
cat diff | grep '^>' | sed 's/^.*[0-9] \./rm -r \"'$rightSED'/' | sed -e 's/\(.\)$/\1\"/' | sed -e 's/@@@/\//g' | sed -e 's/\([$]\)/\\\1/g' > remove
cat diff | grep '^<' | sed 's/^.*[0-9] \.//' > copy0
cat copy0 | sed -e 's/\(.\)$/\1\"/' > copy1
cat copy0 | sed -e 's/[^/]\{1,\}\.*[a-zA-Z0-9]*$//' | sed -e 's/^/\"'$rightSED'/' | sed -e 's/@@@/\//g' | sed -e 's/\(.\)$/\1\"/' | sed -e 's/\([$]\)/\\\1/g' > copyPath
cat copy1 | sed -e 's/^/cp -p \"'$leftSED'/' | sed -e 's/@@@/\//g' | sed -e 's/\([$]\)/\\\1/g' > copy
paste copy copyPath > copy2
chmod +x remove
chmod +x copy2
./remove
./copy2
rm -r "$temp"
UPDATE 1: the code to take $ symbol (like in Ke$ha) in file path or filename
UPDATE 2: log files are sorted to fix some library updating bugs
NOTE: this scripts scans the right AND the left folder. In fact, I realised that scaning the music folder in the class2 sdcard only took 1-2seconds... Btw, I still don't understand why rsync takes so much time to sync the two folders (even if i don't ask for checksums comparisons)...
venezia64 said:
I managed do the script but there is still one issue: at the beginning, when I declare the path variable, I cannot include a path with one or more spaces. For the moment, I just created symbolic links.
<snip>
UPDATE 1: the code to take $ symbol (like in Ke$ha) in file path or filename
UPDATE 2: log files are sorted to fix some library updating bugs
NOTE: this scripts scans the right AND the left folder. In fact, I realised that scaning the music folder in the class2 sdcard only took 1-2seconds... Btw, I still don't understand why rsync takes so much time to sync the two folders (even if i don't ask for checksums comparisons)...
Click to expand...
Click to collapse
Glad you were able to devise a solution. Sed always gives me a headache as I can never remember what needs to be escaped & what doesn't. Clearly your grasp of shell scripting is better than mine.
Re the space in path issue, I take it it isn't adequate just to escape each space? The speed of rsync is puzzling. Is it definitely not connected to the sdcard? If you apply rsync to the same data, but with both directories on your pc, do you get the same performance differential?
I've tried doing this sync using rsync:
between 2 folders on my HDD, only modifications are done to the DEST folder
between a folder on my HDD and another one on my sdcard, each file file is copied all over again each time... which, obviously, takes time
I DID IT! If we look at rsync manual:
Code:
When comparing two timestamps, rsync treats the timestamps as
being equal if they differ by no more than the modify-window
value. This is normally 0 (for an exact match), but you may
find it useful to set this to a larger value in some situations.
In particular, when transferring to or from an MS Windows FAT
filesystem (which represents times with a 2-second resolution),
--modify-window=1 is useful (allowing times to differ by up to 1
second).
My sdcard partition is in FAT...
So the final rsync command which works really well
Code:
rsync -arv --delete --force --modify-window=1 "/Users/XXXXX/Music/iTunes/iTunes Music/Music/" "/Volumes/NO NAME/Music"
a for archive mode
r for recursive deletions (combined with --force)
v for more verbose (optional)
--delete to delete any file in DEST dir that is not in SRC dir
--force to force the deletion of not empty folders
--modify-window=1 to tolerate 1sec of difference between two corresponding files.
So forget about the previous script. This single commandline replaces it.
phewww
Awesome. Congratulations on figuring it out

[HELP]Re-create bootable blob with init.rc changes

Good evening all!!
Well after two days of hitting my head against the wall I decided to ask for help.. typical guy here!!
Problem: when using the blobtools to create a boot blob it soft bricks my transformer. No idea why.
Objective: Create a bootable boot blob with init.rc changes
Steps token to create the boot blob:
::Tools Used::
- BlobTools created by RaYmAn
- BootTools created by RaYmAn
::Blob used:: Stock kernel provided by clemsyn ( h t t p : / / w w w . megaupload.com/?d=GSIHUPJ6 ) kernelblob
1. After compiling blobtools I used "blobunpack" to unpack my blob
Code:
./blobunpack /home/mike/Android/kernelblob
Once done it produced "kernelblob.HEADER" and "kernelblob.LNX"
2. After compiling boottools I used "bootunpack" to unpack "kernelblob.LNX"
Code:
./bootunpack /home/mike/Android/kernelblob.LNX
Which produced "kernelblob.LNX-kernel.gz" and "kernelblob.LNX-ramdisk.cpio.gz"
3. Then I uncompressed "kernelblob.LNX-ramdisk.cpio.gz"
Code:
gunzip -c /home/mike/Android/kernelblob.LNX-ramdisk.cpio.gz | cpio -i
Which produced the initramfs. Made my changes to init.rc
4. Re-created ramdisk using this command
Code:
find . | cpio -o -H newc | gzip > ../newkernelblob.LNX-ramdisk.cpio.gz
5. Then re-create kernelblob.LNX (boot.img) with mkbootimg
Code:
mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel kernelblob.LNX-kernel.gz --ramdisk newkernelblob.LNX-ramdisk.cpio.gz -o newkernelblob.LNX
6. re-created blob using blobpack
Code:
./blobpack kernelblob.HEADER boot_blob LNX newkernelblob.LNX
Example provided by RaYmAn
Code:
./blobpack blobname.HEADER outputfile LNX boot.img
Then I try to flash the new boot_blob but after I reboot it just gets stuck on the ASUS screen...
Thanks for taking the time to read this and help me!!!! Hope this will help others
Just to note:: Even if I do not make changes to init.rc it still does not boot which tells me it might have something to do with the way I'm repacking the blob..... Thanks again for anyones help!!!
Anyone?????
trying to keep the thread alive.... I've tried with the offical blob too. No luck!
I am running ubuntu 64-bit with jdk installed!
The problem is the fact that you pass a cmdline to the mkbootimg command.
On most tegra2 based devices, the cmdline is passed by the bootloader UNLESS the boot.img has a cmdline. Your cmdline is obviously wrong for a tegra2 device, so it never boots.

Tools for extracting samsung kernel

Could anyone give me the right tools for unpacking the ramdisk and the zimage.
Cant find the right one!
Thanks!
in linux you can extract Image from zImage using this :
dd if=zImage bs=1 skip=16541 | gunzip > Image
where 16541 is number from this output : grep -P -a -b -m 1 --only-matching $'\x1F\x8B\x08' zImage | cut -f 1 -d
you can get zImage as file from kies firmware download roms

I'm trying to boot my Nexus 10 with your linux-kvm-arm kernel version 3.13...

Hello to everyone,
I'm trying to boot my Nexus 10 with another kind of kernel version,because I'm not interested to use the Android kernel,but the Ubuntu pure kernel. I've chosen to use the linux-kvm-arm kernel version 3.13 :
These are the commands that I have used :
git clone git://github.com/virtualopensystems/linux-kvm-arm.git
cd linux-kvm-arm
git checkout origin/chromebook-3.13 -b chromebook-3.13
curl http://www.virtualopensystems.com/downloads/guides/kvm_on_chromebook/config > .config
and then I've added these lines to the .config file :
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ASHMEM=y
CONFIG_ANDROID_LOGGER=y
CONFIG_ANDROID_PERSISTENT_RAM=y
CONFIG_ANDROID_RAM_CONSOLE=y
CONFIG_ANDROID_TIMED_OUTPUT=y
CONFIG_ANDROID_TIMED_GPIO is not set
CONFIG_ANDROID_LOW_MEMORY_KILLER=y
CONFIG_ANDROID_SWITCH is not set
CONFIG_ANDROID_INTF_ALARM is not set
CONFIG_FB_TILEBLITTING=y
CONFIG_PHONE is not set
CONFIG_USB_WPAN_HCD is not set
CONFIG_WIMAX_GDM72XX is not set
CONFIG_ARM_PLATFORM_DEVICES=y
CONFIG_ARM_CHROMEOS_FIRMWARE=y
CONFIG_CHROMEOS=y
CONFIG_CHROMEOS_VBC_BLK=y
CONFIG_CHROMEOS_VBC_EC=y
CONFIG_CHROMEOS_RAMOOPS_RAM_START=0x41f00000
CONFIG_CHROMEOS_RAMOOPS_RAM_SIZE=0x00100000
CONFIG_CHROMEOS_RAMOOPS_RECORD_SIZE=0x00020000
CONFIG_CHROMEOS_RAMOOPS_DUMP_OOPS=0x1
CONFIG_CLKDEV_LOOKUP=y
and then I did :
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make uImage dtbs
from here I've followed the tutorial that I've found here :
http://forum.xda-developers.com/showthread.php?t=1981788
and here :
http://forum.xda-developers.com/showthread.php?t=1981788&page=2
mkdir -p newkernel
cd newkernel
wget -c https://dl.google.com/dl/android/aosp/mantaray-kot49h-factory-174ba74f.tgz
tar xvzf mantaray-kot49h-factory-174ba74f.tgz
cd mantaray-kot49h
unzip image-mantaray-kot49h.zip
wget -c http://android-serialport-api.googlecode.com/files/getramdisk.py
chmod +x getramdisk.py
./getramdisk.py boot.img --> ramdisk.img
wget -c http://android-serialport-api.googlecode.com/files/android_bootimg_tools.tar.gz
tar xvf android_bootimg_tools.tar.gz
./mkbootimg --kernel ../../linux-kvm-arm/arch/arm/boot/zImage --ramdisk ramdisk.img --cmdline bootimg.cfg -o new-boot.img
fastboot flash boot new-boot.img
I think that something is wrong here,because it is not able to boot....I see a black screen and nothing else happens...
Hi,
probably too simple, but:
How does your .config look?
Did the curl actually work? (I ask because I tried your URL and it didn't work for me).
Did you actually compile a guest kernel too and boot it?
Special ChromeOS suupport does not exist in that branch.
Keep up the work, if you succeed booting linux, I got a prize for you.
Don't take it wrong, I'm just too bored of the tablet as it is now.
Wejgomi

Set Maximum CPU frequency on any Android ROM for the HP TOUCHPAD

The maximum and minimum cpu frequencies allow by the Kernel can be set to all the Android ROM ever made for the HP TOUCHPAD until now and forever!
This is apply as a native setting ( as shipped from the factory, we could say )
The ROM will not be modify, no need for ROOT access or install SuperSu or any Apps.
It can be done to an existing installed ROM, no need to re-flash, is safe and will not damage your installation or prevent you from using your TP. Even if you do not do it right, you will get your TP running as always.
This is only done in a Linux OS, I am using ubuntu, which it can also be run under a Virtual Machine in any other OS.
1. Get the boot.img from the zip ROM or the current uImage from the TP boot directory.
(The boot.img must be copy to the root/hpboot directory of the PC, not on the tablet)
2. Run each of this commands separately in terminal in the directory the boot.img is.
dumpimage -i boot.img kernel.uImage
dumpimage -i boot.img -p 1 ram
dd if=ram of=ramdisk.img.gz bs=64 skip=1
gunzip ramdisk.img.gz
mkdir ramdisk; cd ramdisk
cpio -i < ../ramdisk.img
3. Go to the ramdisk direcoty and open this file in a text editor:
init.tenderloin.power.rc
Copy and Paste under # CPU Scaling and # CPU boost the following:
Note: You can add different settings to each cpu0 or cpu1.
Different frequencies to each and also assigned different Governors to each cpu.
You have total and individual control.
# CPU Scaling
# Replace the numbers at the first two lines at the end with the frequencies your TP can handle.
# Replace the numbers at the last two lines at the end with the frequencies your TP can handle.
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 192000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 192000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1782000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1782000
# Configure Performance Governor
# This is optional, but it will speed boot time using both CPU at maximum frequencies.
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "performance"
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "performance"
# CPU boost
# Set your desire speed can not be higher than your maximum frequencies.
write /sys/module/cpu_boost/parameters/boost_ms 20
write /sys/module/cpu_boost/parameters/sync_threshold 1782000
write /sys/module/cpu_boost/parameters/input_boost_freq 1782000
You can configure the type of governor after the system finished booting on this line. Is all up to the Kernel and your choice, but interactive is good.
# Configure Interactive
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "interactive"
4. Save the changes and repack the ramdisk with kernel.
Open Terminal in the ramdisk folder and paste:
find . | cpio --create --format='newc' | gzip > ../ramdisk_Pack.img
5. Go to the folder where the original boot.img file is and you should have a file ( ramdisk_Pack.img )
Paste the following two commands:
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -n "TENDERLOIN MAX CPU" -d ./ramdisk_Pack.img ./ramdisk.uImage
mkimage -A arm -T multi -C none -n "Tenderloin Android MAX CPU" -d kernel.uImage:ramdisk.uImage uImage.Android_MAX_CPU
6. There is a file name uImage.Android_MAX_CPU in the same folder as your original boot.img, copy it to your TP boot directory and reboot.
If you enter a wrong frequency and it did not finished then do a hard reset and select the other boot image and use it as always. If it finished booting then you are running faster than ever!
To take in consideration:
The Kernel in the ROM has the frequencies that supports, most of the ROM comes with a top frequencies of 1782000. The SKZ kernel allows for a maximum frequency of 1890000.
The HP Touchpad where made with different suppliers of components. Due to this differences not all supports the same maximum frequencies. Very few can work under 1890000 or 18360000. But you can get lucky and have one. You should know and test the maximum speed that it will take, you can do that with Kernels apps before making modifications to the Boot Image, also the minimum frequencies are important as well.
The advantages of creating your own personal Maximum Speed Boot Image:
1 You will get faster boot time as the CPUs are set to work after the system starts the booting process and do not have to wait until the GUI starts and the Kernel app applies the settings.
2. Keep your ROM secure, no ROOT and no Super User, use it as is.
3. Less apps to install to take space and waste of Memory. Kernel apps and Super User have background services that are all time running just to give you the extra speed. Other apps can get the extra Ram for more processing.
4. There is more benefits of running the device at a higher frequency with no extra processing power, than have multiple apps to fine tune your CPU and governors but use resources.
View attachment 4613960
I don't know how to do with this, please help.
[email protected]:/mnt/g/devices/tenderloin/12.5.1/ramdisk$ find . | cpio –create –format=’newc’ | gzip > ../rak_Pack.img
cpio: You must specify one of -oipt options.
Try `cpio --help' or `cpio --usage' for more information.
Try 'cpio --help' or 'cpio --usage' for more information.
In this post I did a detail explanation on how to unpack the boot image.
https://forum.xda-developers.com/hp-touchpad/development/make-root-permanet-read-write-to-t3846567
Create a directory on root ( hpboot ) copy and paste the command on terminal as is on the post and it should work.
View attachment 4614596
[email protected]:/mnt/g/devices/tenderloin$ cd ./hpboot/
[email protected]:/mnt/g/devices/tenderloin/hpboot$ ls
boot.img
[email protected]:/mnt/g/devices/tenderloin/hpboot$ dumpimage -i boot.img kernel.uImage
[email protected]:/mnt/g/devices/tenderloin/hpboot$ dumpimage -i boot.img -p 1 ram
[email protected]:/mnt/g/devices/tenderloin/hpboot$ dd if=ram of=ramdisk.img.gz bs=64 skip=1
28781+1 records in
28781+1 records out
1842017 bytes (1.8 MB, 1.8 MiB) copied, 0.431285 s, 4.3 MB/s
[email protected]:/mnt/g/devices/tenderloin/hpboot$ gunzip ramdisk.img.gz
[email protected]:/mnt/g/devices/tenderloin/hpboot$ mkdir ramdisk; cd ramdisk
[email protected]:/mnt/g/devices/tenderloin/hpboot/ramdisk$ cpio -i < ../ramdisk.img
6819 blocks
[email protected]:/mnt/g/devices/tenderloin/hpboot/ramdisk$ find . | cpio –create –format=’newc’ | gzip > ../rakRW.img
cpio: You must specify one of -oipt options.
Try `cpio --help' or `cpio --usage' for more information.
Try 'cpio --help' or 'cpio --usage' for more information.
[email protected]:/mnt/g/devices/tenderloin/hpboot/ramdisk$
I did it due to https://forum.xda-developers.com/hp-...te-to-t3846567 , but it stuck just like last time I did it.
What does this mean?
cpio: You must specify one of -oipt options.
I can not see the picture you attached and the link does not work.
Are you doing all the commands inside a Linux machine?
zcarrt said:
--SNIP--
[email protected]:/mnt/g/devices/tenderloin/hpboot/ramdisk$ find . | cpio –create –format=’newc’ | gzip > ../rakRW.img
cpio: You must specify one of -oipt options.
Try `cpio --help' or `cpio --usage' for more information.
--SNIP--
Click to expand...
Click to collapse
It may be copied wrong. It should be: cpio --create -–format=’newc’ (not one dash but two, i.e. not -create, -format, but --create, --format)
The working path shows: [email protected]:/mnt/g/devices/tenderloin/hpboot$
I am not a Linux guru, but it look the boot.img is on the root of the tablet and not the PC.
The commands will only work properly if the directory is created in the root of the PC no where else.
((correction))
Yes, you are correct, is something about pasting a double dash that it turns into a hyphen (single dash). When editing the post it shows as intended, double dash. When publish, shows as a single dash, unless the font size is change on here and type again.
How I did it:
Enter the command in ubuntu terminal ( worked ) then copy and paste into LibreOffice Writer.
Write the guide, then copy and paste into the forum, to avoid any mistakes.
Then surprise ! a double dash is change to a hyphen and I am not even aware of it..!
Thanks for correcting!
HP_TOUCHPAD said:
The working path shows: [email protected]:/mnt/g/devices/tenderloin/hpboot$
I am not a Linux guru, but it look the boot.img is on the root of the tablet and not the PC.
The commands will only work properly if the directory is created in the root of the PC no where else.
Click to expand...
Click to collapse
I thought that, too, but there wouldn't be enough room for the dd command to work, and the error message wouldn't have been a cpio error.
my path:
[email protected]:~/hpboot$
There should not be any mounted device anywhere.
HP_TOUCHPAD said:
I can not see the picture you attached and the link does not work.
Are you doing all the commands inside a Linux machine?
Click to expand...
Click to collapse
I did it in windows 10 Ubuntu bash last time , I will try it properly in a Linux machine again. Thanks.
zcarrt said:
I did it in windows 10 Ubuntu bash last time , I will try it properly in a Linux machine again. Thanks.
Click to expand...
Click to collapse
The problem was on the formatting on my post. When I paste the guide for some reason it shows as a hyphen instead of a double dash.
I corrected the error. This is how it should be, also should work in the windows10 linux subsystem.
find . | cpio --create --format='newc' | gzip > ../ramdisk_Pack.img
Stuck on step 5.
Not clear where to "paste" the 2 lines. I "pasted" them in terminal but get the following:
Usage: mkimage -l image
-l ==> list image header information
mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
-A ==> set architecture to 'arch'
-O ==> set operating system to 'os'
-T ==> set image type to 'type'
-C ==> set compression type 'comp'
-a ==> set load address to 'addr' (hex)
-e ==> set entry point to 'ep' (hex)
-n ==> set image name to 'name'
-d ==> use image data from 'datafile'
-x ==> set XIP (execute in place)
mkimage [-D dtc_options] [-f fit-image.its|-F] fit-image
-D => set all options for device tree compiler
-f => input filename for FIT source
Signing / verified boot not supported (CONFIG_FIT_SIGNATURE undefined)
mkimage -V ==> print version information and exit
Use -T to see a list of available image types
Any help please?
Thanks.
kojam said:
Stuck on step 5.
Not clear where to "paste" the 2 lines. I "pasted" them in terminal but get the following:
go to this post and run the script, if all work on your system then you have everything to build it.
https://forum.xda-developers.com/showpost.php?p=78028080&postcount=4
Click to expand...
Click to collapse
HP_TOUCHPAD said:
kojam said:
Stuck on step 5.
Not clear where to "paste" the 2 lines. I "pasted" them in terminal but get the following:
5. Go to the folder where the original boot.img file is and you should have a file ( ramdisk_Pack.img )
Paste the following two commands:
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -n “TENDERLOIN MAX CPU” -d ./ramdisk_Pack.img ./ramdisk.uImage
mkimage -A arm -T multi -C none -n “Tenderloin Android MAX CPU” -d kernel.uImage:ramdisk.uImage uImage.Android_MAX_CPU
go to this post and run the script, if all work on your system then you have everything to build it.
https://forum.xda-developers.com/showpost.php?p=78028080&postcount=4
Click to expand...
Click to collapse
Thanks for your reply.
I was in that folder (where ramdisk_Pack.img is) in terminal, then I entered/pasted those commands in terminal...
What am I doing wrong? Explain it to me like I'm 5yrs old please. LOL :laugh::silly:
Thanks a million!
Click to expand...
Click to collapse
kojam said:
HP_TOUCHPAD said:
Thanks for your reply.
I was in that folder (where ramdisk_Pack.img is) in terminal, then I entered/pasted those commands in terminal...
What am I doing wrong? Explain it to me like I'm 5yrs old please. LOL :laugh::silly:
Thanks a million!
Click to expand...
Click to collapse
My apologies, you did everything right. The error was in the command I posted which is now corrected.
This is how it happen:
I created the commands in ubuntu text editor, then wrote the instructions in LibreOffice Writer, then copy and paste everything to this forum. Then the apostrophe character got changed and that is why the command was not working.
I tested the commands one by one and I was able to finish the process, you should be able to do it also. This is a learning process and I thank you for trying it and finding out the errors.
Redo everything again as I also corrected the changes for the CPU speed.
Click to expand...
Click to collapse
HP_TOUCHPAD said:
kojam said:
My apologies, you did everything right. The error was in the command I posted which is now corrected.
This is how it happen:
I created the commands in ubuntu text editor, then wrote the instructions in LibreOffice Writer, then copy and paste everything to this forum. Then the apostrophe character got changed and that is why the command was not working.
I tested the commands one by one and I was able to finish the process, you should be able to do it also. This is a learning process and I thank you for trying it and finding out the errors.
Redo everything again as I also corrected the changes for the CPU speed.
Click to expand...
Click to collapse
Quite alright friend.
It is I who thanks you for this.
I was able to get create the file after following your update/corrected instructions.
Thanks again!
Click to expand...
Click to collapse
HP_TOUCHPAD said:
kojam said:
My apologies, you did everything right. The error was in the command I posted which is now corrected.
This is how it happen:
I created the commands in ubuntu text editor, then wrote the instructions in LibreOffice Writer, then copy and paste everything to this forum. Then the apostrophe character got changed and that is why the command was not working.
I tested the commands one by one and I was able to finish the process, you should be able to do it also. This is a learning process and I thank you for trying it and finding out the errors.
Redo everything again as I also corrected the changes for the CPU speed.
Click to expand...
Click to collapse
Thanks!
Worked!
Click to expand...
Click to collapse

Categories

Resources