{"id":11992,"date":"2011-12-05T19:43:59","date_gmt":"2011-12-05T10:43:59","guid":{"rendered":"https:\/\/www.hardkernel.com\/?p=11992"},"modified":"2018-12-07T16:00:39","modified_gmt":"2018-12-07T07:00:39","slug":"small-embedded-linux-root-file-system-for-odroid-7-7e","status":"publish","type":"post","link":"https:\/\/www.hardkernel.com\/ko\/blog\/small-embedded-linux-root-file-system-for-odroid-7-7e\/","title":{"rendered":"Small embedded Linux root file system for ODROID-7\/7E"},"content":{"rendered":"<p>ODROID-7\uc5d0\uc11c \ud14c\uc2a4\ud2b8\ub41c \ub9ac\ub205\uc2a4 \ub8e8\ud2b8 \ud30c\uc77c \uc2dc\uc2a4\ud15c\uc785\ub2c8\ub2e4.<br \/>\nODROID-E7\uc5d0\ub3c4 \uc801\uc6a9 \uac00\ub2a5\ud569\ub2c8\ub2e4.<br \/>\nAuto-Login\uc744 \uad6c\ud604\ud558\uc5ec, SDL \ubc0f \uac04\ub2e8\ud55c \uc5b4\ud50c\uae4c\uc9c0 \ub9cc\ub4e4\uc5b4 \ubaa8\ub450 \uc790\ub3d9\uc73c\ub85c \uc2e4\ud589\ud558\ub294 \uc2e4\uc6a9\uc801\uc778 \uc608\uc81c\uac00 \ub420\uac83 \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<p>How to make a Small embedded Linux root file !<\/p>\n<p>I found a generic embedded root file system with EABI by Googling.<br \/>\n<a href=\"http:\/\/ftp.falinux.com\/toolchain_ramdisk\/recommendation\/gcc-4.3.2\/\" target=\"_blank\" rel=\"noopener\">http:\/\/ftp.falinux.com\/toolchain_ramdisk\/recommendation\/gcc-4.3.2\/<\/a><br \/>\nAt this moment, this link is broken.<\/p>\n<p>To implement the auto login, I need to cross compile the mingetty in the Sourceforge.<br \/>\n<a href=\"http:\/\/sourceforge.net\/projects\/mingetty\/\" target=\"_blank\" rel=\"noopener\">http:\/\/sourceforge.net\/projects\/mingetty\/<\/a><br \/>\nAfter compilation, the generated file must be copied in to \/bin directory.<\/p>\n<p>Add below line in to \/etc\/inittab for automatic login as a super user(root)<\/p>\n<pre>T0:12345:respawn:\/bin\/mingetty --autologin=root ttySAC2 115200 vt100<\/pre>\n<p>To test this root file system, I copied it to the system partition(mmcblk0p2) of Odroid-7.<\/p>\n<p>And I changed bootargs as below.<br \/>\nFor ODROID-7 (S5PC110\/EXYNOS-3110)<\/p>\n<pre>setenv bootargs 'root=\/dev\/mmcblk0p2 rw rootfstype=ext4  init=\/sbin\/init console=ttySAC2,115200 rootdelay=1'\r\nsetevn bootcmd 'movi read kernel 30008000;bootm 30008000'\r\nsavenv\r\n<\/pre>\n<p>For ODROID-E7 (S5P6450 ARM11)<\/p>\n<pre>setenv bootargs 'root=\/dev\/mmcblk0p2 rw rootfstype=ext4  init=\/sbin\/init console=ttySAC2,115200 rootdelay=1'\r\nsetevn bootcmd 'movi read kernel E0008000;bootm E0008000'\r\nsavenv<\/pre>\n<p>To make a SDL and application software, I followed below sequence.<\/p>\n<p>Toolchain<br \/>\nSourcery G++ Lite 2010.09-50\u00a0 (GNUEABI version)<br \/>\n<a href=\"https:\/\/sourcery.mentor.com\/sgpp\/portal\/release1600\" target=\"_blank\" rel=\"noopener\">https:\/\/sourcery.mentor.com\/sgpp\/portal\/release1600<\/a><br \/>\n* Note: EABI version can&#8217;t compile SDL correctly. Must use the GNUEABI version.<\/p>\n<p>SDL source code<br \/>\nhttp:\/\/www.libsdl.org\/download-1.2.php<br \/>\nSource code location on host PC<br \/>\n\/home\/justin\/sdl\/SDL-1.2.14 (This is my working directory. It is just an example!)<\/p>\n<p>Compile SDL<\/p>\n<pre>export CC=arm-none-linux-gnueabi-gcc\r\n.\/configure --host=arm-none-linux-gnueabi --prefix=\/home\/justin\/sdl\/compiled --without-x\r\nmake -j 4\r\nmake install<\/pre>\n<p>* Note: Modify the SDL-1.2.14\/src\/video\/fbcon\/SDL_fbvideo.c<br \/>\nComment out the mouse related code in FB_VideoInit() function.<\/p>\n<p>Compile sdl test (Modify the SDL init function to 800&#215;480 resolution and 32bit color, if the application uses graphic layer.)<\/p>\n<pre>.\/configure --host=arm-none-linux-gnueabi  --with-sdl-prefix=\/home\/justin\/sdl\/compiled --disable-sdltest\r\nmake -j 4<\/pre>\n<p>Compile Freetype<br \/>\nhttp:\/\/download.savannah.gnu.org\/releases\/freetype\/freetype-2.1.10.tar.gz<\/p>\n<pre>.\/configure --host=arm-none-linux-gnueabi --without-zlib --prefix=\/home\/justin\/sdl\/compiled\r\nmake -j 4\r\nmake install<\/pre>\n<p>Compile SDL_ttf to display fonts.<br \/>\nhttp:\/\/www.libsdl.org\/projects\/SDL_ttf\/SDL_ttf-2.0.10.tar.gz<\/p>\n<pre>.\/configure --host=arm-none-linux-gnueabi --prefix=\/home\/justin\/sdl\/compiled --with-freetype-prefix=\/home\/justin\/sdl\/compiled --with-sdl-prefix=\/home\/justin\/sdl\/compiled \r\n<\/pre>\n<p>#undef HAVE_ICONV ==&gt; showfont.c ( Modify this to avoid annoying error. But, this one should be fixed for proper display of 2-byte languages.)<\/p>\n<pre>make -j 4\r\nmake install<\/pre>\n<p>showfont executable file is generated in .lib directory.<\/p>\n<pre>SDL_ShowCursor(SDL_DISABLE);  \/\/To hide the mouse cursor !!!<\/pre>\n<p>Download and Install font.<br \/>\nhttp:\/\/ftp.gnu.org\/gnu\/freefont\/freefont-ttf-20100919.tar.gz<br \/>\nUncompress and copy the fonts in to \/usr\/fonts\/ directory.<\/p>\n<p>Let&#8217;s test.<\/p>\n<pre>.\/showfont -i ..\/fonts\/FreeSerif.ttf 30<\/pre>\n<p>To execute this application automatically, add below line in \/root\/.bashrc !!<\/p>\n<pre>\/usr\/bin\/showfont -i \/usr\/fonts\/FreeSerif.ttf 30<\/pre>\n<p>Finally we made a simple and useful root file system.<br \/>\nThis is very light and fast embedded linux root file system.<br \/>\nSize is 35Mbyte approximately.<br \/>\n<span style=\"font-size: large;\">Get this root file system from<br \/>\n<a href=\"http:\/\/dev.odroid.com\/projects\/odroid-t\/download\/note\/76\" target=\"_blank\" rel=\"noopener\">http:\/\/dev.odroid.com\/projects\/odroid-t\/download\/note\/76<\/a><\/span><\/p>\n<p>Reference.<br \/>\nhttp:\/\/www.crosscompile.org\/static\/pages\/SDL.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ODROID-7\uc5d0\uc11c \ud14c\uc2a4\ud2b8\ub41c \ub9ac\ub205\uc2a4 \ub8e8\ud2b8 \ud30c\uc77c \uc2dc\uc2a4\ud15c\uc785\ub2c8\ub2e4. ODROID-E7\uc5d0\ub3c4 \uc801\uc6a9 \uac00\ub2a5\ud569\ub2c8\ub2e4. Auto-Login\uc744 \uad6c\ud604\ud558\uc5ec, SDL \ubc0f \uac04\ub2e8\ud55c \uc5b4\ud50c\uae4c\uc9c0 \ub9cc\ub4e4\uc5b4 \ubaa8\ub450 \uc790\ub3d9\uc73c\ub85c \uc2e4\ud589\ud558\ub294 \uc2e4\uc6a9\uc801\uc778 \uc608\uc81c\uac00 \ub420\uac83 \uac19\uc2b5\ub2c8\ub2e4. How to make a Small embedded Linux root file ! I found a generic embedded root file system with EABI by Googling. http:\/\/ftp.falinux.com\/toolchain_ramdisk\/recommendation\/gcc-4.3.2\/ At this moment, this link is broken. To implement [&#8230;]\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18463],"tags":[20148,20866,20904,20869,20870],"class_list":["post-11992","post","type-post","status-publish","format-standard","hentry","category-blog","tag-odroid-7","tag-odroid-a","tag-odroid-a4","tag-odroid-e7","tag-odroid-pc"],"_links":{"self":[{"href":"https:\/\/www.hardkernel.com\/ko\/wp-json\/wp\/v2\/posts\/11992","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hardkernel.com\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hardkernel.com\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hardkernel.com\/ko\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hardkernel.com\/ko\/wp-json\/wp\/v2\/comments?post=11992"}],"version-history":[{"count":1,"href":"https:\/\/www.hardkernel.com\/ko\/wp-json\/wp\/v2\/posts\/11992\/revisions"}],"predecessor-version":[{"id":11993,"href":"https:\/\/www.hardkernel.com\/ko\/wp-json\/wp\/v2\/posts\/11992\/revisions\/11993"}],"wp:attachment":[{"href":"https:\/\/www.hardkernel.com\/ko\/wp-json\/wp\/v2\/media?parent=11992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hardkernel.com\/ko\/wp-json\/wp\/v2\/categories?post=11992"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hardkernel.com\/ko\/wp-json\/wp\/v2\/tags?post=11992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}