Related
Big news for every hacker on Samsung devices! j4fs driver is now OpenSource Enjoy: http://bit.ly/jatK1c
Click to expand...
Click to collapse
http://romkitchen.org/sgs/?s=home
Someone care to explain the benefits, if any, of this? My understanding from what little i read is it will help with kernal development on a decent number of samsung devices.
Edit: as in should i be "super excited", "meh", or "cool beans".
second that question .. does this help us?
Would this driver be the one that controls download mode?
Sent from my GT-I9000 using XDA Premium App
Maybe this?
added: Should have checked supercurio's github
Samsung v1 GT-I9100 sources: [common] param.lfs/j4fs driver (communication with bootloader), now OpenSource, yay!
google :
j4fs...
its a filesystem.... FACT
So my GUESS...
a driver for a filesystem...
like ext4 and fat drivers for handling our other storage..
a new filesystem for us to tweak the crap out of and use..?
though ive been wrong before. that is only a logical conclusion not a factual statement
TRusselo said:
google :
j4fs...
its a filesystem.... FACT
So my GUESS...
a driver for a filesystem...
like ext4 and fat drivers for handling our other storage..
a new filesystem for us to tweak the crap out of and use..?
though ive been wrong before. that is only a logical conclusion not a factual statement
Click to expand...
Click to collapse
Sounds good to me.
Sent from my GT-I9000 using XDA Premium App
TRusselo said:
google :
j4fs...
its a filesystem.... FACT
So my GUESS...
a driver for a filesystem...
like ext4 and fat drivers for handling our other storage..
a new filesystem for us to tweak the crap out of and use..?
though ive been wrong before. that is only a logical conclusion not a factual statement
Click to expand...
Click to collapse
according to the post above you this may be the file system used for the bootloaders on the sgs2 so it would help those folks when hacking.
J4FS porting released
If someone is still interested I've just finished the porting of the J4FS on 3.1.x kernel adding support for normal "block device" (for loopback image mounting).
movitool.ntd.homelinux.org/trac/movitool/wiki/j4fs
Hope this can help...
Ceers
Nitro
And another tool (standalone) to extract j4fs/lfs images (eg. param.lfs).
Note: it only extracts - if you want to modify an image you'll have to use the kernel module from the post above (or a hexeditor and some cleverness).
https://github.com/ius/j4fs_extract
(for Googleability)
whiteguypl said:
http://romkitchen.org/sgs/?s=home
Someone care to explain the benefits, if any, of this? My understanding from what little i read is it will help with kernal development on a decent number of samsung devices.
Edit: as in should i be "super excited", "meh", or "cool beans".
Click to expand...
Click to collapse
dunno for what the driver/partition is used, had troubles (device freeze) with custom kernel an the original module from my GT-I9100 (ICS)
as note: device boots and working without the j4fs module in initramfs...
just for fun a little patch for kernel 3.0.15, just read operation tested.
Code:
Index: jv/llid_kernel.c
===================================================================
--- jv/llid_kernel.c (Revision 2075)
+++ jv/llid_kernel.c (Arbeitskopie)
@@ -95,7 +95,7 @@
set_fs(oldfs);
j4fs_filp->f_flags &= ~O_NONBLOCK;
if (ret < 0) {
- printk(1, "j4fs_filp->read() failed: %d\n", ret);
+ printk(KERN_WARNING "j4fs_filp->read() failed: %d\n", ret);
return J4FS_FAIL;
}
// J4FS for moviNAND merged from ROSSI
@@ -153,7 +153,7 @@
set_fs(oldfs);
j4fs_filp->f_flags &= ~O_NONBLOCK;
if (ret < 0) {
- printk(1, "j4fs_filp->write() failed: %d\n", ret);
+ printk(KERN_WARNING "j4fs_filp->write() failed: %d\n", ret);
return J4FS_FAIL;
}
// J4FS for moviNAND merged from ROSSI
Index: jv/j4fs_kernel.c
===================================================================
--- jv/j4fs_kernel.c (Revision 2075)
+++ jv/j4fs_kernel.c (Arbeitskopie)
@@ -10,7 +10,9 @@
* 2009.03 - Currently managed by SungHwan.yun <[email protected]> @[email protected]
*
*/
-#include <linux/smp_lock.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/smp.h>
#include <linux/time.h>
#include <linux/highuid.h>
#include <linux/pagemap.h>
@@ -53,6 +55,8 @@
#define Page_Uptodate(page) test_bit(PG_uptodate, &(page)->flags)
+#define init_MUTEX(sema) sema_init(sema,1)
+
extern j4fs_device_info device_info;
extern unsigned int j4fs_traceMask;
extern unsigned int j4fs_rw_start;
@@ -234,7 +238,7 @@
T(J4FS_TRACE_FS, ("start j4fs_write_begin\n"));
if(to>PAGE_CACHE_SIZE) {
- T(J4FS_TRACE_ALWAYS,("%s %d: page size overflow(pos,index,offset,len,to)=(%d,%d,%d,%d,%d)\n",__FUNCTION__,__LINE__,pos,index,offset,len,to));
+ T(J4FS_TRACE_ALWAYS,("%s %d: page size overflow(pos,index,offset,len,to)=(%llu,%lu,%d,%d,%d)\n",__FUNCTION__,__LINE__,pos,index,offset,len,to));
j4fs_panic("page size overflow");
return -ENOSPC;
}
@@ -1221,7 +1225,7 @@
struct j4fs_sb_info * sbi;
struct j4fs_super_block * es;
struct inode *root;
- u32 tmp, len,ret;
+ u32 ret;
T(J4FS_TRACE_FS,("%s %d\n",__FUNCTION__,__LINE__));
@@ -1322,11 +1326,11 @@
}
-int j4fs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt)
+static struct dentry *j4fs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data)
{
T(J4FS_TRACE_FS,("%s %d\n",__FUNCTION__,__LINE__));
- return get_sb_bdev(fs_type, flags, dev_name, data, j4fs_fill_super, mnt);
+ return mount_bdev(fs_type, flags, dev_name, data, j4fs_fill_super);
}
struct kmem_cache * j4fs_inode_cachep;
@@ -1386,7 +1390,7 @@
struct file_system_type j4fs_fs_type = {
.owner = THIS_MODULE,
.name = "j4fs",
- .get_sb = j4fs_get_sb,
+ .mount = j4fs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
@@ -1416,9 +1420,16 @@
return -EINVAL;
}
-int j4fs_fsync(struct file *file, struct dentry *dentry, int datasync)
+static int j4fs_fsync(struct file *file, int datasync)
{
- return 0;
+ int rc = 0;
+
+ rc = generic_file_fsync(file, datasync);
+ if (rc)
+ goto out;
+ rc = vfs_fsync(file, datasync);
+out:
+ return rc;
}
int __init init_j4fs_fs(void)
Index: jv/j4fs.h
===================================================================
--- jv/j4fs.h (Revision 2075)
+++ jv/j4fs.h (Arbeitskopie)
@@ -167,6 +167,7 @@
#define J4FS_RECLAIM_RESET_UNUSED_SPACE
#define J4FS_TRANSACTION_LOGGING
+#undef T
#define T(mask, p) do { if ((mask) & (j4fs_traceMask | J4FS_TRACE_ALWAYS)) TOUT(p); } while (0)
#define POR(mask, p, q) do { if (((mask) & (j4fs_PORMask))&&!(--j4fs_PORCount)) {TOUT(p); while(1); }} while (0)
Index: jv/Makefile
===================================================================
--- jv/Makefile (Revision 2075)
+++ jv/Makefile (Arbeitskopie)
@@ -1,31 +1,5 @@
-##############################################################################
-# COPYRIGHT(C) : Samsung Electronics Co.Ltd, 2006-2011 ALL RIGHTS RESERVED
-# 2009.02 - Currently managed by JongMinKim <[email protected]> , SungHwanYun <[email protected]>
-##############################################################################
-# VERSION&DATE : Version 1.00 2009/02
-##############################################################################
+EXTRA_CFLAGS += -Wframe-larger-than=2048 -Wno-error=declaration-after-statement
-MOD_NAME = j4fs
+obj-$(CONFIG_J4FS) += j4fs.o
-ifneq ($(KERNELRELEASE), )
-
-EXTRA_CFLAGS += -I$(PRJROOT)/modules/include -I$(KDIR)/drivers/tfsr/Inc -I$(KDIR)/include -I$(KDIR)/include/linux -I$(KDIR)/include/asm -D__KERNEL
-
-obj-m := $(MOD_NAME).o
-
-$(MOD_NAME)-y := j4fs_kernel.o llid_kernel.o fsd_common.o
-
-else
-
-all:
- @$(MAKE) -C $(KDIR) \
- SUBDIRS=$(CURDIR) modules
-
-clean:
- rm -f *.o *.ko *.mod.c *~ .*.cmd
-
-install:
- @$(MAKE) --no-print-directory -C $(KDIR) \
- SUBDIRS=$(CURDIR) modules_install
-
-endif
+j4fs-objs := j4fs_kernel.o llid_kernel.o fsd_common.o
With BRD's TIAMAT kernel, I am able to mount just about any file system, except for something HFS+ formatted...
BRD, will there be some mac love in one of your new kernels??
This is the last piece to make this device optimal for me...and probably a lot of other people as well.
Any insight would be great!! Really dig your work as well!! Love my xoom!!
is hfs built into Linux tree? If not, post up the source and I'll add it in.
I found this a link but I cant post it due to site restrictions...
But it includes this
/*
* linux/fs/hfs/hfs.h
*
* Copyright (C) 1995-1997 Paul H. Hargrove
* (C) 2003 Ardis Technologies <[email protected]>
* This file may be distributed under the terms of the GNU General Public License.
*/
#ifndef _HFS_H
#define _HFS_H
/* offsets to various blocks */
#define HFS_DD_BLK 0 /* Driver Descriptor block */
#define HFS_PMAP_BLK 1 /* First block of partition map */
#define HFS_MDB_BLK 2 /* Block (w/i partition) of MDB */
/* magic numbers for various disk blocks */
#define HFS_DRVR_DESC_MAGIC 0x4552 /* "ER": driver descriptor map */
#define HFS_OLD_PMAP_MAGIC 0x5453 /* "TS": old-type partition map */
#define HFS_NEW_PMAP_MAGIC 0x504D /* "PM": new-type partition map */
#define HFS_SUPER_MAGIC 0x4244 /* "BD": HFS MDB (super block) */
#define HFS_MFS_SUPER_MAGIC 0xD2D7 /* MFS MDB (super block) */
/* various FIXED size parameters */
#define HFS_SECTOR_SIZE 512 /* size of an HFS sector */
#define HFS_SECTOR_SIZE_BITS 9 /* log_2(HFS_SECTOR_SIZE) */
#define HFS_NAMELEN 31 /* maximum length of an HFS filename */
#define HFS_MAX_NAMELEN 128
#define HFS_MAX_VALENCE 32767U
/* Meanings of the drAtrb field of the MDB,
* Reference: _Inside Macintosh: Files_ p. 2-61
*/
#define HFS_SB_ATTRIB_HLOCK (1 << 7)
#define HFS_SB_ATTRIB_UNMNT (1 << 8)
#define HFS_SB_ATTRIB_SPARED (1 << 9)
#define HFS_SB_ATTRIB_INCNSTNT (1 << 11)
#define HFS_SB_ATTRIB_SLOCK (1 << 15)
/* Some special File ID numbers */
#define HFS_POR_CNID 1 /* Parent Of the Root */
#define HFS_ROOT_CNID 2 /* ROOT directory */
#define HFS_EXT_CNID 3 /* EXTents B-tree */
#define HFS_CAT_CNID 4 /* CATalog B-tree */
#define HFS_BAD_CNID 5 /* BAD blocks file */
#define HFS_ALLOC_CNID 6 /* ALLOCation file (HFS+) */
#define HFS_START_CNID 7 /* STARTup file (HFS+) */
#define HFS_ATTR_CNID 8 /* ATTRibutes file (HFS+) */
#define HFS_EXCH_CNID 15 /* ExchangeFiles temp id */
#define HFS_FIRSTUSER_CNID 16
/* values for hfs_cat_rec.cdrType */
#define HFS_CDR_DIR 0x01 /* folder (directory) */
#define HFS_CDR_FIL 0x02 /* file */
#define HFS_CDR_THD 0x03 /* folder (directory) thread */
#define HFS_CDR_FTH 0x04 /* file thread */
/* legal values for hfs_ext_key.FkType and hfs_file.fork */
#define HFS_FK_DATA 0x00
#define HFS_FK_RSRC 0xFF
/* bits in hfs_fil_entry.Flags */
#define HFS_FIL_LOCK 0x01 /* locked */
#define HFS_FIL_THD 0x02 /* file thread */
#define HFS_FIL_DOPEN 0x04 /* data fork open */
#define HFS_FIL_ROPEN 0x08 /* resource fork open */
#define HFS_FIL_DIR 0x10 /* directory (always clear) */
#define HFS_FIL_NOCOPY 0x40 /* copy-protected file */
#define HFS_FIL_USED 0x80 /* open */
/* bits in hfs_dir_entry.Flags. dirflags is 16 bits. */
#define HFS_DIR_LOCK 0x01 /* locked */
#define HFS_DIR_THD 0x02 /* directory thread */
#define HFS_DIR_INEXPFOLDER 0x04 /* in a shared area */
#define HFS_DIR_MOUNTED 0x08 /* mounted */
#define HFS_DIR_DIR 0x10 /* directory (always set) */
#define HFS_DIR_EXPFOLDER 0x20 /* share point */
/* bits hfs_finfo.fdFlags */
#define HFS_FLG_INITED 0x0100
#define HFS_FLG_LOCKED 0x1000
#define HFS_FLG_INVISIBLE 0x4000
/*======== HFS structures as they appear on the disk ========*/
/* Pascal-style string of up to 31 characters */
struct hfs_name {
u8 len;
u8 name[HFS_NAMELEN];
} __packed;
struct hfs_point {
__be16 v;
__be16 h;
} __packed;
struct hfs_rect {
__be16 top;
__be16 left;
__be16 bottom;
__be16 right;
} __packed;
struct hfs_finfo {
__be32 fdType;
__be32 fdCreator;
__be16 fdFlags;
struct hfs_point fdLocation;
__be16 fdFldr;
} __packed;
struct hfs_fxinfo {
__be16 fdIconID;
u8 fdUnused[8];
__be16 fdComment;
__be32 fdPutAway;
} __packed;
struct hfs_dinfo {
struct hfs_rect frRect;
__be16 frFlags;
struct hfs_point frLocation;
__be16 frView;
} __packed;
struct hfs_dxinfo {
struct hfs_point frScroll;
__be32 frOpenChain;
__be16 frUnused;
__be16 frComment;
__be32 frPutAway;
} __packed;
union hfs_finder_info {
struct {
struct hfs_finfo finfo;
struct hfs_fxinfo fxinfo;
} file;
struct {
struct hfs_dinfo dinfo;
struct hfs_dxinfo dxinfo;
} dir;
} __packed;
/* Cast to a pointer to a generic bkey */
#define HFS_BKEY(X) (((void)((X)->KeyLen)), ((struct hfs_bkey *)(X)))
/* The key used in the catalog b-tree: */
struct hfs_cat_key {
u8 key_len; /* number of bytes in the key */
u8 reserved; /* padding */
__be32 ParID; /* CNID of the parent dir */
struct hfs_name CName; /* The filename of the entry */
} __packed;
/* The key used in the extents b-tree: */
struct hfs_ext_key {
u8 key_len; /* number of bytes in the key */
u8 FkType; /* HFS_FK_{DATA,RSRC} */
__be32 FNum; /* The File ID of the file */
__be16 FABN; /* allocation blocks number*/
} __packed;
typedef union hfs_btree_key {
u8 key_len; /* number of bytes in the key */
struct hfs_cat_key cat;
struct hfs_ext_key ext;
} hfs_btree_key;
#define HFS_MAX_CAT_KEYLEN (sizeof(struct hfs_cat_key) - sizeof(u8))
#define HFS_MAX_EXT_KEYLEN (sizeof(struct hfs_ext_key) - sizeof(u8))
typedef union hfs_btree_key btree_key;
struct hfs_extent {
__be16 block;
__be16 count;
};
typedef struct hfs_extent hfs_extent_rec[3];
/* The catalog record for a file */
struct hfs_cat_file {
s8 type; /* The type of entry */
u8 reserved;
u8 Flags; /* Flags such as read-only */
s8 Typ; /* file version number = 0 */
struct hfs_finfo UsrWds; /* data used by the Finder */
__be32 FlNum; /* The CNID */
__be16 StBlk; /* obsolete */
__be32 LgLen; /* The logical EOF of the data fork*/
__be32 PyLen; /* The physical EOF of the data fork */
__be16 RStBlk; /* obsolete */
__be32 RLgLen; /* The logical EOF of the rsrc fork */
__be32 RPyLen; /* The physical EOF of the rsrc fork */
__be32 CrDat; /* The creation date */
__be32 MdDat; /* The modified date */
__be32 BkDat; /* The last backup date */
struct hfs_fxinfo FndrInfo; /* more data for the Finder */
__be16 ClpSize; /* number of bytes to allocate
when extending files */
hfs_extent_rec ExtRec; /* first extent record
for the data fork */
hfs_extent_rec RExtRec; /* first extent record
for the resource fork */
u32 Resrv; /* reserved by Apple */
} __packed;
/* the catalog record for a directory */
struct hfs_cat_dir {
s8 type; /* The type of entry */
u8 reserved;
__be16 Flags; /* flags */
__be16 Val; /* Valence: number of files and
dirs in the directory */
__be32 DirID; /* The CNID */
__be32 CrDat; /* The creation date */
__be32 MdDat; /* The modification date */
__be32 BkDat; /* The last backup date */
struct hfs_dinfo UsrInfo; /* data used by the Finder */
struct hfs_dxinfo FndrInfo; /* more data used by Finder */
u8 Resrv[16]; /* reserved by Apple */
} __packed;
/* the catalog record for a thread */
struct hfs_cat_thread {
s8 type; /* The type of entry */
u8 reserved[9]; /* reserved by Apple */
__be32 ParID; /* CNID of parent directory */
struct hfs_name CName; /* The name of this entry */
} __packed;
/* A catalog tree record */
typedef union hfs_cat_rec {
s8 type; /* The type of entry */
struct hfs_cat_file file;
struct hfs_cat_dir dir;
struct hfs_cat_thread thread;
} hfs_cat_rec;
struct hfs_mdb {
__be16 drSigWord; /* Signature word indicating fs type */
__be32 drCrDate; /* fs creation date/time */
__be32 drLsMod; /* fs modification date/time */
__be16 drAtrb; /* fs attributes */
__be16 drNmFls; /* number of files in root directory */
__be16 drVBMSt; /* location (in 512-byte blocks)
of the volume bitmap */
__be16 drAllocPtr; /* location (in allocation blocks)
to begin next allocation search */
__be16 drNmAlBlks; /* number of allocation blocks */
__be32 drAlBlkSiz; /* bytes in an allocation block */
__be32 drClpSiz; /* clumpsize, the number of bytes to
allocate when extending a file */
__be16 drAlBlSt; /* location (in 512-byte blocks)
of the first allocation block */
__be32 drNxtCNID; /* CNID to assign to the next
file or directory created */
__be16 drFreeBks; /* number of free allocation blocks */
u8 drVN[28]; /* the volume label */
__be32 drVolBkUp; /* fs backup date/time */
__be16 drVSeqNum; /* backup sequence number */
__be32 drWrCnt; /* fs write count */
__be32 drXTClpSiz; /* clumpsize for the extents B-tree */
__be32 drCTClpSiz; /* clumpsize for the catalog B-tree */
__be16 drNmRtDirs; /* number of directories in
the root directory */
__be32 drFilCnt; /* number of files in the fs */
__be32 drDirCnt; /* number of directories in the fs */
u8 drFndrInfo[32]; /* data used by the Finder */
__be16 drEmbedSigWord; /* embedded volume signature */
__be32 drEmbedExtent; /* starting block number (xdrStABN)
and number of allocation blocks
(xdrNumABlks) occupied by embedded
volume */
__be32 drXTFlSize; /* bytes in the extents B-tree */
hfs_extent_rec drXTExtRec; /* extents B-tree's first 3 extents */
__be32 drCTFlSize; /* bytes in the catalog B-tree */
hfs_extent_rec drCTExtRec; /* catalog B-tree's first 3 extents */
} __packed;
/*======== Data structures kept in memory ========*/
struct hfs_readdir_data {
struct list_head list;
struct file *file;
struct hfs_cat_key key;
};
#endif
Click to expand...
Click to collapse
and this...
/*
* linux/fs/hfs/hfs_fs.h
*
* Copyright (C) 1995-1997 Paul H. Hargrove
* (C) 2003 Ardis Technologies <[email protected]>
* This file may be distributed under the terms of the GNU General Public License.
*/
#ifndef _LINUX_HFS_FS_H
#define _LINUX_HFS_FS_H
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/mutex.h>
#include <linux/buffer_head.h>
#include <linux/fs.h>
#include <asm/byteorder.h>
#include <asm/uaccess.h>
#include "hfs.h"
#define DBG_BNODE_REFS 0x00000001
#define DBG_BNODE_MOD 0x00000002
#define DBG_CAT_MOD 0x00000004
#define DBG_INODE 0x00000008
#define DBG_SUPER 0x00000010
#define DBG_EXTENT 0x00000020
#define DBG_BITMAP 0x00000040
//#define DBG_MASK (DBG_EXTENT|DBG_INODE|DBG_BNODE_MOD|DBG_CAT_MOD|DBG_BITMAP)
//#define DBG_MASK (DBG_BNODE_MOD|DBG_CAT_MOD|DBG_INODE)
//#define DBG_MASK (DBG_CAT_MOD|DBG_BNODE_REFS|DBG_INODE|DBG_EXTENT)
#define DBG_MASK (0)
#define dprint(flg, fmt, args...) \
if (flg & DBG_MASK) printk(fmt , ## args)
/*
* struct hfs_inode_info
*
* The HFS-specific part of a Linux (struct inode)
*/
struct hfs_inode_info {
atomic_t opencnt;
unsigned int flags;
/* to deal with localtime ugliness */
int tz_secondswest;
struct hfs_cat_key cat_key;
struct list_head open_dir_list;
struct inode *rsrc_inode;
struct mutex extents_lock;
u16 alloc_blocks, clump_blocks;
sector_t fs_blocks;
/* Allocation extents from catlog record or volume header */
hfs_extent_rec first_extents;
u16 first_blocks;
hfs_extent_rec cached_extents;
u16 cached_start, cached_blocks;
loff_t phys_size;
struct inode vfs_inode;
};
#define HFS_FLG_RSRC 0x0001
#define HFS_FLG_EXT_DIRTY 0x0002
#define HFS_FLG_EXT_NEW 0x0004
#define HFS_IS_RSRC(inode) (HFS_I(inode)->flags & HFS_FLG_RSRC)
/*
* struct hfs_sb_info
*
* The HFS-specific part of a Linux (struct super_block)
*/
struct hfs_sb_info {
struct buffer_head *mdb_bh; /* The hfs_buffer
holding the real
superblock (aka VIB
or MDB) */
struct hfs_mdb *mdb;
struct buffer_head *alt_mdb_bh; /* The hfs_buffer holding
the alternate superblock */
struct hfs_mdb *alt_mdb;
__be32 *bitmap; /* The page holding the
allocation bitmap */
struct hfs_btree *ext_tree; /* Information about
the extents b-tree */
struct hfs_btree *cat_tree; /* Information about
the catalog b-tree */
u32 file_count; /* The number of
regular files in
the filesystem */
u32 folder_count; /* The number of
directories in the
filesystem */
u32 next_id; /* The next available
file id number */
u32 clumpablks; /* The number of allocation
blocks to try to add when
extending a file */
u32 fs_start; /* The first 512-byte
block represented
in the bitmap */
u32 part_start;
u16 root_files; /* The number of
regular
(non-directory)
files in the root
directory */
u16 root_dirs; /* The number of
directories in the
root directory */
u16 fs_ablocks; /* The number of
allocation blocks
in the filesystem */
u16 free_ablocks; /* the number of unused
allocation blocks
in the filesystem */
u32 alloc_blksz; /* The size of an
"allocation block" */
int s_quiet; /* Silent failure when
changing owner or mode? */
__be32 s_type; /* Type for new files */
__be32 s_creator; /* Creator for new files */
umode_t s_file_umask; /* The umask applied to the
permissions on all files */
umode_t s_dir_umask; /* The umask applied to the
permissions on all dirs */
uid_t s_uid; /* The uid of all files */
gid_t s_gid; /* The gid of all files */
int session, part;
struct nls_table *nls_io, *nls_disk;
struct mutex bitmap_lock;
unsigned long flags;
u16 blockoffset;
int fs_div;
};
#define HFS_FLG_BITMAP_DIRTY 0
#define HFS_FLG_MDB_DIRTY 1
#define HFS_FLG_ALT_MDB_DIRTY 2
/* bitmap.c */
extern u32 hfs_vbm_search_free(struct super_block *, u32, u32 *);
extern int hfs_clear_vbm_bits(struct super_block *, u16, u16);
/* catalog.c */
extern int hfs_cat_keycmp(const btree_key *, const btree_key *);
struct hfs_find_data;
extern int hfs_cat_find_brec(struct super_block *, u32, struct hfs_find_data *);
extern int hfs_cat_create(u32, struct inode *, struct qstr *, struct inode *);
extern int hfs_cat_delete(u32, struct inode *, struct qstr *);
extern int hfs_cat_move(u32, struct inode *, struct qstr *,
struct inode *, struct qstr *);
extern void hfs_cat_build_key(struct super_block *, btree_key *, u32, struct qstr *);
/* dir.c */
extern const struct file_operations hfs_dir_operations;
extern const struct inode_operations hfs_dir_inode_operations;
/* extent.c */
extern int hfs_ext_keycmp(const btree_key *, const btree_key *);
extern int hfs_free_fork(struct super_block *, struct hfs_cat_file *, int);
extern void hfs_ext_write_extent(struct inode *);
extern int hfs_extend_file(struct inode *);
extern void hfs_file_truncate(struct inode *);
extern int hfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
/* inode.c */
extern const struct address_space_operations hfs_aops;
extern const struct address_space_operations hfs_btree_aops;
extern struct inode *hfs_new_inode(struct inode *, struct qstr *, int);
extern void hfs_inode_write_fork(struct inode *, struct hfs_extent *, __be32 *, __be32 *);
extern int hfs_write_inode(struct inode *, struct writeback_control *);
extern int hfs_inode_setattr(struct dentry *, struct iattr *);
extern void hfs_inode_read_fork(struct inode *inode, struct hfs_extent *ext,
__be32 log_size, __be32 phys_size, u32 clump_size);
extern struct inode *hfs_iget(struct super_block *, struct hfs_cat_key *, hfs_cat_rec *);
extern void hfs_evict_inode(struct inode *);
extern void hfs_delete_inode(struct inode *);
/* attr.c */
extern int hfs_setxattr(struct dentry *dentry, const char *name,
const void *value, size_t size, int flags);
extern ssize_t hfs_getxattr(struct dentry *dentry, const char *name,
void *value, size_t size);
extern ssize_t hfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
/* mdb.c */
extern int hfs_mdb_get(struct super_block *);
extern void hfs_mdb_commit(struct super_block *);
extern void hfs_mdb_close(struct super_block *);
extern void hfs_mdb_put(struct super_block *);
/* part_tbl.c */
extern int hfs_part_find(struct super_block *, sector_t *, sector_t *);
/* string.c */
extern const struct dentry_operations hfs_dentry_operations;
extern int hfs_hash_dentry(const struct dentry *, const struct inode *,
struct qstr *);
extern int hfs_strcmp(const unsigned char *, unsigned int,
const unsigned char *, unsigned int);
extern int hfs_compare_dentry(const struct dentry *parent,
const struct inode *pinode,
const struct dentry *dentry, const struct inode *inode,
unsigned int len, const char *str, const struct qstr *name);
/* trans.c */
extern void hfs_asc2mac(struct super_block *, struct hfs_name *, struct qstr *);
extern int hfs_mac2asc(struct super_block *, char *, const struct hfs_name *);
extern struct timezone sys_tz;
/*
* There are two time systems. Both are based on seconds since
* a particular time/date.
* Unix: unsigned lil-endian since 00:00 GMT, Jan. 1, 1970
* mac: unsigned big-endian since 00:00 GMT, Jan. 1, 1904
*
*/
#define __hfs_u_to_mtime(sec) cpu_to_be32(sec + 2082844800U - sys_tz.tz_minuteswest * 60)
#define __hfs_m_to_utime(sec) (be32_to_cpu(sec) - 2082844800U + sys_tz.tz_minuteswest * 60)
#define HFS_I(inode) (list_entry(inode, struct hfs_inode_info, vfs_inode))
#define HFS_SB(sb) ((struct hfs_sb_info *)(sb)->s_fs_info)
#define hfs_m_to_utime(time) (struct timespec){ .tv_sec = __hfs_m_to_utime(time) }
#define hfs_u_to_mtime(time) __hfs_u_to_mtime((time).tv_sec)
#define hfs_mtime() __hfs_u_to_mtime(get_seconds())
static inline const char *hfs_mdb_name(struct super_block *sb)
{
return sb->s_id;
}
static inline void hfs_bitmap_dirty(struct super_block *sb)
{
set_bit(HFS_FLG_BITMAP_DIRTY, &HFS_SB(sb)->flags);
sb->s_dirt = 1;
}
#define sb_bread512(sb, sec, data) ({ \
struct buffer_head *__bh; \
sector_t __block; \
loff_t __start; \
int __offset; \
\
__start = (loff_t)(sec) << HFS_SECTOR_SIZE_BITS;\
__block = __start >> (sb)->s_blocksize_bits; \
__offset = __start & ((sb)->s_blocksize - 1); \
__bh = sb_bread((sb), __block); \
if (likely(__bh != NULL)) \
data = (void *)(__bh->b_data + __offset);\
else \
data = NULL; \
__bh; \
})
#endif
Click to expand...
Click to collapse
Not sure if thats what your looking for...I really appreciate the help!
BRD,
I know you're working on the new kernel...I was just wondering if you had any further thoughts on this?
I'm not sure if what I posted is even what you need to accomplish this ...
Thanks!
Sent from my Xoom using Tapatalk
mradlauer said:
BRD,
I know you're working on the new kernel...I was just wondering if you had any further thoughts on this?
I'm not sure if what I posted is even what you need to accomplish this ...
Thanks!
Sent from my Xoom using Tapatalk
Click to expand...
Click to collapse
OK. That should point me in the right direction. Ill see what I can whip up
Your awesome! Thanks a bunch and if you need a beta tester for it, let me know...
I'm sure this will be welcome to a lot of folks out there with a mac.
BRD,
I have loaded your new kernel and everything looks to be pretty smooth now.
A quick question about mounting HFS/HFSPlus...
I know you have to disable journaling on the disk to make it RW...I am curious as to how to mount hfs tho...When I plug in a drive, it shows up in USB_OTG with 200mb avail....
I'm thinking that we'll need an app similar to that of the NTFS mount tool...Which works perfecty...
Any thoughts? Or should I just app request something like the NTFS mount tool?
Thanks again! Your work is greatly appreciated!
Some fixes:
- dmesg
Code:
<6>[ 1.044134] pmem_camera: 1 init
- mem
Code:
static struct android_pmem_platform_data pmem_camera_pdata = {
.name = "pmem_camera",
.no_allocator = 0,
//cardsharing
// .cached = 0,
.cached = 1,
};
no more physical address error, but somethink is not ok with jpegtask
Code:
<6>[ 194.591656] pmem: successful request for physical address of pmem region id 1, offset 650190848, len 524288
<6>[ 194.591716] pmem: successful request for physical address of pmem region id 2, offset 661762048, len 6721536
<6>[ 194.612419] adsp_open() name = 'JPEGTASK'
<6>[ 194.612514] adsp: opening module JPEGTASK
<6>[ 194.613648] adsp: module JPEGTASK has been registered
<6>[ 194.613674] adsp_open() module 'JPEGTASK' adev e4978e84
<6>[ 194.613708] msm_adsp_enable() 'JPEGTASK'state[0] id[42]
<6>[ 194.614464] adsp: rpc event=0, proc_id=2, module=42, image=0
<6>[ 194.614748] adsp: module JPEGTASK: READY
<6>[ 194.615379] pmem: successful request for physical address of pmem region id 1, offset 649142272, len 4096
<6>[ 194.615554] pmem: successful request for physical address of pmem region id 1, offset 649146368, len 4096
<6>[ 194.615603] adsp_pmem_add module JPEGTASK vaddr:0x41168000 paddr:0x26b12000 len:4096
<6>[ 194.615633] adsp_pmem_add module JPEGTASK vaddr:0x4116c000 paddr:0x26b13000 len:4096
<6>[ 194.615801] adsp_pmem_add module JPEGTASK vaddr:0x41ffc000 paddr:0x26c12000 len:524288
<3>[ 194.615836] module JPEGTASK: verify failed.
maybe you have idea!
I think problem with: camera (jpeg), youtube (high def video) , but all working (output way), but not working (input way), is becouse we have something wrong with user space (maybe problem with permisions!), or maybe need corection for memory mapping!
I've tried to fix cammera, and I know bug is inside when camera catcing picture from jpeg task (input way not working, but output way working). Also, I know when youtube catching "high def video" (input way), something is not ok with "codecs" or "user space" or "memmory map"... maybe you have idea?
I think fixing cam bug will fix all (youtube...etc)
EDIT:
See this:
Code:
<6>[ 194.615801] adsp_pmem_add module JPEGTASK vaddr:0x41ffc000 paddr:0x26c12000 len:524288
Why len is 524288? Picture have size > 3-4M, maybe it cause problem with jpegtask verify??
about video and youtube problem in codecs
about camera problem in memory map
I think problem is in msm_adsp.h, adsp.c, adsp.h and adsp_photon.c
something is not ok there (I think wrong in adsp_photon.c != msm_adsp.h!) becouse I see in dmesg from int adsp_video_verify_cmd() warning about "unknown video queue"... from code:
Code:
int adsp_video_verify_cmd(struct msm_adsp_module *module,
unsigned int queue_id, void *cmd_data,
size_t cmd_size)
{
switch (queue_id) {
case QDSP_mpuVDecPktQueue:
DLOG("\n");
return verify_vdec_pkt_cmd(module, cmd_data, cmd_size);
default:
printk(KERN_INFO "unknown video queue %u\n", queue_id);
return 0;
}
}
and from it I know QDSP_mpuVDecPktQueue is not used, so I think we have problem in adsp_photon.c and need to realign it like defined in msm_adsp.h!!!
I dumped something, maybe help here:
Code:
<4>[ 0.972350] adsp: module name=AUDPLAY0TASK, module id=2, mod clk=<NULL>, verify cmd=0, patch event=0, pdev name=adsp_AUDPLAY0TASK, pdev id=-1, id_to_module=e4979000
<4>[ 0.972588] adsp: module name=AUDPPTASK, module id=7, mod clk=<NULL>, verify cmd=0, patch event=0, pdev name=adsp_AUDPPTASK, pdev id=-1, id_to_module=e4979148
<4>[ 0.972741] adsp: module name=AUDRECTASK, module id=19, mod clk=<NULL>, verify cmd=0, patch event=0, pdev name=adsp_AUDRECTASK, pdev id=-1, id_to_module=e4979290
<4>[ 0.972886] adsp: module name=AUDPREPROCTASK, module id=20, mod clk=<NULL>, verify cmd=0, patch event=0, pdev name=adsp_AUDPREPROCTASK, pdev id=-1, id_to_module=e49793d8
<4>[ 0.973040] adsp: module name=VFETASK, module id=31, mod clk=vfe_clk, verify cmd=c0143330, patch event=c01437f4, pdev name=adsp_VFETASK, pdev id=-1, id_to_module=e4979520
<4>[ 0.973183] adsp: module name=QCAMTASK, module id=43, mod clk=<NULL>, verify cmd=0, patch event=0, pdev name=adsp_QCAMTASK, pdev id=-1, id_to_module=e4979668
<4>[ 0.973330] adsp: module name=JPEGTASK, module id=42, mod clk=vdc_clk, verify cmd=c0142f0c, patch event=c01432d4, pdev name=adsp_JPEGTASK, pdev id=-1, id_to_module=e49797b0
<4>[ 0.973568] adsp: module name=VIDEOTASK, module id=9, mod clk=vdc_clk, verify cmd=c01429c0, patch event=0, pdev name=adsp_VIDEOTASK, pdev id=-1, id_to_module=e49798f8
<4>[ 0.973713] adsp: module name=VDEC_LP_MODE, module id=48, mod clk=<NULL>, verify cmd=0, patch event=0, pdev name=adsp_VDEC_LP_MODE, pdev id=-1, id_to_module=e4979a40
<4>[ 0.973901] adsp: module name=VIDEOENCTASK, module id=30, mod clk=vdc_clk, verify cmd=c0142bd8, patch event=0, pdev name=adsp_VIDEOENCTASK, pdev id=-1, id_to_module=e4979b88
And yes, cammera jpegtask have problem with memory map, but video have problem in adsp!
may be ,video with another player with codecs work good
http://gitorious.org/linux-on-qualcomm-s-msm/linux-msm/blobs/htc-msm-2.6.27/arch/arm/mach-msm/pmem.c
this file had camera pmem calc
i think this is help with with
NOTE: need edits in devices_htc.c/.h
NOTE2: Camera Snapshot work only in Fast Burst Camera
Ok I will try! Please see this -> http://forum.xda-developers.com/showpost.php?p=16448252&postcount=4
camera
Hi !
sorry for my English, but someone has a solution for a problem with camera in hd mini ? I try the android r134 FANTASTIC, but no photos some one can help me?
tanks
No reason do make doubbleposts.
As you can see in this thread, they are working on it.
Its still "under construction"
something interesting from strace
Code:
writev(3, [{"\4", 1}, {"GPhoto\0", 7}, {"Sd-card availableSize = 5673\0", 29}], 3) = 37
syscall_983042(0x43904738, 0x4390473c, 0, 0x4390473c, 0xaca8c3f4, 0x438f70cf, 0x434, 0xf0002, 0, 0x40041858, 0xcd80, 0xbe9e4700, 0, 0xbe9e43f0, 0xaca64fc7, 0xafd0ec8c, 0x8000010, 0x43904738, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 0
Code:
recv(52740, 0x80, 4294966774, MSG_WAITALL|MSG_TRUNC|MSG_DONTWAIT|MSG_PROBE|MSG_FIN|MSG_NOSIGNAL|0xbe9e0000) = -1 ETIMEDOUT (Connection timed out)
TIMEDOUT !! I don't know where is timedout, hmmm FUTEX??? Also I seen in dmesg always diferent size in bank_1 but it's defined static !!
this adress 0xbe9e0000 don't responding
I found something! Curently error come from msm_camera.c (see dmesg.log) "msm_put_stats_buffer: NULL physical address"!!!
Two functions:
first:
Code:
static int msm_put_stats_buffer(struct msm_sync *sync, void __user *arg)
{
int rc = -EIO;
struct msm_stats_buf buf;
unsigned long pphy;
struct msm_vfe_cfg_cmd cfgcmd;
if (copy_from_user(&buf, arg,
sizeof(struct msm_stats_buf))) {
ERR_COPY_FROM_USER();
return -EFAULT;
}
CDBG("%s\n", __func__);
pphy = msm_pmem_stats_vtop_lookup(sync, buf.buffer, buf.fd);
if (pphy != 0) {
if (buf.type == STAT_AEAW)
cfgcmd.cmd_type = CMD_STATS_BUF_RELEASE;
else if (buf.type == STAT_AF)
cfgcmd.cmd_type = CMD_STATS_AF_BUF_RELEASE;
else {
pr_err("%s: invalid buf type %d\n",
__func__,
buf.type);
rc = -EINVAL;
goto put_done;
}
cfgcmd.value = (void *)&buf;
if (sync->vfefn.vfe_config) {
rc = sync->vfefn.vfe_config(&cfgcmd, &pphy);
if (rc < 0)
pr_err("%s: vfe_config error %d\n",
__func__, rc);
} else
pr_err("%s: vfe_config is NULL\n", __func__);
} else {
pr_err("%s: NULL physical address\n", __func__);
rc = -EINVAL;
}
put_done:
return rc;
}
In second function I added (see dmesg.log!) printk, and I see vaddr and buffer addr sometimes is ===, sometimes !== so it need to be fixed but hmmm where??? I not have idea , maybe you have idea:
Code:
static unsigned long msm_pmem_stats_vtop_lookup(
struct msm_sync *sync,
unsigned long buffer,
int fd)
{
struct msm_pmem_region *region;
struct hlist_node *node, *n;
hlist_for_each_entry_safe(region, node, n, &sync->pmem_stats, list) {
printk("ADSP TEST: region->info.vaddr(0x%08lx)==(0x%08lx)buffer, region->info.fd(%d)==(%d)fd, region->info.vfe_can_write(%d)==0\n",
((unsigned long)(region->info.vaddr)), buffer, region->info.fd, fd, region->info.vfe_can_write);
if (((unsigned long)(region->info.vaddr) == buffer) &&
(region->info.fd == fd) &&
region->info.vfe_can_write == 0) {
region->info.vfe_can_write = 1;
return region->paddr;
}
}
return 0;
}
As you see some memory regions is not writeable becouse region->info.vaddr !== buffer
i don't think so
i think problem in s5k4e1gx.c
Code:
{ /*Snapshot*/
0x06, /* pre_pll_clk_div REG=0x0305 */
0x00, /* pll_multiplier_msb REG=0x0306 */
0x50, /* pll_multiplier_lsb REG=0x0307 */
0x00, /* vt_sys_clk_div REG=0x30B5 */
0xB0, /* DPHY_bandctrl REG=0x30F1 */
0x00, /* read_mode REG=0x0101 */
0x0A, /* x_output_size_msb REG=0x034C */
0x30, /* x_output_size_lsb REG=0x034D */
0x07, /* y_output_size_msb REG=0x034E */
0xA8, /* y_output_size_lsb REG=0x034F */
0x01, /* x_even_inc REG=0x0381 */
0x01, /* x_odd_inc REG=0x0383 */
0x01, /* y_even_inc REG=0x0385 */
0x01, /* y_odd_inc REG=0x0387 */
0x03, /* h_binning REG=0x30A9 */
0xE8, /* v_binning REG=0x300E */
0x07, /* frame_length_lines_msb REG=0x0340 */
0xB4, /* frame_length_lines_lsb REG=0x0341 */
0x0A, /* line_length_pck_msb REG=0x0342 */
0xB2, /* line_length_pck_lsb REG=0x0343 */
0x10, /* pclk_inv; REG=0x3110 */
0x0C, /* pclk_delay; REG=0x3117 */
0x0A, /* v_h_strength; REG=0x3119 */
0xAA, /* data_pclk_strength; REG=0x311A */
0x82, /* cds_test REG=0x300F */
0xC0, /* rst_offset1 REG=0x3013 */
0xA4, /* rmp_init REG=0x3017 */ /*0x94*/
0x88, /* comp_bias REG=0x301B */ /*0x71*/
0x00, /* analogue_gain_code_global_msb REG=0x0204 */
0x80, /* analogue_gain_code_global_lsb REG=0x0205 */
0x07, /* coarse_integration_time_msb REG=0x0202 */
0xA8, /* coarse_intergation_time_lsb REG=0x0203 */
1960, /* size_h */
12, /* blk_l*/
2608, /* size_w*/
130 /* blk_p*/
}
};
or may be
static int msm_divert_snapshot(struct msm_sync *sync,
in msm_camera
Ok maybe! But as you see region->info.vaddr !== buffer ...some offsets differs there and I don't know what cause it or where I need to search Maybe haret not cleaned completely some memory regions?
i try to research diffs in leo kernel
only find time fix
Maked some tests and I confirm we have problem in queue_id and it need to be fixed in photon_adsp.c or msm_adsp.h... see dmesg with latest kernel from munjeni release thread... I tried video and camera and got "adsp_video_verify_cmd: unknown video queue 4" and in jpeg_verify "-1" !!! So one queue step fail or maybe array of the queues (or array of the module offsets) in adsp_photon.c or msm_adsp.h need to be realigned! I think it cause audio loop and video freze in youtube becouse wrong queue (wrong module used), allso cause problem in video capture! With new memory map I got youtube to "not freze" but could not stop audio and no high def video... please see commit http://gitorious.org/2-6-32-photon/testing/commit/e3121b4083068760fc33a277e10c049a4054840d you will see QDSP_uPJpegActionCmdQueue is not used!
i think value for camera 22 - 23
because logcat have error with 22 ioctl
QDSP_uPJpegActionCmdQueue with 22 value you can find in leo source msm_adsp
Maybe asking help from Cianogen to support our phone becouse it's related to rpc and we not have that knownledge, it is hard to fix without .pdf specification for our phone!
problem with resolution, in fast burst camera with large buffer and 1280x760 all good in android camera problem with buffer ,
the first what can be a problem : auto-focus wrong offset
the second : buffer with very high resolution too large and pmem don't have needed size
the third : problem with ioctl
There isn't really a wholesome guide for this device, which includes everything form flashing to compiling. So i am writing this guide.
Currently its being populated. This will contain everything - flashing, modding, compiling etc.
How to root SGSA : Look here
How to flash firmwares from sammobile using Odin : Look here
Rooting JB :
Download here : Root
How to :
1. Download the zip and place it in the root of your sd card.
PS : SD Card is a must.
2. Reboot to the stock recovery.
3. Select install update from external storage.
4. Select the root.zip file.
5. Viola
Enjoy your rooted JB.
Original post here.
Rooting GB :
Please note that this method will increase the binary counter. A more complex method to root GB is available here which doesn't increase the binary counter.
This kernel will provide you the standard stock kernel and also includes TWRP recovery.
( disclaimer )
I AM NOT TO BE HELD RESPONSIBLE IF YOU DAMAGE YOUR PHONE
Using Odin to flash this kernel WILL increase your binary counter.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
( features )
- Team Win Recovery Project 2.2.1
- CIFS Support
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
( how to install using Odin )
1. Restart into download mode by pressing Power + Home + Vol Down
2. Start Odin, and flash the attached kernel as PDA.
Remember to extract the attached file only once. if you end up with a kernel.bin.md5 you extracted twice!
Do not use the PIT, do not have any options checked except for "Auto reboot" and "F. Reset Time"
3. Wait for the device to reboot
( how to install using DD )
This method does not increase your binary counter, but your phone needs to be rooted so you can perform this!
IF YOU'RE NOT FAMILIAR WITH DD I RECOMMEND YOU TO AVOID THIS METHOD
1. Extract the attached file twice. You will end up with a kernel.bin.md5 file
2. Put the kernel.bin.md5 file to /sdcard
3. Start adb shell
4. Do the following commands:
Code:
$ su
# dd if=/sdcard/kernel.bin.md5 of=/dev/block/mmcblk0p15
# reboot
5. Wait for the device to reboot.
Click to expand...
Click to collapse
Download the pre-rooted kernel here.
Flashing with Odin :
Odin is the saviour tool for all Samsung devices. The method for flashing by Odin differs from device to device.
This thread will give step by step instructions on how to flash a stock rom from Odin on the GT-I9070/p :
A. Download Odin tools from here : Odin Tools
Pass : shaaan
B. Download the stock rom from : SamFirmware
Setting up Odin :
1. Make sure you have installed the necessary drivers for this device. The drivers can be installed from within KIES or seperately here.
2. Run Odin as administrator.
3. Setting up the files is divided in two types depending on the firmware type :
a. If the firmware is a multi package file, put the files in the corresponding sections.
ie. CSC file in CSC section, PDA file in PDA section.
b. If the firmware is a single package, add the single file in the PDA section.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
4. Now that Odin is setup, put the phone in download mode. To do that, power off the phone and press 'home+power+volume down' buttons together. Keep the buttons pressed till Download mode appears.
5. Now that Odin and the phone are setup, connect the phone to the device. Odin will detect the device and show something like 'com port (1)'
6. Flash the device.
7. The flash will take 5 minutes for a full flash on average.
8. When the flashing is complete, DO NOT remove the device until Odin shows ' PASS '.
9. The device will reboot. Remove the device, go to recovery mode and do a factory/data reset.
That's it. Happy flashing peeps..!!
ROM Modding
Now that we are done with basic things like rooting and flashing, let's move on to some complex stuff..
Tools needed -
1. Apktool
2. XUltimate for deodexing
3. Notepad ++
4. Baksmali manager ( attached )
5. DSIXDA's Android kitchen - only if you really want to use it. but i recommend doing everything manually.
Click to expand...
Click to collapse
Step I :
Setup Android SDK. Instructions here.
Once the SDK is setup, run the command "android" in command prompt. It should look something like this.
Make sure that your PC recognizes the device. Run the command "adb devices". It should show something like this.
Step II :
Once these basic things are setup, install apktool :
1. Download apktool.
2. There will be two files, they will be .bz2 files.
3. Create a new folder called apktool.
4. Put it here: C:\Users\<your username>\apktool.
5. Open these with 7zip. You’ll notice that inside there are .tar files.
6. Double-click the .tar file, and now you’ll see the files.
7. Extract the files from BOTH zips to your new apktool folder at C:\Users\<your username>\apktool.
8. You’ll have 3 files total now in your apktool folder: aapt.exe, apktool.bat, apktool.jar.
Click to expand...
Click to collapse
Now install Notepad++
Restart the computer.
Using apktool :
Generally it is not required to install the framework files, but apps like '/system/app/Settings.apk' need it.
The general commands for apktool are -
apktool d framework-res.apk -- Decompiles framework-res.apk
apktool b framework-res -- Builds the modified files
apktool if path_to_framework-res.apk -- Installs framework-res. Do the same for twframework-res
Click to expand...
Click to collapse
Preface :
OK a lot of people have been asking about building kernels, so here is my best shot at a tutorial. You guys shouldn't expect my little walk through here plus another person’s source to make you a "developer", all it will prove is that you can copy/paste. Also if you follow this guide, I am not responsible for anything that you may do that results in destruction, death, or other negative side-affects. You really shouldn't be messing with this stuff unless you know what you are doing, or doing a LOT of research along the way.
However please use this guide as a springboard for knowledge, to give you some key terms to google, to turn on those lightbulbs in your head and get those gears churning.
Note: This is not a newbie's guide to Linux. Before you post your question please look at it. If it involves the syntax of the command/what a command does you need to do your own research elsewhere before attempting to continue with this guide.
Click to expand...
Click to collapse
I. Setting up the environment :
A. Install Ubuntu 12.04 (Not holding your hand here, if you can't do this you shouldn't be messing with kernels)
B. Installing required packages: Type this code into the terminal.
Code:
For 32 and 64 bit systems :
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl
libncurses5-dev zlib1g-dev openjdk-6-jre openjdk-6-jdk pngcrush schedtool
For 64 bit systems only :
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-4.7-multilib g++-4.5-multilib
Also make sure you have ADB installed. Its a must.
C. Open a terminal
D. Type "mkdir -p android/kernel"
The above steps explained:
A. Installing a linux distro. You could really install any Linux distro however Ubuntu in my eyes is the easy to use and install, and widely supported.
B. Installing needed packages. These are needed for building the kernel. No I can't tell you what every single package does, it is your job to research and figure that out.
C. Ummm...duh?
D. Building a directory structure that will help keep us organized. The "mkdir" command creates a directory. The more you type these commands the more familiar you will become with them.
Click to expand...
Click to collapse
II. Downloading the source :
A. Download the relevant source from the Samsung Opensource Website
B. Once the source is download, extract it into the "android/kernel" directory that we made in the previous step.
C. Grab your desired toolchain. I generally recommend the CodeSourcery toolchain.
Click to expand...
Click to collapse
III. Modifications :
This is the part people are curious about, they want to make modifications to the kernel to make it "special". Start all these from the root directory of your kernel source.
Mod 1. Applying a patch
A. Download the patch you wish to apply, in this case this one should work.
B. Save that file as "kernelPatch" in your kernel directory.
C. Open a Terminal
D. Move into the root directory of the kernel you wish to patch.
E. Type "patch -p1 < ../kernelPatch"
The above steps explained:
A. Pretty simple, I mean we need a patch. The patch itself is quite simply a diff between the original kernel source tree and the source tree containing the changes. I'll post a quick tutorial on how to create a patch in the third post. The patch above contains multiple governors to be added to your kernel.
B. Self-explanatory
C. Self-explanatory
D. Self-explanatory
E. Basically we run the patch command on our source using the patch we downloaded previously. The "patch" portion is the binary itself, the "-p1" option allows you to control the number of forward slashes to remove from file paths(You'll need to look at this option more if you are using weird directory structures or applying the patches from a odd location). The "<" operator directs the content of our "../kernelPatch" file into the command.
Click to expand...
Click to collapse
Mod 2. Adding a Governor
A. Open "drivers/cpufreq/Kconfig"
B. Add the following lines in appropriate spot amongst the other govenor's
Code:
config CPU_FREQ_DEFAULT_GOV_SMARTASS
bool "smartass"
select CPU_FREQ_GOV_SMARTASS
select CPU_FREQ_GOV_PERFORMANCE
help
Use the CPUFreq governor 'smartass' as default.
Code:
config CPU_FREQ_GOV_SMARTASS
tristate "'smartass' cpufreq governor"
depends on CPU_FREQ
help
smartass' - a "smart" optimized governor!
If in doubt, say N.
C. Open "drivers/cpufreq/Makefile"
D. Add the following line in the appropriate spot.
Code:
obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS) += cpufreq_smartass.o
E. Create a file called "drivers/cpufreq/cpufreq_smartass.c"
F. Put the following code in that file.
Code:
/*
* drivers/cpufreq/cpufreq_smartass.c
*
* Copyright (C) 2010 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Author: Erasmux
*
* Based on the interactive governor By Mike Chan ([email protected])
* which was adaptated to 2.6.29 kernel by Nadlabak ([email protected])
*
* requires to add
* EXPORT_SYMBOL_GPL(nr_running);
* at the end of kernel/sched.c
*
*/
#include <linux/cpu.h>
#include <linux/cpumask.h>
#include <linux/cpufreq.h>
#include <linux/sched.h>
#include <linux/tick.h>
#include <linux/timer.h>
#include <linux/workqueue.h>
#include <linux/moduleparam.h>
#include <asm/cputime.h>
#include <linux/earlysuspend.h>
static void (*pm_idle_old)(void);
static atomic_t active_count = ATOMIC_INIT(0);
struct smartass_info_s {
struct cpufreq_policy *cur_policy;
struct timer_list timer;
u64 time_in_idle;
u64 idle_exit_time;
unsigned int force_ramp_up;
unsigned int enable;
};
static DEFINE_PER_CPU(struct smartass_info_s, smartass_info);
/* Workqueues handle frequency scaling */
static struct workqueue_struct *up_wq;
static struct workqueue_struct *down_wq;
static struct work_struct freq_scale_work;
static u64 freq_change_time;
static u64 freq_change_time_in_idle;
static cpumask_t work_cpumask;
static unsigned int suspended;
/*
* The minimum amount of time to spend at a frequency before we can ramp down,
* default is 45ms.
*/
#define DEFAULT_DOWN_RATE_US 20000
static unsigned long down_rate_us;
/*
* When ramping up frequency with no idle cycles jump to at least this frequency.
* Zero disables. Set a very high value to jump to policy max freqeuncy.
*/
#define DEFAULT_UP_MIN_FREQ 1152000
static unsigned int up_min_freq;
/*
* When sleep_max_freq>0 the frequency when suspended will be capped
* by this frequency. Also will wake up at max frequency of policy
* to minimize wakeup issues.
* Set sleep_max_freq=0 to disable this behavior.
*/
#define DEFAULT_SLEEP_MAX_FREQ 537600
static unsigned int sleep_max_freq;
/*
* Sampling rate, I highly recommend to leave it at 2.
*/
#define DEFAULT_SAMPLE_RATE_JIFFIES 2
static unsigned int sample_rate_jiffies;
/*
* Freqeuncy delta when ramping up.
* zero disables causes to always jump straight to max frequency.
*/
#define DEFAULT_RAMP_UP_STEP 614400
static unsigned int ramp_up_step;
/*
* Max freqeuncy delta when ramping down. zero disables.
*/
#define DEFAULT_MAX_RAMP_DOWN 384000
static unsigned int max_ramp_down;
/*
* CPU freq will be increased if measured load > max_cpu_load;
*/
#define DEFAULT_MAX_CPU_LOAD 75
static unsigned long max_cpu_load;
/*
* CPU freq will be decreased if measured load < min_cpu_load;
*/
#define DEFAULT_MIN_CPU_LOAD 30
static unsigned long min_cpu_load;
static int cpufreq_governor_smartass(struct cpufreq_policy *policy,
unsigned int event);
#ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_SMARTASS
static
#endif
struct cpufreq_governor cpufreq_gov_smartass = {
.name = "smartass",
.governor = cpufreq_governor_smartass,
.max_transition_latency = 6000000,
.owner = THIS_MODULE,
};
static void cpufreq_smartass_timer(unsigned long data)
{
u64 delta_idle;
u64 update_time;
u64 now_idle;
struct smartass_info_s *this_smartass = &per_cpu(smartass_info, data);
struct cpufreq_policy *policy = this_smartass->cur_policy;
now_idle = get_cpu_idle_time_us(data, &update_time);
if (update_time == this_smartass->idle_exit_time)
return;
delta_idle = cputime64_sub(now_idle, this_smartass->time_in_idle);
//printk(KERN_INFO "smartass: t=%llu i=%llu\n",cputime64_sub(update_time,this_smartass->idle_exit_time),delta_idle);
/* Scale up if there were no idle cycles since coming out of idle */
if (delta_idle == 0) {
if (policy->cur == policy->max)
return;
if (nr_running() < 1)
return;
this_smartass->force_ramp_up = 1;
cpumask_set_cpu(data, &work_cpumask);
queue_work(up_wq, &freq_scale_work);
return;
}
/*
* There is a window where if the cpu utlization can go from low to high
* between the timer expiring, delta_idle will be > 0 and the cpu will
* be 100% busy, preventing idle from running, and this timer from
* firing. So setup another timer to fire to check cpu utlization.
* Do not setup the timer if there is no scheduled work.
*/
if (!timer_pending(&this_smartass->timer) && nr_running() > 0) {
this_smartass->time_in_idle = get_cpu_idle_time_us(
data, &this_smartass->idle_exit_time);
mod_timer(&this_smartass->timer, jiffies + sample_rate_jiffies);
}
if (policy->cur == policy->min)
return;
/*
* Do not scale down unless we have been at this frequency for the
* minimum sample time.
*/
if (cputime64_sub(update_time, freq_change_time) < down_rate_us)
return;
cpumask_set_cpu(data, &work_cpumask);
queue_work(down_wq, &freq_scale_work);
}
static void cpufreq_idle(void)
{
struct smartass_info_s *this_smartass = &per_cpu(smartass_info, smp_processor_id());
struct cpufreq_policy *policy = this_smartass->cur_policy;
pm_idle_old();
if (!cpumask_test_cpu(smp_processor_id(), policy->cpus))
return;
/* Timer to fire in 1-2 ticks, jiffie aligned. */
if (timer_pending(&this_smartass->timer) == 0) {
this_smartass->time_in_idle = get_cpu_idle_time_us(
smp_processor_id(), &this_smartass->idle_exit_time);
mod_timer(&this_smartass->timer, jiffies + sample_rate_jiffies);
}
}
/*
* Choose the cpu frequency based off the load. For now choose the minimum
* frequency that will satisfy the load, which is not always the lower power.
*/
static unsigned int cpufreq_smartass_calc_freq(unsigned int cpu, struct cpufreq_policy *policy)
{
unsigned int delta_time;
unsigned int idle_time;
unsigned int cpu_load;
unsigned int new_freq;
u64 current_wall_time;
u64 current_idle_time;
current_idle_time = get_cpu_idle_time_us(cpu, ¤t_wall_time);
idle_time = (unsigned int)( current_idle_time - freq_change_time_in_idle );
delta_time = (unsigned int)( current_wall_time - freq_change_time );
cpu_load = 100 * (delta_time - idle_time) / delta_time;
//printk(KERN_INFO "Smartass calc_freq: delta_time=%u cpu_load=%u\n",delta_time,cpu_load);
if (cpu_load < min_cpu_load) {
cpu_load += 100 - max_cpu_load; // dummy load.
new_freq = policy->cur * cpu_load / 100;
if (max_ramp_down && new_freq < policy->cur - max_ramp_down)
new_freq = policy->cur - max_ramp_down;
//printk(KERN_INFO "Smartass calc_freq: %u => %u\n",policy->cur,new_freq);
return new_freq;
} if (cpu_load > max_cpu_load) {
if (ramp_up_step)
new_freq = policy->cur + ramp_up_step;
else
new_freq = policy->max;
return new_freq;
}
return policy->cur;
}
/* We use the same work function to sale up and down */
static void cpufreq_smartass_freq_change_time_work(struct work_struct *work)
{
unsigned int cpu;
unsigned int new_freq;
struct smartass_info_s *this_smartass;
struct cpufreq_policy *policy;
cpumask_t tmp_mask = work_cpumask;
for_each_cpu(cpu, tmp_mask) {
this_smartass = &per_cpu(smartass_info, cpu);
policy = this_smartass->cur_policy;
if (this_smartass->force_ramp_up) {
this_smartass->force_ramp_up = 0;
if (nr_running() == 1) {
cpumask_clear_cpu(cpu, &work_cpumask);
return;
}
if (policy->cur == policy->max)
return;
if (ramp_up_step)
new_freq = policy->cur + ramp_up_step;
else
new_freq = policy->max;
if (suspended && sleep_max_freq) {
if (new_freq > sleep_max_freq)
new_freq = sleep_max_freq;
} else {
if (new_freq < up_min_freq)
new_freq = up_min_freq;
}
} else {
new_freq = cpufreq_smartass_calc_freq(cpu,policy);
// in suspend limit to sleep_max_freq and
// jump straight to sleep_max_freq to avoid wakeup problems
if (suspended && sleep_max_freq &&
(new_freq > sleep_max_freq || new_freq > policy->cur))
new_freq = sleep_max_freq;
}
if (new_freq > policy->max)
new_freq = policy->max;
if (new_freq < policy->min)
new_freq = policy->min;
__cpufreq_driver_target(policy, new_freq,
CPUFREQ_RELATION_L);
freq_change_time_in_idle = get_cpu_idle_time_us(cpu,
&freq_change_time);
cpumask_clear_cpu(cpu, &work_cpumask);
}
}
static ssize_t show_down_rate_us(struct cpufreq_policy *policy, char *buf)
{
return sprintf(buf, "%lu\n", down_rate_us);
}
static ssize_t store_down_rate_us(struct cpufreq_policy *policy, const char *buf, size_t count)
{
ssize_t res;
unsigned long input;
res = strict_strtoul(buf, 0, &input);
if (res >= 0 && input >= 1000 && input <= 100000000)
down_rate_us = input;
return res;
}
static struct freq_attr down_rate_us_attr = __ATTR(down_rate_us, 0644,
show_down_rate_us, store_down_rate_us);
static ssize_t show_up_min_freq(struct cpufreq_policy *policy, char *buf)
{
return sprintf(buf, "%u\n", up_min_freq);
}
static ssize_t store_up_min_freq(struct cpufreq_policy *policy, const char *buf, size_t count)
{
ssize_t res;
unsigned long input;
res = strict_strtoul(buf, 0, &input);
if (res >= 0 && input >= 0)
up_min_freq = input;
return res;
}
static struct freq_attr up_min_freq_attr = __ATTR(up_min_freq, 0644,
show_up_min_freq, store_up_min_freq);
static ssize_t show_sleep_max_freq(struct cpufreq_policy *policy, char *buf)
{
return sprintf(buf, "%u\n", sleep_max_freq);
}
static ssize_t store_sleep_max_freq(struct cpufreq_policy *policy, const char *buf, size_t count)
{
ssize_t res;
unsigned long input;
res = strict_strtoul(buf, 0, &input);
if (res >= 0 && input >= 0)
sleep_max_freq = input;
return res;
}
static struct freq_attr sleep_max_freq_attr = __ATTR(sleep_max_freq, 0644,
show_sleep_max_freq, store_sleep_max_freq);
static ssize_t show_sample_rate_jiffies(struct cpufreq_policy *policy, char *buf)
{
return sprintf(buf, "%u\n", sample_rate_jiffies);
}
static ssize_t store_sample_rate_jiffies(struct cpufreq_policy *policy, const char *buf, size_t count)
{
ssize_t res;
unsigned long input;
res = strict_strtoul(buf, 0, &input);
if (res >= 0 && input > 0 && input <= 1000)
sample_rate_jiffies = input;
return res;
}
static struct freq_attr sample_rate_jiffies_attr = __ATTR(sample_rate_jiffies, 0644,
show_sample_rate_jiffies, store_sample_rate_jiffies);
static ssize_t show_ramp_up_step(struct cpufreq_policy *policy, char *buf)
{
return sprintf(buf, "%u\n", ramp_up_step);
}
static ssize_t store_ramp_up_step(struct cpufreq_policy *policy, const char *buf, size_t count)
{
ssize_t res;
unsigned long input;
res = strict_strtoul(buf, 0, &input);
if (res >= 0)
ramp_up_step = input;
return res;
}
static struct freq_attr ramp_up_step_attr = __ATTR(ramp_up_step, 0644,
show_ramp_up_step, store_ramp_up_step);
static ssize_t show_max_ramp_down(struct cpufreq_policy *policy, char *buf)
{
return sprintf(buf, "%u\n", max_ramp_down);
}
static ssize_t store_max_ramp_down(struct cpufreq_policy *policy, const char *buf, size_t count)
{
ssize_t res;
unsigned long input;
res = strict_strtoul(buf, 0, &input);
if (res >= 0)
max_ramp_down = input;
return res;
}
static struct freq_attr max_ramp_down_attr = __ATTR(max_ramp_down, 0644,
show_max_ramp_down, store_max_ramp_down);
static ssize_t show_max_cpu_load(struct cpufreq_policy *policy, char *buf)
{
return sprintf(buf, "%lu\n", max_cpu_load);
}
static ssize_t store_max_cpu_load(struct cpufreq_policy *policy, const char *buf, size_t count)
{
ssize_t res;
unsigned long input;
res = strict_strtoul(buf, 0, &input);
if (res >= 0 && input > 0 && input <= 100)
max_cpu_load = input;
return res;
}
static struct freq_attr max_cpu_load_attr = __ATTR(max_cpu_load, 0644,
show_max_cpu_load, store_max_cpu_load);
static ssize_t show_min_cpu_load(struct cpufreq_policy *policy, char *buf)
{
return sprintf(buf, "%lu\n", min_cpu_load);
}
static ssize_t store_min_cpu_load(struct cpufreq_policy *policy, const char *buf, size_t count)
{
ssize_t res;
unsigned long input;
res = strict_strtoul(buf, 0, &input);
if (res >= 0 && input > 0 && input < 100)
min_cpu_load = input;
return res;
}
static struct freq_attr min_cpu_load_attr = __ATTR(min_cpu_load, 0644,
show_min_cpu_load, store_min_cpu_load);
static struct attribute * smartass_attributes[] = {
&down_rate_us_attr.attr,
&up_min_freq_attr.attr,
&sleep_max_freq_attr.attr,
&sample_rate_jiffies_attr.attr,
&ramp_up_step_attr.attr,
&max_ramp_down_attr.attr,
&max_cpu_load_attr.attr,
&min_cpu_load_attr.attr,
NULL,
};
static struct attribute_group smartass_attr_group = {
.attrs = smartass_attributes,
.name = "smartass",
};
static int cpufreq_governor_smartass(struct cpufreq_policy *new_policy,
unsigned int event)
{
unsigned int cpu = new_policy->cpu;
int rc;
struct smartass_info_s *this_smartass = &per_cpu(smartass_info, cpu);
switch (event) {
case CPUFREQ_GOV_START:
if ((!cpu_online(cpu)) || (!new_policy->cur))
return -EINVAL;
if (this_smartass->enable) /* Already enabled */
break;
/*
* Do not register the idle hook and create sysfs
* entries if we have already done so.
*/
if (atomic_inc_return(&active_count) > 1)
return 0;
rc = sysfs_create_group(&new_policy->kobj, &smartass_attr_group);
if (rc)
return rc;
pm_idle_old = pm_idle;
pm_idle = cpufreq_idle;
this_smartass->cur_policy = new_policy;
this_smartass->cur_policy->max = CONFIG_MSM_CPU_FREQ_ONDEMAND_MAX;
this_smartass->cur_policy->min = CONFIG_MSM_CPU_FREQ_ONDEMAND_MIN;
this_smartass->cur_policy->cur = CONFIG_MSM_CPU_FREQ_ONDEMAND_MAX;
this_smartass->enable = 1;
// notice no break here!
case CPUFREQ_GOV_LIMITS:
if (this_smartass->cur_policy->cur != new_policy->max)
__cpufreq_driver_target(new_policy, new_policy->max, CPUFREQ_RELATION_H);
break;
case CPUFREQ_GOV_STOP:
this_smartass->enable = 0;
if (atomic_dec_return(&active_count) > 1)
return 0;
sysfs_remove_group(&new_policy->kobj,
&smartass_attr_group);
pm_idle = pm_idle_old;
del_timer(&this_smartass->timer);
break;
}
return 0;
}
static void smartass_suspend(int cpu, int suspend)
{
struct smartass_info_s *this_smartass = &per_cpu(smartass_info, smp_processor_id());
struct cpufreq_policy *policy = this_smartass->cur_policy;
unsigned int new_freq;
if (!this_smartass->enable || sleep_max_freq==0) // disable behavior for sleep_max_freq==0
return;
if (suspend) {
if (policy->cur > sleep_max_freq) {
new_freq = sleep_max_freq;
if (new_freq > policy->max)
new_freq = policy->max;
if (new_freq < policy->min)
new_freq = policy->min;
__cpufreq_driver_target(policy, new_freq,
CPUFREQ_RELATION_H);
}
} else { // resume at max speed:
__cpufreq_driver_target(policy, policy->max,
CPUFREQ_RELATION_H);
}
}
static void smartass_early_suspend(struct early_suspend *handler) {
int i;
suspended = 1;
for_each_online_cpu(i)
smartass_suspend(i,1);
}
static void smartass_late_resume(struct early_suspend *handler) {
int i;
suspended = 0;
for_each_online_cpu(i)
smartass_suspend(i,0);
}
static struct early_suspend smartass_power_suspend = {
.suspend = smartass_early_suspend,
.resume = smartass_late_resume,
};
static int __init cpufreq_smartass_init(void)
{
unsigned int i;
struct smartass_info_s *this_smartass;
down_rate_us = DEFAULT_DOWN_RATE_US;
up_min_freq = DEFAULT_UP_MIN_FREQ;
sleep_max_freq = DEFAULT_SLEEP_MAX_FREQ;
sample_rate_jiffies = DEFAULT_SAMPLE_RATE_JIFFIES;
ramp_up_step = DEFAULT_RAMP_UP_STEP;
max_ramp_down = DEFAULT_MAX_RAMP_DOWN;
max_cpu_load = DEFAULT_MAX_CPU_LOAD;
min_cpu_load = DEFAULT_MIN_CPU_LOAD;
suspended = 0;
/* Initalize per-cpu data: */
for_each_possible_cpu(i) {
this_smartass = &per_cpu(smartass_info, i);
this_smartass->enable = 0;
this_smartass->force_ramp_up = 0;
this_smartass->time_in_idle = 0;
this_smartass->idle_exit_time = 0;
// intialize timer:
init_timer_deferrable(&this_smartass->timer);
this_smartass->timer.function = cpufreq_smartass_timer;
this_smartass->timer.data = i;
}
/* Scale up is high priority */
up_wq = create_rt_workqueue("ksmartass_up");
down_wq = create_workqueue("ksmartass_down");
INIT_WORK(&freq_scale_work, cpufreq_smartass_freq_change_time_work);
register_early_suspend(&smartass_power_suspend);
return cpufreq_register_governor(&cpufreq_gov_smartass);
}
#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_SMARTASS
pure_initcall(cpufreq_smartass_init);
#else
module_init(cpufreq_smartass_init);
#endif
static void __exit cpufreq_smartass_exit(void)
{
cpufreq_unregister_governor(&cpufreq_gov_smartass);
destroy_workqueue(up_wq);
destroy_workqueue(down_wq);
}
module_exit(cpufreq_smartass_exit);
MODULE_AUTHOR ("Erasmux");
MODULE_DESCRIPTION ("'cpufreq_smartass' - A smart cpufreq governor");
MODULE_LICENSE ("GPL");
G. open "include/linux/cpufreq.h"
H. Under the "Cpufreq Default" section add
Code:
#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_SMARTASS)
extern struct cpufreq_governor cpufreq_gov_smartass;
#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_smartass)
Ok there is a governor added, do the exact same steps for any other one's you would like to add.
The above steps explained:
A. Just opening a file, you guys have this. The Kconfig ties into our "make menuconfig" command later, making our mod a selectable option.
B. Adding the appropriate code for our governor to get it in our .config file. The first chunk would allow us to set our governor as the default one for our kernel, the other allows us to totally remove or add it to the build as we wish.
C-D. This step tells the linker to tie our module in with the rest of the code.
E-F. Creating the actually governor itself, don't skip this step. I would suggest reading through this and trying to understand how it works, it's some pretty awesome stuff.
G-H. Open a file and add the code needed to tie our module into the rest of the source. Without this we would not be able to compile due to the rest of the source not knowing our module exists.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
IV. Getting a Config File :
Samsung now doesn't support grabbing the kernel config from "/proc/config". So we have the alternative method of using the stock config from "/arch/arm/config". Use the README to get a better understanding of how the config file works.
Click to expand...
Click to collapse
V. Building :
Time to start the real "build" section of this tutorial.
Part A. Pre-build Steps
A. Open terminal and change to the root of your kernel directory
B. Type "export ARCH=arm"
C. Type "export CROSS_COMPILE=~/android/kernel/toolchains/arm-eabi-linaro-4.6.2/bin/arm-eabi-"
Part B. The First Build
A. Type "make <your_config_name>_defconfig"
B. Type "make menuconfig" and make the required changes to use any modules you added or similar changes.
C. Type "make -j<maximum number of jobs>"
Part C. Re-Builds
A. Type "make clean"
B. Type "make oldconfig"
C. Type "make -j<maximum number of jobs>"
Part D. Building Modules
You have two options:
A. Type "make modules"
B. Type "make path/to/your/module.ko"
Alternatively, you can use this build script here[/URL.]
Click to expand...
Click to collapse
Above steps explained :
Part A.(These steps are required every time you close your terminal and re-open it to build again.)
A. Ok shouldn’t need to explain this.
B. This command sets your target architecture.
C. Defines the path to the toolchain we are going to use to compile our kernel. You can change this to point towards whatever toolchain you have downloaded or feel like using, the way it is currently configured it will use the Linaro toolchain that we downloaded above.
Part B.(These only need to be run the first time you build a kernel.)
A. Load's your configuration file from earlier.
B. Open up a menu to configure your kernel. It will use the config file you loaded in the previous step as a base.
C. Viola start the build. I typically allow 1 job per core, so on my quad core machine I put "make -j4". Just raising that number will not make your build faster, your processor needs to be able to support the number of jobs you are assigning it.
Part C. (Use the command's when you are building any-time outside of the first)
A. This command gets rid of any old/outdated binaries or modules you compiled before, and let's start fresh. I like to run it every I build unless my changes are really small and localized.
B. A very awesome command, it parses through what has changed and only prompts you about new options.
C. See the explanation for the above "Part C.".
Part D.(Use these for just building kernel modules.)
A. This will re-build all modules.
B. Will rebuild just the module you need. Very useful when you need to rebuild a WiFi module.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
VI. Now What ?
Ok we have now started our build and we are waiting for it to finish, so there are two possible outcomes:
Outcome A. Build Succeds
W00t!! You have a kernel built by your self from source. There are a couple things you need in-order to use this kernel on your device any ".ko" modules and the zImage binary. If you pay attention to the output of your compiler then you will see the location of those objects. However the following commands will make your life a bit easier(Thanks Recognized Developer Hacre):
A. Open a terminal
B. Change to your root kernel directory
C. Type "mkdir ../<your_kernel>_output"
D. Type "cp arch/arm/boot/zImage ../<your_kernel>_output/zImage"
E. Type "find . -name "*.ko" -exec cp {} ../<your_kernel>_output \;"
The above steps explained:
A-C. Self-Explanatory
D. Move our kernel binary into our output folder
E. This handy bit of magic finds all ".ko" modules and also copies them into your output file.
You will also need to assemble a kernel image containing a initramfs for your device, along with the kernel binary and such. Getting the ramdisk from a bin file isn't really easy, but i have attached a script that should do the work. Just remove the .txt extension and chmod it to a+x.
Click to expand...
Click to collapse
Outcome B : Build Fails
Oh dear. It failed. Well guess what...this is going to happen..a LOT. Get used to it, and get used to googling and experimenting with different solutions. The following are some tips that will help you with debugging your issues.
Running a "Clean" build
A. Backup your config file(Type "cp .config ../backupConfig")
B. Re-run the build process using just your defconfig from earlier.
Limiting Output(Thanks Hacre.)
A. Another good tip is to run "make -j1" to get the error, as it will limit the amount of text you need to scroll through.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
While the kernel is compiling, it should show something like this :
When the kernel compile is complete, it should show something like this :
Tips :
I. In the defconfig file, remove the SHRM file signature verification or RIL won't work.
II. Use "make menuconfig" to access a GUI and modify the kernel parameters.
FAQ's :
Q. Can i downgrade the device if i upgrade it to JB ?
A. Yes. You can. There is a detailed guide in the development section. Please refer it before posting.
Credits :
thewadegeek form whose kernel compiling guide, i copy pasted loads of stuff
users for their support
Click to expand...
Click to collapse
Feel something is missing ? Please let me know. I will be happy to update the guide.
Good job dude , keep up u r doing great , thanks lot ^_*
Can I flash whole XXLPZ via odin the same way? Coz my ota doesn't show any update.
And will the root method work then too?
Sent from my GT-I9070 using xda premium
atishey23 said:
Can I flash whole XXLPZ via odin the same way? Coz my ota doesn't show any update.
And will the root method work then too?
Sent from my GT-I9070 using xda premium
Click to expand...
Click to collapse
yes and yes. worked for me, improved performance for me
i think they should pin this thread
popup error
after i flash xxlpz via odin it reboots perfectly and stuck at language chooser. cant finish setup because of popup error "unfortunately com.google.process has stopped" any fix?
Одг: [REF] The All In One Guide for SGSA
ianmcgui said:
after i flash xxlpz via odin it reboots perfectly and stuck at language chooser. cant finish setup because of popup error "unfortunately com.google.process has stopped" any fix?
Click to expand...
Click to collapse
Read a bit!
http://forum.xda-developers.com/showthread.php?p=37246645
Sent from Galaxy S Advance
thanks...good going
thanks, waiting for more :good:
OP updated.
perfect guide
gr8 work.................. i wish i could find this type of guide before i root 1st time so that my binary count wont increase
btw there is any other way for zero binary count??? (i know about triangle away & jib and try both on my sgsa but dont work
and i have 1 problem if u have sol. than plz reply.. in my sgsa "wap setting" can not be installed which is sent by service providers (i.e bsnllive , docomo divein etc) it gives me unable to read
any one having this type of problem???/
great guide..btw i have a problem.. i have installed everything and when i perform a task the terminal want the password which i cant seem to be able to input! i cant do anything because of that! any workaround?
Brainiac.shri said:
great guide..btw i have a problem.. i have installed everything and when i perform a task the terminal want the password which i cant seem to be able to input! i cant do anything because of that! any workaround?
Click to expand...
Click to collapse
Since you don't state it clearly, i guess that you are talking about the commands in Ubuntu!
When you enter the password in the Ubuntu terminal, it isn't showed for security reasons.
So, just type the password and press enter!
Sent from my GT-I9070 using xda premium
Shaaan said:
Since you don't state it clearly, i guess that you are talking about the commands in Ubuntu!
When you enter the password in the Ubuntu terminal, it isn't showed for security reasons.
So, just type the password and press enter!
Sent from my GT-I9070 using xda premium
Click to expand...
Click to collapse
nope! doesnt work! but still logged into ubuntu and tried again and still not working. i remember the password(i just used it to log into the OS) just do not see the problem!
EDIT: doesnt work for certain commands! i tried rooting it just for fun and there the password was accepted just fine!
Frankly speaking after spending a lot of time on XDA, I feel like Developing something for our dear phone! So like which is easier, safer and/or quicker to develop.. A Kernel or a Custom ROM..?
If Kernel.. how can I do that? Download stock kernel and modify it?
If ROM.. where to start? Download the firmware and start modifying it?
PS: I'm not trolling... I'm serious
Sami Kabir said:
Frankly speaking after spending a lot of time on XDA, I feel like Developing something for our dear phone! So like which is easier, safer and/or quicker to develop.. A Kernel or a Custom ROM..?
If Kernel.. how can I do that? Download stock kernel and modify it?
If ROM.. where to start? Download the firmware and start modifying it?
PS: I'm not trolling... I'm serious
Click to expand...
Click to collapse
Step by step ROM making guide. Heat up your PC chair by reading!!! But, as I know you - you will ask for explanation.
http://forum.xda-developers.com/showthread.php?t=1801690
Hi guys,
I'm trying to compile fourkbomb's Oreo Kernel but I'm stuck on:
drivers/power/qpnp-bms.c:432:13: error: redefinition of 'disable_bms_irq_nosync'
drivers/power/qpnp-bms.c:421:13: note: previous definition of 'disable_bms_irq_nosync' was here
drivers/power/qpnp-bms.c:421:13: warning: 'disable_bms_irq_nosync' defined but not used [-Wunused-function]
error, forbidden warning: qpnp-bms.c:421
scripts/Makefile.build:307: recipe for target 'drivers/power/qpnp-bms.o' failed
make[2]: *** [drivers/power/qpnp-bms.o] Error 1
scripts/Makefile.build:443: recipe for target 'drivers/power' failed
make[1]: *** [drivers/power] Error 2
Makefile:954: recipe for target 'drivers' failed
make: *** [drivers] Error 2
The only things I added are the mac80211 injection patch( http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch ) and the keyboard gadget patch ( https://github.com/pelya/android-ke...eric-kernel-version/generic_kernel_3.04.patch )
Does anyone know how to solve this?
nik012003 said:
Hi guys,
I'm trying to compile fourkbomb's Oreo Kernel but I'm stuck on:
drivers/power/qpnp-bms.c:432:13: error: redefinition of 'disable_bms_irq_nosync'
drivers/power/qpnp-bms.c:421:13: note: previous definition of 'disable_bms_irq_nosync' was here
drivers/power/qpnp-bms.c:421:13: warning: 'disable_bms_irq_nosync' defined but not used [-Wunused-function]
error, forbidden warning: qpnp-bms.c:421
scripts/Makefile.build:307: recipe for target 'drivers/power/qpnp-bms.o' failed
make[2]: *** [drivers/power/qpnp-bms.o] Error 1
scripts/Makefile.build:443: recipe for target 'drivers/power' failed
make[1]: *** [drivers/power] Error 2
Makefile:954: recipe for target 'drivers' failed
make: *** [drivers] Error 2
The only things I added are the mac80211 injection patch( http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch ) and the keyboard gadget patch ( https://github.com/pelya/android-ke...eric-kernel-version/generic_kernel_3.04.patch )
Does anyone know how to solve this?
Click to expand...
Click to collapse
This should be the kernel you're trying to build, right?
Look at the compiler errors. The first one tells you that a function in drivers/power/qpnp-bms.c is defined twice. This should not happen. A quick look to the commit history of that file reveals that this commit added a second definition of that function that was not needed, since the other definition was already present. Compare the two definitions: they're similar but not equal. The other one has been improved with the addition of some code by previous commits. So revert this commit: b48e3d6c4c41822f21b0967b0663cbf6a521ec3b to remove the second, useless definition. The second error (unused function) should disappear too, after reverting that commit. Anyway, neither one nor the other error was caused by the patches you applied to the kernel source. fourkbomb probably made a little mistake when merging some commits, I guess.
Tomoms said:
This should be the kernel you're trying to build, right?
Look at the compiler errors. The first one tells you that a function in drivers/power/qpnp-bms.c is defined twice. This should not happen. A quick look to the commit history of that file reveals that this commit added a second definition of that function that was not needed, since the other definition was already present. Compare the two definitions: they're similar but not equal. The other one has been improved with the addition of some code by previous commits. So revert this commit: b48e3d6c4c41822f21b0967b0663cbf6a521ec3b to remove the second, useless definition. The second error (unused function) should disappear too, after reverting that commit. Anyway, neither one nor the other error was caused by the patches you applied to the kernel source. fourkbomb probably made a little mistake when merging some commits, I guess.
Click to expand...
Click to collapse
Looks like it worked!
Thank you so much!
Now I got another error:
CC drivers/staging/android/binder.o
drivers/staging/android/binder.c: In function 'binder_transaction_buffer_release':
drivers/staging/android/binder.c:1629:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
error, forbidden warning: binder.c:1629
scripts/Makefile.build:307: recipe for target 'drivers/staging/android/binder.o' failed
make[3]: *** [drivers/staging/android/binder.o] Error 1
scripts/Makefile.build:443: recipe for target 'drivers/staging/android' failed
make[2]: *** [drivers/staging/android] Error 2
scripts/Makefile.build:443: recipe for target 'drivers/staging' failed
make[1]: *** [drivers/staging] Error 2
Makefile:954: recipe for target 'drivers' failed
make: *** [drivers] Error 2
I'll try to figure out where the problem is
nik012003 said:
Looks like it worked!
Thank you so much!
Now I got another error:
CC drivers/staging/android/binder.o
drivers/staging/android/binder.c: In function 'binder_transaction_buffer_release':
drivers/staging/android/binder.c:1629:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
error, forbidden warning: binder.c:1629
scripts/Makefile.build:307: recipe for target 'drivers/staging/android/binder.o' failed
make[3]: *** [drivers/staging/android/binder.o] Error 1
scripts/Makefile.build:443: recipe for target 'drivers/staging/android' failed
make[2]: *** [drivers/staging/android] Error 2
scripts/Makefile.build:443: recipe for target 'drivers/staging' failed
make[1]: *** [drivers/staging] Error 2
Makefile:954: recipe for target 'drivers' failed
make: *** [drivers] Error 2
I'll try to figure out where the problem is
Click to expand...
Click to collapse
I've found the problem, but this one might be trickier for you to solve it. Should you need any advice or help, just ask me
Tomoms said:
I've found the problem, but this one might be trickier for you to solve it. Should you need any advice or help, just ask me
Click to expand...
Click to collapse
I'm so tempted to revert back this commit but I have a feeling that it's not going to work...
There is a problem with the function binder_transaction_buffer_release on line 1629 where I can see:
fd_array = (u32 *)(parent_buffer + fda->parent_offset);
I think "(u32 *)" that is wrong because the function isn't returning 32bit values but I have no idea how to fix that.
I have to nail down the bug further or find a LineageOs Oreo Kernel that compiles...
nik012003 said:
I'm so tempted to revert back this commit but I have a felling that it's not going to work...
There is a problem with the function binder_transaction_buffer_release on line 1629 where I can see:
fd_array = (u32 *)(parent_buffer + fda->parent_offset);
I think "(u32 *)" that is wrong because the function isn't returning 32bit values but I have no idea how to fix that.
I have to nail down the bug further or find a LineageOs Oreo Kernel that compiles...
Click to expand...
Click to collapse
No, that commit is not the cause of the issue. The issue is related to a new binder configuration option that is needed to ensure Oreo compatibility. Revert this commit: https://github.com/fourkbomb/android_kernel_oppo_msm8974/commit/b9bb71ce90bfb91740ac72d2a5584897cdee07a6 and set CONFIG_ANDROID_BINDER_IPC_32BIT=y in your defconfig.
Tomoms said:
No, that commit is not the cause of the issue. The issue is related to a new binder configuration option that is needed to ensure Oreo compatibility. Revert this commit: https://github.com/fourkbomb/android_kernel_oppo_msm8974/commit/b9bb71ce90bfb91740ac72d2a5584897cdee07a6 and set CONFIG_ANDROID_BINDER_IPC_32BIT=y in your defconfig.
Click to expand...
Click to collapse
I'll try that tomorrow and I'll let you know how it goes.
Thank you very much!
Ok, it worked!
Now I'm getting errors regarding the android usb gadget patch:
CC drivers/usb/gadget/android.o
In file included from drivers/usb/gadget/android.c:82:0:
drivers/usb/gadget/f_hid_android_keyboard.c:5:36: warning: 'ghid_device_android_keyboard' defined but not used [-Wunused-variable]
error, forbidden warning: f_hid_android_keyboard.c:5
scripts/Makefile.build:307: recipe for target 'drivers/usb/gadget/android.o' failed
make[3]: *** [drivers/usb/gadget/android.o] Error 1
scripts/Makefile.build:443: recipe for target 'drivers/usb/gadget' failed
make[2]: *** [drivers/usb/gadget] Error 2
scripts/Makefile.build:443: recipe for target 'drivers/usb' failed
make[1]: *** [drivers/usb] Error 2
Makefile:954: recipe for target 'drivers' failed
My f_hid_android_keyboard.c contains only a struct:
#include <linux/platform_device.h>
#include <linux/usb/g_hid.h>
/* hid descriptor for a keyboard */
static struct hidg_func_descriptor ghid_device_android_keyboard = {
.subclass = 1, /* Boot Interface Subclass */
.protocol = 1, /* Keyboard */
.report_length = 8,
.report_desc_length = 63,
.report_desc = {
0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */
0x09, 0x06, /* USAGE (Keyboard) */
0xa1, 0x01, /* COLLECTION (Application) */
0x05, 0x07, /* USAGE_PAGE (Keyboard) */
0x19, 0xe0, /* USAGE_MINIMUM (Keyboard LeftControl) */
0x29, 0xe7, /* USAGE_MAXIMUM (Keyboard Right GUI) */
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
0x25, 0x01, /* LOGICAL_MAXIMUM (1) */
0x75, 0x01, /* REPORT_SIZE (1) */
0x95, 0x08, /* REPORT_COUNT (8) */
0x81, 0x02, /* INPUT (Data,Var,Abs) */
0x95, 0x01, /* REPORT_COUNT (1) */
0x75, 0x08, /* REPORT_SIZE (8) */
0x81, 0x03, /* INPUT (Cnst,Var,Abs) */
0x95, 0x05, /* REPORT_COUNT (5) */
0x75, 0x01, /* REPORT_SIZE (1) */
0x05, 0x08, /* USAGE_PAGE (LEDs) */
0x19, 0x01, /* USAGE_MINIMUM (Num Lock) */
0x29, 0x05, /* USAGE_MAXIMUM (Kana) */
0x91, 0x02, /* OUTPUT (Data,Var,Abs) */
0x95, 0x01, /* REPORT_COUNT (1) */
0x75, 0x03, /* REPORT_SIZE (3) */
0x91, 0x03, /* OUTPUT (Cnst,Var,Abs) */
0x95, 0x06, /* REPORT_COUNT (6) */
0x75, 0x08, /* REPORT_SIZE (8) */
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
0x25, 0x65, /* LOGICAL_MAXIMUM (101) */
0x05, 0x07, /* USAGE_PAGE (Keyboard) */
0x19, 0x00, /* USAGE_MINIMUM (Reserved) */
0x29, 0x65, /* USAGE_MAXIMUM (Keyboard Application) */
0x81, 0x00, /* INPUT (Data,Ary,Abs) */
0xc0 /* END_COLLECTION */
}
};
I can see that the patch wasn't applied correctly due to some missing code in my android.c file.( I can't see the function hid_function_bind_config, but It's there in the patch file)
Can I just manually apply the patches?
nik012003 said:
Ok, it worked!
Now I'm getting errors regarding the android usb gadget patch:
CC drivers/usb/gadget/android.o
In file included from drivers/usb/gadget/android.c:82:0:
drivers/usb/gadget/f_hid_android_keyboard.c:5:36: warning: 'ghid_device_android_keyboard' defined but not used [-Wunused-variable]
error, forbidden warning: f_hid_android_keyboard.c:5
scripts/Makefile.build:307: recipe for target 'drivers/usb/gadget/android.o' failed
make[3]: *** [drivers/usb/gadget/android.o] Error 1
scripts/Makefile.build:443: recipe for target 'drivers/usb/gadget' failed
make[2]: *** [drivers/usb/gadget] Error 2
scripts/Makefile.build:443: recipe for target 'drivers/usb' failed
make[1]: *** [drivers/usb] Error 2
Makefile:954: recipe for target 'drivers' failed
My f_hid_android_keyboard.c contains only a struct:
#include <linux/platform_device.h>
#include <linux/usb/g_hid.h>
/* hid descriptor for a keyboard */
static struct hidg_func_descriptor ghid_device_android_keyboard = {
.subclass = 1, /* Boot Interface Subclass */
.protocol = 1, /* Keyboard */
.report_length = 8,
.report_desc_length = 63,
.report_desc = {
0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */
0x09, 0x06, /* USAGE (Keyboard) */
0xa1, 0x01, /* COLLECTION (Application) */
0x05, 0x07, /* USAGE_PAGE (Keyboard) */
0x19, 0xe0, /* USAGE_MINIMUM (Keyboard LeftControl) */
0x29, 0xe7, /* USAGE_MAXIMUM (Keyboard Right GUI) */
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
0x25, 0x01, /* LOGICAL_MAXIMUM (1) */
0x75, 0x01, /* REPORT_SIZE (1) */
0x95, 0x08, /* REPORT_COUNT (8) */
0x81, 0x02, /* INPUT (Data,Var,Abs) */
0x95, 0x01, /* REPORT_COUNT (1) */
0x75, 0x08, /* REPORT_SIZE (8) */
0x81, 0x03, /* INPUT (Cnst,Var,Abs) */
0x95, 0x05, /* REPORT_COUNT (5) */
0x75, 0x01, /* REPORT_SIZE (1) */
0x05, 0x08, /* USAGE_PAGE (LEDs) */
0x19, 0x01, /* USAGE_MINIMUM (Num Lock) */
0x29, 0x05, /* USAGE_MAXIMUM (Kana) */
0x91, 0x02, /* OUTPUT (Data,Var,Abs) */
0x95, 0x01, /* REPORT_COUNT (1) */
0x75, 0x03, /* REPORT_SIZE (3) */
0x91, 0x03, /* OUTPUT (Cnst,Var,Abs) */
0x95, 0x06, /* REPORT_COUNT (6) */
0x75, 0x08, /* REPORT_SIZE (8) */
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
0x25, 0x65, /* LOGICAL_MAXIMUM (101) */
0x05, 0x07, /* USAGE_PAGE (Keyboard) */
0x19, 0x00, /* USAGE_MINIMUM (Reserved) */
0x29, 0x65, /* USAGE_MAXIMUM (Keyboard Application) */
0x81, 0x00, /* INPUT (Data,Ary,Abs) */
0xc0 /* END_COLLECTION */
}
};
I can see that the patch wasn't applied correctly due to some missing code in my android.c file.( I can't see the function hid_function_bind_config, but It's there in the patch file)
Can I just manually apply the patches?
Click to expand...
Click to collapse
Revert the patch you applied, and add this one: https://github.com/Tomoms/neon_kernel/commit/7707cc859fe788af5af9a9cba5ab2c21c66470be
It's working properly for me.