Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

Not found rc file in ~/rootfs/etc dir

hello all

I want to edit rc file before rebuild kernel that can't find rc file in ~/root/etc dir.

I don't like to excute "ifconfig" or "inetd" command every time under the uClinux.

Can i add a rc file in ~/root/etc dir?

On uClinux : ~/bin/login

I don't know uClibic login's account and "Password".

How to know my account and password ?

Because I don't login to use my uClinux OS every time . so , i want to creat it..

How to creat a account on uClinux OS?

Thanks in advance !

jay

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by jay_1025@Apr 14 2006, 07:21 PM

    hello all

    i want to edit rc file before rebuild kernel that can't find rc file in ~/root/etc dir.

    i don't like to excute "ifconfig" or "inetd" command every time under the uclinux.

    can i add a rc file in ~/root/etc dir?

    on uclinux : ~/bin/login

    i don't know uclibic login's account and "password".

    how to know my account and password ?

    because i don't login to use my uclinux os every time . so , i want to creat it..

    how to creat a account on uclinux os?

    thanks in advance !

    jay

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=14369)

    --- quote end ---

    --- Quote End ---

    There are many ways to add init tasks.

    you can add simple init command into etc/inittab, just like the lo init.

    you can add a line in inittab to run etc/rc .

    you can uncomment the line contains /etc/init.d/rcS in inittab .

    then ~/rootfs/etc/init.d/rcS will be executed during linux init.

    the default rcS will run each Sxxxxxx task.

    the account and passwd file are etc/passwd and etc/shadow .

    the simple inittab from ~/download, does not use login, it call /bin/sh directly.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi hippo

    I have edit "inittab" file in ~/rootfs/etc and recompile kernel .

    But not update the initramfs....

    compile kernel info:

    perl -I/home/jay/linux-2.6.16.1/arch/nios2nommu/scripts /home/jay/linux-2.6.16.1/arch/nios2nommu/scripts/gen_nios2_system.h.pl cpu_0 sdram_0 cfi_flash_0 < nios_0.ptf > include/nios2_system.h.tmp; if [ -r include/nios2_system.h ] && cmp -s include/nios2_system.h include/nios2_system.h.tmp; then rm -f include/nios2_system.h.tmp; else echo &#39; UPD include/nios2_system.h&#39;; mv -f include/nios2_system.h.tmp include/nios2_system.h; fi

    CHK include/linux/version.h

    CHK include/linux/compile.h

    CHK usr/initramfs_list

    Kernel: arch/nios2nommu/boot/zImage is ready

    I don&#39;t see the "GPIO" and "GZIP" in compile messages and not find "initramfs_list" file in ~/rootfs/usr/ dir.

    THx
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    hi hippo

    This is booting message:

    uClinux/Nios II

    Altera Nios II support © 2004 Microtronix Datacom Ltd.

    setup_arch: No persistant network settings signature at 008F0000

    Built 1 zonelists

    Kernel command line:

    PID hash table entries: 64 (order: 6, 1024 bytes)

    Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)

    Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)

    Memory available: 6072k/8192k RAM, 0k/0k ROM (1402k kernel code, 623k data

    Mount-cache hash table entries: 512

    NET: Registered protocol family 16

    io scheduler noop registered

    io scheduler deadline registered (default)

    Serial: JTAG UART driver $Revision: 1.4 $

    ttyJ0 at MMIO 0x81004000 (irq = 1) is a jtag_uart

    dmfe_probe:eth0, 50000 Khz Nios

    <DM9000> eth0 I/O: 80900090, VID: 90000a46

    ADDR: 00:07:ed:00:00:00

    dmfe_probe:eth1, 50000 Khz Nios

    NET: Registered protocol family 2

    IP route cache hash table entries: 128 (order: -3, 512 bytes)

    TCP established hash table entries: 512 (order: -1, 2048 bytes)

    TCP bind hash table entries: 512 (order: -1, 2048 bytes)

    TCP: Hash tables configured (established 512 bind 512)

    TCP reno registered

    TCP bic registered

    NET: Registered protocol family 1

    NET: Registered protocol family 10

    IPv6 over IPv4 tunneling driver

    NET: Registered protocol family 17

    Freeing unused kernel memory: 508k freed (0x16e000 - 0x1ec000)

    init started: BusyBox v1.1.1-pre0 (2006.04.14-14:34+0000) multi-call bina

    Bummer, could not run &#39;/bin/ifconfig&#39;: No such file or directory

    BusyBox v1.1.1-pre0 (2006.04.14-14:34+0000) Built-in shell (msh)

    Enter &#39;help&#39; for a list of built-in commands.

    # ps

    PID Uid VmSize Stat Command

    1 root DW init

    2 root SWN [ksoftirqd/0]

    3 root SW< [events/0]

    4 root SW< [khelper]

    5 root SW< [kthread]

    6 root SW< [kblockd/0]

    7 root SW [pdflush]

    8 root SW [pdflush]

    10 root SW< [aio/0]

    9 root SW [kswapd0]

    22 root Z [inetd]

    25 root SW /bin/boa

    32 root SW init

    33 root SW /bin/sh

    34 root RW ps

    I have add "/sbin/ifconfig eth0 xxx.xxx.xxx.xxx" line in ~/rootfs/etc/inittab file and rebuild kernel.

    Why not to update the kernel?........... http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif

    Thanks in advance !

    jay
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by jay_1025@Apr 15 2006, 01:19 AM

    hi hippo

    i have edit "inittab" file in ~/rootfs/etc and recompile kernel .

    but not update the initramfs....

    compile kernel info:

    perl -i/home/jay/linux-2.6.16.1/arch/nios2nommu/scripts /home/jay/linux-2.6.16.1/arch/nios2nommu/scripts/gen_nios2_system.h.pl cpu_0 sdram_0 cfi_flash_0 < nios_0.ptf > include/nios2_system.h.tmp; if [ -r include/nios2_system.h ] && cmp -s include/nios2_system.h include/nios2_system.h.tmp; then rm -f include/nios2_system.h.tmp; else echo &#39; upd include/nios2_system.h&#39;; mv -f include/nios2_system.h.tmp include/nios2_system.h; fi

    chk include/linux/version.h

    chk include/linux/compile.h

    chk usr/initramfs_list

    kernel: arch/nios2nommu/boot/zimage is ready

    i don&#39;t see the "gpio" and "gzip" in compile messages and not find "initramfs_list" file in ~/rootfs/usr/ dir.

    thx

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=14384)

    --- quote end ---

    --- Quote End ---

    the file is in kernel dir, ~/linux-2.6.x/usr/initramfs_list