Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 May 2009 09:03:41 +0200
From:      Johan Simpson <jsimpson.za@gmail.com>
To:        freebsd-embedded@freebsd.org
Subject:   FreeBSD 7.1 AMD Geode LX 800 / Compact Flash boot issues
Message-ID:  <9e6237170905060003n673711bdp2e36c3b55ead3b7f@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi all, im having some problems with getting FreeBSD to work on a new
embedded Geode based motherboard.

This is the board im using:
http://files.ieiworld.com/files/news/080325/NOVA-LX_homepage.html

To sum up what ive tried..

1. When i boot the freebsd 7.1 dvd normally, sysinstall hangs at
probing devices.
2. I managed to get a minimal install on the compact flash, by
disabling ACPI on the dvd's boot menu.
3. Now i have FreeBSD 7.1 successfully installed on the CF card.


Here is where the problems start :(


It locks up right before/after the loader loads loader.conf.


Ive put some printf calls in the loader to see where exactly the system hangs.


In src/sys/boot/common/interp.c,v 1.29.28.1 2008/11/25 02:59:29 kensmith Exp $

ive found a problem in interact()

-------------------------------------------------------------------------------
#ifdef BOOT_FORTH
    bf_init();
#endif
     printf("Reached interact1\n");    /*PUT IN BY ME */
    /*
     * Read our default configuration
     */
    if(include("/boot/loader.rc")!=CMD_OK)
	include("/boot/boot.conf");
    printf("\n");
    /*
     * Before interacting, we might want to autoboot.
     */
     printf("Reached interact2\n"); /*PUT IN BY ME */

    autoboot_maybe();

-----------------------------------------------------------------------------

It never gets to print "Reached interact2".



So ive put in some printf's into include()

which look like this:

-----------------------------------------------------------

  printf("Including config file\n");
    if (((fd = open(filename, O_RDONLY)) == -1)) {
	sprintf(command_errbuf,"can't open '%s': %s\n", filename, strerror(errno));
	return(CMD_ERROR);
    }
    printf("Config file is open: %s\n", filename);
    /*
     * Read the script into memory.
     */
    script = se = NULL;
    line = 0;
	
    while (fgetstr(input, sizeof(input), fd) >= 0) {

	printf("Reading.. %s\n", input);



------------------------------------------------------------


It seems that include() is called 3 times.

After which it hangs. So ive decided to print out the lines its
reading from the config files.


Turns out that its not reading the config files, but garbage data.

What can i do to fix this problem, and is this a filesystem / CF problem?

Im willing to fix up the problem, but need some advice from the
experts before i go look for the problem in the wrong places.


Thank you for your time

Johan Simpson



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9e6237170905060003n673711bdp2e36c3b55ead3b7f>