FS4412 Development Board Study notes (iii)

Source: Internet
Author: User
Tags bz2 mkdir visual studio

1. Re-production and file system startup or the following error occurred

[    1.955000] Request_module:runaway loop modprobe binfmt-464c
//This error is due to the fact that the cross-compilation tool  
configuration BusyBox is not configured Found in configuration busybox setting->build options->
write prefix in cross compile arm-none-linux-gnueabi-
[    1.965000] Failed to EXECUTE/LINUXRC (error-8).  Attempting defaults
... [    1.990000] Request_module:runaway loop modprobe binfmt-464c
[    2.000000] Starting init:/sbin/init exists But couldn ' t execute it (error-8)
[    2.020000] Request_module:runaway loop modprobe binfmt-464c
[    2.030000] Starting init:/bin/sh exists but couldn ' t execute it (error-8)
[    2.040000] Kernel panic-not syncin G:no working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

2. Load the file system image to the memory boot parameter set to the following:

This manual doesn't mention
setenv Bootargs root=/dev/ram0 INIT=/LINUXRC console=ttysac2,115200
setenv bootcmd tftp 41000000 uimage\;tftp 42000000 exynos4412-fs4412.dtb\;tftp 43000000 ramdisk.img\;bootm 41000000 43000000 42000000

3. Steps to make a Linux file system:
A. Download BusyBox from http://busybox.net/downloads/
B. Decompression BusyBox
C. CD BusyBox

    Make Menuconfig | |  Busybox Settings---> Build Options---> [*] Build Busybox as a static binary (no shared  LIBS) [] Force Nommu Build [] build with Large File support (for accessing files > 2
    GB) (arm-none-linux-gnueabi-) Cross Compiler prefix//here Set the Crossover compilation tool () Additional CFLAGS
        Make do install CD _install LS (found in the following directory) | |
                Bin linuxrc sbin usr mkdir dev etc mnt proc var tmp sys root Add library: toolchain-4.5.1-farsight.tar.bz2 ||
                (Off-topic)
                    Toolchain is a tool chain, a set of tools and associated libraries used within a process, called tool chain.
                        Four Kinds of Tools | | Cross assembler cross compile cross library cross Link toolchain typically has a program compiler (compiler), such as GCC, that can be compiled, or cross-platform Compile) work. The current tool key software has realworks toolchain, GNU toolchain.
                Microsoft's Visual Studio 2005 is the toolchain of Windows CE. Cross-compilation (cross compile) is a common way to compile programs on one platform that can run on a different architecture, such as compiling on a PC platform (X86 CPU) to Programs running on an arm-based CPU platform, compiled programs that are not operational on the X86 CPU platform, must be placed on the ARM CPU platform to run, although two platforms use Linux System.
                    This approach is useful in heterogeneous platform porting and embedded development.
        Relative and cross-compiling, the usual compilation is called local compilation, that is, in the current platform compiled, compiled programs are also executed locally. TAR-XJF toolchain-4.5.1-farsight.tar.bz2 CP. /.. /.. /toolchain-4.5.1-farsight/arm-none-linux-gnueabi/lib/. -A (at this point in the _install directory) delete the symbol table from the static and shared library files: RM lib/*.a Arm-none-linux-gnueabi-strip lib/*.so (Super User execution) to see the size of the library, ensuring that no Over 4M du-mh lib/

D. Adding a system boot file
(1) Add File Inittab under etc, the file content is as follows:

        #this is run first except if booting in Single-user mode.
                :: Sysinit:/etc/init.d/rcs
                #/bin/sh invocations on SEL  ected TTYs
                # start an ' Askfirst ' shell on the console (whatever, May is)
                :: askfirst:-/bin/sh
                # stuff to do When restarting the init process
                :: restart:/sbin/init
                # Stuff to do before rebooting
                :: ctrlaltdel:/sbin/ Reboot
(2) Add File Fstab under etc, the file content is as follows: #device mount-point type options dump fsck order PROC/PROC proc DEFA Ults 0 0 tmpfs/tmp tmpfs defaults 0 0 sysfs/sys sysfs defaults 0 0 Tmpfs/dev Tmpfs Defaults 0 0 Here we mount the file system with three proc, Sysfs, and Tmpfs. In the kernel proc and SYSFS are supported by default, and TMPFS is not supported, we need to add TMPFS support to modify the Linux kernel configuration; $ cd ~/ke rnel/linux-3.14 $ make Menuconfig file systems---> Pseudo file Systems---> [*] Virtual Memory file system support (former SHM FS) [*] Tmpfs P Osix Access Control Lists recompile kernel: $ make uimage $ CP arch/arm/boot/uimage  /tftpboot (3) Go back to the file system you created, create the INIT.D directory under etc, and create the RCS file under INIT.D, with the contents of the RCS file: #!/bin/sh # this is The first script called by Init process/bin/mount-a ECHO/SBIn/mdev >/proc/sys/kernel/hotplug/sbin/mdev-s Add executable permissions for RcS: $ chmod +x Init.d/rcs (4)
            Add the profile file under etc, the file content is: #!/bin/sh export hostname=farsight export user=root
            Export Home=root export ps1= "[$USER @ $HOSTNAME \w]\#" Path=/bin:/sbin:/usr/bin:/usr/sbin
 Ld_library_path=/lib:/usr/lib: $LD _library_path export PATH Ld_library_path

Important: If the newly crafted file system size exceeds 8M, delete the unwanted library files

E. NFS Test
Delete the original/source/rootfs:
Sudorm−rf/source/rootfs copy our new root filesystem to the/source/rootfs directory sudo rm-rf/source/rootfs copy our new root filesystem to the/source/rootfs directory sudo mkdir/source/rootfs
$ sudo cp _install/*/source/rootfs–a

4.Ramdisk File System Production
The NFS-tested file system content is packaged into a RAMDisk file image and burned to the target platform for testing. Master through experiments
RAMDisk file system features and image production methods.
Steps

(1), make a size 8M image file $ cd ~ $ dd if=/dev/zero of=ramdisk bs=1k count=8192 (RAMDisk for 8M) (2), format this image file for Ext2 $ mk Fs.ext2-f RAMDisk (3), create initrd directory under mount as mount point $ sudo mkdir/mnt/initrd (4), attach this disk image file to/MNT/INITRD note here the Ramsi DK cannot be stored in the Rootfs directory $ sudo mount-t ext2-o loop ramdisk/mnt/initrd (5), copy our file system to initrd.img and copy all the contents of the tested file system to /MNT/INITRD directory below $ sudo cp/source/rootfs/*/mnt/initrd–a cp/source/rootfs_ram/*/mnt/initrd-ra (6), Uninstall INITRD $ sudo umount/mnt/initrd (7), Compress initrd.img for initrd.img.gz and copy to/tftpboot under $ gzip--best-c RAMDisk > R
    Amdisk.gz (8), formatted as Uboot recognized format $ mkimage-n "RAMDisk"-A arm-o linux-t ramdisk-c gzip-d ramdisk.gz ramdisk.img $ CP Ramdisk.img/tftpboot (9), configuration kernel support RAMDisk after the ramdisk.img is finished, you need to configure the kernel support RAMDisk as the boot file system, modify the kernel configuration $ cd ~/Kernel/linu x-3.14 make Menuconfig File Systems---> <*> Second extended FS Support Device Dr Ivers SCSI DEvice Support---> <*> SCSI disk Support Block devices---> <*& Gt RAM Block Device support (+) default number of RAM disks (8192) default RAM disk size (Kby
        TES) (modified to 8M) general Setup---> [*] Initial RAM filesystem and RAM disk (INITRAMFS/INITRD) support
Recompile the kernel, copy to/tftpboot (10), and reset the startup parameters on the u-boot command line: setenv Bootargs root=/dev/ram0 INIT=/LINUXRC console=ttysac2,115200 setenv bootcmd tftp 41000000 uimage_3.14\;tftp 42000000 exynos4412-fs4412.dtb\;tftp 43000000 Ramdisk.img\;bootm 41000000 43000000 42000000

Restart the board to see if it starts properly.

Problem: Create your own file system, the following issues occur when executing the first file

Bad variable nameine 10:ld_library_path
 ': No such file or directory please
press Enter to activate the this console.
can ' t run '/bin/
Press Enter to activate the this console. Y
': No such file or directory

You can use the disc's configuration file. The description file system is no problem, the problem is in the configuration file.
There should be a problem with the format of the configuration file, which was previously pasted directly. (some can be played with vim hand)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.