"qa/L1_jax_distributed_unittest/test.sh" did not exist on "fad3044bde1547eae9543a6a3f80401e59bb629e"
Commit 84c50066 authored by longpanda's avatar longpanda
Browse files

1.0.10 release

parent fe0dda69
...@@ -117,6 +117,10 @@ static void cmdline_strip ( char *cmdline, const char *cruft ) { ...@@ -117,6 +117,10 @@ static void cmdline_strip ( char *cmdline, const char *cruft ) {
*/ */
static int cmdline_init ( void ) { static int cmdline_init ( void ) {
userptr_t cmdline_user; userptr_t cmdline_user;
userptr_t chainaddr;
char *pos1;
char *pos2;
int chainlen;
char *cmdline; char *cmdline;
size_t len; size_t len;
int rc; int rc;
...@@ -129,6 +133,23 @@ static int cmdline_init ( void ) { ...@@ -129,6 +133,23 @@ static int cmdline_init ( void ) {
cmdline_user = phys_to_user ( cmdline_phys ); cmdline_user = phys_to_user ( cmdline_phys );
len = ( strlen_user ( cmdline_user, 0 ) + 1 /* NUL */ ); len = ( strlen_user ( cmdline_user, 0 ) + 1 /* NUL */ );
pos1 = strstr((char *)cmdline_user, "mem:");
if (pos1)
{
pos2 = strstr(pos1, ":size:");
if (pos2)
{
*pos2 = 0;
chainaddr = phys_to_user(strtoul(pos1 + 4 + 2, NULL, 16)); // skip 0x prefix in hex number
chainlen = (int)strtoul(pos2 + 6, NULL, 10);
*pos2 = ':';
g_initrd_addr = (void *)umalloc(chainlen);
g_initrd_len = chainlen;
memcpy_user((userptr_t)g_initrd_addr, 0, chainaddr, 0, chainlen);
}
}
/* Allocate and copy command line */ /* Allocate and copy command line */
cmdline_copy = malloc ( len ); cmdline_copy = malloc ( len );
if ( ! cmdline_copy ) { if ( ! cmdline_copy ) {
...@@ -137,6 +158,9 @@ static int cmdline_init ( void ) { ...@@ -137,6 +158,9 @@ static int cmdline_init ( void ) {
rc = -ENOMEM; rc = -ENOMEM;
goto err_alloc_cmdline_copy; goto err_alloc_cmdline_copy;
} }
g_cmdline_copy = cmdline_copy;
cmdline = cmdline_copy; cmdline = cmdline_copy;
copy_from_user ( cmdline, cmdline_user, 0, len ); copy_from_user ( cmdline, cmdline_user, 0, len );
DBGC ( colour, "RUNTIME found command line \"%s\" at %08x\n", DBGC ( colour, "RUNTIME found command line \"%s\" at %08x\n",
...@@ -221,11 +245,6 @@ static int initrd_init ( void ) { ...@@ -221,11 +245,6 @@ static int initrd_init ( void ) {
memcpy_user ( image->data, 0, phys_to_user ( initrd_phys ), 0, memcpy_user ( image->data, 0, phys_to_user ( initrd_phys ), 0,
initrd_len ); initrd_len );
g_initrd_addr = (void *)image->data;
g_initrd_len = image->len;
g_cmdline_copy = cmdline_copy;
/* Mark initrd as consumed */ /* Mark initrd as consumed */
initrd_phys = 0; initrd_phys = 0;
......
...@@ -126,11 +126,8 @@ void hide_umalloc ( physaddr_t start, physaddr_t end ) { ...@@ -126,11 +126,8 @@ void hide_umalloc ( physaddr_t start, physaddr_t end ) {
* *
*/ */
void hide_textdata ( void ) { void hide_textdata ( void ) {
/* Deleted by longpanda */
#if 0
hide_region ( &hidemem_textdata, virt_to_phys ( _textdata ), hide_region ( &hidemem_textdata, virt_to_phys ( _textdata ),
virt_to_phys ( _etextdata ) ); virt_to_phys ( _etextdata ) );
#endif
} }
/** /**
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -130,8 +130,7 @@ static BOOL IsVentoyPhyDrive(int PhyDrive, UINT64 SizeBytes) ...@@ -130,8 +130,7 @@ static BOOL IsVentoyPhyDrive(int PhyDrive, UINT64 SizeBytes)
PartStartSector = 2048; PartStartSector = 2048;
PartSectorCount = (UINT32)((SizeBytes - VENTOY_EFI_PART_SIZE - SIZE_1MB) / 512); PartSectorCount = (UINT32)((SizeBytes - VENTOY_EFI_PART_SIZE - SIZE_1MB) / 512);
if (MBR.PartTbl[0].FsFlag != 0x07 || if (MBR.PartTbl[0].StartSectorId != PartStartSector ||
MBR.PartTbl[0].StartSectorId != PartStartSector ||
MBR.PartTbl[0].SectorCount != PartSectorCount) MBR.PartTbl[0].SectorCount != PartSectorCount)
{ {
Log("Part1 not match %u %u", PartStartSector, PartSectorCount); Log("Part1 not match %u %u", PartStartSector, PartSectorCount);
......
...@@ -43,6 +43,17 @@ typedef unsigned char uint8_t; ...@@ -43,6 +43,17 @@ typedef unsigned char uint8_t;
#define VENTOY_GUID { 0x77772020, 0x2e77, 0x6576, { 0x6e, 0x74, 0x6f, 0x79, 0x2e, 0x6e, 0x65, 0x74 }} #define VENTOY_GUID { 0x77772020, 0x2e77, 0x6576, { 0x6e, 0x74, 0x6f, 0x79, 0x2e, 0x6e, 0x65, 0x74 }}
typedef enum ventoy_fs_type
{
ventoy_fs_exfat = 0, /* 0: exfat */
ventoy_fs_ntfs, /* 1: NTFS */
ventoy_fs_ext, /* 2: ext2/ext3/ext4 */
ventoy_fs_xfs, /* 3: XFS */
ventoy_fs_udf, /* 4: UDF */
ventoy_fs_max
}ventoy_fs_type;
#pragma pack(1) #pragma pack(1)
typedef struct ventoy_guid typedef struct ventoy_guid
...@@ -130,6 +141,11 @@ static int verbose = 0; ...@@ -130,6 +141,11 @@ static int verbose = 0;
static ventoy_guid vtoy_guid = VENTOY_GUID; static ventoy_guid vtoy_guid = VENTOY_GUID;
static const char *g_ventoy_fs[ventoy_fs_max] =
{
"exfat", "ntfs", "ext*", "xfs", "udf"
};
static int vtoy_check_os_param(ventoy_os_param *param) static int vtoy_check_os_param(ventoy_os_param *param)
{ {
uint32_t i; uint32_t i;
...@@ -410,14 +426,10 @@ static int vtoy_print_os_param(ventoy_os_param *param, char *diskname) ...@@ -410,14 +426,10 @@ static int vtoy_print_os_param(ventoy_os_param *param, char *diskname)
cnt = vtoy_find_disk_by_guid(param->vtoy_disk_guid, diskname); cnt = vtoy_find_disk_by_guid(param->vtoy_disk_guid, diskname);
debug("find 0 disk by size, try with guid cnt=%d...\n", cnt); debug("find 0 disk by size, try with guid cnt=%d...\n", cnt);
} }
if (param->vtoy_disk_part_type == 0) if (param->vtoy_disk_part_type < ventoy_fs_max)
{
fs = "exfat";
}
else if (param->vtoy_disk_part_type == 0)
{ {
fs = "ntfs"; fs = g_ventoy_fs[param->vtoy_disk_part_type];
} }
else else
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment