LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-15-2014, 05:06 PM   #1
kelamahim
LQ Newbie
 
Registered: Oct 2011
Posts: 19

Rep: Reputation: Disabled
Bootable SD card


Hi!

Im following the instructions here:

http://linux-sunxi.org/Bootable_SD_card#Bootloader

but I can`t find the cardroot command looks like it is not in the debian repositories...

Any suggestions?

Thanks,

Miha
 
Old 03-16-2014, 12:36 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
In the link you provided, cardroot is not a command; it's a variable:
Code:
cardroot=${card}${p}2
 
2 members found this post helpful.
Old 03-17-2014, 02:39 AM   #3
kelamahim
LQ Newbie
 
Registered: Oct 2011
Posts: 19

Original Poster
Rep: Reputation: Disabled
Thanks!

Yes it became obvious as soon as saw your reply. I somehow didnt see the assigment sign.

Now I dont understand the difference between the card layout and partitioning:

SD card layout:


start size usage

0 8KB Unused, available for partition table etc.
8 24KB Initial SPL loader
32 512KB u-boot
544 128KB environment
672 352KB reserved
1024 - Free for partitions


first the first part of the card is erased:

dd if=/dev/zero of=${card} bs=1M count=1

then the bootloader is added:

dd if=spl/sunxi-spl.bin of=${card} bs=1024 seek=8
dd if=u-boot.img of=${card} bs=1024 seek=40

Why seek=40 if it should start at 32 as stated in the SD card layout above?

And then finaly partitioning is made like this:

sfdisk -R ${card}
cat <<EOT | sfdisk --in-order -uM ${card}
1,16,c
,,L
EOT

Which I dont understand at all..

Does somebody have any ideas what is happening behind these commands?

Thanks,

Miha
 
Old 03-17-2014, 05:20 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
You didn't need to erase it.

A simple dd if=image.name of=/dev/sdx should have been all you needed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create a bootable SD card? dEnDrOn Linux - General 9 08-10-2012 04:34 PM
[SOLVED] How to check if a SD card is bootable with extlinux floppy_stuttgart Linux - Newbie 10 10-05-2011 04:06 PM
Making SD card bootable Completely Clueless Linux - General 5 08-25-2010 09:55 AM
DHCP, LTSP, Bootable Network Card atmelton Linux - Networking 5 04-24-2007 05:22 PM
Amigo Bootable Business Card? nycace36 Amigo 9 10-18-2004 12:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration