...
 
Commits (4)
......@@ -33,6 +33,10 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
export LOST_BUILDMK_ROOT="`pwd`"
source build/config/image_cdrom.sh
source config.sh
# grub-mkrescue finden
if (which grub-mkrescue > /dev/null 2>&1); then
GRUB2_BIN_PREFIX=grub
......@@ -55,7 +59,7 @@ cp -r build/root-cdrom/config build/root/
cp -r build/root-common/config build/root/
#CD Image erstellen
$GRUB2_BIN_PREFIX-mkrescue --output=build/images/cdrom.img build/root/
$GRUB2_BIN_PREFIX-mkrescue --directory="$LOST_GRUB2_MODULESDIR" --output="$IMAGE_PATH" build/root/
#Konfigurationsdateien wieder löschen
rm -r build/root/config
......@@ -63,6 +63,16 @@ static inline uint32_t locked_increment(volatile uint32_t* var)
return __sync_fetch_and_add(var, 1);
}
/**
* Eine Variable dekrementieren, während der Bus gesperrt ist.
*
* @param var Pointer auf die zu dekrementierende Variable
*/
static inline uint32_t locked_decrement(volatile uint32_t* var)
{
return __sync_fetch_and_sub(var, 1);
}
/* Mutexe **************************************/
......
......@@ -223,9 +223,6 @@ struct cdi_device {
* \endenglish
*/
struct cdi_bus_data* bus_data;
// tyndur-spezifisch
void* backdev;
};
/**
......
......@@ -57,13 +57,6 @@ struct cdi_scsi_device {
/// Number of LUNs
int lun_count;
/**
* tyndur-spezifisch: Frontend-Geraet (z.B. CDI_STORAGE-Geraet, das ueber
* SCSI angesteuert wird)
*/
void* frontdev;
};
/// SCSI-Treiber
......
......@@ -19,13 +19,17 @@
#include "cdi.h"
#include "cdi/audio.h"
#include "cdi/fs.h"
#include "cdi/misc.h"
#include "cdi/pci.h"
#include "cdi/scsi.h"
#include "cdi/storage.h"
extern void cdi_storage_driver_register(struct cdi_storage_driver* driver);
extern void cdi_audio_driver_register(struct cdi_audio_driver* driver);
extern void cdi_tyndur_net_device_init(struct cdi_device* device);
void cdi_osdep_new_device(struct cdi_driver* drv, struct cdi_device* dev);
static list_t* drivers = NULL;
static void cdi_tyndur_run_drivers(void);
......@@ -149,7 +153,7 @@ static void cdi_tyndur_init_pci_devices(void)
}
if (device != NULL) {
cdi_list_push(driver->devices, device);
cdi_osdep_new_device(driver, device);
printf("cdi: %x.%x.%x: Benutze Treiber %s\n",
pci->bus, pci->dev, pci->function, driver->name);
} else {
......@@ -214,9 +218,8 @@ static void cdi_tyndur_run_drivers(void)
}
}
/* Netzwerk ist schon initialisiert und SCSI hat kein RPC-Interface,
* sondern muss mit scsidisk gelinkt werden. */
if (driver->type != CDI_NETWORK && driver->type != CDI_SCSI) {
/* Netzwerk ist schon initialisiert */
if (driver->type != CDI_NETWORK) {
init_service_register((char*) driver->name);
}
}
......@@ -277,6 +280,22 @@ list_t* cdi_tyndur_get_drivers(void)
return drivers;
}
void cdi_osdep_new_device(struct cdi_driver* drv, struct cdi_device* dev)
{
if (!dev) {
return;
}
dev->driver = drv;
cdi_list_push(drv->devices, dev);
switch ((int)drv->type) {
case CDI_SCSI:
cdi_scsi_device_init(CDI_UPCAST(dev, struct cdi_scsi_device, dev));
break;
}
}
/**
* Wenn main nicht von einem Treiber ueberschrieben wird, ist hier der
* Einsprungspunkt. Die Standardfunktion ruft nur cdi_init() auf. Treiber, die
......
This diff is collapsed.