scripts/extract_xc3028.pl

Source file repositories/reference/linux-study-clean/scripts/extract_xc3028.pl

File Facts

System
Linux kernel
Corpus path
scripts/extract_xc3028.pl
Extension
.pl
Size
45686 bytes
Lines
1718
Domain
Support Tooling And Documentation
Bucket
scripts
Inferred role
Support Tooling And Documentation: scripts
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

if ($size>0 && $size <0x8000) {
			for (my $j=0;$j<$size;$j++) {
				syswrite(OUTFILE, substr($out,$j+$i,1));
			}
			$i+=$size;
		}
	}
}

sub main_firmware_24($$$$)
{
	my $out;
	my $j=0;
	my $outfile = shift;
	my $name    = shift;
	my $version = shift;
	my $nr_desc = shift;

	for ($j = length($name); $j <32; $j++) {
		$name = $name.chr(0);
	}

	open OUTFILE, ">$outfile";
	syswrite(OUTFILE, $name);
	write_le16($version);
	write_le16($nr_desc);

	#
	# Firmware 0, type: BASE FW   F8MHZ (0x00000003), id: (0000000000000000), size: 6635
	#

	write_le32(0x00000003);			# Type
	write_le64(0x00000000, 0x00000000);	# ID
	write_le32(6635);			# Size
	write_hunk_fix_endian(257752, 6635);

	#
	# Firmware 1, type: BASE FW   F8MHZ MTS (0x00000007), id: (0000000000000000), size: 6635
	#

	write_le32(0x00000007);			# Type
	write_le64(0x00000000, 0x00000000);	# ID
	write_le32(6635);			# Size
	write_hunk_fix_endian(264392, 6635);

	#
	# Firmware 2, type: BASE FW   FM (0x00000401), id: (0000000000000000), size: 6525
	#

	write_le32(0x00000401);			# Type
	write_le64(0x00000000, 0x00000000);	# ID
	write_le32(6525);			# Size
	write_hunk_fix_endian(271040, 6525);

	#
	# Firmware 3, type: BASE FW   FM INPUT1 (0x00000c01), id: (0000000000000000), size: 6539
	#

	write_le32(0x00000c01);			# Type
	write_le64(0x00000000, 0x00000000);	# ID
	write_le32(6539);			# Size
	write_hunk_fix_endian(277568, 6539);

	#
	# Firmware 4, type: BASE FW   (0x00000001), id: (0000000000000000), size: 6633
	#

	write_le32(0x00000001);			# Type
	write_le64(0x00000000, 0x00000000);	# ID
	write_le32(6633);			# Size

Annotation

Implementation Notes