2016/1/22

stty

root@sabreauto_6q:/ # busybox stty -F /dev/ttymxc0 -a
speed 9600 baud;stty: /dev/ttymxc0
 line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ;
eol2 = ; swtch = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
這個可以動作。

如果有不一樣的 option 就在command 後面加上去..
stty -F /dev/ttymxc0 -echo

把 option 中的 echo 改成 -ech0

imx6 ltib

雖然已經不支援了 (改用 yocto).
但是一堆 doc 還是用這格個來回答。

ref: 解開 zip 到 /opt/freescale/pkg
解開 ltib source
run install
安裝到 ltib

修改sudo , rpm 需要 nopasswd:
charles-chang ALL = NOPASSWD: /usr/bin/rpm, /opt/freescale/ltib/usr/bin/rpm

run ./ltib
有錯的話,會停下,寫在 host_xxx.log

m4 錯,gets 問題。 == download .17 版。重 build
wget -- build spec 加上 --no-ssl
mtd-utils -- 自己先產生好 md5
busybox -- 刪除 兩行。

途中會出現 menuconfig 畫面。
都是 exit 後跳出新選項。
follow ref 的說明。

build 完!!


因為是 embedded system, 所以部會自動把所有 package 都 build 好。
只有把 package source, patch 準備好。
要的話,再自己 build

./ltib -p cantest
這樣就會把 cantest build 好,
source code 也會弄好,放在 rpm/BUILD/cantest-1.0/

如果要 build static,
就進入 ltib shell..
./ltib -m shell
然後到 project 去修改 Makefile
在 compile-link command 加上 -static
刪除 target 後打 make 就可以。

2016/1/21

imx6 : Change CPU frequency

ref: https://community.freescale.com/thread/317229
Hi, Carmili
     You can 

    "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" 
    
     to see what is the current governor you are using, 
     if it is interactive/conservative/ondemand, 
     then the cpu freq will be changed according to cpu's loading automatically. 

     If you want to change it manually, you need to switch it to userspace governor by 

     "echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

     , then 

     "echo 792000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed" 

     is to set it to 792M, to 996M, using 996000. 
     
     To see current cpufreq, you can 

     "cat /sys/devices/system/cpu/cpu0/cpufreq/cur_cpufreq".
 

2016/1/20

又來...改版了

BoardConfig.mk:
TARGET_BOOTLOADER_CONFIG := 
imx6q    : mx6qsabreautoandroid_config 
imx6dl   : mx6dlsabreautoandroid_config 
imx6solo : mx6solosabresdandroid_config 
imx6qp   : mx6qpsabreautoandroid_config

core/Makefile:
BOOTLOADER_CROSS_TOOLCHAIN := `pwd`/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
BOOTLOADER_ENV := ARCH=arm CROSS_COMPILE=$(BOOTLOADER_CROSS_TOOLCHAIN)
HOST_PROCESSOR := $(shell cat /proc/cpuinfo | grep processor | wc -l)
TARGET_BOOTLOADER_IMAGE := $(PRODUCT_OUT)/u-boot.imx

BOOTLOADER_PATH := bootable/bootloader/uboot-imx/
BOOTLOADER_CONFIG_FILE := $(BOOTLOADER_PATH)/include/config.h

bootloader: $(TARGET_BOOTLOADER_IMAGE)

$(TARGET_BOOTLOADER_IMAGE):
        for ubootplat in $(TARGET_BOOTLOADER_CONFIG); do \
                UBOOT_PLATFORM=`echo $$ubootplat | cut -d':' -f1`; \
                UBOOT_CONFIG=`echo $$ubootplat | cut -d':' -f2`; \
        echo $(UBOOT_PLATFORM); \
        echo $(UBOOT_CONFIG); \
                $(MAKE) -C bootable/bootloader/uboot-imx/ distclean $(BOOTLOADER_ENV); \
                $(MAKE) -C bootable/bootloader/uboot-imx/ $$UBOOT_CONFIG $(BOOTLOADER_ENV); \
                $(MAKE) -C bootable/bootloader/uboot-imx/ $(BOOTLOADER_ENV); \
                install -D bootable/bootloader/uboot-imx/u-boot.imx $(PRODUCT_OUT)/u-boot-$$UBOOT_PLATFORM.imx; \
                install -D bootable/bootloader/uboot-imx/u-boot.imx $@; \
        done

所以 command 就是..
make mx6dlsabreautoandroid_config

2016/1/19

git upload-pack: git-pack-objects died with error

mirror android-5.1.1 之後,lan 拉 code , 在 chromuim_org/third_party/opus/src 出現..
remote: warning: suboptimal pack - out of memory
看到這篇:https://blog.wu-boy.com/2014/02/git-server-git-pack-objects-died-with-error/

修改 ..opus/src/config, 加上
[pack]
    window = 0
就 OK 了。

後來 platform/prebuild/sdk 也發生一樣的,也是一樣改 config


後來,在其他 project 還是一樣。所以 ref: http://stackoverflow.com/questions/4826639/repack-of-git-repository-fails
使用 git 的 username, 下..
git config pack.windowMemory 10m
git config pack.packSizeLimit 20m
看看 .git/config 出現:
[pack]
        windowMemory = 10m
        packSizeLimit = 20m
把這個 copy 到 fail 的project 的 config 哩就可以了。

2016/1/18

wandboard boot log



U-Boot 2014.04-08649-g30666fa (Jan 15 2016 - 16:13:12)

CPU:   Freescale i.MX6DL rev1.1 at 792 MHz
CPU:   Temperature 22 C, calibration data: 0x5814f95f
Reset cause: POR
Board: MX6-SabreSD
I2C:   ready
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
*** Warning - bad CRC, using default environment

No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In:    serial
Out:   serial
Err:   serial
check_and_clean: reg 0, flag_set 0
Fastboot: Normal
flash target is MMC:1
Net:   FEC [PRIME]
Normal Boot
Hit any key to stop autoboot:  0
booti mmc1
kernel   @ 14008000 (6745776)
ramdisk  @ 15000000 (726603)
fdt      @ 14f00000 (44666)
kernel cmdline:
        use boot.img command line:
        console=ttymxc0,115200 init=/init video=mxcfb0:dev=hdmi,1280x1024M@60,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off vmalloc=400M androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale cma=384M androidboot.selinux=disabled androidboot.dm_verify=disabled androidboot.serialno=0806b1d4df63bc68
   Using Device Tree in place at 14f00000, end 14f0de79

Starting kernel ...

Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.10.53-88205-g302ca30 (charles-chang@robotjr) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #2 SMP PREEMPT Fri Jan 15 16:14:02 CST 2016
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Freescale i.MX6 Quad/DualLite (Device Tree), model: Wandboard i.MX6 Dual Lite Board
cma: CMA: reserved 384 MiB at 32000000
Memory policy: ECC disabled, Data cache writealloc
PERCPU: Embedded 8 pages/cpu @817d7000 s9728 r8192 d14848 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 259840
Kernel command line: console=ttymxc0,115200 init=/init video=mxcfb0:dev=hdmi,1280x1024M@60,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off vmalloc=400M androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale cma=384M androidboot.selinux=disabled androidboot.dm_verify=disabled androidboot.serialno=0806b1d4df63bc68
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 959MB 64MB = 1023MB total
Memory: 627520k/627520k available, 421056k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc0800000 - 0xff000000   (1000 MB)
    lowmem  : 0x80000000 - 0xc0000000   (1024 MB)
    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
    modules : 0x7f000000 - 0x7fe00000   (  14 MB)
      .text : 0x80008000 - 0x80e572bc   (14653 kB)
      .init : 0x80e58000 - 0x80eac600   ( 338 kB)
      .data : 0x80eae000 - 0x80f2fe40   ( 520 kB)
       .bss : 0x80f2fe40 - 0x80fc1fdc   ( 585 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Preemptible hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
NR_IRQS:16 nr_irqs:16 16
L310 cache controller enabled
l2x0: 16 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x32050000, Cache size: 524288 B
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms
CPU identified as i.MX6DL, silicon rev 1.1
Console: colour dummy device 80x30
Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 512
Initializing cgroup subsys debug
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x807c36c0 - 0x807c3718
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (3162.11 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
pinctrl core: initialized pinctrl subsystem
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Use WDOG1 as reset source
syscon 20c8000.anatop: regmap [mem 0x020c8000-0x020c8fff] registered
vdd1p1: 800 <--> 1375 mV at 1100 mV
vdd3p0: 2625 <--> 3400 mV at 3000 mV
vdd2p5: 2000 <--> 2750 mV at 2400 mV
cpu: 725 <--> 1450 mV at 1150 mV
vddpu: 725 <--> 1450 mV
vddsoc: 725 <--> 1450 mV at 1175 mV
syscon 20e0000.iomuxc-gpr: regmap [mem 0x020e0000-0x020e0037] registered
syscon 21bc000.ocotp-ctrl: regmap [mem 0x021bc000-0x021bffff] registered
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
imx6dl-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
bio: create slab  at 0
mxs-dma 110000.dma-apbh: initialized
1P8V: 1800 mV
2P5V: 2500 mV
3P3V: 3300 mV
usb_otg_vbus: 5000 mV
i2c-core: driver [max17135] using legacy suspend method
i2c-core: driver [max17135] using legacy resume method
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
i2c i2c-0: IMX I2C adapter registered
i2c i2c-1: IMX I2C adapter registered
i2c i2c-2: IMX I2C adapter registered
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti 
PTP clock support registered
imx-ipuv3 2400000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
mxc_mipi_csi2 21dc000.mipi_csi: i.MX MIPI CSI2 driver probed
mxc_mipi_csi2 21dc000.mipi_csi: i.MX MIPI CSI2 dphy version is 0x3130302a
MIPI CSI2 driver module loaded
Advanced Linux Sound Architecture Driver Initialized.
cfg80211: Calling CRDA to update world regulatory domain
pureg-dummy: no parameters
Switching to clocksource mxc_timer1
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP: reno registered
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 708K (85000000 - 850b1000)
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
mxc_epit: probe of 20d0000.epit failed with error -22
mxc_epit: probe of 20d4000.epit failed with error -22
Bus freq driver module loaded
futex hash table entries: 512 (order: 3, 32768 bytes)
audit: initializing netlink socket (disabled)
type=2000 audit(0.390:1): initialized
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
NTFS driver 2.1.30 [Flags: R/W DEBUG].
jffs2: version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
fuse init (API version 7.22)
msgmni has been set to 1995
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
imx-weim 21b8000.weim: WEIM driver registered.
MIPI DSI driver module loaded
mxc_hdmi 20e0000.hdmi_video: Detected HDMI controller 0x13:0x1a:0xa0:0xc1
fbcvt: 1280x1024@60: CVT Name - 1.310M4
mxc_sdc_fb fb.28: registered mxc display driver hdmi
mxc_sdc_fb fb.28: 1920x1080 h_sync,r,l: 44,88,148  v_sync,l,u: 5,4,36 pixclock=148500000 Hz
imx-ipuv3 2400000.ipu: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)
Console: switching to colour frame buffer device 240x67
imx-sdma 20ec000.sdma: no iram assigned, using external mem
imx-sdma 20ec000.sdma: loaded firmware 1.1
imx-sdma 20ec000.sdma: initialized
Serial: IMX driver
2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX
console [ttymxc0] enabled
21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 60) is a IMX
serial: Freescale lpuart driver
imx sema4 driver is registered.
[drm] Initialn minor 0
brd: module loaded
loop: module loaded
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky 
CAN device driver interface
libphy: fec_enet_mii_bus: probed
fec 2188000.ethernet eth0: registered PHC device 0
PPP generic driver version 2.4.2
PPP BSD Compression module registered
PPP Deflate Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
usbcore: registered new interface driver asix
usbcore: registered new interface driver ax88179_178a
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver net1080
usbcore: registered new interface driver cdc_subset
usbcore: registered new interface driver zaurus
usbcore: registered new interface driver cdc_ncm
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver option
usbserial: USB Serial support registered for GSM modem (1-port)
ci_hdrc ci_hdrc.1: doesn't support gadget
ci_hdrc ci_hdrc.1: EHCI Host Controller
ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 3.10.53-88205-g302ca30 ehci_hcd
usb usb1: SerialNumber: ci_hdrc.1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mousedev: PS/2 mouse device common for all mice
usbcore: registered new interface driver xpad
usbcore: registered new interface driver usb_acecad
usbcore: registered new interface driver aiptek
usbcore: registered new interface driver gtco
usbcore: registered new interface driver hanwang
usbcore: registered new interface driver kbtab
usbcore: registered new interface driver wacom
fusion 1-0010: Failed to read firmware version
fusion: probe of 1-0010 failed with error -5
i2c-core: driver [isl29023] using legacy suspend method
i2c-core: driver [isl29023] using legacy resume method
snvs_rtc 20cc034.snvs-rtc-lp: rtc core: registered 20cc034.snvs-rtc-lp as rtc0
i2c /dev entries driver
ov5640_read_reg:write reg error:reg=300a
camera ov5640_mipi is not found
mxc_v4l2_output v4l2_out.33: V4L2 device registered as video16
mxc_v4l2_output v4l2_out.33: V4L2 device registered as video17
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)
gspca_main: v2.14.0 registered
imx2-wdt 20bc000.wdog: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=0)
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.24.0-ioctl (2013-01-15) initialised: dm-devel@redhat.com
cpuidle: using governor ladder
cpuidle: using governor menu
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
sdhci-esdhc-imx 2190000.usdhc: could not get ultra high speed state, work on normal mode
mmc0: no vqmmc regulator found
mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
sdhci-esdhc-imx 2194000.usdhc: could not get ultra high speed state, work on normal mode
mmc1: no vqmmc regulator found
mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
sdhci-esdhc-imx 2198000.usdhc: could not get ultra high speed state, work on normal mode
mmc2: no vqmmc regulator found
mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
mmc2: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
galcore: clk_get vg clock failed, disable vg!
Galcore version 5.0.11.25762
mmc1: queuing unknown CIS tuple 0x80 (11 bytes)
mmc1: new high speed SDIO card at address 0001
mmc2: host does not support reading read-only switch. assuming write-enable.
mmc2: new high speed SDHC card at address 59b4
mmcblk2: mmc2:59b4 USD   7.51 GiB
 mmcblk2: p1 p2 p3 < p5 p6 p7 p8 p9 > p4
