Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,209 Members 36,680 Now Online
XDA Developers Android and Mobile Development Forum

[Dual-Boot SDCard | CM7.2 Source | Guides | Recovery | Stock 1.4.2 ]

Tip us?
 
succulent
Old
#11  
succulent's Avatar
Senior Member - OP
Thanks Meter 448
Posts: 241
Join Date: Dec 2010
Quote:
Originally Posted by highfly22 View Post
Why this kernel cannot flash wih TEAM-B+ ROM?

I try compiled a kernel of NT official source code with NFS support and it crashed with TEAM-B+ ROM.
Need more information in your post.

The reason you don't use this kernel with Team-B rom is that the kernel version numbering is different, although you can change it in the Makefile to match Team-B kernel version. The ramdisk is also different. It'll have effects on the rom like no wifi or wonít boot.

Simply compiling the kernel and sticking it to a boot.img will not work; hence, I put my way of making boot.img in the second post. You need attach bauwks second u-boot to your boot.img if you do it manually. Since I have a different ramdisk than Team-B rom, you need to wipe your cache.
The Following 2 Users Say Thank You to succulent For This Useful Post: [ Click to Expand ]
 
meghd00t
Old
#12  
Senior Member
Thanks Meter 140
Posts: 112
Join Date: Jul 2011
Location: Bangalore
YES! Got it working, I was able to boot a boot.img & recovery.img using my own kernel by following this tutorial. But, some problems I added extra file to the recovery.img /sbin folder (genptable, simg2img, make_ext4fs mkdosfs from my unbrick tools) and they show up and run correctly but the whole input stuff is broken, the tablet behaves as if the volume keys are always pressed and the bar is always moving the n key is not able to select any menu option. Any pointers on how to fix this?

PS
Here is my recovery.img if you want to test http://dl.dropbox.com/u/64885133/recovery.img


and my build script

Code:
cd /mnt/scratch/src/distro/kernel/android-2.6.35

export DST=/mnt/scratch/cm7src/out/target/product/acclaim
export ARCH=arm
export CROSS_COMPILE=/opt/arm-2010q1/bin/arm-none-linux-gnueabi-
export BOARD_KERNEL_CMDLINE="androidboot.console=ttyO0 console=ttyO0,115200n8 mem=448M@0x80000000 mem=35M@0x9CC00000 mem=512M@0xA0000000 init=/init rootwait vram=32M,9CC00000 omapfb.vram=0:5M@9CC00000"
export KERNEL_DIR=/mnt/scratch/src/distro/kernel/android-2.6.35

make mrproper
make android_4430BN_defconfig
cat fs-conf >> .config
make oldconfig
make -j4 zImage
make -j4 modules

cp -a arch/arm/boot/zImage $DST/kernel
cp -a drivers/media/video/omapgfx/gfx_vout_mod.o $DST/system/etc/

cd /mnt/scratch/src/mydroid/hardware/ti/wlan/wl1283/platforms/os/linux
make clean
make TNETW=1273
cp -a tiwlan_drv.ko $DST/system/etc/


cd ../../../../wl1283_softAP/platforms/os/linux/
make clean
make TNETW=1273
cp -a tiap_drv.ko $DST/system/etc/wifi/softap

cd /mnt/scratch/src/mydroid/hardware/ti/wlan/wl1283/firmware
cp -a firmware.bin tiwlan.ini.activemode wlan_cu.st $DST/system/etc/


cd /mnt/scratch/src/distro/android/fwram
make clean
make 
cp -a fwram.ko $DST/system/etc/


cd /mnt/scratch/src

and this is my fs-conf (Since I use fedora, I mostly use their style of generating kernel configs)

Code:
CONFIG_NETWORK_FILESYSTEMS=y
# CONFIG_AFS_FS is not set
# CONFIG_CEPH_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_NCP_FS is not set
# CONFIG_SMB_FS is not set

CONFIG_NLS_UTF8=y
CONFIG_SLOW_WORK=y
# CONFIG_SLOW_WORK_DEBUG is not set
CONFIG_CIFS=y
CONFIG_CIFS_DEBUG2=y
CONFIG_CIFS_EXPERIMENTAL=y
CONFIG_CIFS_POSIX=y
CONFIG_CIFS_STATS=y
# CONFIG_CIFS_STATS2 is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
CONFIG_CIFS_XATTR=y

CONFIG_EXPORTFS=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_NFSD=y
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFS_V4_1=y
# CONFIG_ROOT_NFS is not set
CONFIG_RPCSEC_GSS_KRB5=y
# CONFIG_RPCSEC_GSS_SPKM3 is not set
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y

CONFIG_TUN=y

CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_STAT_DETAILS=y

CONFIG_MD=y
CONFIG_BLK_DEV_DM=y
# CONFIG_BLK_DEV_MD is not set
# CONFIG_BLK_DEV_UB is not set
CONFIG_DM_CRYPT=y
# CONFIG_DM_DEBUG is not set
# CONFIG_DM_DELAY is not set
# CONFIG_DM_MIRROR is not set
# CONFIG_DM_MULTIPATH is not set
# CONFIG_DM_SNAPSHOT is not set
CONFIG_DM_UEVENT=y
# CONFIG_DM_ZERO is not set
CONFIG_CRYPTO_TWOFISH=y
CONFIG_CRYPTO_TWOFISH_COMMON=y
Thanks & best regards

-m

--
my files http://d-h.st/users/meghd00t/ or http://goo.im/devs/meghd00t/
The Following User Says Thank You to meghd00t For This Useful Post: [ Click to Expand ]
 
succulent
Old
(Last edited by succulent; 13th April 2012 at 03:01 PM.)
#13  
succulent's Avatar
Senior Member - OP
Thanks Meter 448
Posts: 241
Join Date: Dec 2010
Quote:
Originally Posted by meghd00t View Post
YES! Got it working, I was able to boot a boot.img & recovery.img using my own kernel by following this tutorial. But, some problems I added extra file to the recovery.img /sbin folder (genptable, simg2img, make_ext4fs mkdosfs from my unbrick tools) and they show up and run correctly but the whole input stuff is broken, the tablet behaves as if the volume keys are always pressed and the bar is always moving the n key is not able to select any menu option. Any pointers on how to fix this?
Good job!

You can add this to the acclaim.mk,

Code:
PRODUCT_PACKAGES += \
    make_ext4fs \
    setup_fs \

PRODUCT_PACKAGES := \
    make_ext4fs \
For the recovery part, I didn't test it because we already have recovery tools made by others here. Sorry about that. In the recovery folder, there is a recovery ui file, you can edit it. It's the same one from Whistlestopís KF device, so the keys might be off. The Nook Color recovery ui file is,

Code:
/*
 * Copyright (C) 2009 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <linux/input.h>

#include "recovery_ui.h"
#include "common.h"
#include "extendedcommands.h"

char* MENU_HEADERS[] = { NULL };

char* MENU_ITEMS[] = { "reboot system now",
                       "apply update from sdcard",
                       "wipe data/factory reset",
                       "wipe cache partition",
                       "install zip from sdcard",
                       "backup and restore",
                       "mounts and storage",
                       "advanced",
                       NULL };

int device_recovery_start() {
    return 0;
}

int device_toggle_display(volatile char* key_pressed, int key_code) {
    int alt = key_pressed[KEY_LEFTALT] || key_pressed[KEY_RIGHTALT];
    if (alt && key_code == KEY_L)
        return 1;
    // allow toggling of the display if the correct key is pressed, and the display toggle is allowed or the display is currently off
    if (ui_get_showing_back_button()) {
        return get_allow_toggle_display() && (key_code == KEY_MENU || key_code == KEY_END);
    }
    return get_allow_toggle_display() && (key_code == KEY_MENU || key_code == KEY_POWER || key_code == KEY_END);
}

int device_reboot_now(volatile char* key_pressed, int key_code) {
    return 0;
}

int device_handle_key(int key_code, int visible) {
    if (visible) {
        switch (key_code) {
            case KEY_CAPSLOCK:
            case KEY_VOLUMEDOWN:
                return HIGHLIGHT_DOWN;

            case KEY_LEFTSHIFT:
            case KEY_VOLUMEUP:
                return HIGHLIGHT_UP;

            case KEY_POWER:
                if (ui_get_showing_back_button()) {
                    return SELECT_ITEM;
                }
                if (!get_allow_toggle_display())
                    return GO_BACK;
                break;
            case KEY_HOME:
            case KEY_LEFTBRACE:
            case KEY_ENTER:
            case BTN_MOUSE:
            case KEY_CENTER:
            case KEY_CAMERA:
            case KEY_F21:
            case KEY_SEND:
                return SELECT_ITEM;
            
            case KEY_END:
            case KEY_BACKSPACE:
            case KEY_BACK:
                if (!get_allow_toggle_display())
                    return GO_BACK;
        }
    }

    return NO_ACTION;
}

int device_perform_action(int which) {
    return which;
}

int device_wipe_data() {
    return 0;
}
One more thing,
I think fattire/dalingrin added postrecoveryboot.sh to the recovery folder to clear the boot count so your NT doesnít reset itself.

postrecoveryboot.sh, Iíve added bootdata partition which is where the boot count is on NT. Boot count might also be on rom partition, I donít know.
Code:
#!/sbin/sh

# Resets the boot counter and the bcb instructions
mkdir /rom
mount /dev/block/mmcblk0p5 /rom
mkdir /bootdata
mount /dev/block/mmcblk0p6 /bootdata

# Zero out the boot counter
dd if=/dev/zero of=/rom/devconf/BootCnt bs=1 count=4
dd if=/dev/zero of=/bootdata/BootCnt bs=1 count=4

# Reset the bootloader control block (bcb) file
dd if=/dev/zero of=/rom/bcb bs=1 count=1088
dd if=/dev/zero of=/bootdata/BCB bs=1 count=1088

umount /rom
rmdir /rom
umount /bootdata
rmdir /bootdata
You will also have to add this to the AndroidBoard.mk,
Code:
file := $(TARGET_RECOVERY_ROOT_OUT)/sbin/postrecoveryboot.sh
ALL_PREBUILT += $(file)
$(file) : $(LOCAL_PATH)/recovery/postrecoveryboot.sh | $(ACP)
	$(transform-prebuilt-to-target)
The Following User Says Thank You to succulent For This Useful Post: [ Click to Expand ]
 
meghd00t
Old
#14  
Senior Member
Thanks Meter 140
Posts: 112
Join Date: Jul 2011
Location: Bangalore
Ok, Thanks for all that info, I will try all this and report back tomorrow.

Is there any easy way to build static native c or c++ code for android ndk is complicated I gave up and built on fedora arm (hacked up really) but now I have gdisk and sgdisk!!

How do I contribute these binaries back to clockwork mod to replace the ancient and buggy parted that lives inside clockworkmod?
Thanks & best regards

-m

--
my files http://d-h.st/users/meghd00t/ or http://goo.im/devs/meghd00t/
 
J_M_H
Old
#15  
Member
Thanks Meter 5
Posts: 88
Join Date: Sep 2009
Are there any plans to make a kernel compatible with Team B+ CM7 ROM? This would be similar to what was done in the Nook Color world with dalingrin's OC'ed kernel.
 
meghd00t
Old
#16  
Senior Member
Thanks Meter 140
Posts: 112
Join Date: Jul 2011
Location: Bangalore
Ok I worked a bit on that pointer, got myself a working cwm, and Here are the results http://dl.dropbox.com/u/64885133/myrecovery.zip

and attached is the diff from your sources, I have left out the binary files you can fine then in other posts here.
Attached Files
File Type: gz succulent.diff.gz - [Click for QR Code] (1.8 KB, 8 views)
Thanks & best regards

-m

--
my files http://d-h.st/users/meghd00t/ or http://goo.im/devs/meghd00t/
 
meghd00t
Old
#17  
Senior Member
Thanks Meter 140
Posts: 112
Join Date: Jul 2011
Location: Bangalore
Thank you for the inspiration.

I have a complete cm7 locally built and with a fully functional recovery, which is actually proving useful in unbricking and fixing partition table issues

As you dot seem to have a proper github repo here is a zip containing my changes to your file.

Once again thank you.

http://dl.dropbox.com/u/64885133/cm7...7-mods-src.zip
Thanks & best regards

-m

--
my files http://d-h.st/users/meghd00t/ or http://goo.im/devs/meghd00t/
 
succulent
Old
#18  
succulent's Avatar
Senior Member - OP
Thanks Meter 448
Posts: 241
Join Date: Dec 2010
I will post my updated source on github later this week. I have one small coding that need to be fix and I am not even a coder.

I didn't post my rom on xda because I wanted people to learn to compile their own rom. Fattire did similar thing with cm9 on Nook Color forum. Plus, Team-B had first dib on CM7. I rather not post similar rom. However, if you Google, you might find it.
The Following User Says Thank You to succulent For This Useful Post: [ Click to Expand ]
 
meghd00t
Old
#19  
Senior Member
Thanks Meter 140
Posts: 112
Join Date: Jul 2011
Location: Bangalore
I know I saw your art and was blown away! 3 years ago when I got this PC I went and got the W700, at that time there was no driver for the built in Wacom and I wasted my time waiting, then I got tired and made a patch and pushed it upstream all this took another 15 months. Now I actually have a working wacom on the laptop but I hardly ever use it!

If you let me know what is bugging you I could take a look, maybe I know something.

thanks once more for sharing!
Thanks & best regards

-m

--
my files http://d-h.st/users/meghd00t/ or http://goo.im/devs/meghd00t/
 
succulent
Old
#20  
succulent's Avatar
Senior Member - OP
Thanks Meter 448
Posts: 241
Join Date: Dec 2010
Ok, I got everything updated and uploaded to github.

https://github.com/succulent/android_device_bn_acclaim
https://github.com/succulent/android_vendor_bn_acclaim
https://github.com/succulent/acclaim_recovery_sdcard

Enjoy compiling your own rom.

The Following User Says Thank You to succulent For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes