|
From: <sle...@us...> - 2006-11-21 13:39:23
|
Revision: 679
http://svn.sourceforge.net/hackndev/?rev=679&view=rev
Author: sleep_walker
Date: 2006-11-21 05:39:18 -0800 (Tue, 21 Nov 2006)
Log Message:
-----------
l4p: cmdline fix, less debug output
Modified Paths:
--------------
linux4palm/BFUGarux/BFULinuxHelper.c
linux4palm/BFUGarux/BFUSettings-alone.c
linux4palm/BFUGarux/README
linux4palm/BFUGarux/cmdline
linux4palm/BFUGarux/garux-clean.c
linux4palm/BFUGarux/icons/icon_256.bmp
linux4palm/BFUGarux/icons/icon_256_s.bmp
linux4palm/BFUGarux/icons/icon_hr.bmp
linux4palm/BFUGarux/icons/icon_hr_s.bmp
Modified: linux4palm/BFUGarux/BFULinuxHelper.c
===================================================================
--- linux4palm/BFUGarux/BFULinuxHelper.c 2006-11-17 08:45:11 UTC (rev 678)
+++ linux4palm/BFUGarux/BFULinuxHelper.c 2006-11-21 13:39:18 UTC (rev 679)
@@ -14,6 +14,8 @@
* no warranty, freedom, blah blah blah (you surely know it)
*/
+#define DEBUG
+
#ifdef DEBUG
#define CMDLINE_FILE "cmdline"
#else
Modified: linux4palm/BFUGarux/BFUSettings-alone.c
===================================================================
--- linux4palm/BFUGarux/BFUSettings-alone.c 2006-11-17 08:45:11 UTC (rev 678)
+++ linux4palm/BFUGarux/BFUSettings-alone.c 2006-11-21 13:39:18 UTC (rev 679)
@@ -1,4 +1,4 @@
-#define BFU_VERBOSE
+//#define BFU_VERBOSE
#include "BFUDefaultSettings.h"
#include "BFUSettings.Rsrc.h"
@@ -184,7 +184,9 @@
// BFUdoDie("Creating address and/or device string",0);
StrPrintF(BFUCommandLinePart," BFUSettings=%x",options);
StrCat(BFUCommandLinePart,del);
+#ifdef BFU_VERBOSE
BFUdoDie(BFUCommandLinePart,0);
+#endif
*netSet='\0';
*globalSet='\0';
// BFUdoDie("Creating network preferences string",0);
@@ -216,13 +218,18 @@
StrCat(BFUCommandLinePart,netSet);
// BFUdoDie(BFUCommandLinePart,0);
StrCat(BFUCommandLinePart,del);
+#ifdef BFU_VERBOSE
BFUdoDie(BFUCommandLinePart,0);
+#endif
}
//global part
+ *globalSet='\0';
+#ifdef BFU_VERBOSE
if (BFUSettingsValues.address)
BFUdoDie(BFUSettingsValues.address,0);
if (BFUSettingsValues.device)
BFUdoDie(BFUSettingsValues.device,0);
+#endif
switch(BFUSettingsValues.source)
{
case 0:
@@ -384,6 +391,15 @@
return true;
}
+static UInt16 BFUSetVolRefNum()
+{
+ UInt16 volRefNum;
+ UInt32 volIterator = vfsIteratorStart;
+
+ VFSVolumeEnumerate(&volRefNum, &volIterator);
+ return volRefNum;
+}
+
/*
*
* this function tries to find saved preferences on cards
@@ -432,9 +448,9 @@
BFUdoDie("BFUSavedPrefs already in RAM",0);
case errNone:
// that means errNone - nothing else is returned by this function
-// BFUdoDie("BFUSavedPrefs found on card",0);
+ BFUdoDie("BFUSavedPrefs found on card",volRefNum);
volIterator = vfsIteratorStop;
- BFUPrefsVolRefNum =volRefNum;
+ BFUPrefsVolRefNum = volRefNum;
break;
default:
//what did I missed???
@@ -573,9 +589,11 @@
return true;
}
+
+
static Boolean BFUExportPrefs2Card()
{
- UInt16 volRefNum = BFUPrefsFoundOnCard ? BFUPrefsVolRefNum : 1;
+ UInt16 volRefNum = BFUPrefsFoundOnCard ? BFUPrefsVolRefNum : BFUSetVolRefNum(); //FIXME: this line should be remade
// UInt32 volIterator=vfsIteratorStart;
Err err;
// BFUdoDie("Going to delete old preferences...",0);
@@ -589,14 +607,16 @@
BFUdoDie("Bad filename (VFSFileDelete)",0);
break;
case vfsErrDirNotEmpty:
- BFUdoDie("Directory is not empty (VFSFileDelete). That means something wrong, I'm not deleting directories...",0);
+ BFUdoDie("Directory is not empty (VFSFileDelete). That means something is wrong, I'm not deleting directories...",0);
return false;
break;
case vfsErrFileStillOpen:
BFUdoDie("Old preferences are still opened - shouldn't happen",0);
break;
case vfsErrFileNotFound:
+#ifdef BFU_VERBOSE
BFUdoDie("Old preferences couldn't be found, it's ok...",0);
+#endif
break;
case vfsErrFilePermissionDenied:
BFUdoDie("Couldn't delete old preferences - permission denied.",0);
@@ -684,13 +704,13 @@
BFUSettingsValues.silentBoot = CtlGetValue(getObjectPtr(pForm,BFUSilentBootBox));
break;
case BFUCardReadonlyBox:
- BFUSettingsValues.silentBoot = CtlGetValue(getObjectPtr(pForm,BFUCardReadonlyBox));
+ BFUSettingsValues.cardRO = CtlGetValue(getObjectPtr(pForm,BFUCardReadonlyBox));
break;
case BFUDebugModeBox:
- BFUSettingsValues.silentBoot = CtlGetValue(getObjectPtr(pForm,BFUDebugModeBox));
+ BFUSettingsValues.debug = CtlGetValue(getObjectPtr(pForm,BFUDebugModeBox));
break;
case BFUKeyboardSupportBox:
- BFUSettingsValues.silentBoot = CtlGetValue(getObjectPtr(pForm,BFUKeyboardSupportBox));
+ BFUSettingsValues.keyboard = CtlGetValue(getObjectPtr(pForm,BFUKeyboardSupportBox));
break;
case BFUReflashBox:
BFUSettingsValues.reflash = CtlGetValue(getObjectPtr(pForm,BFUReflashBox));
Modified: linux4palm/BFUGarux/README
===================================================================
--- linux4palm/BFUGarux/README 2006-11-17 08:45:11 UTC (rev 678)
+++ linux4palm/BFUGarux/README 2006-11-21 13:39:18 UTC (rev 679)
@@ -8,13 +8,10 @@
1) Compile a suitable kernel for the Palm and get the zImage.
2) Copy the zImage file in to the boot loader source directory.
3) Type 'make' to see usage - syntax is
- make <palm_type> [BFU] <garux-type.prc>
+ make <palm_type> <BFU>
<palm_type> could be palmld, palmte, palmtt, palmtt3, palmtt5, palmtx, palmz72
- [BFU] - type BFU if you want BFUSettings support
- <garux-type.prc> could be:
- garux.prc - good old one
- garux-cleaner.prc - rewrite of garux code to be better modificable
+ <BFU> could be BFU or noBFU - type BFU if you want BFUSettings support
II] Bugs and Limitations
Modified: linux4palm/BFUGarux/cmdline
===================================================================
--- linux4palm/BFUGarux/cmdline 2006-11-17 08:45:11 UTC (rev 678)
+++ linux4palm/BFUGarux/cmdline 2006-11-21 13:39:18 UTC (rev 679)
@@ -1 +1 @@
-blah blah blah BFUSettings=0BE0;c0a80101c0a80115ffffffff;/linux2ram;/dev/mmcblk0p1;20%; blah
+mem=0x04000000 initrd=0xA0400000,631365 root=/dev/ram0 init=/linuxrc BFUSettings=0B60;C0A8017BC0A80101FFFFFFFF;/linux2ram;/dev/mmcblk0p1;20%;
Modified: linux4palm/BFUGarux/garux-clean.c
===================================================================
--- linux4palm/BFUGarux/garux-clean.c 2006-11-17 08:45:11 UTC (rev 678)
+++ linux4palm/BFUGarux/garux-clean.c 2006-11-21 13:39:18 UTC (rev 679)
@@ -1,16 +1,38 @@
/* Garux-clean
*
- * rewriten garux.c (see its credits), based on OnBoardC skeleton and mainly tested there, by Tomas Cech (Sleep.Walker)
+ * rewriten garux.c , based on OnBoardC skeleton and mainly tested there, by Tomas Cech (Sleep.Walker)
* bugs: fr...@gm...
* (hope that there aren't any)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
+ *
+ * runLinuxKernel() is from garux.c
+ *
+ * Garux credits
+ * Linux Loader for the Palm OS.
+ *
+ * Copyright (C) 2004 Vinayak R. Borkar
+ * Author: Vinayak R. Borkar [vin...@us...]
+ *
+ * Original version by Romain Goyet [r....@gm...]
+ *
+ * 11-Sep-2005, Alex Osborne [bob...@gm...]:
+ * Updated to work with multiple handhelds.
+ *
+ * Device support based on the work of:
+ * Nikolay Petukhov - Palm Tungsten T2
+ * Vladimir Pouzanov - Palm Tungsten T3
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
*/
+
#define ForSimulator
//#define DEBUG
@@ -133,8 +155,8 @@
#ifdef with_BFUSettings
if (BFUCommandLinePart[0] != '\0')
{
- BFUdoDie(parameters,StrLen(parameters));
- BFUdoDie(BFUCommandLinePart,StrLen(parameters));
+// BFUdoDie(parameters,StrLen(parameters));
+// BFUdoDie(BFUCommandLinePart,StrLen(parameters));
StrCat(parameters,BFUCommandLinePart);
}
#endif
@@ -344,7 +366,7 @@
handled = true;
break;
case frmCloseEvent:
- StrNCopy(parameters,FldGetTextPtr(getObjectPtr(pForm,KernelParam)),KernelParamLength);
+// StrNCopy(parameters,FldGetTextPtr(getObjectPtr(pForm,KernelParam)),KernelParamLength);
mainFormOnClose(pForm);
FrmEraseForm(pForm);
FrmDeleteForm(pForm);
@@ -370,6 +392,7 @@
printf("Serial open, port id: %x\n", portid);
SrmSend(portid, "Garux.\n\n", 8, &err);
#endif
+ StrNCopy(parameters,FldGetTextPtr(getObjectPtr(pForm,KernelParam)),KernelParamLength);
runLinuxKernel();
break;
@@ -469,7 +492,9 @@
if (BFUSettingsInit())
{
WinDrawChars("BFUSettings were set up",StrLen("BFUSettings were set up"),9,128);
+#ifdef BFU_VERBOSE
BFUdoDie(BFUCommandLinePart,0);
+#endif
}
else
WinDrawChars("BFUSettings were not set up",StrLen("BFUSettings were not set up"),9,128);
Modified: linux4palm/BFUGarux/icons/icon_256.bmp
===================================================================
(Binary files differ)
Modified: linux4palm/BFUGarux/icons/icon_256_s.bmp
===================================================================
(Binary files differ)
Modified: linux4palm/BFUGarux/icons/icon_hr.bmp
===================================================================
(Binary files differ)
Modified: linux4palm/BFUGarux/icons/icon_hr_s.bmp
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|