Forum Discussion

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

Extrem Guide to Kill Neek with u-boot : Kernel panic.

Hi,

I am following the nios wiki (Extrem guide to kill neek with u-boot)

I notice a mistake in the tutorial when we send neek.bin. More precisely, the zone to "deprotect" and to erase si not at 0xe0000000 but at 0xe4000000.

Then after, i have a problem at step 11.

I enable the MTD command line partition table parsing in Device Driver => MTD => MTD partitionning Support => Command Line partition table parsing

and also JFF2 support in File System => Miscellaneous File System => JFFS2 support (and let the default selection that appreared)

After it is said to add a line in vendor/product Makefile. I do not have add it because I don't know where to add it in the Makefile (And is it the Makefile in nios2-linux/uClinux-dist/vendors/Altera/nios2/ ?)

then make (and no problem, i have the rootfs.jffs2) and i send it by tftp to the neek. And i complete the step 11 until :

run bootcmd

and I got a Kernel Panic :

IP-Config: No network devices available

VFS: Cannot open root device "mtdblock2" or unknown-block(0,0)

Please append a correct "root=" boot option; here are the available partitions :

Kernel panic - not syncing: VFS: Unable to mount root fs on unknow-block(0,0)

I have tried to add the missing line in vendor/product Makefile just at the end. But as expected it is not better.

Can you help me ?

6 Replies

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

    Thank you for pointing out the typo. I have rearranged the wiki. Please try again. You may compare the uClinux-dist config files to find out the kernel config changes.

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

    Ok. You add a kernel config for the neek. I have put the three new files to have a new product. Then I do "make menuconfig", i select the neek, and i save. And a lot of question appears in bash to configure the kernel :

    *

    * Restart config...

    *

    *

    * Linux Kernel Configuration

    *

    Add LRU list to track non-evictable pages (UNEVICTABLE_LRU) [Y/n/?]

    ...

    When I come back to the nios2 product, no question appears at the end of the configuration.

    I don't understand why we have to reconfigure the kernel while i just add the file config.linux-2.6.x.

    EDIT :

    Oh maybe i understand. I see in my config.linux-2.6.x that the version of the kernel i use is the 2.6.30 while yours, hippo, in your file (on the Extrem Guide) it is version 2.6.32-rc3. Is it possible that it is the source of my problems ?

    And if it is the case, i have to update from git my nios2-linux distribution ?

    ./use_git_for_update

    ./update

    Just to be sure : The config.linux-2.6.x is used by the implicit make menuconfig done in the linux-2.6 directory of the nios2-linux distribution

    And the config.vendor-2.6.x is used by the implicit make menuconfig done in the uClinux-dust/user dir ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Sorry. It's my mistake. I updated the files. Please copy them and set default config again.

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

    --- Quote Start ---

    Ok. You add a kernel config for the neek. I have put the three

    Just to be sure : The config.linux-2.6.x is used by the implicit make menuconfig done in the linux-2.6 directory of the nios2-linux distribution

    And the config.vendor-2.6.x is used by the implicit make menuconfig done in the uClinux-dust/user dir ?

    --- Quote End ---

    Correct.

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

    I have once more problems in the Extrem guide. Always at the same step (MTD and JFFS2).

    Now just after make menuconfig appears questions about the user space, the uClinux distribution configuration.

    So i suppose that the config.linux-2.6.x is correct new (because i don't have the previous question about the kernel configuration anymore) but i suppose that config.vendor-2.6.x is incorrect. (When i use the other config.vendor-2.6.x in nios2 dir, no question about configuration appears but when i use yours, there are questions)

    And if i use the config.vendor-2.6.x of nios2 dir in the neek dir, so i can build uClinux-dist, an error occurs in the compilation :

    cp: ne peut évaluer `../common/nsswitch.conf': Aucun fichier ou répertoire de ce type

    make[2]: *** [romfs] Erreur 1

    make[2]: quittant le répertoire « /home/Adrien/nios2-linux_MMU/nios2-linux/uClinux-dist/vendors/Altera/neek »

    make[1]: *** [romfs] Erreur 2

    make[1]: quittant le répertoire « /home/Adrien/nios2-linux_MMU/nios2-linux/uClinux-dist/vendors »

    make: *** [romfs.subdirs] Erreur 1
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The config.vendors-2.6.x is updated for trunk branch on 20100531. So it might be different if you didn't pull update.

    Please check if your files are corrupted with gitk or git status. Or try "git checkout -f" to refresh the source. Better "export LANG=en_US" so I can read the message.

    - Hippo