LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 12-17-2009, 11:10 AM   #1
Braiam
LQ Newbie
 
Registered: Dec 2009
Posts: 5

Rep: Reputation: 0
Is incompatible FAT12 driver between Linux and FreeDOS?


Hi,

I have an ICOP VSX6154 board which has a 2MB SPI Flash Disk onboard. I develop a Linux driver for I/O access the flash. The m25p80 driver registers it as a MTD device with one partition. The mtdblock driver creates a block device named 'mtdblock0' in /dev directory. So I can mount the flash.

According to manufacturer's recommendations the flash may be formatted by spitool.exe provided by him. To use this tool I made a bootable FreeDOS USB flash drive. I formatted the spi flash disk using this tool. The flash was formatted as FAT12.

The purpose to use the flash is to keep Linux kernel, initrd and syslinux bootloader recorded on. They'll be used to boot the Linux (with /dev/ram as root device) and then this will be downloading libraries and binaries from local network needed to run my software. These files recorded on flash will be eventually updated by external action (perhaps from network) without rebooting the system.

This is the problem: If I copy the files (kernel and initrd) to spi flash disk (remembering that the flash is mounted as a block device) and install syslinux by Linux booted through PXE when I reboot the system and it starts the booting process using the spi flash disk it shows "Boot error". But if I copy them and install syslinux by FreeDOS so the BIOS can boot the linux correctly. I need the first case running.
Files written on spi flash through Linux using the driver I developed can only be read successful by Linux.

The system is Busybox (v1.14.1) running over Kernel 2.6.31.

I'm sorry about my english but I hope I was clear to explain my problem. Any help would be appreciated.
 
Old 12-27-2009, 01:21 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
My best guess is that the location of the kernel is passed incorrectly. Or you get the error at later stage? Try to compare the bootloader image generated in both cases. There should be some difference.
 
Old 12-28-2009, 09:54 AM   #3
Braiam
LQ Newbie
 
Registered: Dec 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Mara View Post
My best guess is that the location of the kernel is passed incorrectly. Or you get the error at later stage? Try to compare the bootloader image generated in both cases. There should be some difference.
I think the syslinux bootloader is not finding the ldlinux.sys needed in boot process. Or not?
I read the flash in RAW mode and I realized that FAT Directory Entries are written starting at 41st sector when I use FreeDOS. But when I use Linux the FAT Directory Entries are written starting at 16th sector. According to boot sector the FAT Directory Entries can be written starting at 13rd sector up to 28th sector. The boot sector was recorded on flash by spitool.exe running on FreeDOS.
I forgot to mention that the BIOS emulates the SPI flash disk as floppy.
I need to check the difference of the syslinux versions used in Linux and FreeDOS. I think they are not the same.
Thank you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Freedos & linux mint multiboot on a pendrive dns.davies Linux - General 0 12-03-2007 09:10 AM
Today's kernel upgrade incompatible with my nvidia driver epsilon72 Fedora 3 04-13-2007 11:26 PM
LXer: A concise guide to installing and using FreeDOS ver 1.0 in GNU/Linux using QEmu LXer Syndicated Linux News 0 09-28-2006 06:03 PM
C program which copies floppy (FAT12) rakestraw Programming 4 08-04-2006 04:00 AM
code for make format floppy in fat12 mode flatronft Linux - Software 0 01-02-2004 07:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration