1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2025-04-21 12:27:27 +03:00

qi-add-gta02-indentity-part-parsing.patch

Now everything else is in place, we are able to mount
the GTA02 "identity" partition and extract the USB Ethernet
MAC Address from it, and add it to the kernel commandline.

This causes the Ethernet gadget to use the same MAC address
each boot, simplifying DHCP server situation.  The MAC
address in the identity partition is globally unique from
the factory.

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green
2009-02-03 18:06:39 +00:00
committed by Andy Green
parent bb67ea1a84
commit dd0c85f427
2 changed files with 60 additions and 3 deletions

View File

@@ -39,6 +39,7 @@ int ext2fs_devread(int sector, int filesystem_block_log2, int byte_offset, int b
sector = sector << filesystem_block_log2;
/*
* Check partition boundaries
*/
@@ -93,8 +94,7 @@ int ext2fs_devread(int sector, int filesystem_block_log2, int byte_offset, int b
u8 p[SECTOR_SIZE];
block_len = SECTOR_SIZE;
this_kernel->block_read(p,
partition_offset_blocks + sector, 1);
this_kernel->block_read(p,partition_offset_blocks + sector, 1);
memcpy(buf, p, byte_len);
return 1;
}