Friday, March 23, 2018

check shared library dependency

readelf -a [shared library] | grep NEEDED
readelf -a [exec file] | grep NEEDED

Wednesday, March 21, 2018

beyond compare cookie remove



  • ~/Library/Preferences/
  • com.ScooterSoftware.BeyondCompare.plist
  • ~/Library/Application Support/
  • Beyond Compare
  • ~/Library/Caches/
  • com.ScooterSoftware.BeyondCompare

list up file and dir size on linux



du -a -h --max-depth=1 | sort -hr

kernel its

/dts-v1/;

/ {
description = "FIT (Flattened Image Tree)";
#address-cells = <1>;

images {
kernel@1 {
description = "Linux kernel";
data = /incbin/("./arch/arm/boot/Image");
type = "kernel";
arch = "arm";
os = "linux";
compression = "none";
load = <0x80208000>;
entry = <0x80208000>;
hash@1 {
algo = "crc32";
};
hash@2 {
algo = "sha1";
};
};


fdt@1 {
description = "device tree blob";
data = /incbin/("./arch/arm/boot/arm-bd.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
hash@1 {
algo = "crc32";
};
hash@2 {
algo = "sha1";
};
};


};

configurations {
default = "config@1";

config@1 {
description = "FIT configuration";
kernel = "kernel@1";
fdt = "fdt@1";
};

};
};


/dts-v1/;

/ {
description = "FIT (Flattened Image Tree)";
#address-cells = <1>;

images {
kernel@1 {
description = "Linux kernel";
data = /incbin/("./arch/arm/boot/Image");
type = "kernel";
arch = "arm";
os = "linux";
compression = "none";
load = <0x80208000>;
entry = <0x80208000>;
hash@1 {
algo = "sha1";
};
};


fdt@1 {
description = "device tree blob";
data = /incbin/("./arch/arm/boot/arm-bd.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
hash@1 {
algo = "sha1";
};
};

ramdisk@1 {
description = "ramdisk";
data = /incbin/("./ramdisk.gz");
type = "ramdisk";
arch = "arm";
os = "linux";
compression = "gzip";
hash@1 {
algo = "sha1";
};
};

};

configurations {
default = "config@1";

config@1 {
description = "FIT configuration";
kernel = "kernel@1";
fdt = "fdt@1";
ramdisk = "ramdisk@1";
};

};
};

linux kernel + ramdisk boot

host > sudo dd if=/dev/zero of=/dev/ram0 bs=1k count=65536
host > sudo mke2fs -vm0 -b 1024 /dev/ram0 65536  // sudo mke2fs -t ext4 -vm0 -b 4096 /dev/ram0 32768
host > sudo tune2fs -c 0 /dev/ram0
host > sudo dd if=/dev/ram0 bs=1k count=65536 | gzip -v9 > ramdisk.gz

========================================================================

host > mkdir mnt
host > gunzip ramdisk.gz
host > sudo mount -o loop ramdisk mnt/
host > ... copy stuff you want to have in ramdisk to mnt...
host > sudo umount mnt
host > gzip -v9 ramdisk

========================================================================

mkimage -A arm -O linux -T ramdisk -n "Initial Ram Disk" -d ramdisk.gz ramdisk.gz.uboot

========================================================================


CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=4
CONFIG_BLK_DEV_RAM_SIZE=65536

========================================================================

bootargs=root=/dev/ram0 rw

========================================================================

rd_load_image: from [/initrd.image]

========================================================================

static int __init compr_fill(void *buf, unsigned int len)
{
int r = sys_read(crd_infd, buf, len);

printk("%s: initrd len 0x%x, buf %p, return %d\n", __func__, len, buf, r);

if (r < 0)
printk(KERN_ERR "RAMDISK: error while reading compressed data");
else if (r == 0)
printk(KERN_ERR "RAMDISK: EOF while reading compressed data");
return r;
}

========================================================================


static int __init compr_flush(void *window, unsigned int outcnt)
{
static unsigned long total_written;
int written = sys_write(crd_outfd, window, outcnt);

total_written += written;
if (written != outcnt) {
if (decompress_error == 0)
printk(KERN_ERR
       "RAMDISK: incomplete write (%d != %d) total written %lu\n",
       written, outcnt, total_written);
decompress_error = 1;
total_written = 0;
return -1;
}
return outcnt;
}

========================================================================

## initrd_high = 0xffffffff, copy_to_ram = 1
   Loading Ramdisk to 867a8000, end 871ef24d ... OK
   ramdisk load start = 0x867a8000, ramdisk load end = 0x871ef24d


[    0.467428] populate_rootfs: __initramfs_start c07efd08 __initramfs_size 134
[    0.467441] populate_rootfs: initrd_start 0xc67a8000 initrd_end 0xc71ef24d

Tuesday, March 13, 2018

Friday, March 9, 2018

submitting patches

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#patch_version_missing

Wednesday, March 7, 2018

RSSI/SNR/EIRP

https://supportforums.cisco.com/t5/wireless-mobility-documents/snr-rssi-eirp-and-free-space-path-loss/ta-p/3128478