A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita
audio
rust
zig
deno
mpris
rockbox
mpd
1#!/usr/bin/perl
2
3#
4# Check that the given file is smaller than the given size and if not, return
5# an error code. Used to verify that the rombox.ucl file fits on the particular
6# model you build for.
7
8sub filesize {
9 my ($filename)=@_;
10 my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
11 $atime,$mtime,$ctime,$blksize,$blocks)
12 = stat($filename);
13 return $size;
14}
15
16my $romsize = 256*1024; # 256 KB
17
18my $romstart = $ARGV[0];
19
20if($romstart =~ /^0x(.*)/i) {
21 $romstart = hex($romstart);
22}
23
24
25my $max = $romsize - $romstart;
26
27my $file = filesize($ARGV[1]);
28
29if($file > $max ) {
30 printf "Output is %d bytes larger than max ($max)\n", $file-$max;
31 exit 1;
32}