mmcblk2: p4 size 13585440 extends beyond EOD, truncated
mxc_vdoa 21e4000.vdoa: i.MX Video Data Order Adapter(VDOA) driver probed
mxc_asrc 2034000.asrc: mxc_asrc registered
mxc_vpu 2040000.vpu: VPU initialized
caam 2100000.caam: Instantiated RNG4 SH0
caam 2100000.caam: Instantiated RNG4 SH1
caam 2100000.caam: device ID = 0x0a160100 (Era 4)
caam 2100000.caam: job rings = 2, qi = 0
caam algorithms registered in /proc/crypto
caam_jr 2101000.jr0: registering rng-caam
platform caam_sm: blkkey_ex: 4 keystore units available
platform caam_sm: 64-bit clear key:
platform caam_sm: [0000] 00 01 02 03 04 0f 06 07
platform caam_sm: 64-bit black key:
platform caam_sm: [0000] 04 47 f5 42 dd 10 f6 fc
platform caam_sm: [0008] ea 7d 27 64 a3 f3 6f 86
platform caam_sm: 128-bit clear key:
platform caam_sm: [0000] 00 01 02 03 04 0f 06 07
platform caam_sm: [0008] 08 09 0a 0b 0c 0d 0e 0f
platform caam_sm: 128-bit black key:
platform caam_sm: [0000] 4a 23 7d d0 8c 4a 9f 22
platform caam_sm: [0008] d5 03 04 81 b3 71 5c de
platform caam_sm: 192-bit clear key:
platform caam_sm: [0000] 00 01 02 03 04 0f 06 07
platform caam_sm: [0008] 08 09 0a 0b 0c 0d 0e 0f
platform caam_sm: [0016] 10 11 12 13 14 15 16 17
platform caam_sm: 192-bit black key:
platform caam_sm: [0000] 6a 71 9c b8 2f 1d be 43
platform caam_sm: [0008] 83 b5 1d 87 90 13 0c e6
platform caam_sm: [0016] 26 6a b2 eb fa 1e b3 a5
platform caam_sm: [0024] 11 50 06 be 63 59 35 e2
platform caam_sm: 256-bit clear key:
platform caam_sm: [0000] 00 01 02 03 04 0f 06 07
platform caam_sm: [0008] 08 09 0a 0b 0c 0d 0e 0f
platform caam_sm: [0016] 10 11 12 13 14 15 16 17
platform caam_sm: [0024] 18 19 1a 1b 1c 1d 1e 1f
platform caam_sm: 256-bit black key:
platform caam_sm: [0000] 86 ee fa 9c e9 3c d0 7b
platform caam_sm: [0008] 35 35 b5 f9 13 59 64 56
platform caam_sm: [0016] e0 7c 2c ed 09 a7 78 99
platform caam_sm: [0024] 77 6e c6 e5 2d ea 89 f9
platform caam_sm: 64-bit unwritten blob:
platform caam_sm: [0000] 00 00 00 00 00 00 00 00
platform caam_sm: [0008] 00 00 00 00 00 00 00 00
platform caam_sm: [0016] 00 00 00 00 00 00 00 00
platform caam_sm: [0024] 00 00 00 00 00 00 00 00
platform caam_sm: [0032] 00 00 00 00 00 00 00 00
platform caam_sm: [0040] 00 00 00 00 00 00 00 00
platform caam_sm: [0048] 00 00 00 00 00 00 00 00
platform caam_sm: [0056] 00 00 00 00 00 00 00 00
platform caam_sm: [0064] 00 00 00 00 00 00 00 00
platform caam_sm: [0072] 00 00 00 00 00 00 00 00
platform caam_sm: [0080] 00 00 00 00 00 00 00 00
platform caam_sm: [0088] 00 00 00 00 00 00 00 00
platform caam_sm: 128-bit unwritten blob:
platform caam_sm: [0000] 00 00 00 00 00 00 00 00
platform caam_sm: [0008] 00 00 00 00 00 00 00 00
platform caam_sm: [0016] 00 00 00 00 00 00 00 00
platform caam_sm: [0024] 00 00 00 00 00 00 00 00
platform caam_sm: [0032] 00 00 00 00 00 00 00 00
platform caam_sm: [0040] 00 00 00 00 00 00 00 00
platform caam_sm: [0048] 00 00 00 00 00 00 00 00
platform caam_sm: [0056] 00 00 00 00 00 00 00 00
platform caam_sm: [0064] 00 00 00 00 00 00 00 00
platform caam_sm: [0072] 00 00 00 00 00 00 00 00
platform caam_sm: [0080] 00 00 00 00 00 00 00 00
platform caam_sm: [0088] 00 00 00 00 00 00 00 00
platform caam_sm: 196-bit unwritten blob:
platform caam_sm: [0000] 00 00 00 00 00 00 00 00
platform caam_sm: [0008] 00 00 00 00 00 00 00 00
platform caam_sm: [0016] 00 00 00 00 00 00 00 00
platform caam_sm: [0024] 00 00 00 00 00 00 00 00
platform caam_sm: [0032] 00 00 00 00 00 00 00 00
platform caam_sm: [0040] 00 00 00 00 00 00 00 00
platform caam_sm: [0048] 00 00 00 00 00 00 00 00
platform caam_sm: [0056] 00 00 00 00 00 00 00 00
platform caam_sm: [0064] 00 00 00 00 00 00 00 00
platform caam_sm: [0072] 00 00 00 00 00 00 00 00
platform caam_sm: [0080] 00 00 00 00 00 00 00 00
platform caam_sm: [0088] 00 00 00 00 00 00 00 00
platform caam_sm: 256-bit unwritten blob:
platform caam_sm: [0000] 00 00 00 00 00 00 00 00
platform caam_sm: [0008] 00 00 00 00 00 00 00 00
platform caam_sm: [0016] 00 00 00 00 00 00 00 00
platform caam_sm: [0024] 00 00 00 00 00 00 00 00
platform caam_sm: [0032] 00 00 00 00 00 00 00 00
platform caam_sm: [0040] 00 00 00 00 00 00 00 00
platform caam_sm: [0048] 00 00 00 00 00 00 00 00
platform caam_sm: [0056] 00 00 00 00 00 00 00 00
platform caam_sm: [0064] 00 00 00 00 00 00 00 00
platform caam_sm: [0072] 00 00 00 00 00 00 00 00
platform caam_sm: [0080] 00 00 00 00 00 00 00 00
platform caam_sm: [0088] 00 00 00 00 00 00 00 00
platform caam_sm: 64-bit black key in blob:
platform caam_sm: [0000] 7d 25 70 4a 67 fc 7f 6f
platform caam_sm: [0008] 75 ff 57 37 4d 84 6f 2d
platform caam_sm: [0016] bf f9 da 72 e9 86 b6 6f
platform caam_sm: [0024] f8 6e 86 9b de 21 18 2b
platform caam_sm: [0032] af a8 b3 fb 23 19 15 44
platform caam_sm: [0040] 8e 20 e4 ea 5d 8e 1a fe
platform caam_sm: [0048] 6c 73 d3 52 7f 3e 77 6a
platform caam_sm: [0056] 00 00 00 00 00 00 00 00
platform caam_sm: [0064] 00 00 00 00 00 00 00 00
platform caam_sm: [0072] 00 00 00 00 00 00 00 00
platform caam_sm: [0080] 00 00 00 00 00 00 00 00
platform caam_sm: [0088] 00 00 00 00 00 00 00 00
platform caam_sm: 128-bit black key in blob:
platform caam_sm: [0000] 8d 18 c9 50 76 c8 16 40
platform caam_sm: [0008] d2 7f 39 99 66 4c 29 0b
platform caam_sm: [0016] e2 ca a4 f1 74 52 37 4a
platform caam_sm: [0024] c7 58 8d bb 5d 36 37 08
platform caam_sm: [0032] 1f 3d b7 c1 e5 d0 5f 66
platform caam_sm: [0040] e3 51 47 20 b1 41 98 f8
platform caam_sm: [0048] ac 92 c5 de 02 a3 0d 94
platform caam_sm: [0056] 2b e0 d4 43 6c 99 ec be
platform caam_sm: [0064] 00 00 00 00 00 00 00 00
platform caam_sm: [0072] 00 00 00 00 00 00 00 00
platform caam_sm: [0080] 00 00 00 00 00 00 00 00
platform caam_sm: [0088] 00 00 00 00 00 00 00 00
platform caam_sm: 192-bit black key in blob:
platform caam_sm: [0000] e4 96 ef 8a f8 6a 34 5c
platform caam_sm: [0008] f5 3b 11 90 0b d9 5e b2
platform caam_sm: [0016] ad 2e 4a f2 ff 05 38 a0
platform caam_sm: [0024] 1c 09 42 a9 f4 52 ef 0e
platform caam_sm: [0032] 95 e9 75 79 d0 7b 47 2c
platform caam_sm: [0040] 17 13 d0 42 d2 46 77 b9
platform caam_sm: [0048] b1 3f 2e 5b 71 80 d7 5a
platform caam_sm: [0056] 56 a8 85 b6 03 59 d5 16
platform caam_sm: [0064] 82 30 c8 b0 dd 3c d6 88
platform caam_sm: [0072] 00 00 00 00 00 00 00 00
platform caam_sm: [0080] 00 00 00 00 00 00 00 00
platform caam_sm: [0088] 00 00 00 00 00 00 00 00
platform caam_sm: 256-bit black key in blob:
platform caam_sm: [0000] bd 58 e2 5c 73 1f f7 0e
platform caam_sm: [0008] f8 c4 2f ea 57 18 bd 53
platform caam_sm: [0016] ca 88 3b b9 d3 a1 9e 41
platform caam_sm: [0024] d4 b3 44 f1 f7 cd c9 28
platform caam_sm: [0032] 9a 70 8d ca 04 41 f1 e5
platform caam_sm: [0040] 97 fd c1 76 b4 44 89 19
platform caam_sm: [0048] 7a 86 d0 26 e7 2d 12 a6
platform caam_sm: [0056] fe fb 5b da 1c 15 68 b3
platform caam_sm: [0064] cf 1b 8a 35 62 b6 24 54
platform caam_sm: [0072] 48 80 9a d4 61 d0 c9 4a
platform caam_sm: [0080] 00 00 00 00 00 00 00 00
platform caam_sm: [0088] 00 00 00 00 00 00 00 00
platform caam_sm: restored 64-bit black key:
platform caam_sm: [0000] d9 1f 5f f3 2f e8 d8 54
platform caam_sm: [0008] 37 aa e0 4a f2 94 9d d1
platform caam_sm: restored 128-bit black key:
platform caam_sm: [0000] 4a 23 7d d0 8c 4a 9f 22
platform caam_sm: [0008] d5 03 04 81 b3 71 5c de
platform caam_sm: restored 192-bit black key:
platform caam_sm: [0000] 6a 71 9c b8 2f 1d be 43
platform caam_sm: [0008] 83 b5 1d 87 90 13 0c e6
platform caam_sm: [0016] 2a 3a c8 3c 1e aa 95 8a
platform caam_sm: [0024] 19 25 5b 2b fb f1 6e ba
platform caam_sm: restored 256-bit black key:
platform caam_sm: [0000] 86 ee fa 9c e9 3c d0 7b
platform caam_sm: [0008] 35 35 b5 f9 13 59 64 56
platform caam_sm: [0016] e0 7c 2c ed 09 a7 78 99
platform caam_sm: [0024] 77 6e c6 e5 2d ea 89 f9
snvs-secvio 20cc000.caam-snvs: violation handlers armed - non-secure state
hidraw: raw HID events driver (C) Jiri Kosina
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ashmem: initialized
logger: created 256K log 'log_main'
logger: created 256K log 'log_events'
logger: created 256K log 'log_radio'
logger: created 256K log 'log_system'
usbcore: registered new interface driver snd-usb-audio
sgtl5000 1-000a: sgtl5000 revision 0x11
sgtl5000 1-000a: Failed to get supply 'VDDD': -19
1-000a: 1200 mV normal
sgtl5000 1-000a: Using internal LDO instead of VDDD
imx-sgtl5000 sound.24:  sgtl5000 <-> 2028000.ssi mapping ok
imx-spdif sound-spdif.25:  dit-hifi <-> 2004000.spdif mapping ok
imx-audio-hdmi sound-hdmi.26:  hdmi-hifi <-> hdmi_audio.17 mapping ok
NET: Registered protocol family 26
u32 classifier
    Actions configured
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (15960 buckets, 63840 max)
ctnetlink v0.93: registering with nfnetlink.
NF_TPROXY: Transparent proxy support initialized, version 4.1.0
NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd.
xt_time: kernel timezone is -0000
ip_tables: (C) 2000-2006 Netfilter Core Team
arp_tables: (C) 2002 David S. Miller
TCP: cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 10
mip6: Mobile IPv6
ip6_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 17
NET: Registered protocol family 15
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
usb_otg_vbus: disabling
regulator-dummy: disabling
imx mcc test is registered.
file system registered
android_usb gadget: Mass Storage Function, version: 2009/09/11
android_usb gadget: Number of LUNs=1
 lun0: LUN: removable file: (no medium)
