Skip to content

Instantly share code, notes, and snippets.

## Starting application at 0x10800000 ...
PC=0x10800024
SP=0xff34fd70
CPSR=0x600001d3
<cortex_init>@ABC12-</cortex_init>
<mmu_init_table></mmu_init_table>
<arm_cpuinit>FG01H1IJKLM</arm_cpuinit>
@ABC12-FG01H1IJKLM@ABC12-FG01H1IJKLM@ABC12-FG01H1IJKLM
MULTIPROCESSOR hatched!
jump to start()
@ryo
ryo / gist:2991b4196a70fe126467
Created January 9, 2015 08:47
tcpdump quick response patch
Index: tcpdump.c
===================================================================
RCS file: /cvsroot/src/external/bsd/tcpdump/dist/tcpdump.c,v
retrieving revision 1.10
diff -a -u -p -r1.10 tcpdump.c
--- tcpdump.c 21 Nov 2014 13:31:19 -0000 1.10
+++ tcpdump.c 9 Jan 2015 08:46:38 -0000
@@ -1533,7 +1533,7 @@ main(int argc, char **argv)
error("%s: Can't set monitor mode: %s",
device, pcap_statustostr(status));
@ryo
ryo / itoa.c
Last active August 29, 2015 14:23
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
inline int
my_log10(uint64_t n)
{
if (n < 10000000000000000ULL) {
@ryo
ryo / defcheck.20160210.log
Created February 10, 2016 07:47
defcheck for netbsd-src
# Wed Feb 10 02:09:51 2016
#
# commandline: ./defcheck.pl -v /usr/src
#
sys/arch/acorn26/acorn26/cpu.c:54: reference 'CPU_ARM2' but not include opt_cputypes.h (defined in sys/arch/arm/conf/files.arm)
sys/arch/acorn26/acorn26/cpu.c:94: reference 'CPU_ARM2' but not include opt_cputypes.h (defined in sys/arch/arm/conf/files.arm)
sys/arch/acorn26/acorn26/cpu.c:168: reference 'CPU_ARM2' but not include opt_cputypes.h (defined in sys/arch/arm/conf/files.arm)
sys/arch/acorn26/acorn26/cpu.c:282: reference 'CPU_ARM2' but not include opt_cputypes.h (defined in sys/arch/arm/conf/files.arm)
sys/arch/acorn26/acorn26/cpu.c:102: reference 'CPU_ARM250' but not include opt_cputypes.h (defined in sys/arch/arm/conf/files.arm)
sys/arch/acorn26/acorn26/cpu.c:282: reference 'CPU_ARM250' but not include opt_cputypes.h (defined in sys/arch/arm/conf/files.arm)
@ryo
ryo / gist:509513ff56a75a45a05a
Created February 10, 2016 19:14
BUG: curses getch() with high frequency SIGALRM on FreeBSD
#include <stdio.h>
#include <signal.h>
#include <curses.h>
#include <string.h>
#include <sys/time.h>
//#define USE_ALARM
void
sigalrm(int signo)
@ryo
ryo / bootmsg.txt
Last active March 31, 2016 06:09
NetBSD/imx7 boot
U-Boot 2014.04-at1 (Mar 22 2016 - 16:50:23)
CPU: Freescale i.MX7D rev1.1 at 792 MHz
CPU: Temperature: can't get valid data!
Reset cause: POR
I2C: ready
DRAM: 512 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
SF: Detected N25Q64 with page size 256 Bytes, erase size 4 KiB, total 8 MiB
In: serial
@ryo
ryo / imx7.diff
Last active May 6, 2016 05:44
netbsd-imx7.diff
diff --git a/etc/etc.evbarm/Makefile.inc b/etc/etc.evbarm/Makefile.inc
index dd2d701..b7ceedb 100644
--- a/etc/etc.evbarm/Makefile.inc
+++ b/etc/etc.evbarm/Makefile.inc
@@ -105,6 +105,8 @@ EVBARM_BOARDS.armv7hf+= HUMMINGBIRD_A31
#EVBARM_BOARDS.armv7+= IGEPV2
EVBARM_BOARDS.armv7+= TEGRA
EVBARM_BOARDS.armv7hf+= TEGRA
+EVBARM_BOARDS.armv7+= ARMADILLO-IOT-G3
+EVBARM_BOARDS.armv7hf+= ARMADILLO-IOT-G3
cvs -q diff -aU8
Index: sdmmc_mem.c
===================================================================
RCS file: /src/cvs/cvsroot-netbsd/src/sys/dev/sdmmc/sdmmc_mem.c,v
retrieving revision 1.51
diff -a -U 8 -r1.51 sdmmc_mem.c
--- sdmmc_mem.c 13 Mar 2016 09:12:16 -0000 1.51
+++ sdmmc_mem.c 5 Aug 2016 07:19:44 -0000
@@ -958,32 +958,34 @@
} else if (ISSET(sc->sc_caps, SMC_CAPS_4BIT_MODE)) {
@ryo
ryo / netbsd-mt7688
Created September 19, 2016 18:17
dmesg of NetBSD/LinkIt Smart 7688 Duo
U-Boot 1.1.3 (Sep 10 2015 - 05:56:31)
Board: Ralink APSoC DRAM: 128 MB
relocate_code Pointer at: 87f68000
******************************
Software System Reset Occurred
******************************
flash manufacture id: c2, device id 20 19
find flash: MX25L25635E
============================================
@ryo
ryo / gethostbyname2_inet6.c
Created December 9, 2016 10:29
gethostbyname2 test
#include <stdio.h>
#include <sys/socket.h>
#include <netdb.h>
int
main(int argc, char *argv[])
{
static struct hostent h_ent;
static char h_buf[16384];
struct hostent *hent;