<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1440094132233562658</id><updated>2026-06-26T14:11:57.848+08:00</updated><category term="Linux"/><category term="Android"/><category term="Freescale"/><category term="git"/><category term="programming"/><category term="Tips"/><category term="smdk2416"/><category term="Renesas"/><category term="Stock"/><category term="Tegra"/><category term="misc"/><category term="Digest"/><category term="English"/><category term="NAS"/><category term="Qualcomm"/><category term="Algorithm"/><category term="Lyrics"/><category term="TI"/><category term="openwrt"/><category term="u-boot"/><category term="wifi"/><category term="ADSL"/><category term="Fitness"/><category term="Intel"/><category term="MIPS"/><category term="PTP"/><category term="QT"/><category term="Song"/><category term="Tizen"/><category term="USB"/><category term="bluetooth"/><category term="dhcp"/><category term="ffmpeg"/><category term="ipq806x"/><category term="libusb"/><category term="nfs"/><category term="opencv"/><category term="prefix_sum"/><category term="reference"/><category term="startup"/><category term="swimming"/><category term="tftp"/><category term="yocto"/><title type='text'>Stay Hungry, Stay Foolish</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>133</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-5765709509607298307</id><published>2026-06-26T14:11:57.848+08:00</published><updated>2026-06-26T14:11:57.848+08:00</updated><title type='text'>zfs</title><content type='html'>&lt;p&gt;&amp;nbsp;~# zpool import&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; pool: freenas_xxx&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; id: 1132200382232156645&lt;/p&gt;&lt;p&gt;&amp;nbsp;state: ONLINE&lt;/p&gt;&lt;p&gt;status: The pool was last accessed by another system.&lt;/p&gt;&lt;p&gt;action: The pool can be imported using its name or numeric identifier and&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; the &#39;-f&#39; flag.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-EY&lt;/p&gt;&lt;p&gt;config:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; freenas_xxx&amp;nbsp; ONLINE&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; raidz2-0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ONLINE&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sda&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ONLINE&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sdc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ONLINE&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sdd&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ONLINE&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sdb&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ONLINE&lt;/p&gt;&lt;p&gt;~# zpool import -o readonly=on -R /tmp freenas_xxx&lt;/p&gt;&lt;p&gt;cannot import &#39;freenas_fuxing_1st_rd&#39;: pool was previously in use from another system.&lt;/p&gt;&lt;p&gt;Last accessed by freenas.fuxing (hostid=fe2c2f4) at Sun Dec&amp;nbsp; 1 07:59:49 2019&lt;/p&gt;&lt;p&gt;The pool can be imported, use &#39;zpool import -f&#39; to import the pool.&lt;/p&gt;&lt;p&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/p&gt;&lt;p&gt;~# zpool import -f -o readonly=on -R /tmp freenas_xxx&lt;/p&gt;&lt;p&gt;// check zpool status&lt;/p&gt;&lt;p&gt;~# zpool status&lt;/p&gt;&lt;p&gt;// umount zpool&lt;/p&gt;&lt;p&gt;~# zpool &lt;span class=&quot;ͼg&quot;&gt;export&lt;/span&gt; freenas_xxx&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/5765709509607298307/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2026/06/zfs.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/5765709509607298307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/5765709509607298307'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2026/06/zfs.html' title='zfs'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-6149998245896389290</id><published>2025-03-06T14:10:00.005+08:00</published><updated>2025-03-06T14:22:07.535+08:00</updated><title type='text'>dpdk-pktgen</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;C shared or static library &#39;bsd&#39; not found&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Soltuion: make menuconfig -&amp;gt; enable libbsd&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;Program python3 found: YES (/work/marvell-sdk/cn10ka-switches-release-output/host/bin/python3)&lt;/div&gt;&lt;p&gt;Library rte_net_i40e found: YES&lt;/p&gt;&lt;p&gt;Library rte_net_ixgbe found: YES&lt;/p&gt;&lt;p&gt;Library rte_net_ice found: YES&lt;/p&gt;&lt;p&gt;Library rte_bus_vdev found: YES&lt;/p&gt;&lt;p&gt;Run-time dependency threads found: YES&lt;/p&gt;&lt;p&gt;Run-time dependency numa found: YES 2.0.14&lt;/p&gt;&lt;p&gt;Run-time dependency pcap found: YES 1.10.1&lt;/p&gt;&lt;p&gt;Library dl found: YES&lt;/p&gt;&lt;p&gt;Library m found: YES&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;../cn10ka-switches-release-output/build/dpdk-pktgen-24.10.3/app/meson.build:53:0: ERROR: C shared or static library &#39;bsd&#39; not found&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;A full log can be found at /work/marvell-sdk/cn10ka-switches-release-output/build/dpdk-pktgen-24.10.3/build/meson-logs/meson-log.txt&lt;/p&gt;&lt;p&gt;make[1]: *** [package/pkg-generic.mk:283: /work/marvell-sdk/cn10ka-switches-release-output/build/dpdk-pktgen-24.10.3/.stamp_configured] Error 1&lt;/p&gt;&lt;p&gt;make: *** [Makefile:23: _all] Error 2&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/6149998245896389290/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2025/03/dpdk-pktgen.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/6149998245896389290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/6149998245896389290'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2025/03/dpdk-pktgen.html' title='dpdk-pktgen'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-4628067112281315605</id><published>2025-02-19T15:54:00.004+08:00</published><updated>2025-02-27T08:06:18.327+08:00</updated><title type='text'>Ubuntu 22.04 LTS</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;VIM issue:&amp;nbsp;https://vi.stackexchange.com/questions/29529/escape-sequences-showing-up-within-vi&lt;/li&gt;&lt;li&gt;Install nVidia driver&lt;/li&gt;&lt;ul&gt;&lt;li&gt;sudo add-apt-repository ppa:graphics-drivers&lt;/li&gt;&lt;li&gt;sudo apt update&lt;/li&gt;&lt;li&gt;Open &quot;Software Update&quot; to install the driver&lt;/li&gt;&lt;li&gt;Reference:&amp;nbsp;https://askubuntu.com/questions/1533273/nvidia-560-drivers-not-available-in-ubuntu-24-04&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/4628067112281315605/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2025/02/ubuntu-2204-lts.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/4628067112281315605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/4628067112281315605'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2025/02/ubuntu-2204-lts.html' title='Ubuntu 22.04 LTS'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-6015880440977540506</id><published>2024-12-17T10:13:00.001+08:00</published><updated>2024-12-17T10:46:55.878+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PTP"/><title type='text'>PTP</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&amp;nbsp;PTP Introduction&lt;/li&gt;&lt;ul&gt;&lt;li&gt;https://networklessons.com/cisco/ccnp-encor-350-401/introduction-to-precision-time-protocol-ptp&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Configuring PTP using ptp4l&lt;/li&gt;&lt;ul&gt;&lt;li&gt;https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ptp_using_ptp4l#sec-Using_PTP_with_Multiple_Interfaces&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/6015880440977540506/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2024/12/ptp.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/6015880440977540506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/6015880440977540506'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2024/12/ptp.html' title='PTP'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-4927805680973482289</id><published>2024-12-17T10:11:00.005+08:00</published><updated>2025-01-16T18:16:44.940+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ffmpeg"/><title type='text'>ffmpeg</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&amp;nbsp;Dump RTSP to file&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;pre style=&quot;--theme-background-attachment: auto; --theme-background-color: var(--white); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: var(--black-600); --theme-body-font-family: var(--ff-sans); --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: var(--white); --theme-content-border-color: var(--black-225); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: var(--black-500); --theme-footer-link-color-hover: var(--black-200); --theme-footer-link-color: var(--black-300); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: var(--black-300); --theme-footer-title-color: var(--black-250); --theme-header-background-border-bottom: 0; --theme-header-background-color: var(--theme-primary); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: var(--theme-primary); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: var(--ff-sans); --theme-post-owner-background-color: var(--theme-secondary-100); --theme-post-owner-new-background-color: var(--theme-secondary-200); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: var(--ff-sans); --theme-primary-custom-100: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .9))); --theme-primary-custom-200: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .75))); --theme-primary-custom-300: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .5))); --theme-primary-custom-400: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), var(--theme-base-primary-color-l)); --theme-primary-custom-500: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.3))); --theme-primary-custom-600: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.6))); --theme-primary-custom: var(--theme-primary-custom-400); --theme-topbar-bottom-border: 1px solid var(--black-225); border-radius: var(--br-md); border: 0px; box-sizing: inherit; color: #0c0d0e; font-family: var(--ff-mono); font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--fs-body1); font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: var(--lh-md); margin-bottom: calc(1.5em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: var(--su12); vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;--theme-background-attachment: auto; --theme-background-color: var(--white); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: var(--black-600); --theme-body-font-family: var(--ff-sans); --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: var(--white); --theme-content-border-color: var(--black-225); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: var(--black-500); --theme-footer-link-color-hover: var(--black-200); --theme-footer-link-color: var(--black-300); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: var(--black-300); --theme-footer-title-color: var(--black-250); --theme-header-background-border-bottom: 0; --theme-header-background-color: var(--theme-primary); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: var(--theme-primary); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: var(--ff-sans); --theme-post-owner-background-color: var(--theme-secondary-100); --theme-post-owner-new-background-color: var(--theme-secondary-200); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: var(--ff-sans); --theme-primary-custom-100: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .9))); --theme-primary-custom-200: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .75))); --theme-primary-custom-300: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .5))); --theme-primary-custom-400: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), var(--theme-base-primary-color-l)); --theme-primary-custom-500: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.3))); --theme-primary-custom-600: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.6))); --theme-primary-custom: var(--theme-primary-custom-400); --theme-topbar-bottom-border: 1px solid var(--black-225); border-radius: 0px; border: 0px; box-sizing: inherit; color: var(--black-600); font-family: var(--ff-mono); font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--_pr-code-fs); font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&quot;ffmpeg -i rtsp://@192.168.241.1:62156 -acodec copy -vcodec copy c:/abc.mp4&quot;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;pre style=&quot;--theme-background-attachment: auto; --theme-background-color: var(--white); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: var(--black-600); --theme-body-font-family: var(--ff-sans); --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: var(--white); --theme-content-border-color: var(--black-225); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: var(--black-500); --theme-footer-link-color-hover: var(--black-200); --theme-footer-link-color: var(--black-300); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: var(--black-300); --theme-footer-title-color: var(--black-250); --theme-header-background-border-bottom: 0; --theme-header-background-color: var(--theme-primary); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: var(--theme-primary); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: var(--ff-sans); --theme-post-owner-background-color: var(--theme-secondary-100); --theme-post-owner-new-background-color: var(--theme-secondary-200); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: var(--ff-sans); --theme-primary-custom-100: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .9))); --theme-primary-custom-200: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .75))); --theme-primary-custom-300: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .5))); --theme-primary-custom-400: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), var(--theme-base-primary-color-l)); --theme-primary-custom-500: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.3))); --theme-primary-custom-600: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.6))); --theme-primary-custom: var(--theme-primary-custom-400); --theme-topbar-bottom-border: 1px solid var(--black-225); border-radius: var(--br-md); border: 0px; box-sizing: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: var(--lh-md); margin-bottom: calc(1.5em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: var(--su12); vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;--theme-background-attachment: auto; --theme-background-color: var(--white); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: var(--black-600); --theme-body-font-family: var(--ff-sans); --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: var(--white); --theme-content-border-color: var(--black-225); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: var(--black-500); --theme-footer-link-color-hover: var(--black-200); --theme-footer-link-color: var(--black-300); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: var(--black-300); --theme-footer-title-color: var(--black-250); --theme-header-background-border-bottom: 0; --theme-header-background-color: var(--theme-primary); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: var(--theme-primary); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: var(--ff-sans); --theme-post-owner-background-color: var(--theme-secondary-100); --theme-post-owner-new-background-color: var(--theme-secondary-200); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: var(--ff-sans); --theme-primary-custom-100: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .9))); --theme-primary-custom-200: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .75))); --theme-primary-custom-300: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .5))); --theme-primary-custom-400: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), var(--theme-base-primary-color-l)); --theme-primary-custom-500: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.3))); --theme-primary-custom-600: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.6))); --theme-primary-custom: var(--theme-primary-custom-400); --theme-topbar-bottom-border: 1px solid var(--black-225); border-radius: 0px; border: 0px; box-sizing: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #0c0d0e; font-family: Times New Roman;&quot;&gt;https://stackoverflow.com/questions/16259588/how-to-dump-raw-rtsp-stream-to-file&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style=&quot;color: #0c0d0e;&quot;&gt;Continuously produce 1 second videos&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;color: #0c0d0e;&quot;&gt;&quot;ffmpeg -framerate 5 -i /tmp/ffmpeg_pipe -c:v libx264 -g 5 -f segment -segment_time 1 &quot;output_%04d.mp4&quot;&quot;&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;code style=&quot;--theme-background-attachment: auto; --theme-background-color: var(--white); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 198; --theme-base-primary-color-l: 51.37254902%; --theme-base-primary-color-s: 60.48387097%; --theme-body-font-color: var(--black-600); --theme-body-font-family: var(--ff-sans); --theme-button-active-background-color: var(--theme-primary-200); --theme-button-color: var(--theme-primary); --theme-button-hover-background-color: var(--theme-primary-100); --theme-button-hover-color: var(--theme-primary-400); --theme-button-outlined-border-color: var(--theme-primary-400); --theme-button-outlined-selected-border-color: var(--theme-primary-500); --theme-button-primary-active-background-color: var(--theme-primary-600); --theme-button-primary-active-color: var(--white); --theme-button-primary-background-color: var(--theme-primary-400); --theme-button-primary-color: var(--white); --theme-button-primary-hover-background-color: var(--theme-primary-500); --theme-button-primary-hover-color: var(--white); --theme-button-primary-selected-background-color: var(--theme-primary-600); --theme-button-primary-selected-color: var(--white); --theme-button-selected-background-color: var(--theme-primary-300); --theme-button-selected-color: var(--theme-primary-600); --theme-content-background-color: var(--white); --theme-content-border-color: hsl(210,8%,90%); --theme-footer-background-border-top: 0; --theme-footer-background-color: transparent; --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: hsl(210,8%,90%); --theme-footer-link-color-hover: hsl(210,8%,5%); --theme-footer-link-color: hsl(210,8%,25%); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: hsl(210,8%,68%); --theme-footer-title-color: #0082A3; --theme-header-background-border-bottom: 0; --theme-header-background-color: transparent; --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: var(--theme-primary); --theme-header-sponsored-color: hsl(210,8%,25%); --theme-link-color-hover: #61b4d8; --theme-link-color-visited: #50AEC6; --theme-link-color: #38A1CE; --theme-post-body-font-family: var(--ff-sans); --theme-post-owner-background-color: var(--theme-primary-100); --theme-post-owner-new-background-color: var(--theme-primary-200); --theme-post-title-color-hover: rgba(56,161,206,0.8); --theme-post-title-color-visited: #50AEC6; --theme-post-title-color: #38A1CE; --theme-post-title-font-family: var(--ff-sans); --theme-primary-custom-100: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .9))); --theme-primary-custom-200: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .75))); --theme-primary-custom-300: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + ((100% - var(--theme-base-primary-color-l)) * .5))); --theme-primary-custom-400: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), var(--theme-base-primary-color-l)); --theme-primary-custom-500: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.3))); --theme-primary-custom-600: hsl(var(--theme-base-primary-color-h), var(--theme-base-primary-color-s), calc(var(--theme-base-primary-color-l) + (var(--theme-base-primary-color-l) * -.6))); --theme-primary-custom: var(--theme-primary-custom-400); --theme-topbar-bottom-border: none; border-radius: var(--br-sm); border: 0px; box-sizing: inherit; color: #0c0d0e; font-family: var(--ff-mono); font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--_pr-code-fs); font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: inherit; margin: 0px; padding: var(--su2) var(--su4); vertical-align: baseline; white-space-collapse: preserve;&quot;&gt;-g 5&lt;/code&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI Adjusted&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Liberation Sans&amp;quot;, sans-serif&quot; style=&quot;background-color: white; color: #0c0d0e; font-size: 15px;&quot;&gt;&amp;nbsp;argument forces a key frame every 5 frames&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style=&quot;color: #0c0d0e;&quot;&gt;https://superuser.com/questions/1812357/how-can-i-setup-ffmpeg-to-continuously-produce-1-second-videos-from-piped-jpgs&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style=&quot;color: #0c0d0e;&quot;&gt;Run a ffmpeg process in the background&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;color: #0c0d0e;&quot;&gt;&quot;nohup ffmpeg_cmd 2&amp;gt;/dev/null &amp;gt; /dev/null &amp;amp;&quot;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: #0c0d0e;&quot;&gt;https://stackoverflow.com/questions/1198052/run-a-ffmpeg-process-in-the-background&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style=&quot;color: #0c0d0e;&quot;&gt;Transfer mp4 to mkv&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;color: #0c0d0e;&quot;&gt;ffmpeg -i aaa.mp4 -c copy aaa.mkv&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: #0c0d0e;&quot;&gt;https://stackoverflow.com/questions/65525078/does-converting-mp4-to-mkv-change-data-fidelity&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/4927805680973482289/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2024/12/ffmpeg.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/4927805680973482289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/4927805680973482289'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2024/12/ffmpeg.html' title='ffmpeg'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-2017167706613765750</id><published>2024-12-09T10:48:00.001+08:00</published><updated>2024-12-09T10:49:10.782+08:00</updated><title type='text'>minicom with Kermit</title><content type='html'>1. sudo apt-get install ckermit&lt;div&gt;2. Edit ~/.kermrc&lt;/div&gt;&lt;div&gt;=====&lt;/div&gt;set carrier-watch off&lt;br /&gt;set prefixing all&lt;br /&gt;set parity none&lt;br /&gt;set stop-bits 1&lt;br /&gt;set modem none&lt;br /&gt;set file type bin&lt;br /&gt;set file name lit&lt;br /&gt;&lt;div&gt;set flow-control none&lt;/div&gt;&lt;div&gt;=====&lt;/div&gt;&lt;div&gt;3. In minicom, &quot;ctrl&quot; -&amp;gt; &quot;a&quot; -&amp;gt; &quot;o&quot;, change g and h as below&lt;/div&gt;&lt;div&gt;=====&lt;/div&gt;&lt;div&gt;G --&amp;gt; /usr/bin/kermit -i -l %f -b %b -s Y U Y N N&lt;/div&gt;&lt;div&gt;H --&amp;gt; /usr/bin/kermit -i -l %f -b %b -r N D Y N N&lt;/div&gt;&lt;div&gt;=====&lt;/div&gt;&lt;div&gt;4. in minicom, &quot;Save setup as dfl&quot;&lt;/div&gt;&lt;div&gt;5. exit minicom&lt;/div&gt;&lt;div&gt;6. source ~/.kermrc&lt;/div&gt;&lt;div&gt;7. sudo minicom -D /dev/ttyUSBx&lt;/div&gt;&lt;div&gt;8 &quot;ctrl&quot; -&amp;gt; &quot;s&quot; -&amp;gt; kermit -&amp;gt; select file to transfer&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Referebce&lt;/li&gt;&lt;ul&gt;&lt;li&gt;http://lazyflai.blogspot.com/2010/06/linuxminiconkermit.html&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/2017167706613765750/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2024/12/minicom-with-kermit.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/2017167706613765750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/2017167706613765750'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2024/12/minicom-with-kermit.html' title='minicom with Kermit'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-9046032591179150617</id><published>2019-03-29T09:40:00.004+08:00</published><updated>2019-03-29T14:19:56.595+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="reference"/><category scheme="http://www.blogger.com/atom/ns#" term="startup"/><title type='text'>Startup</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://blogs.longwin.com.tw/wordpress/startup-2-v5.pdf&quot;&gt;startup-2-v5.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://startup20.org/category/%E5%89%B5%E6%A5%AD%E5%BF%83%E5%BE%97/&quot;&gt;創業心得&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/9046032591179150617/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2019/03/startup.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/9046032591179150617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/9046032591179150617'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2019/03/startup.html' title='Startup'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-6603923393209617915</id><published>2019-02-12T16:42:00.001+08:00</published><updated>2019-02-12T16:42:08.758+08:00</updated><title type='text'>Setup Time Machine under Ubuntu</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://zhuanlan.zhihu.com/p/31088141&quot;&gt;低成本搭建Time Machine 服务器&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/6603923393209617915/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2019/02/setup-time-machine-under-ubuntu.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/6603923393209617915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/6603923393209617915'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2019/02/setup-time-machine-under-ubuntu.html' title='Setup Time Machine under Ubuntu'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-4998551802158801096</id><published>2019-01-30T18:49:00.001+08:00</published><updated>2019-01-31T14:13:14.253+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="libusb"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="USB"/><title type='text'>Using libusb without udev and usbfs</title><content type='html'>Due to CONFIG_USB_DEVICEFS is obsoleted in Kernel 3.10.x. To enable libusb to access the specific USB device, ex: under busybox mdev enrionment, it should be mapped to /dev/bus/usb/00x/00x manually.&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://sourceforge.net/projects/libusb/&quot; target=&quot;_blank&quot;&gt;libusb download link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Build libusb and disable udev&lt;/li&gt;
&lt;ol&gt;&lt;pre style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt;./configure --host=$(HOST) --target=$(TARGET) --disable-udev --prefix=$(LIB_TEMP_DIR)
&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;&lt;li&gt;Sample script to add specific USB node to &quot;/dev/bus/usb/&quot;.&lt;/li&gt;
&lt;pre style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt;#!/bin/sh

for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do
    syspath=&quot;${sysdevpath%/dev}&quot;;
    if [ -e ${syspath}/busnum ]; then
        dev=`cat ${syspath}/dev`
        busnum=`cat ${syspath}/busnum`
        devnum=`cat ${syspath}/devnum`
        idVendor=`cat ${syspath}/idVendor`
        idProduct=`cat ${syspath}/idProduct`

        BUSNUM=`printf &quot;%03d&quot; ${busnum}`
        DEVNUM=`printf &quot;%03d&quot; ${devnum}`

        NODE_MASTER=`echo $dev | cut -d &quot;:&quot; -f1`
        NODE_MINOR=`echo $dev | cut -d &quot;:&quot; -f2`

        #devname=`printf &quot;bus/usb/%03d/%03d&quot; ${busnum} ${devnum}`
        #echo &quot;syspath = ${syspath}, devname = ${devname}, dev = ${dev}&quot;
        #echo &quot;idVendor = ${idVendor}, idProduct = ${idProduct}&quot;
        #echo &quot;node_master = ${node_master}, node_minor = ${node_minor}&quot;

        if [ ${idVendor} == &quot;Vendor_id_you_want&quot; ] &amp;&amp; [ ${idProduct} == &quot;product_id_you_want&quot; ]; then
            echo &quot;found.................&quot;
            if [ -e /dev/bus/usb/${BUSNUM} ]; then
                rm -fr /dev/bus/usb/${BUSNUM}
            fi

            mkdir -p /dev/bus/usb/${BUSNUM}
            mknod /dev/bus/usb/${BUSNUM}/${DEVNUM} c ${NODE_MASTER} ${NODE_MINOR}
        fi
    else
        continue;
    fi
