Forum Discussion
Altera_Forum
Honored Contributor
20 years agoI agree, I want to stick with linux now, no more IDE except for downloading - but I definitely don't know how to build the filesystem from scratch.
Should I just create an empty directory, and then create the following directories: /bin /sbin /etc /dev /usr /var /tmp /proc /sys I don't understand how to create entries in the /dev directory - the only device I need for now is the JTAG UART (I think) - so how do I create an entry for this? What other entries in /dev do I need? Once I do that, I can create an /etc/inittab file like you said.. Then I have to get busybox working, correct? I was able to do a make menuconfig in Cygwin in the busybox directory, but I couldn't get it in linux... should I follow the instructions on MArcs page for busybox, or should I copy it from the examples apps directory in windows??? Then onc eI have it in linux, I should be able to add any apps using the menu and do a make; make install. I did this all in windows, but I would like to do it in linux too (keep it simple like you said). So correct me if I'm wrong, but /init is automatically executed when the root initramfs is mounted, correct? and /sbin/init will be built by busybox... and init uses /etc/inittab to do more stuff?? How is the login console started then? I will try and get busybox building in linux now... can I just download from the busybox site, or is there a special build for nios2? --- Quote Start --- originally posted by hippo@Nov 28 2005, 08:07 PM cheer!!
about the root fs, it should be better to build it by hand. it is simple and clean.
i would prefer doing all the works in a shell console, instead of the ide.
the ide may add something unpredictable.
you should build everything in console, and back to ide when you download and test.
you can borrow a lot from slackware/initrd, in tranditional linux life style.
setup all the dirs, bin,sbin,etc,dev,usr,usr/bin,var,tmp,proc,sys ...
check if you have all the devices you will use, zero,null,console ( and hda,hda1... etc)
it maybe missing /dev/console that give you the warning.
setup the install path to your root fs in busybox menuconfig. and make install, it will copy and
setup the symlinks.
add a symlink /init to /sbin/init for initramfs to work.
and a very simple inittab,
# startup the file system
null::sysinit:/bin/mount -t proc proc /proc
null::sysinit:/bin/mount -t sysfs sysfs /sys
# busybox console
::askfirst:/bin/sh
you should be sitting in front of busybox prompt now.
about the apps, i would prefer add them to busybox.
it saves space and troubles.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11221)
--- quote end ---
--- Quote End ---