èæ¯
SoC Allwinner A10ã§ã¿ãã¬ãããè³Œå ¥ããŸããïŒ sun4iã¯ãA8ã³ã¢ãã¡ããªã®Cortexã¢ãŒããã¯ãã£ã®AllWinner A10 ARMv7-Aããã»ããµã®ã³ãŒãåã§ã ïŒã æåã¯Android 2.xã§ã次ã«4.xã§ãã¬ã€ããŸããããæéãçµã€ã«ã€ããŠååã§ã¯ãªããªããŸããã ããã«ãLinuxãæèŒãããã®SoCã«åºã¥ãããã³ã³ãã¥ãŒã¿ãŒãçç£ãéå§ããŸããã ãããŒããç§ã®ã¿ãã¬ããããæªãããšã¯äœã ããïŒããšæããããžãã¹ã«åãããããŸããã å€æããããã«ããã¹ãŠããã§ã«ç§ã®ããã«è¡ãããŠãããç©äºãè¡ãå¿ èŠã¯ãããŸããã§ãã ïŒ
- ã«ãŒãã«ã¯ãã®ãã©ãããã©ãŒã çšã«æé©åãããŠããŸãã
- ãã®ãã©ãããã©ãŒã çšã«æé©åãããããŒãããŒããŒ
- æ°ããdebian armhfããŒãããªãªãŒã¹ãããŸãã ã
ãã®å šäœãæ§æãããçµã¿ç«ãŠããããŸãŸã§ãã
æ°Žææ¥
ã·ã¹ãã -ArchLinux x86-64ã ã¢ã»ã³ããªçšã®ç°å¢ã®å Žæãšã€ã³ã¹ããŒã«æ¹æ³ã«ã€ããŠã¯èª¬æããŸããããã€ã³ã¿ãŒãããäžã§ã¯ãã®æ å ±ã§ååã§ãã ã¯ãããããŠããã®ã»ãšãã©ãçç±ã§ã¯ãªããç§ã¯å¿ èŠãªãã®ãã¹ãŠãéããããŸãã
ç§ã®ãå°æãã¯ããã§ãïŒ
- qemu-user-static -rootfsã§chrootã§ããããã«ããããã«æ åœè ãããªãã£ããããdebianãªããžããªããããã±ãŒãžãååŸããŠåéããå¿ èŠããããŸããã ãã®ãã¹ãŠããç°ãªãã¢ãŒããã¯ãã£ã®ãã·ã³ïŒãã®å Žåã¯ç§ã®ãã·ã³ïŒã§arm elfå®è¡å¯èœãã¡ã€ã«ãå®è¡ããããã«å¿ èŠã§ãã
- gccããŒãžã§ã³4.6.1ïŒ Sourcery CodeBench Lite 2011.09-70ïŒ-GCC ARMã¯ãã¹ã³ã³ãã€ã©ãŒã å€ããã®ãããããŸãããããŸã ç§ã倱æãããŸããã linaroã®æ°ããã¯ãã¹ã³ã³ãã€ã©ã䜿çšããããšããå§ãããŸãã
SoCããŒãããã»ã¹
- bromïŒmmcãnandãusbã§boot0ãšåŒã°ããããŒãããŒããŒãæ¢ããŸãïŒSPL-2çªç®ã®ããã°ã©ã ããŒããŒïŒsun4i-spl.binïŒã
- boot0 ïŒSPL-2çªç®ã®ããã°ã©ã ããŒããŒïŒsun4i-spl.binïŒã¯ããã€ã¹ãåæåããŸã
- SPL ïŒboot0ïŒã¯u-bootïŒboot1ïŒãèµ·åããŸã
- u-boot ïŒboot1ïŒã¯æ®ãã®ããã€ã¹ãåæåããããŒããŠã§ã¢ãæäœããããã®æœè±¡åãäœæããŸã
- initrdã®ãããªu-bootã®æšªã«ããŒããŠã§ã¢æ§æãã¡ã€ã«ïŒscript.binãEvb.binãmele.bin sys_config.binïŒãããŒãããŸãã
- u-bootã¯ã«ãŒãã«ãããŒãããŸãã
ã€ãŸã ããŠã³ããŒãã¯SDã«ãŒãããéå§ãããããã«ããŒãããŒããŒããªãå Žåã¯ãNANDãã©ãã·ã¥ãç¶è¡ãããŸãã
allwinner-ubootããŒãããŒããŒã®ããã¥ã¡ã³ãã«ãããšãSDã«ãŒãã®æ§é ã¯æ¬¡ã®ããã«ãªããŸãã
å§ãŸã | ãµã€ãº | 説æ |
0 | 8KB | æªäœ¿çšãããŒãã£ã·ã§ã³ããŒãã«ãªã©ã«äœ¿çšå¯èœ |
8 | 24KB | åæSPLããŒã㌠|
32 | 512KB | u-boot |
544 | 128KB | ç°å¢ |
672 | 352KB | äºçŽæžã¿ |
1024 | ããŒãã£ã·ã§ã³ã¯ç¡æ |
U-bootã¢ã»ã³ããª
åéããå¿ èŠã¯ãããŸãããsun4i-spl.binu-boot.binã¯ããããããŠã³ããŒãã§ããŸã ã
uboot-allwinnerããã«ãããŸãã
git clone git://github.com/hno/uboot-allwinner cd uboot-allwinner make sun4i CROSS_COMPILE=arm-none-linux-gnueabi- cd ..
ããŒãããŒããŒãšã³ããª
泚æãSDã«ãŒãããã€ã¹ãä»ã®ã¡ãã£ã¢ãšæ··åããªãããã«æ³šæããŠãã ããã èªåãäœãããŠããã®ãç解ããŠããªããªããããããã£ãšè¯ãããªãã§ãã ããã
$ {SD}-ããã€ã¹å€æ°ãæåã§çœ®æã§ããå®è¡åã«ç»é²ã§ããŸãã
export SD=/dev/sdb
# SPL (boot0) SD dd if=uboot-allwinner/spl/sun4i-spl.bin of=${SD} bs=1024 seek=8 conv=notrunc # (boot1) u-boot SD dd if=uboot-allwinner/u-boot.bin of=${SD} bs=1024 seek=32 conv=notrunc
microSDãã©ã€ããå£ããŸã
泚æãæäœã®çµæãšããŠãMicroSDãã©ã€ãäžã®ããŒã¿ã¯å€±ãããå¿ èŠãªãã®ã¯ãã¹ãŠå®å šãªå Žæã«ä¿åãããŸãã
- å¿ ã2ã€ã®ã»ã¯ã·ã§ã³ãäœæããå¿ èŠããããŸãã
- æåã®ã»ã¯ã·ã§ã³ã¯ãéã®æ§æãã¡ã€ã«ïŒevb.binïŒãšã«ãŒãã«ïŒuImageïŒãå«ãã»ã¯ã·ã§ã³ã§ãã ã»ã¯ã¿2048ããå§ãŸãããµã€ãºã32MBã100MBã§ãFATãã¡ã€ã«ã·ã¹ãã ïŒFATããŒãã£ã·ã§ã³ã¿ã€ãïŒãŸãã¯ext2 / 3ïŒããŒãã£ã·ã§ã³83ã¿ã€ãïŒãå¿ èŠã§ãã
- 2çªç®ã®ããŒãã£ã·ã§ã³ã¯rootfsããŒãã£ã·ã§ã³ã§ãã·ã¹ãã å šäœã§ããããŒãã£ã·ã§ã³ãµã€ãºã1GBã4GB以å ã«ããããšãæãŸããã§ãããã¡ã€ã«ã·ã¹ãã ã¯å³å¯ã«ext4ã§ãããŒãã£ã·ã§ã³ã¿ã€ãã¯83ã§ãã
- å¿ èŠã«å¿ããŠãå¥ã®ã¹ã¯ããã»ã¯ã·ã§ã³ãäœæã§ããŸãã
- æ®ãã®ã¹ããŒã¹ãèªåã§äœ¿çšããŠãã ããã ããŒã¿çšã®ã»ã¯ã·ã§ã³ãäœæããŸããã/home/ã«ããŠã³ãã§ããŸã
16GBã«ãŒããå£ããæ¹æ³ã¯æ¬¡ã®ãšããã§ãã
fdisk -l /dev/sdb Disk /dev/sdb: 15.9 GB, 15935209472 bytes 64 heads, 32 sectors/track, 15197 cylinders, 31123456 Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000728ca - Id /dev/sdb1 2048 34815 16384 83 Linux /dev/sdb2 34816 6326271 3145728 83 Linux /dev/sdb3 6326272 31123455 12398592 83 Linux
äžèšã®ãã€ã³ãã«åŸã£ãŠãMicroSDãã©ã€ããç ŽæããŸãã
Linuxã䜿çšãã人ãfdiskã䜿çšã§ããããšãé¡ã£ãŠããŸãã
fdisk ${SD}
æžåŒèšå®ïŒ
mkfs.vfat ${SD}1 -n sun4i-boot mkfs.ext4 ${SD}2 -L sun4i-rootfs
é©åãªå Žæã«ããŠã³ãããŸãã
mkdir /mnt/sun4i-boot mkdir /mnt/sun4i-rootfs mount ${SD}1 /mnt/sun4i-boot mount ${SD}2 /mnt/sun4i-rootfs
ã«ãŒãã«ã¢ã»ã³ããª
ã«ãŒãã«ãã³ã³ãã€ã«ã§ããŸãããäžã®ã¢ãžã¥ãŒã«ã䜿çšããŠæ¢è£œã®ã«ãŒãã«ãæ·»ä»ããŸããã
# git clone git://github.com/amery/linux-allwinner.git # cd linux-allwinner make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- sun4i_defconfig # make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- gconfig
gconfigã®ä»£ããã«ãxconfigïŒqtã€ã³ã¿ãŒãã§ã€ã¹ïŒãŸãã¯menuconfigïŒã³ã³ãœãŒã«ã€ã³ã¿ãŒãã§ã€ã¹ïŒã®ãã€ã¹ãã䜿çšã§ããŸãã ã«ãŒãã«ã«å¿ èŠãªãã©ã€ããŒãšå¿ èŠãªæ©èœãå«ããããšãå¿ããªãã§ãã ããã ãªãã·ã§ã³ã®ãã³ãããèªã¿ãã ããã
ã¿ããã¹ã¯ãªãŒã³ã¢ãžã¥ãŒã«ãšfsïŒfatãntfsïŒãå¿ããªãã§ãã ããã
# make ARCH=arm CFLAGS="march=armv7-a -mfloat-abi=hard -mfpu=neon -ftree-vectorize -mvectorize-with-neon-quad -mcpu=cortex-a8 -mtune=cortex-a8 -mthumb -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -ffast-math" CROSS_COMPILE=arm-none-linux-gnueabi- -j3 uImage modules # make ARCH=arm CFLAGS="march=armv7-a -mfloat-abi=hard -mfpu=neon -ftree-vectorize -mvectorize-with-neon-quad -mcpu=cortex-a8 -mtune=cortex-a8 -mthumb -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -ffast-math" CROSS_COMPILE=arm-none-linux-gnueabi- -j3 INSTALL_MOD_PATH=/mnt/sun4i-rootfs # boot cp arch/arm/boot/uImage /mnt/sun4i-boot
-jåŒæ°ã¯ãåæã³ã³ãã€ã«ã¹ã¬ããã®æ°ãæå®ããŸãã ããã»ããµã®ã³ã¢ãããã¹ã¬ããã1ã€å€ãããšãå®éšçã«ç¢ºç«ãããŸããã
æé©åãã©ã°ã¯ValdikSSã®èšäºããååŸãããŸã ã æ£çŽãªãšãããã«ãŒãã«ã¯ãããã§ã³ã³ãã€ã«ãããŸããã ãã ããSDãã©ãã·ã¥ã«ãŒãã«ã¯ãŸã ã€ã³ã¹ããŒã«ããŠããŸããã
rootfsãã€ã³ã¹ããŒã«ãã
debootstrapã䜿çšããŠåærootfsãããŒãããæ¹æ³ã«ã€ããŠã¯èª¬æããŸãããããã¯å¥ã®èšäºã«å€ããããã§ãã æ¢è£œã®Debian Wheezy ARMHF rootfsãé 眮ããæ¹ãè¯ãã§ãããã
u-bootã¯ããã©ã«ãã§ãã®ããã«èšå®ãããŠãããããrootfsã¯2çªç®ã®SDããŒãã£ã·ã§ã³ã«ä¿åãããŠããå±æ§ã§è§£åããå¿ èŠããããŸãïŒèšå®ã«ã€ããŠã¯ãã¡ããåç §ããŠãã ããïŒ ã
Debian Wheezy RootfsãããŠã³ããŒãããŠè§£åããŸãã
tar -xpf debian-wheezy-armhf-rootfs.img.tar.bz2 -C /mnt/sun4i-boot
ãšããã§ãã«ãŒãã«3.0.36+ãžã®ã¢ãžã¥ãŒã«ããããŸãã ãŸãããŠãŒã¶ãŒuserãnetwork-managerãnm-appletã®èªåããŒããåããã¹ãªã ãªlxdeãã»ãã·ã§ã³ã®éå§æã«éå§ãããŸãã ã¿ããã¹ã¯ãªãŒã³ã¯ã¿ãããããã¢ãŒãã§åäœããŸãã
udevã¯å¿ èŠãªãã¹ãŠã®ã¢ãžã¥ãŒã«ãããŒãããå¯èœæ§ããããŸããã確ãã«ããããã¯/ mnt / sun4i-rootfs / etc / modulesã«èšè¿°ã§ããŸãã å¿ èŠãªã¢ãžã¥ãŒã«ã®ãªã¹ãã¯ãTerminalEmulatorãä»ããŠAndroidOSã§ååŸã§ããŸãã
TerminalEmulatorïŒ$ lsmod
ADBãä»ããŠïŒ
adb shell lsmod
LinuxããŒãã»ããã¢ãã
æåã®ããŒãããŒãã£ã·ã§ã³ã®å 容ãå«ãã¢ãŒã«ã€ããããŠã³ããŒãããŸã ã
ãããŠãã¢ãŒã«ã€ããã/ mnt / sun4i-bootã®evb.binæ§æãã¡ã€ã«ãæœåºããŸãã
tar -xf debian-wheezy-armhf-boot.tar.bz2 evb.bin -C /mnt/sun4i-boot
ã«ãŒãã«ããã«ãããªãã£ãå Žåãã¢ã»ã³ãã«ãããã«ãŒãã«3.0.36+ãæœåºã§ããŸãã
tar -xf debian-wheezy-armhf-boot.tar.bz2 uImage -C /mnt/sun4i-boot
æã¡äžã
ããããããã¹ãŠãæºåã§ããŠããŸãã ã·ã¹ãã ãSDãã©ã€ãã«ã€ã³ã¹ããŒã«ããŸããã microSDã«ãŒããã¿ãã¬ããã®ã«ãŒããªãŒããŒã«æ¿å ¥ããé»æºãå ¥ããŸãã é»æºãå ¥ããŠãã5ç§åŸã«ãããã¯ã©ã€ããç¹ç¯ããç»é¢ãé»ã®ãŸãŸã«ãªããŸãã æ°ååŸãã·ã¹ãã å šäœãèµ·åããã¯ãã§ãã
ã«ãŒãã®ããã©ã«ããã¹ã¯ãŒãã¯rootã§ããããŠãŒã¶ãŒã¯userã§ããããšã«æ³šæããŠãã ããã å€æŽããããšããå§ãããŸãã
USBããŒããŒãããªãå Žåã¯ãrootfsã«ä»®æ³ããŒããŒããããªã€ã³ã¹ããŒã«ãããŠããŸãã
WiFiãããã¯ãŒã¯ã«æ¥ç¶ããŠããããŸãã¯USBã€ãŒãµãããã¢ããã¿ãŒã䜿çšããŠãããnm-appletã䜿çšããŠãããã¯ãŒã¯ã«æ¥ç¶ããŠããŸãã sshçµç±ã§ããã«æ¥ç¶ã§ããŸãã
lxterminalãèµ·åããå¿ èŠãªãœãããŠã§ã¢ãæäŸããŸãã
sudo -i apt-get update apt-get install vlc geany
èããããåé¡
- é»æºãå
¥ããŠãäœã衚瀺ãããªãå Žåã¯ãããŠã³ããŒããé²è¡äžã®å¯èœæ§ããããŸãã5åã»ã©åŸ
ã¡ãŸãããã ãããã€ã©ã€ãã衚瀺ãããªãå Žåã¯ãevanda.binãnandaã«ããAndroidãã¡ãŒã ãŠã§ã¢ã®èšå®ãã¡ã€ã«ã«çœ®ãæããå¿
èŠããããŸãã
Terminal EmaulatorãŸãã¯adbãä»ããAndroidã®ããã€ã¹ïŒ
adb shell su mkdir /local/data/tmp/nanda mount /dev/block/nanda /local/data/tmp/nanda
äœããã®æ¹æ³ã§script.binãæœåºããŸãããããè¡ããŸããã
$ adb pull /local/data/tmp/nanda/script.bin evb.bin
cp evb.bin /mnt/sun4i-boot/
- ããã¯ã©ã€ãã¯ãŸã ããããã·ã¹ãã ãèµ·åããŠããªãå Žåã¯ãã¿ãã¬ããããMicroSDã«ãŒããåãå€ããŠ/ mnt / sun4i-rootfsã«ããŠã³ãããããšã«ãããã·ã¹ãã ãã°ã衚瀺ã§ããŸãã
cat /mnt/sun4i-rootfs/var/log/dmesg cat /mnt/sun4i-rootfs/var/log/Xorg.0.log
- ã¿ãããæ©èœããªãå Žåã¯ãAndroidã§ã©ã®ã¢ãžã¥ãŒã«ãã¿ããã®åå ã§ãããã確èªããå¿
èŠããããŸãã
ADBã«ããæ¹æ³ïŒ
adb shell 'lsmod | grep ts'
TerminalEmulatorãä»ããã¡ãœãã
/ mnt / sun4i-rootfs / etc / modules
ãããã«
ããã§ãMOMO9ã¿ãã¬ããã§Linuxãèµ·åããŸããã ã·ã¹ãã ã¯ãŸã å®å šã«æ§æãããŠããªããããåãã©ãããããã¢ãŒããæ§æããŠå¿ èŠãªããã±ãŒãžãé åžããŠãåé¡ã¯ãããŸããã ããªãã®æéãããããŸããã ãããããã®åŸãã·ã¹ãã ããŒããããã»ãŒãçµã¿ç«ãŠãåŸãããã«ãã®OSãã©ã®ããã«æ©èœããããç解ãå§ããŸãã ç¹å¥ãªè±èªã®èªåœã®èªåœãè£å ãããŸããããããæªãã¯ãããŸããã
MOMO9ã¹ã¯ãªãŒã³ã·ã§ããã®Debian Wheezy
以äžã¯ãMagickImageããã±ãŒãžã®ã€ã³ããŒããŠãŒãã£ãªãã£ã䜿çšããŠããã€ã¹èªäœã§ååŸããã¹ã¯ãªãŒã³ã·ã§ããã§ãã
æºåž¯é»è©±ãã«ã¡ã©ã§æ®åœ±ããããä»ã«æå ã«ãªãã®ã§ããã¿ãŸããã
æºåž¯é»è©±ãã«ã¡ã©ã§æ®åœ±ããããä»ã«æå ã«ãªãã®ã§ããã¿ãŸããã
ãããŠãã¡ãããç§ã¯ããªããããªãã®PCã§äœãããããæ©åšã®æå·ã«ã€ããŠäœã®è²¬ä»»ãè² ããŸããã ç解ããŠãã¹ãŠãè¡ããŸãã SDãªãŒããŒããã€ã¹ãããŒããã©ã€ããŸãã¯ãã®ä»ã®ããã€ã¹ãšæ··åããªãã§ãã ããã
UPDïŒ
- SoCããŒãããã»ã¹ã ãã©ãŒã©ã ã®èª¬æã
- SoCããŒãããã»ã¹ã
- .configãã¡ã€ã«ã¯ãlinux-allwinner / scripts / extract-ikconfigã«ãŒãã«ã®ãœãŒã¹ãã©ã«ããŒã«ããã¹ã¯ãªããã䜿çšããŠãæ¢ã«ã³ã³ãã€ã«ãããã«ãŒãã«ããæœåºã§ããŸãã ã€ãŸããæ°ããã«ãŒãã«ãæåããèšå®ããããšã¯ã§ããŸããããå€ãã«ãŒãã«ã®èšå®ãã¡ã€ã«ã䜿çšããŸããã³ã³ãã€ã«æã«ã®ã¿ããã«ãã¹ã¯ãªãããæ°ããã«ãŒãã«æ©èœãšã¢ãžã¥ãŒã«ãã©ããããïŒã«ãŒãã«ã«å«ããããã€ã¡ãŒãžã«å«ããªããïŒã«ãŒãã«ïŒã
- RZK333ã¯ãœãŒã¹ãè¿œå ããŸããïŒRhombus-TechïŒarm-netbook @ freenode channelãããã§ããªãã説æããŠãããã®ã®ãã¹ãŠã®äœè
ã¯ããããæ¥ãŠããŸãïŒã«ãŒãã«ã®ããããu-bootã®ããããSPL解æãSDããã®èµ·åïŒããã³linux-sunxi.orgæãããã ç§ã¯ãã£ã³ãã«ã«ã¯ããŸããã§ããããwikiã®æ
å ±ã¯èå³æ·±ããã®ã§ãã
- ç§ã¯ãã®ãããã¯ããå€ããscããŸããã Linux on AllWinner A10ãä»çµã¿ããã£ã¹ã«ãã·ã§ã³ãã³ã¢ãã«ãã£ã³ã°
- ããã€ãã®ã¹ã¯ãªãŒã³ã·ã§ãããè¿œå ããŸããã
- ç§ã¯ãã®åéã®å匷ãå§ããã°ãããªã®ã§ãã€ã³ã¹ããŒã«ããæãæ£ããæ¹æ³ã®ãµããããŠããããã§ã¯ãããŸããã ãããã£ãŠãäžæ£ç¢ºãªç¹ã«æ°ã¥ããããç§ãæ£ãããã«ãæ¥ããããããªããã§ãã ããã æè¬ããã ãã§ãã