android_usb gadget: android_usb ready
snvs_rtc 20cc034.snvs-rtc-lp: setting system clock to 1970-01-01 00:00:02 UTC (2)
ALSA device list:
  #0: imx6-wandboard-sgtl5000
  #1: imx-spdif
  #2: imx-hdmi-soc
Freeing unused kernel memory: 336K (80e58000 - 80eac000)
Console: switching to colour dummy device 80x30
EXT4-fs (mmcblk2p5): mounted filesystem with ordered data mode. Opts: barrier=1
fs_mgr: __mount(source=/dev/block/mmcblk2p5,target=/system,type=ext4)=0
EXT4-fs (mmcblk2p4): Ignoring removed nomblk_io_submit option
EXT4-fs (mmcblk2p4): mounted filesystem with ordered data mode. Opts: nomblk_io_submit,noauto_da_alloc,errors=panic
fs_mgr: __mount(source=/dev/block/mmcblk2p4,target=/data,type=ext4)=0
EXT4-fs (mmcblk2p6): Ignoring removed nomblk_io_submit option
EXT4-fs (mmcblk2p6): mounted filesystem with ordered data mode. Opts: nomblk_io_submit
fs_mgr: __mount(source=/dev/block/mmcblk2p6,target=/cache,type=ext4)=0
EXT4-fs (mmcblk2p7): mounted filesystem with ordered data mode. Opts: (null)
fs_mgr: __mount(source=/dev/block/mmcblk2p7,target=/device,type=ext4)=0
binder: 152:152 transaction failed 29189, size 0-0
init: using deprecated syntax for specifying property 'ro.serialno', use ${name} instead
init: using deprecated syntax for specifying property 'ro.product.manufacturer', use ${name} instead
init: using deprecated syntax for specifying property 'ro.product.model', use ${name} instead
init: cannot find '/system/bin/debuggerd64', disabling 'debuggerd64'
init: cannot find '/system/bin/install-recovery.sh', disabling 'flash_recovery'
android_usb: already disabled
read descriptors
read strings
mtp_bind_config

root@wandboard:/ #
root@wandboard:/ # healthd: No charger supplies found
healthd: No battery devices found

root@wandboard:/ #
root@wandboard:/ #
root@wandboard:/ #
root@wandboard:/ # mxc_sdc_fb fb.28: 1920x1080 h_sync,r,l: 44,88,148  v_sync,l,u: 5,4,36 pixclock=148500000 Hz

root@wandboard:/ #
root@wandboard:/ #
root@wandboard:/ #
root@wandboard:/ #
root@wandboard:/ #
root@wandboard:/ #
root@wandboard:/ # cd /deERROR: v4l2 capture: slave not found!
ERROR: v4l2 capture: slave not found!
ERROR: v4l2 capture: slave not found!
ERROR: v4l2 capture: slave not found!
imx-hdmi-audio imx-hdmi-audio: HDMI Video is not ready!
imx-hdmi-audio imx-hdmi-audio: ASoC: can't open platform imx-hdmi-audio: -22
imx-hdmi-audio imx-hdmi-audio: HDMI Video is not ready!
imx-hdmi-audio imx-hdmi-audio: ASoC: can't open platform imx-hdmi-audio: -22
v
root@wandboard:/dev # ls
__properties__
alarm
ashmem
autofs
binder
block
bus
console
cpu_dma_latency
cpuctl
device-mapper
dri
fscklogs
full
fuse
galcore
graphics
hw_random
i2c-0
i2c-1
i2c-2
input
ion
keychord
kmsg
log
loop-control
mem
memcg
mtp_usb
mxc_asrc
mxc_hdmi
mxc_ipu
mxc_mem
mxc_vpu
mxs_viim
network_latency
network_throughput
null
ppp
ptmx
ptp0
pts
random
rfkill
rtc0
snd
socket
sw_sync
tty
tty0
tty1
tty10
tty11
tty12
tty13
tty14
tty15
tty16
tty17
tty18
tty19
tty2
tty20
tty21
tty22
tty23
tty24
tty25
tty26
tty27
tty28
tty29
tty3
tty30
tty31
tty32
tty33
tty34
tty35
tty36
tty37
tty38
tty39
tty4
tty40
tty41
tty42
tty43
tty44
tty45
tty46
tty47
tty48
tty49
tty5
tty50
tty51
tty52
tty53
tty54
tty55
tty56
tty57
tty58
tty59
tty6
tty60
tty61
tty62
tty63
tty7
tty8
tty9
ttyGS0
ttyGS1
ttyGS2
ttyGS3
ttymxc0
ttymxc2
tun
ubi_ctrl
uhid
uinput
urandom
usb-ffs
usb_accessory
vcs
vcs1
vcsa
vcsa1
video0
video16
video17
watchdog
xt_qtaguid
zero
root@wandboard:/dev # ls ttymx*
ttymxc0
ttymxc2
root@wandboard:/dev # warning: `main' uses 32-bit capabilities (legacy support in use)
request_suspend_state: wakeup (3->0) at 31655712336 (1970-01-01 00:00:30.305492336 UTC)

