Skip to content

Instantly share code, notes, and snippets.

@adukot
adukot / C.H.I.P. u-boot printenv
Created November 27, 2016 17:02
C.H.I.P. u-boot printenv
=> printenv
baudrate=115200
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=fel usb0 pxe dhcp
bootargs=root=ubi0:rootfs rootfstype=ubifs rw earlyprintk ubi.mtd=4
bootcmd=echo CHIP ID: chip-${serial#} ;gpio set PB2; if test -n ${fel_booted} && test -n ${scriptaddr}; then echo (FEL boot); source ${scriptaddr}; fi; mtdparts; ubi part UBI; ubifsmount ubi0:rootfs; ubifsload $fdt_addr_r /boot/sun5i-r8-chip.dtb; ubifsload $kernel_addr_r /boot/zImage; setenv bootargs $bootargs $kernelarg_video; bootz $kernel_addr_r - $fdt_addr_r
@adukot
adukot / C.H.I.P. booting
Created November 27, 2016 16:16
C.H.I.P. booting
=> loadb 40000000
## Ready for binary (kermit) download to 0x40000000 at 115200 bps...
## Total Size = 0x00495914 = 4806932 Bytes
## Start Addr = 0x40000000
=> go 40000000
## Starting application at 0x40000000 ...
@B
@adukot
adukot / NetBSD最初にやること
Created November 26, 2016 14:41
NetBSD最初にやること
ディスクがめっちゃでかくなるので8Gのディスクにシステムを入れて、pkgsrcやsrcは別ディスクにするとよい。
肥大化したときに別ディスクにコピーするだけでサイズを小さくできる。そうしないとゼロで埋めてVMwareでディスクの最適化とかめんどくさい。
/boot.cfgにvesa 1280x800x16とか入れると画面広々でよいね。
そもそもi386でやるとTransbook Chiにもっていきやすい。
@adukot
adukot / C.H.I.P. UART
Created November 26, 2016 10:09
C.H.I.P. UART
Allwinner R8 memory map
UART0 : 0x01C2 8000
UART1 : 0x01C2 8400 <- bingo!
---
u-boot challenge
---
=> md.l 01c28000
01c28000: 00000000 00000000 00000000 00000000 ................
@adukot
adukot / C.H.I.P Linux boot message
Created November 26, 2016 09:55
C.H.I.P. Linux boot message
=> boot
CHIP ID: chip-162542100a40bb44
Command 'gpio' failed: Error -22
device nand0 <sunxi-nand.0>, # parts = 5
#: name size offset mask_flags
0: spl 0x00400000 0x00000000 0
1: spl-backup 0x00400000 0x00400000 0
2: uboot 0x00400000 0x00800000 0
3: env 0x00400000 0x00c00000 0
@adukot
adukot / C.H.I.P. u-boot commands
Created November 26, 2016 09:55
C.H.I.P u-boot commands
U-Boot SPL 2016.01-00088-g99c771f (Sep 09 2016 - 22:51:38)
DRAM: 512 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from NAND
U-Boot 2016.01-00088-g99c771f (Sep 09 2016 - 22:51:38 +0000) Allwinner Technology
CPU: Allwinner A13 (SUN5I)
I2C: ready
@adukot
adukot / LinkIt Smart 7688 NetBSD evbmips WIP
Created July 27, 2016 17:53
LinkIt Smart 7688 NetBSD/evbmips WIP
Index: sys/arch/evbmips/conf/LINKITSMART
===================================================================
RCS file: sys/arch/evbmips/conf/LINKITSMART
diff -N sys/arch/evbmips/conf/LINKITSMART
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ sys/arch/evbmips/conf/LINKITSMART 27 Jul 2016 17:19:21 -0000
@@ -0,0 +1,253 @@
+# $NetBSD: ZYXELKX,v 1.6 2015/08/07 14:12:04 maxv Exp $
+
+include "arch/evbmips/conf/std.rasoc"
@adukot
adukot / Onion Omega serial test
Created May 21, 2016 07:26
Onion Omega serial test
ar7240> mm 18020000
18020000: 00000230 ? 240
@18020004: 00004388 ? .
ar7240> mm.b 18020000
18020000: 00 ?
18020001: 00 ?
18020002: 02 ?
18020003: 0d ? 40
@18020004: 00 ?
@adukot
adukot / Onion Omega U-boot info
Created May 21, 2016 07:18
Onion Omega U-boot info
ar7240> help
reset - Perform RESET of the CPU
? - alias for 'help'
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootm - boot application image from memory
cp - memory copy
erase - erase FLASH memory
help - print online help
md - memory display
@adukot
adukot / Onion Omega booting
Created May 21, 2016 07:15
Onion Omega booting
U-Boot 1.1.4 (Aug 28 2015 - 16:51:26)
AP121 (ar9331) U-boot
DRAM: 64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 140k for U-Boot at: 83fdc000
Reserving 192k for malloc() at: 83fac000
Reserving 44 Bytes for Board Info at: 83fabfd4
Reserving 36 Bytes for Global Data at: 83fabfb0