Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I run from SD card (not flash the onboard flash) #20

Open
cellularmitosis opened this issue Nov 5, 2019 · 1 comment
Open

How do I run from SD card (not flash the onboard flash) #20

cellularmitosis opened this issue Nov 5, 2019 · 1 comment

Comments

@cellularmitosis
Copy link

Hi,

Every time I try to boot from the SD Card, the blue LED lights up and the CI20 copies the SD Card to the onboard flash.

This isn't what I want -- I want to boot and run Linux from the SD Card.

Am I missing something obvious? Do I need to install a custom bootloader onto the SD Card?

@latinovic
Copy link

Hi,
In order to have CI20 booting from SD card you should do following:

Build u-boot from source as instructed here:

https://www.elinux.org/CI20_Dev_Zone

Download RFS from one of following locations:

http://mipscreator.mips.com/CI20/images/default_NAND/Debian8_20160602/rootfs_2016_06_02.tar
http://mipscreator.mips.com/CI20/images/default_NAND/Debian8_20150909/rootfs_2015_09_09.tar

Burn u-boot to SD card

  • Determine the device name of the SD card:
    run lsblk command before sd card is inserted, run lsblk command after sd card is inserted, see the difference.
    /dev/sdd is used in my case.
  • Unmount sd card

sudo umount $SD_MOUNT_PATH

  • Burn uboot

sudo sfdisk /dev/sdd -uS -L << EOF
4096,,L
EOF
sudo mkfs.ext4 /dev/sdd1
sudo dd if=/dev/zero of=/dev/sdd bs=1K seek=526 count=32
sudo dd if=./CI20_u-boot/spl/u-boot-spl.bin of=/dev/sdd obs=512 seek=1
sudo dd if=./CI20_u-boot/u-boot.img of=/dev/sdd obs=1K seek=14
sync

Unpack RFS to SD card

mount SD card (/dev/sdd1)

sudo tar -xzpf ./rootfs_2016_06_02.tar -C $SD_MOUNT_PATH
sudo sync

Boot CI20

  • Insert SD card
  • Make sure that JP3 is set to boot from SD card (2,3)
  • Power on the board

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants