OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Apr 15, 2024 11:39 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Raspberry Pi: Input file is not a valid disk image
PostPosted: Mon Aug 02, 2021 2:15 pm 
Offline
User avatar

Joined: Wed Jun 09, 2021 2:25 pm
Posts: 6
Hello,
I have been creating a OS for the raspberry pi but whenever I put the .img file into the raspberry pi imager I get this error:
Code:
Input file is not a valid disk image.
File size 532516 bytes is not a multiple of 512 bytes.

I have been using the gcc cross compiler for aarch64 and I'm trying to compile to the Raspberry Pi 4.
If you need more information please just ask.
Anyways thanks in advance.

_________________
-Sam()
Code:
{
    Programmer();
}


Top
 Profile  
 
 Post subject: Re: Raspberry Pi: Input file is not a valid disk image
PostPosted: Mon Aug 02, 2021 2:38 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5134
The Raspberry Pi imager expects a complete disk image, not just a kernel image.

If all you have is a kernel image, you'll need to prepare an SD card with an appropriate boot partition and boot files, then copy your kernel image into that partition.


Top
 Profile  
 
 Post subject: Re: Raspberry Pi: Input file is not a valid disk image
PostPosted: Mon Aug 02, 2021 2:46 pm 
Offline
User avatar

Joined: Wed Jun 09, 2021 2:25 pm
Posts: 6
Octocontrabass wrote:
The Raspberry Pi imager expects a complete disk image, not just a kernel image.

If all you have is a kernel image, you'll need to prepare an SD card with an appropriate boot partition and boot files, then copy your kernel image into that partition.

Sorry but how would I go about doing that?

_________________
-Sam()
Code:
{
    Programmer();
}


Top
 Profile  
 
 Post subject: Re: Raspberry Pi: Input file is not a valid disk image
PostPosted: Mon Aug 02, 2021 4:05 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5134
Create a FAT32 partition if one doesn't already exist, download the necessary boot files, and copy everything necessary over to the FAT32 partition. If your SD card is 32GB or less, it should already be partitioned in a way that will work, since that's the standard for SDHC.

The information on the wiki is not always the most up-to-date, so I suggest looking at the official documentation for which files you need instead of using the list on the wiki.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 69 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group