done;
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Reference&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://lists.openembedded.org/pipermail/openembedded-devel/2010-September/069770.html&quot;&gt;busybox&#39;s mdev: add script to populate /dev/bus/usb&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/43458765/getting-information-from-tty-device-without-using-udev-linux&quot;&gt;Getting information from tty Device without using udev linux&lt;br /&gt;
&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://unix.stackexchange.com/questions/42844/how-do-i-access-a-usb-serial-port-without-an-entry-in-dev&quot;&gt;How do I access a USB serial port without an entry in /dev?&lt;br /&gt;
&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/4998551802158801096/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2019/01/using-libusb-without-udev-and-usbfs.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/4998551802158801096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/4998551802158801096'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2019/01/using-libusb-without-udev-and-usbfs.html' title='Using libusb without udev and usbfs'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-6695433725531046432</id><published>2018-04-16T16:12:00.001+08:00</published><updated>2018-04-16T16:12:34.048+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dhcp"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="wifi"/><title type='text'>Start dhcpd on more than one NIC</title><content type='html'>Bridge all interfaces to a bridge, then run udhcpd on the bridge interface.&lt;br /&gt;
&lt;br /&gt;
# insmod /lib/module/3.x.x/kernel/.../wifi_driver.ko&lt;br /&gt;
# ifconfig ra0 up&lt;br /&gt;
# brctl addif br0 ra0&lt;br /&gt;
device ra0 entered promiscuous mode&lt;br /&gt;
br0: port 7(ra0) entered forwarding state&lt;br /&gt;
br0: port 7(ra0) entered forwarding state&lt;br /&gt;
# br0: port 7(ra0) entered forwarding state&lt;br /&gt;
MtAsicACQueue: Write CR:21510, Value=10421&lt;br /&gt;
MtAsicACQueue: Write CR:21500, Value=10421&lt;br /&gt;
MtAsicACQueue: Write CR:21510, Value=10421&lt;br /&gt;
MtAsicACQueue: Write CR:21500, Value=10421&lt;br /&gt;
Rcv Wcid(1) AddBAReq&lt;br /&gt;
Start Seq = 00000000&lt;br /&gt;
sending OFFER of 192.168.1.33&lt;br /&gt;
BA - Send ADDBA request. StartSeq = 0,&amp;nbsp; FrameLen = 33. BufSize = 8&lt;br /&gt;
BA - Send ADDBA request. StartSeq = 200,&amp;nbsp; FrameLen = 33. BufSize = 8&lt;br /&gt;
sending OFFER of 192.168.1.33&lt;br /&gt;
sending ACK to 192.168.1.33&lt;br /&gt;
&lt;br /&gt;
# ping 192.168.1.33&lt;br /&gt;
PING 192.168.1.33 (192.168.1.33): 56 data bytes&lt;br /&gt;
64 bytes from 192.168.1.33: seq=0 ttl=64 time=31.349 ms&lt;br /&gt;
64 bytes from 192.168.1.33: seq=2 ttl=64 time=155.953 ms&lt;br /&gt;
64 bytes from 192.168.1.33: seq=3 ttl=64 time=165.323 ms&lt;br /&gt;
64 bytes from 192.168.1.33: seq=4 ttl=64 time=120.031 ms&lt;br /&gt;
^C&lt;br /&gt;
--- 192.168.1.33 ping statistics ---&lt;br /&gt;
5 packets transmitted, 4 packets received, 20% packet loss&lt;br /&gt;
round-trip min/avg/max = 31.349/118.164/165.323 ms&lt;br /&gt;
&amp;nbsp;&lt;a href=&quot;https://wiki.archlinux.org/index.php/Network_bridge&quot; target=&quot;_blank&quot;&gt;How to add interface to a bridge.&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/6695433725531046432/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2018/04/start-dhcpd-on-more-than-one-nic.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/6695433725531046432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/6695433725531046432'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2018/04/start-dhcpd-on-more-than-one-nic.html' title='Start dhcpd on more than one NIC'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-5198446192343871266</id><published>2018-01-05T16:46:00.001+08:00</published><updated>2018-01-05T17:03:42.963+08:00</updated><title type='text'>NAND flash offset calculation</title><content type='html'>&lt;ol&gt;&lt;li&gt;NAND flash information&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;512MB&lt;/li&gt;
&lt;li&gt;8192 blocks&lt;/li&gt;
&lt;li&gt;1 block = 64 pages&lt;/li&gt;
&lt;li&gt;1 page = (2K + 6) bytes&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;bad block information&lt;/li&gt;
&lt;ol&gt;&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;[NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
Scanning device for bad blocks
Bad eraseblock 546 at 0x000004440000
Bad eraseblock 2868 at 0x000016680000
Bad eraseblock 3890 at 0x00001e640000
Signature matched and data read!
&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;&lt;li&gt;Dump bad block, 0x000004440000, data from u-boot&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;page number = (4440000h/800h) = 8880h&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;4440000h = bad block offset&lt;/li&gt;
&lt;li&gt;800h = 2048 bytes&lt;/li&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;# nand page 8880
page 0x8880:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

oob:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;li&gt;Write data to error block&lt;/li&gt;
&lt;ol&gt;&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;# nand write 16680000 34
write offs 0x16680000, len 0x2
ranand_read: skip reading a fact bad block 16680000 -&gt; 166a0000
..ranand_erase: start:16680000, len:20000 
ranand_erase: attempt to erase a fact bad block at 0x16680000
.(5192)offs=375914496 piece=0 piece_size=2 rc=1
bad block: 16680000, try next: 166a0000
..ranand_erase: start:166a0000, len:20000 
.(5192)offs=375914496 piece=0 piece_size=2 rc=0
Done!
write succeed
&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;&lt;li&gt;Read/Write data to good block next bad block&lt;/li&gt;
&lt;ol&gt;&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;# nand erase 166a0000 16
erase addr=166A0000, len=22
ranand_erase: start:166a0000, len:16 
.erase finish
# nand write 166a0000 34  
write offs 0x166a0000, len 0x1
..ranand_erase: start:166a0000, len:20000 
.(5192)offs=376045568 piece=0 piece_size=1 rc=0
Done!
write succeed
# nand read 166a0000 16
pagemask=0003FFFF, chipize=1FF80000
(5286) chip-&gt;page_shift=11
read len: 22
34 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 

# nand page 2cd40                    // 2cd40h = 166a0000h/800h
page 0x2cd40:
34 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

oob:
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
28 0c 22 f0 8d 1d fd ff 26 20 98 1b 87 6e fc ff 26 20 98 1b 87 6e fc ff 26 20 98 1b 87 6e fc ff

&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/5198446192343871266/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2018/01/nand-flash-offset-calculation.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/5198446192343871266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/5198446192343871266'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2018/01/nand-flash-offset-calculation.html' title='NAND flash offset calculation'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-1972459565857098689</id><published>2017-10-07T15:47:00.003+08:00</published><updated>2017-10-07T15:50:42.000+08:00</updated><title type='text'>nodejs relative</title><content type='html'>1. install n to management nodejs&lt;br /&gt;
1.1 $ sudo npm install -g n&lt;br /&gt;
1.2 $ n // check version&lt;br /&gt;
1.3 $ sudo n latest // install latest version&lt;br /&gt;
1.4 $ sudo n stable // install stable version&lt;br /&gt;
1.5 $ n rm 0.0.x // remove 0.0.x version&lt;br /&gt;
1.6 $ n use 0.0.x test.js // use 0.0.x version&lt;br /&gt;
1.7 &lt;a href=&quot;http://weizhifeng.net/node-version-management-via-n-and-nvm.html&quot;&gt;利用n和nvm管理Node的版本&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/1972459565857098689/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2017/10/nodejs-relative.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/1972459565857098689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/1972459565857098689'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2017/10/nodejs-relative.html' title='nodejs relative'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-5739881285060655333</id><published>2017-09-06T14:17:00.000+08:00</published><updated>2017-10-24T15:13:33.285+08:00</updated><title type='text'>openwrt bleeding_edge</title><content type='html'>&lt;ol&gt;&lt;li&gt;How to add customized files to openwrt.&lt;/li&gt;
&lt;ol&gt;&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt;&lt;build_root&gt;/files
&lt;build_root&gt;/files/etc/passwd
&lt;build_root&gt;/files/etc/shadow
&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;&lt;a href=&quot;https://stackoverflow.com/questions/41748035/openwrtadd-custom-user-in-image&quot;&gt;[OpenWRT][Add custom user in image]&lt;/a&gt;
&lt;li&gt;How to fix following &quot;unicode/uversion.h:  No such file or directory&quot; error&lt;/li&gt;
&lt;ol&gt;&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt;In file included from ../deps/v8/src/assembler.cc:95:0:
../deps/v8/src/intl.h:14:30: fatal error: unicode/uversion.h: No such file or directory
compilation terminated.
&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;&lt;ol&gt;&lt;li&gt;disable i18n feature first by &quot;make menuconfig -&gt; Langues -&gt; Node.js -&gt; Configuration -&gt; Enable i18n features&quot;&lt;/li&gt;
&lt;li&gt;make openwrt&lt;/li&gt;
&lt;li&gt;enable i18n feature&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/xueliu/lora-feed&quot;&gt;Lora gateway feeds&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;change default settings from LEDE&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://simontune.xyz/2017/08/02/%E6%94%AF%E6%8C%81Homekit%E8%B7%AF%E7%94%B1%E5%99%A8%E7%B3%BB%E7%BB%9F%E7%9A%84%E7%BC%96%E8%AF%91-LEDE/&quot;&gt;支持Homekit路由器系统的编译-LEDE&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/5739881285060655333/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2017/09/openwrt-bleedingedge.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/5739881285060655333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/5739881285060655333'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2017/09/openwrt-bleedingedge.html' title='openwrt bleeding_edge'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-5429184732113683737</id><published>2017-08-24T10:43:00.000+08:00</published><updated>2019-02-11T11:40:04.576+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="openwrt"/><title type='text'>How to enable MIPS FPU emulator in openwrt</title><content type='html'>Two ways to enable MIPS FPU emulator in openwrt&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;make menuconfig&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Advanced configuration option (for developers) --&amp;gt; Target options --&amp;gt; Use software floating point by default &lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;make kernel_menuconfig&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Kernel Type --&amp;gt; MIPS FPU Emulator&lt;/li&gt;
&lt;/ul&gt;&lt;/ol&gt;Check if FPU emulator is enabled by&lt;br /&gt;
root@OpenWrt:/# ls /sys/kernel/debug/mips/&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;fpuemustats&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unaligned_action&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unaligned_instructions&lt;br /&gt;
&lt;br /&gt;
Testing Result:&lt;br /&gt;
&lt;br /&gt;
Step 1: | V | V | X |&lt;br /&gt;
Step 2: | X | V | V |&lt;br /&gt;
Result: | X | V | V |&lt;br /&gt;
&lt;br /&gt;
Conclusion:&lt;br /&gt;
Only turn on step2 can enable MIPS FPU emulator&lt;br /&gt;
&lt;br /&gt;
Note: Enable MIPS FPU emulator fixes &quot;Illegal Instruction&quot; while running applications (like node.js).&lt;br /&gt;
&lt;br /&gt;
Reference:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://blog.csdn.net/xhoufei2010/article/details/51627417&quot; target=&quot;_blank&quot;&gt;openwrt 编译node.js功能（解决Illegal instruction错误）&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/openwrt/packages/issues/2633&quot; target=&quot;_blank&quot;&gt;node.js doesn&#39;t run on AR9331 : SIGILL , Illegal instruction&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/nodejs/node/issues/4818&quot; target=&quot;_blank&quot;&gt;Node fails to start on MTK7620: &quot;Illegal instruction&quot; #4818&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/nxhack/openwrt-node-packages&quot; target=&quot;_blank&quot;&gt;OpenWrt / LEDE Project Node.js packages. up-to-date v4.x LTS, v6.x LTS and v8.x&lt;/a&gt;&amp;nbsp; &lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #24292e; display: inline; float: none; font-family: , &amp;quot;blinkmacsystemfont&amp;quot; , &amp;quot;segoe ui&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , &amp;quot;segoe ui symbol&amp;quot;; font-size: 14px; font-style: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;&lt;/span&gt; </content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/5429184732113683737/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2017/08/how-to-enable-fpu-emulator-on-openwrt.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/5429184732113683737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/5429184732113683737'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2017/08/how-to-enable-fpu-emulator-on-openwrt.html' title='How to enable MIPS FPU emulator in openwrt'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-5775905295639837154</id><published>2016-08-01T14:53:00.003+08:00</published><updated>2016-08-01T15:02:41.454+08:00</updated><title type='text'>Add diffie-hellman-group1-sha1 back to openssh-server (OpenSSH_7.2p2)</title><content type='html'>&lt;ol&gt;Symptom: When client tries to connect ssh server by scp/ssh. It encounters an error message as below. &quot;Unable to negotiate with legacyhost: no matching key exchange method found.&quot;
&lt;li&gt;sshd log is storaged at &quot;/var/log/auth.log&quot;.&lt;/li&gt;
&lt;code&gt;
Unable to negotiate with 127.0.0.1: no matching key exchange method found.
Their offer: diffie-hellman-group1-sha1
&lt;/code&gt;
&lt;li&gt;Add following lines to /etc/ssh/sshd_config&lt;/li&gt;
&lt;code&gt;
KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr
&lt;/code&gt;
&lt;li&gt;regenerate keys by &quot;ssh-keygen -A&quot;&lt;/li&gt;
&lt;li&gt;Restart sshd server by &quot;service sshd restart&quot;&lt;/li&gt;
&lt;li&gt;Reconnect from client by scp/ssh again.&lt;/li&gt;
&lt;li&gt;Reference&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://www.howtoforge.com/community/threads/enable-diffie-hellman-group1-sha1-on-jessie.70764/&quot;&gt;enable diffie-hellman-group1-sha1 on Jessie&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.openssh.com/legacy.html&quot;&gt;OpenSSH legancy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikibooks.org/wiki/OpenSSH/Logging_and_Troubleshooting&quot;&gt;OpenSSH/Logging and Troubleshooting&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/5775905295639837154/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2016/08/add-diffie-hellman-group1-sha1-back-to.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/5775905295639837154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/5775905295639837154'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2016/08/add-diffie-hellman-group1-sha1-back-to.html' title='Add diffie-hellman-group1-sha1 back to openssh-server (OpenSSH_7.2p2)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-389492598310259245</id><published>2016-03-14T15:55:00.000+08:00</published><updated>2016-03-17T16:32:08.560+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ipq806x"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Qualcomm"/><title type='text'>IPQ806X</title><content type='html'>&lt;ol&gt;&lt;li&gt;Enable scp access&lt;/li&gt;
&lt;ol&gt;&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt;sudo apt-get update
sudo apt-get install openssh-server
sudo ufw allow 22
&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;&lt;li&gt;Simple test script&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;copy command: &quot;scp username@192.168.1.100:/tftpboot/username/test.sh .&quot;&lt;/li&gt;
&lt;li&gt;execute command: &quot;source test.sh 2&gt;&amp;1 | tee test.log&quot;&lt;/li&gt;
&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt;#!/bin/sh

echo &quot;iperf testing&quot;
iperf -c 192.168.1.100 -t 30

echo &quot;Setting WiFi AP&quot;
uci set wireless.@wifi-device[0].disabled=0
uci set wireless.@wifi-device[0].hwmode=11ac
uci set wireless.@wifi-device[0].htmode=VHT80
uci set wireless.@wifi-device[0].channel=44
uci set wireless.@wifi-iface[0].ssid=AK_5G_1
uci set wireless.@wifi-device[1].disabled=0
uci set wireless.@wifi-device[1].hwmode=11ng
uci set wireless.@wifi-device[1].htmode=HT40
uci set wireless.@wifi-device[1].channel=6
uci set wireless.@wifi-iface[1].ssid=AK_2G
uci set wireless.@wifi-device[2].disabled=0
uci set wireless.@wifi-device[2].hwmode=11ac
uci set wireless.@wifi-device[2].htmode=VHT80
uci set wireless.@wifi-device[2].channel=44
uci set wireless.@wifi-iface[2].ssid=AK_5G_2
uci set wirelss; wifi

echo &quot;Testing nand-flash&quot;
lmdd if=/dev/mtd0 of=/tmp/test.bin bs=4096 count=1000
lmdd if=/tmp/test.bin of=/dev/mtd0 bs=4096 count=1000

echo &quot;Testing nor-flash&quot;
lmdd if=/dev/mtd12 of=/tmp/kernel.bin bs=4096
lmdd if=/tmp/kernel.bin of=/dev/mtd12 bs=4096

echo &quot;Testing LEDs&quot;
echo 1 &gt; /sys/class/leds/ap148:blue:status/brightness
echo 0 &gt; /sys/class/leds/ap148:white:status/brightness
sleep 3
echo 0 &gt; /sys/class/leds/ap148:blue:status/brightness
echo 1 &gt; /sys/class/leds/ap148:white:status/brightness
sleep 3
echo 1 &gt; /sys/class/leds/ap148:blue:status/brightness
echo 1 &gt; /sys/class/leds/ap148:white:status/brightness
sleep 3
echo 0 &gt; /sys/class/leds/ap148:blue:status/brightness
echo 0 &gt; /sys/class/leds/ap148:white:status/brightness

echo &quot;Press WPS before leaving&quot;
#just push wps, target will act WPS PUSH BUTTON EVENT DETECTED
#event_test /dev/input/event0

&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;&lt;li&gt;DDR3 speed calculation&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;equtation: vco = ref * (L + M/N)/(p*q)&lt;/li&gt;
&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; devmem2 0x00903184 0x4000042A  
 devmem2 0x00903188 0x10  
 devmem2 0x0090318c 0x19

 L = 0x2A, M=0x10, N=0x19  
 25M * (42 + 16/25)/(2*1) = 533 MHz  
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Reference document: 80_Y6477_22_IPQ806X_CLOCK_CONTROLLER_PROGRAMMING_REFERENCE.pdf&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/389492598310259245/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2016/03/ipq806x-relative.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/389492598310259245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/389492598310259245'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2016/03/ipq806x-relative.html' title='IPQ806X'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-2600311298683540092</id><published>2016-03-01T15:32:00.000+08:00</published><updated>2016-03-01T15:32:20.598+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><title type='text'>Merge git repositories from old ones.</title><content type='html'>&lt;ol&gt;&lt;li&gt;Merge git repositories from old ones.&lt;/li&gt;
&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; 
 # like to have git structure as below
 root ---&gt; for_uboot ---&gt; for_uboot_test1
      |              |--&gt; for_uboot_test2
      |--&gt; for_kernel ---&gt; for_kernel_test1
                      |--&gt; for_kernel_test2
 # clone empty repository as final target  
 ## add one file as init commit  
 # git checkout -b for_uboot  
 ## add one file for u_boot root  
 # git push origin for_uboot  
 # git remote add old_uboot git@github.com:xxxx/old_uboot_repository  
 # git fetch old_uboot  
 # git checkout -b for_uboot_test1  
 # git merge old_uboot/test1  
 # git push --set-upstream origin for_uboot_test1  
 # git checkout for_uboot     // add uboot_test2  
 # git checkout -b for_uboot_test2  
 # git merge old_uboot/test2  
 # git push --set-upstream origin for_uboot_test2  
 # git checkout master // add kernel  
 # git checkout -b for_kernel  
 ## add file to for_kernel root  
 # git remote add old_kernel git@github.com:xxxx/old_kernel_repository  
 # git fetch old_kernel  
 # git checkout -b for_kernel_test1  
 # git merge old_kernel/test1  
 # git push --set-upstream origin for_kernel_test1  
 # git checkout for_kernel // add old_test2  
 # git checkout -b for_kernel_test2  
 # git merge old_kernel/test2  
 # git push --set-upstream origin for_kernel_test2  
&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/2600311298683540092/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2016/03/merge-git-repositories-from-old-ones.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/2600311298683540092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/2600311298683540092'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2016/03/merge-git-repositories-from-old-ones.html' title='Merge git repositories from old ones.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-6013209889132628039</id><published>2016-02-17T13:13:00.001+08:00</published><updated>2016-02-23T13:04:37.827+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="u-boot"/><title type='text'>U-boot standalone application</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://www.denx.de/wiki/view/DULG/UBootStandalone&quot;&gt;U-Boot Standalone Applications&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.denx.de/wiki/U-Boot/Licensing&quot;&gt;U-Boot Licensing&lt;/a&gt;&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;NOTE! This license does not cover the so-called &quot;standalone&quot; applications that use U-Boot services by means of the jump table provided by U-Boot exactly for this purpose - this is merely considered normal use of U-Boot, and does not fall under the heading of &quot;derived work&quot; -- see file Licenses/Exceptions for details.&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;&lt;a href=&quot;https://casper.berkeley.edu/svn/trunk/roach/sw/uboot/doc/README.standalone&quot;&gt;Design Notes on Exporting U-Boot Functions to Standalone Applications&lt;/a&gt;&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;The functions are exported by U-Boot via a jump table.&lt;/li&gt;
&lt;li&gt;The pointer to the jump table is passed to the application in a machine-dependent way.&lt;/li&gt;
&lt;li&gt;The application should call the app_startup() function before any call to the exported functions.&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;If some functions are added before entry point, u-boot standalone application will not work normally. Using ${CROSS_COMPILE}nm to get the offset and run from it.&lt;/li&gt;
&lt;ol&gt;&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; $ ${CROSS_COMPILE}nm -n examples/hello_world  
 0000000000040004 T testfunc  
 0000000000040058 T hello_world  
 000000000004016c t dummy  
 ...  
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;&lt;a href=&quot;http://www.denx.de/wiki/view/DULG/MyStandaloneProgramDoesNotWork&quot;&gt;My standalone program does not work&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;&lt;a href=&quot;http://cholla.mmto.org/kyu/blog/booting/hello_uboot.html&quot;&gt;Build a u-boot standalone outside of u-boot&lt;/a&gt;&lt;/li&gt;
&lt;ol&gt;&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; # Makefile for simple standalone application  
 # to run under U-boot Tom Trebisky 4-15-2015  
 CCX = arm-linux-gnu-gcc  
 COPTS = -nostdinc -fno-builtin -Os -marm -march=armv7-a -I.  
 CC = $(CCX) $(COPTS)  
 # It is a bug that we cannot invoke gcc to do this,  
 # but doing this directly gets the job done.  
 LD = arm-linux-gnu-ld.bfd  
 BIN = arm-linux-gnu-objcopy -O binary  
 DUMP = arm-linux-gnu-objdump -d  
 all: hi.bin  
 install: hi.bin  
      cp hi.bin /var/lib/tftpboot/hello.bin  
 dump:     hi  
      $(DUMP) hi  
 version:  
      $(CC) --version  
 hi.o: hi.c  
      $(CC) -c hi.c  
 stubs.E: stubs.c  
      $(CC) -E stubs.c  
 stubs.s: stubs.c  
      $(CC) -S stubs.c  
 stubs.o: stubs.c  
      $(CC) -c stubs.c  
 hi: hi.o stubs.o  
      $(LD) -g -Ttext 0x80300000 -e hi_there -o hi hi.o stubs.o  
 hi.bin: hi  
      $(BIN) hi hi.bin  
 clean:  
      rm -f hi.o stubs.o hi hi.bin stubs.s stubs.E  
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;&lt;a href=&quot;http://cholla.mmto.org/kyu/blog/booting/hello_makefile&quot;&gt;make file sample&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;sample lds file as below&lt;/li&gt;
&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; OUTPUT_FORMAT(&quot;elf32-littlearm&quot;, &quot;elf32-littlearm&quot;, &quot;elf32-littlearm&quot;)  
 OUTPUT_ARCH(arm)  
 ENTRY(hello_world)  
 MEMORY  
 {  
   ram : ORIGIN = 0x42000000, LENGTH = 16M  
 }  
 SECTIONS  
 {  
   .text :  
   {  
     *(.text)  
     *(.rodata)  
     _etext = .;  
   } &amp;gt; ram  
   .data :  
   {  
     _data = .;  
     *(.data)  
     _edata = .;  
   } &amp;gt; ram  
   .bss :  
   {  
     __bss_start = .;  
     *(.bss)  
   } &amp;gt; ram  
   . = ALIGN(4);  
   __bss_end = .;  
   _end = .;  
 }  
&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;&lt;li&gt;Sample lds for u-boot standalone application&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://www.ele.uva.es/~jesus/hardware_empotrado/Compiler.pdf&quot;&gt;Sections and LDS sample&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;How to access global variables in standalone application&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;Sample command to load standalone application from u-boot as below&lt;/li&gt;
&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; set ipaddr 192.168.1.1  
 set serverip 192.168.1.100  
 tftpboot 0x42000000 hello_world.bin  
 go 0x42000000  
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Note the load address of command &quot;tftpboot 0x42000000 hello_world.bin&quot;&lt;/li&gt;
&lt;li&gt;Set &quot;${CROSS_COMPILE}ld -Ttext&quot; to tftp load address as &quot;${CROSS_COMPILE}ld -Ttext 0x42000000&quot;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Some useful references&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://balau82.wordpress.com/2010/02/28/hello-world-for-bare-metal-arm-using-qemu/&quot;&gt;Hello world for bare metal ARM using QEMU&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://balau82.wordpress.com/2010/03/10/u-boot-for-arm-on-qemu/&quot;&gt;U-boot for ARM on QEMU&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/6013209889132628039/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2016/02/u-boot-standalone-application.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/6013209889132628039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/6013209889132628039'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2016/02/u-boot-standalone-application.html' title='U-boot standalone application'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-7817079241919411151</id><published>2016-02-17T10:25:00.001+08:00</published><updated>2016-08-28T22:07:11.842+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="swimming"/><title type='text'>Swimming Articles</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://www.topswim.net/archiver/tid-113560.html&quot;&gt;水感的秘密&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.amath.nchu.edu.tw/teacher/hcwang/Swimmin_1.html&quot;&gt;蛙泳者如何克服自由式踢腳的夢魘&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/7817079241919411151/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2016/02/swimming-articles.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/7817079241919411151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/7817079241919411151'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2016/02/swimming-articles.html' title='Swimming Articles'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-3200952803170848119</id><published>2016-02-03T14:04:00.002+08:00</published><updated>2016-02-26T09:27:56.705+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="openwrt"/><title type='text'>Openwrt Relative Items</title><content type='html'>&lt;ol&gt;&lt;li&gt;How to partial build?&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;clean and rebuild kernel: &quot;make target/linux/{clean,compile} V=99&quot;&lt;/li&gt;
&lt;li&gt;rebuild kernel: &quot;make target/linux/compile V=99&quot;&lt;/li&gt;
&lt;li&gt;rebuild bootloader: &quot;make package/uboot-ipq806x/compile V=99&quot;&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;Notice, you can find following folder under package&lt;/li&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE_5TJVpkvICeOAiH4ZTy8s3sRy-hAxZMpi0lvTG0FEdb8TY60K8lW-X0qP7HCrmUmmwqTJ3zZDqZzpzYv0F8-4RHfprP-HHDUeI8fGt0NMGu2OBnPgST-0QEXCRaYw5PFRI9yUXGPdOo/s1600/test.jpeg&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE_5TJVpkvICeOAiH4ZTy8s3sRy-hAxZMpi0lvTG0FEdb8TY60K8lW-X0qP7HCrmUmmwqTJ3zZDqZzpzYv0F8-4RHfprP-HHDUeI8fGt0NMGu2OBnPgST-0QEXCRaYw5PFRI9yUXGPdOo/s320/test.jpeg&quot; /&gt;&lt;/a&gt; &lt;/ol&gt;&lt;li&gt;&lt;a href=&quot;https://wiki.openwrt.org/doc/howto/build&quot;&gt;OpenWrt build system – Usage&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;quilt&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://linuxocarina.blogspot.tw/2007/11/quilt-patches-script.html&quot;&gt;Quilt-Patches 整合 Script&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/3200952803170848119/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2016/02/openwrt-relative-items.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/3200952803170848119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/3200952803170848119'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2016/02/openwrt-relative-items.html' title='Openwrt Relative Items'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE_5TJVpkvICeOAiH4ZTy8s3sRy-hAxZMpi0lvTG0FEdb8TY60K8lW-X0qP7HCrmUmmwqTJ3zZDqZzpzYv0F8-4RHfprP-HHDUeI8fGt0NMGu2OBnPgST-0QEXCRaYw5PFRI9yUXGPdOo/s72-c/test.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-9218249273388613546</id><published>2015-10-02T16:43:00.002+08:00</published><updated>2015-10-02T16:48:09.707+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="opencv"/><title type='text'>OpenCV</title><content type='html'>&lt;ol&gt;&lt;li&gt;IplImage to Mat&lt;/li&gt;
&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; #include &quot;opencv2/highgui/highgui&quot;  
 #include &quot;opencv2/core/core_c.h&quot;  
 #include &amp;lt;iostream&amp;gt;  
 using namespace cv;  
 using namespace std;  
 void foo(void) {  
   IplImage *org_img;  
   Mat org_mat = cvarrToMat(org_img); // not copy, share memory  
   ...  
 }  
&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/9218249273388613546/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2015/10/opencv.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/9218249273388613546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/9218249273388613546'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2015/10/opencv.html' title='OpenCV'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-7306753133465687817</id><published>2015-09-22T16:23:00.003+08:00</published><updated>2016-01-27T14:43:42.823+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="yocto"/><title type='text'>Yocto Relative</title><content type='html'>&lt;ol&gt;&lt;li&gt;How to config DDR&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;Configure xlsx file, download from &lt;a href=&quot;https://community.freescale.com/docs/DOC-94917&quot;&gt;here&lt;/a&gt;, according to DDR chip&#39;s parameters.&lt;/li&gt;
&lt;li&gt;Copy all the data from Realiew.inc tab to an file, ddr.inc for example.&lt;/li&gt;
&lt;li&gt;Comment &quot;system /16 0x020bc000 = 0x30&lt;/li&gt;
&lt;li&gt;Follow stress test tool doc to perform the stress test.&lt;/li&gt;
&lt;li&gt;Write the result data back to u-boot.&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;How to add LEDS_PWM&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;Make sure the kernel configuration CONFIG_LEDS_PWM resp. CONFIG_LEDS_GPIO is enabled.&lt;/li&gt;
&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; pwmleds {  
   compatible = &quot;pwm-leds&quot;;  
   led1 {  
     label = &quot;test-green-led&quot;;  
     pwms = &amp;lt;&amp;amp;pwm1 1 5000000 0&amp;gt;; // frequency in ns  
     max-brightness = &amp;lt;255&amp;gt;;  
   };  
 };  
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;&lt;a href=&quot;http://developer.toradex.com/knowledge-base/pwm-(linux)&quot;&gt;PWM (Linux)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;i.mx6 pinctrl information&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt&quot;&gt;fsl,imx-pinctrl.txt&lt;/a&gt;&lt;/li&gt;
&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; Bits used for CONFIG:  
 NO_PAD_CTL(1 &amp;lt;&amp;lt; 31): indicate this pin does not need config.  
 SION(1 &amp;lt;&amp;lt; 30): Software Input On Field.  
 Force the selected mux mode input path no matter of MUX_MODE functionality. By default the input path is determined by functionality of the selected mux mode (regular).  
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;&lt;a href=&quot;http://developer.toradex.com/device-tree-customization&quot;&gt;Device Tree Customization&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;How to change kernel configuration?&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;steps&lt;/li&gt;
&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; $ bitbake linux-imx -c cleansstate  
 $ bitbake linux-imx -c menuconfig  
 &amp;lt;enable some configurations&amp;gt;  
 $ bitbake linux-imx -c diffconfig  
 $cp /mnt/data/imx6/fsl-release-bsp-3-10-53/build-x11/tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.10.53-r0/fragment.cfg ../sources/meta-xxx/recipes-kernel/linux/linux-imx/pci.cfg  
 &amp;lt;add following in bbappend file&amp;gt;  
 ...  
 SRC_URI += &quot;file://pci.cfg&quot;  
 ...  
 do_configure_append() {  
     #this is run from  
     #./tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.10.53-r0/git  
     cat ../*.cfg &amp;gt;&amp;gt; ${B}/.config  
 }  
 $ bitbake linux-imx -c cleansstate  
 $ bitbake -c configure -f linux-imx  
 $ bitbake -c compile -f linux-imx  
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;&lt;a href=&quot;https://community.freescale.com/thread/376369&quot;&gt;Changing the Kernel configuration for i.MX6 SABRE&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;How to add u-boot patches?&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;create layer (yocto-layer create imx6dlXXX)&lt;/li&gt;
&lt;li&gt;add layer to $(yocto)/sources/base/conf/bblayers.conf&lt;/li&gt;
&lt;li&gt;add LAYERDEPENDS_xxx = &quot;core fsl-arm fsl-arm-extra&quot; in $(layer)/conf/layer.conf&lt;/li&gt;
&lt;li&gt;get u-boot patches (git format-patch -X)&lt;/li&gt;
&lt;li&gt;create $(layer)/recipes-bsp/u-boot&lt;/li&gt;
&lt;li&gt;create u-boot-imx_2014.04.bbappend under $(layer)/recipes-bsp/u-boot/u-boot-imx/&lt;/li&gt;
&lt;code&gt; FILESEXTRAPATHS_prepend := &quot;${THISDIR}/${PN}-${PV}:&quot;   SRC_URI += &quot;file://0001-XXX.patch&quot; &lt;/code&gt;
&lt;li&gt;create folder under $(layer)/recipes-bsp/u-boot/u-boot-imx-2014.04 and copy all patches to here&lt;/li&gt;
&lt;li&gt;bitbake -c compile u-boot-imx -f&lt;/li&gt;
&lt;li&gt;bitbake -c deploy u-boot-imx&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Using BB to copy files (sample.bb)&lt;/li&gt;
&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; DESCRIPTION = &quot;Copies files to the image&quot;  
 LICENSE = &quot;CLOSED&quot;  
 FILESEXTRAPATHS_prepend := &quot;${THISDIR}/files:&quot;  
 SRC_URI += &quot;file://myLib1.bin&quot;  
 SRC_URI += &quot;file://myLib2.bin&quot;  
 S = &quot;${WORKDIR}&quot;  
 do_install() {  
  install -v -d ${D}lib/firmware/brcm/  
  install -m 755 myLib1.bin ${D}/lib/firmware/brcm/myLib1.bin  
  install -m 755 myLib2.bin ${D}/lib/firmware/brcm/myLib2.bin  
 }  
PACKAGE_ARCH_mx6 = &quot;${MACHINE_ARCH}&quot;    
&lt;/code&gt;&lt;/pre&gt;&lt;li&gt;Add package to specific image in conf/local.conf&lt;/li&gt;
&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; IMAGE_INSTALL_append += &quot;sample&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://lists.yoctoproject.org/pipermail/yocto/2014-July/020444.html&quot;&gt;Intel copy files sample&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-edison/tree/meta-intel-edison-bsp/recipes-support/edison-mcu/mcu-fw-bin_0.1.bb&quot;&gt;Intel copy file sample&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-edison/tree/meta-intel-edison-bsp/recipes-kernel/bcm43340-bt/bcm43340-bt_1.0.bb&quot;&gt;Compile brcm_patchram_plus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://community.freescale.com/docs/DOC-94967&quot;&gt;i.MX Yocto Project: How do I add an existing package to an image?&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Useful commands&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;Check all available recipes&lt;/li&gt;
&lt;code&gt;bitbake-layers show-recipes &quot;*-image-*&quot;&lt;/code&gt; &lt;/ol&gt;&lt;li&gt;Add Crosswalk to Yocto project&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://www.yoctoproject.org/blogs/jefro/2014/crosswalk-now-available-yocto-project&quot;&gt;Reference Link&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;&lt;a href=&quot;http://www.imx6rex.com/software/how-to-add-support-for-a-custom-board-into-yocto/&quot;&gt;Reference: Support customer board&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;FAQs&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;How to fix: Make[1]: Execvp: printf: Argument list too long&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;To solve this problem, be sure ‘pwd’ command prints less than 50 characters in your shell when you are in yocto-build folder.&lt;/li&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQq8F5l6uIfZKY8NhoPmtAm-d0eRQHnfzLZXLWlH7fsj8V3fZSewZqyzDpLAwTkir26_kiU2V5_7oy46raXU28zvmSxdNGhWqhp-m6M17aCXV4y2Ujplb0_tBwI1o742a5ae_APVJq6ME/s1600/Screenshot+from+2016-01-14+11%253A49%253A52.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQq8F5l6uIfZKY8NhoPmtAm-d0eRQHnfzLZXLWlH7fsj8V3fZSewZqyzDpLAwTkir26_kiU2V5_7oy46raXU28zvmSxdNGhWqhp-m6M17aCXV4y2Ujplb0_tBwI1o742a5ae_APVJq6ME/s320/Screenshot+from+2016-01-14+11%253A49%253A52.png&quot; /&gt;&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;http://air.imag.fr/images/0/0d/DIY_Yocto.pdf&quot;&gt;Reference&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/7306753133465687817/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2015/09/yocto-relative.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/7306753133465687817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/7306753133465687817'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2015/09/yocto-relative.html' title='Yocto Relative'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQq8F5l6uIfZKY8NhoPmtAm-d0eRQHnfzLZXLWlH7fsj8V3fZSewZqyzDpLAwTkir26_kiU2V5_7oy46raXU28zvmSxdNGhWqhp-m6M17aCXV4y2Ujplb0_tBwI1o742a5ae_APVJq6ME/s72-c/Screenshot+from+2016-01-14+11%253A49%253A52.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-3685960371635970004</id><published>2015-07-01T10:19:00.000+08:00</published><updated>2015-07-15T15:48:30.861+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithm"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><title type='text'>Codility Test</title><content type='html'>&lt;ol&gt;&lt;li&gt;Lesson 1: Time Complexity&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demo7XVRKX-65Y/&quot;&gt;TapeEquilibrium&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demoACAVWH-FNC/&quot;&gt;FrogJmp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demoAPRX9G-M8K/&quot;&gt;PermMissingElem&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Lesson 2: Counting elements&lt;/li&gt;
&lt;li&gt;Lesson 3: Prefix sums&lt;/li&gt;
&lt;li&gt;Lesson 4: Sorting&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=https://codility.com/demo/results/demo33WAND-S32/&gt;Distinct&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Lesson 5: Stacks and queues&lt;/li&gt;
&lt;li&gt;Lesson 6: Leaders&lt;/li&gt;
&lt;li&gt;Lesson 7: Maximum slice sum&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demoCCYJZH-NN2/&quot;&gt;MaxSliceSum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demoFET647-DA7/&quot;&gt;MaxProfit&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Lesson 8: Prime and composite numbers&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demoTHV7UY-64A/&quot;&gt;CountFactors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demoZXTRA9-AEV/&quot;&gt;MinPerimeterRectangle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demoQVTQ4B-QDV/&quot;&gt;Peaks (need to refine)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;&quot;&gt;Flags (not finish yet)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Lesson 9: Sieve of Eratosthenes&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;CountSemiprimes&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demo7EV476-MYU/&quot;&gt;CountNonDivisible (need to refine by sieve)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Lesson 10: Euclidean algorithm&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;ChocolatesByNumbers&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demo8MS6H9-REX/&quot;&gt;100% with &quot;gcd by dividing&quot;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demoGVHEXP-SHQ/&quot;&gt;87%&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demoW8F3RY-RMP/&quot;&gt;75%&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;CommonPrimeDivisors&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Lesson 11: Fibonacci numbers&lt;/li&gt;
&lt;li&gt;Lesson 12: Binary search algorithm&lt;/li&gt;
&lt;li&gt;Lesson 13: Caterpillar method&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;AbsDistinct&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href = &quot;https://codility.com/demo/results/demoPC9B73-K7H/&quot;&gt;100% --&gt; change abs() to labs() to avoid overflow.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demoBXT5Q4-6PS/&quot;&gt;92%&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demoAYWY3R-7CH/&quot;&gt;78%&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;CountDistinctSlices&lt;/li&gt;
&lt;li&gt;MinAbsSumOfTwo&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demoEM6DP3-WXG/&quot;&gt;45%, double for loop&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;CountTriangles&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://codility.com/demo/results/demoRW7BGV-FBR/&quot;&gt;72%&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;li&gt;Lesson 14: Greedy algorithms&lt;/li&gt;
&lt;li&gt;Lesson 15: Dynamic programming&lt;/li&gt;
&lt;li&gt;Lesson 99: Future training&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/3685960371635970004/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2015/07/codility-test.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/3685960371635970004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/3685960371635970004'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2015/07/codility-test.html' title='Codility Test'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-816771801745298878</id><published>2015-06-27T12:24:00.000+08:00</published><updated>2015-06-27T12:33:21.748+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithm"/><category scheme="http://www.blogger.com/atom/ns#" term="prefix_sum"/><title type='text'>Algorithm</title><content type='html'>&lt;ol&gt;&lt;li&gt;prefix sum&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;sequence of numbers: {4, 2, 2, 5, 1, 5, 8}&lt;/li&gt;
&lt;li&gt;prefix sum: {4, 6, 8, 13, 14, 19, 27}&lt;/li&gt;
&lt;li&gt;calculate sum between i, j&lt;/li&gt;
&lt;pre  style=&quot;font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn9Egmz__3dkzyVSDhjlJdMWW4H204RJ5u4csMjBV5rqUtPmIefLOq0m5I327WBfkobAI_VuxU4o4Lf7_vVJCuWdAn4SEgFOtMwmPSBWT3aJVUW3QO1sRCgr4qrH5e2OI925CtygWQJqoK/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;&quot;&gt;&lt;code style=&quot;color:#000000;word-wrap:normal;&quot;&gt; int A[7] = {4, 2, 2, 5, 1, 5, 8};  
 int prefix_sum[7];  
 void calc_prefix_sum(void)  
 {  
   int i;  
   prefix_sum[0] = A[0];  
   for(i=1; i&amp;amp;lt;7; i++)  
     prefix_sum[i] = prefix_sum[i-1] + A[i];  
 }  
 int difference(int i, int j)  
 {  
   if(i == 0)  
     return prefix_sum[j];  
   return prefix_sum[j] - prefix_sum[i-1];  
 }  
&lt;/code&gt;&lt;/pre&gt;&lt;/ol&gt;&lt;li&gt;Reference&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://www.csie.ntnu.edu.tw/~u91029/Sequence.html&quot;&gt;演算法筆記&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/816771801745298878/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2015/06/algorithm.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/816771801745298878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/816771801745298878'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2015/06/algorithm.html' title='Algorithm'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1440094132233562658.post-4345909209723354767</id><published>2015-06-17T17:55:00.002+08:00</published><updated>2015-06-17T17:56:25.426+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Renesas"/><title type='text'>SH-2A_Media_SDK_v2.03.00 sample</title><content type='html'>&lt;ol&gt;&lt;li&gt;sh7269 memory map sample&lt;/li&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZcbt78MKukgfbD3qhHPDQiP-MrPNNNHXYBoE9L-ZlRGM_EXYorSHv34r_wM3BdanomlrCfNBYAIjt_rrsZULMD0GuUQskkxKL3ZLsI_GM3IJinooZo6KO1ro_Dj9t4iKdSZRKVuavGxA/s1600/sh7269_memory_map.jpg&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZcbt78MKukgfbD3qhHPDQiP-MrPNNNHXYBoE9L-ZlRGM_EXYorSHv34r_wM3BdanomlrCfNBYAIjt_rrsZULMD0GuUQskkxKL3ZLsI_GM3IJinooZo6KO1ro_Dj9t4iKdSZRKVuavGxA/s320/sh7269_memory_map.jpg&quot; /&gt;&lt;/a&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://shmichen.blogspot.com/feeds/4345909209723354767/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://shmichen.blogspot.com/2015/06/sh-2amediasdkv20300-sample.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/4345909209723354767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1440094132233562658/posts/default/4345909209723354767'/><link rel='alternate' type='text/html' href='http://shmichen.blogspot.com/2015/06/sh-2amediasdkv20300-sample.html' title='SH-2A_Media_SDK_v2.03.00 sample'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZcbt78MKukgfbD3qhHPDQiP-MrPNNNHXYBoE9L-ZlRGM_EXYorSHv34r_wM3BdanomlrCfNBYAIjt_rrsZULMD0GuUQskkxKL3ZLsI_GM3IJinooZo6KO1ro_Dj9t4iKdSZRKVuavGxA/s72-c/sh7269_memory_map.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>