20180208_jeffrey - silenceuncrio/diary GitHub Wiki
0920
review
0950
對於 linux kernel 的 trace 目前有些小心得
make target/linux/install
- 快速套用目前對於 source code 的修改
- 重新產生 linux kernel image
- source code 位置
- mtd driver
build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7621/linux-3.10.14/drivers/mtd
- jffs2
build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7621/linux-3.10.14/fs/jffs2
- mtd driver
目前對於 mtd driver 的 trace 已完成 但還沒整理出文件
jffs2 正開始
1140
追一下 system/fstools
這個 package
make package/system/fstools/install
- 快速套用目前對於 source code 的修改
- 對 rootfs 做更新
- source code 位置
build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/fstools-2015-02-25.1
1305
要 trace system/fstools
這個 package 可以利用下面的流程
- 修改 source code
make package/system/fstools/install V=s
make package/install V=s
cd proscend
make prepare
make
1540
build_dir\target-mipsel_24kec+dsp_uClibc-0.9.33.2\linux-ramips_mt7621\linux-3.10.14\fs\filesystems.c
int register_filesystem(struct file_system_type * fs)
{
int res = 0;
struct file_system_type ** p;
BUG_ON(strchr(fs->name, '.'));
if (fs->next)
return -EBUSY;
write_lock(&file_systems_lock);
printk("[JFS][%s:%d] find_filesystem(name: %s)\n", __FUNCTION__, __LINE__, fs->name);
p = find_filesystem(fs->name, strlen(fs->name));
if (*p)
res = -EBUSY;
else
*p = fs;
write_unlock(&file_systems_lock);
printk("[JFS][%s:%d] res: %d\n", __FUNCTION__, __LINE__, res);
return res;
}
開機相關訊息
[ 0.156000] [JFS][register_filesystem:78] find_filesystem(name: sysfs)
[ 0.160000] [JFS][register_filesystem:85] res: 0
[ 0.164000] [JFS][register_filesystem:78] find_filesystem(name: rootfs)
[ 0.168000] [JFS][register_filesystem:85] res: 0
[ 0.172000] [JFS][register_filesystem:78] find_filesystem(name: bdev)
[ 0.176000] [JFS][register_filesystem:85] res: 0
[ 0.180000] [JFS][register_filesystem:78] find_filesystem(name: proc)
[ 0.184000] [JFS][register_filesystem:85] res: 0
[ 0.316000] [JFS][register_filesystem:78] find_filesystem(name: tmpfs)
[ 0.320000] [JFS][register_filesystem:85] res: 0
[ 0.324000] [JFS][register_filesystem:78] find_filesystem(name: debugfs)
[ 0.328000] [JFS][register_filesystem:85] res: 0
[ 0.332000] [JFS][register_filesystem:78] find_filesystem(name: sockfs)
[ 0.336000] [JFS][register_filesystem:85] res: 0
[ 1.944000] [JFS][register_filesystem:78] find_filesystem(name: pipefs)
[ 1.956000] [JFS][register_filesystem:85] res: 0
[ 1.964000] [JFS][register_filesystem:78] find_filesystem(name: anon_inodefs)
[ 1.980000] [JFS][register_filesystem:85] res: 0
[ 2.180000] [JFS][proc_filesystems_init:253]
[ 2.192000] [JFS][register_filesystem:78] find_filesystem(name: devpts)
[ 2.204000] [JFS][register_filesystem:85] res: 0
[ 2.212000] [JSQUASHFS][init_squashfs_fs:442]
[ 2.220000] [JFS][register_filesystem:78] find_filesystem(name: squashfs)
[ 2.236000] [JFS][register_filesystem:85] res: 0
[ 2.244000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 2.256000] [JFS][register_filesystem:78] find_filesystem(name: ramfs)
[ 2.268000] [JFS][register_filesystem:85] res: 0
[ 2.280000] [JJFFS2][init_jffs2_fs:372]
[ 2.284000] jffs2: version 2.2. (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 2.304000] [JFS][register_filesystem:78] find_filesystem(name: jffs2)
[ 2.320000] [JFS][register_filesystem:85] res: 0
[ 2.328000] [JOVERLAYFS][ovl_init:676]
[ 2.336000] [JFS][register_filesystem:78] find_filesystem(name: overlayfs)
[ 2.348000] [JFS][register_filesystem:85] res: 0
[ 2.512000] [JFS][register_filesystem:78] find_filesystem(name: mtd_inodefs)
[ 2.528000] [JFS][register_filesystem:85] res: 0
1605
每個 filesystem mount 的時間也不同
[ 0.164000] [JFS][sysfs_mount:110]
[ 0.176000] [JFS][rootfs_mount:251]
[ 0.188000] [JFS][bd_mount:465]
[ 0.200000] [JFS][proc_mount:101]
[ 0.360000] [JFS][debug_mount:293]
[ 1.984000] [JFS][pipefs_mount:1302]
[ 2.016000] [JFS][anon_inodefs_mount:90]
[ 5.568000] [JFS][squashfs_mount:403]
[ 5.992000] [JFS][proc_mount:101]
[ 6.000000] [JFS][sysfs_mount:110]
[ 12.212000] [JFS][debug_mount:293]
[ 15.180000] [JFS][jffs2_mount:322]
[ 48.780000] [JFS][ovl_mount:663]
1640
目前開機後利用 mount
看到的資訊如下
root@M360-P:/# mount
rootfs on / type rootfs (rw)
/dev/root on /rom/rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /tmp/root type tmpfs (rw,noatime,mode=755)
overlayfs:/tmp/root on /rom type overlayfs (rw,noatime,lowerdir=/,upperdir=/tmp/root)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/mtdblock6 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
1815
firmware upgrade 了幾次
No jffs2 marker was found
的問題還是會發生
看來要開始從 /sbin/sysupgrade
著手了