root@wandboard:/dev #
root@wandboard:/dev #
root@wandboard:/dev # lowmemorykiller: lowmem_shrink: convert oom_adj to oom_score_adj:
lowmemorykiller: oom_adj 0 => oom_score_adj 0
lowmemorykiller: oom_adj 1 => oom_score_adj 58
lowmemorykiller: oom_adj 2 => oom_score_adj 117
lowmemorykiller: oom_adj 3 => oom_score_adj 176
lowmemorykiller: oom_adj 9 => oom_score_adj 529
lowmemorykiller: oom_adj 15 => oom_score_adj 1000
acc_open
acc_release
fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
ERROR: v4l2 capture: slave not found!
android_work: sent uevent USB_STATE=CONNECTED
android_work: sent uevent USB_STATE=DISCONNECTED
android_work: sent uevent USB_STATE=CONNECTED
android_usb gadget: high-speed config #1: android
android_work: sent uevent USB_STATE=CONFIGURED
request_suspend_state: sleep (0->3) at 157449572351 (1970-01-01 00:02:36.099350351 UTC)
active wake lock PowerManagerService.WakeLocks
active wake lock gadget

2016/1/13

ALL_PREBUILT is deprecated

android 5.0
用以前的
ALL_PREBUILT += ..
 $(transform-prebuilt-to-target)
