embeded/odroid2016. 10. 13. 21:33

어? boot.txt는 원본(?) 이고 부팅에 영향을 안주고

scr 확장자로 된게 본체인가?


+

와~ 이거 되면 시리얼 안사도 된다? ㅋㅋㅋㅋ

+


$ mkimage

Usage: mkimage -l image

          -l ==> list image header information

       mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image

          -A ==> set architecture to 'arch'

          -O ==> set operating system to 'os'

          -T ==> set image type to 'type'

          -C ==> set compression type 'comp'

          -a ==> set load address to 'addr' (hex)

          -e ==> set entry point to 'ep' (hex)

          -n ==> set image name to 'name'

          -d ==> use image data from 'datafile'

          -x ==> set XIP (execute in place)

       mkimage [-D dtc_options] [-f fit-image.its|-F] fit-image

          -D => set options for device tree compiler

          -f => input filename for FIT source

Signing / verified boot not supported (CONFIG_FIT_SIGNATURE undefined)

       mkimage -V ==> print version information and exit 


$ file boot.*

boot.scr: u-boot legacy uImage, boot, Linux/ARM, Script File (Not compressed), 289 bytes, Fri Apr 18 00:22:42 2014, Load Address: 0x00000000, Entry Point: 0x00000000, Header CRC: 0xB3F039B6, Data CRC: 0x88FB7365

boot.txt: ASCII text


$ ll /boot

total 21860

drwxr-xr-x  2 root root    4096 oct 11 00:48 ./

drwxr-xr-x 19 root root    4096 oct  8 20:51 ../

-rwxr-xr-x  1 root root     353 ago  8  2014 boot.scr*

-rwxr-xr-x  1 root root     281 ago  8  2014 boot.txt*

-rwxr-xr-x  1 root root  101420 ago  8  2014 config-3.8.13.23*

-rw-r--r--  1 root root  101448 ago  8  2014 config-3.8.13.26

-rw-r--r--  1 root root  102438 nov 25  2014 config-3.8.13.28

-rw-r--r--  1 root root  102534 oct 11 00:48 config-3.8.13.30

-rwxr-xr-x  1 root root 2127254 ago  8  2014 initrd.img-3.8.13.23*

-rw-r--r--  1 root root 2127606 ago  8  2014 initrd.img-3.8.13.26

-rw-r--r--  1 root root 2127327 feb 21  2015 initrd.img-3.8.13.28

-rw-r--r--  1 root root 2190696 oct 11 00:48 initrd.img-3.8.13.30

-rwxr-xr-x  1 root root 2194825 ago  8  2014 uInitrd*

-rwxr-xr-x  1 root root 2194825 ago  8  2014 uInitrd-3.8.13.23*

-rw-r--r--  1 root root 2127670 ago  8  2014 uInitrd-3.8.13.26

-rw-r--r--  1 root root 2195492 nov 25  2014 uInitrd-3.8.13.28

-rw-r--r--  1 root root 2190760 oct 11 00:48 uInitrd-3.8.13.30

-rwxr-xr-x  1 root root 2453112 ago  8  2014 zImage* 


$ cat boot.scr

'V▒▒9▒SO▒!▒▒sebootsetenv initrd_high "0xffffffff"

setenv fdt_high "0xffffffff"

setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x42000000 uInitrd; bootm 0x40008000 0x42000000"

setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=/dev/mmcblk0p2 rootwait ro mem=2047M"

boot


$ cat boot.txt

setenv initrd_high "0xffffffff"

setenv fdt_high "0xffffffff"

setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x42000000 uInitrd; bootm 0x40008000 0x42000000"

setenv bootargs "console=tty1 root=/dev/mmcblk0p2 rootwait ro mem=2047M"

boot


$ sudo mkimage -T script -A arm -C none -d boot.txt boot.scr

Image Name:

Created:      Thu Oct 13 23:16:02 2016

Image Type:   ARM Linux Script (uncompressed)

Data Size:    264 Bytes = 0.26 kB = 0.00 MB

Load Address: 00000000

Entry Point:  00000000

Contents:

   Image 0: 256 Bytes = 0.25 kB = 0.00 MB


$ cat boot.scr

'V4▒P▒W▒▒                                                                                                         ▒▒▒setenv initrd_high "0xffffffff"

setenv fdt_high "0xffffffff"

setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x42000000 uInitrd; bootm 0x40008000 0x42000000"

setenv bootargs "console=tty1 root=/dev/mmcblk0p2 rootwait ro mem=2047M"

boot 


포인트는 /boot가 아니라 /media/boot ...

eMMC는 분리되어 나오나? 이전에 SD로 할떄는 또 기억이 안나서 모르겠네..

[링크 : http://odroid.com/dokuwiki/doku.php?id=en:nfsboot]

[링크 : http://odroid.com/dokuwiki/doku.php?id=en:odroid-xq]


+

이렇게 쉬울리가 없...지?

아니 도대체 왜 저건 안 없어 지는거야? ㅠㅠ

그래도 두번 나오던 녀석이 한번 나오니 다행인건가...(?)

$ dmesg | grep console

[    0.000000] Kernel command line: console=tty1 console=ttySAC1,115200 mem=2047M console=tty1 root=/dev/mmcblk0p2 rootwait ro mem=2047M

[    0.000000] console [tty1] enabled

[    1.571946] console [ttySAC1] enabled


$ cat /boot/boot.scr

'V4▒P▒W▒▒                                                                                                         ▒▒▒setenv initrd_high "0xffffffff"

setenv fdt_high "0xffffffff"

setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x42000000 uInitrd; bootm 0x40008000 0x42000000"

setenv bootargs "console=tty1 root=/dev/mmcblk0p2 rootwait ro mem=2047M"

boot


$ cat /media/boot/boot.scr

'V▒▒!W▒▒▒▒▒setenv initrd_high "0xffffffff"

setenv fdt_high "0xffffffff"

setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x42000000 uInitrd; bootm 0x40008000 0x42000000"

setenv bootargs "console=tty1 root=/dev/mmcblk0p2 rootwait ro mem=2047M"

boot

 


웬지... 기본으로 무조건 커널 인자로 ttySAC1,115200을 넣도록 되어 있는 느낌?

맞네.. 젠장 -_-


If you are using kernel 3.8 "console=tty1 console=ttySAC1,115200 mem=2047M" is a part of kernel config itself. This line is always added to kernel parameters. You need to mess with "Boot Options --->" in kernel config, modify it, disable it or set to extend kernel parameters only if nothing else is set as.

[링크 : http://forum.odroid.com/viewtopic.php?f=8&t=1978]


+

/proc/config.gz 를 확인해본 결과

CONFIG_CMDLINE="console=tty1 console=ttySAC1,115200 mem=2047M"


젠장 -_-

Posted by 구차니