I am following a tutorial on few kernel dev. I encountered an operation where I have to use `dd`

like

```
dd ... if=PBL.bin of=... count=block_number
```

The `block_number`

variable is defined to be as

```
The HEX of ($filesize - 1)/512 + 1
```

where `$filesize`

is the filesize of the input file `PBL.bin`

as given in the `dd`

command above.

How do I calculate this value? Thanks in advance

`dd`

also accepts decimal for`count=`

as well. Also please include a link to the tutorial so we can see were this occurs. – Dan D. Feb 5 at 9:11signedinteger arithmetic with that formula. (-: – JdeBP Feb 5 at 11:31