出現了 error

所以參考 external/srec/tests/Android.mk
最後是:
#####################################################################
# Run "make srec_test_files" to install the above files.            #
# By default they are not copied to /system/usr/srec since they are #
# only required by the SREC and UAPI tests.                         #
#####################################################################
srec_test_files : $(copy_to) $(copy_to_scripts) $(copy_to_pcm) srec_grammars
這個 "make srec_test_file" 是在 android root path 下的。

因為 Android 的 build 系統是一個整個 Makefile
所以最後的 rule , target 就是在 root 的 Makefile 中。



所以 follow 這個做一個 Android.mk:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

copy_from_scripts += \
        otgdev.sh

copy_to_scripts := $(addprefix $(TARGET_OUT)/bin/,$(copy_from_scripts))

$(copy_to_scripts) : $(TARGET_OUT)/bin/% : $(LOCAL_PATH)/% | $(ACP)
        $(transform-prebuilt-to-target)


#####################################################################
# Run "make helptool" to install the above files.            #
#####################################################################

helptool : $(copy_to_scripts)
這樣的作法,make 時不會自動build, 要而外下 make helptool 才會做。

如果是要 make 時自動會做,還是要用 BUILD_PREBUILT:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE := otgdev.sh
LOCAL_SRC_FILES := $(LOCAL_MODULE)
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)

include $(BUILD_PREBUILT)