Before following any of these steps, make sure you have booted ubilinux or debian os (from Emutexlabs) on Intel Edison.
- You need to have a SD card formatted with ext4 file system to store the root file system
- Download and unpack Debian image from emutexlabs website
- In the unpacked directory (with the "flashall.sh" script) run the following commands to prepare the SD card. These commands mount the edison-image-edison.ext4 rootfs image and copy the contents onto the SD card
sudo su
mkdir Rootfs
mount ./edison-image-edison.ext4 Rootfs
cp -a Rootfs/* media/saru/eb361b92-c285-44a6-9f32-da393c879487
sync
- Eject the SD Card and now it is ready to boot
- On a running Edison board, plug your formatted SD card and get the device name.
dmesg | tail -n 10
- Here, the SD card device is “/dev/mmcblk1” and the partition we’ve created is "/dev/mmcblk1p1"
Debian system on Edison, does not mount the microsd card automatically. To mount sdcard at boot, modify the /etc/fstab system file in edison.
- Find the UUID for the sd card
blkid
-
Add an entry for the partition to automount it at startup. Add file system, mount point, type, options, dump and pass information of sdcard partition to fstab file and save it. Example, the format looks like below,
nano /etc/fstab
#Add an entry for the partition
UUID=eb361b92-c285-44a6-9f32-da393c879487 /media/sdcard ext4 defaults 0 0
mkdir -p /media/sdcard/
reboot
After reboot, debian os automatically mounts the sdcard.
BTRGBControlTo boot using the external device, you need to modify the U-Boot environment variable named "mmc-bootargs" with kernel boot arguments. We cannot modify U-Boot environment variables from edison linux console in debian os. It is possible only in U-Boot command prompt.
- To modify U-Boot env variables, u-boot and u-boot-tools packages are available in debian repository. The tools fw_printenv/fw_setenv in the u-boot source tree normally work with MTD partitions but they don’t support MMC.
To modify u-boot env variables ,during the boot, on the serial console, when it prompts to press a key to stop booting, press any key and then run the following commands in the U-Boot command prompt.
Run the following commands in boot command prompt
> setenv mmc-bootargs 'setenv bootargs root=${myrootfs} rootdelay=3 rootfstype=ext4 ${bootargs_console} ${bootargs_debug} systemd.unit=${bootargs_target}.target hardware_id=${hardware_id} g_multi.iSerialNumber=${serial#} g_multi.dev_addr=${usb0addr}'
> setenv myrootfs '/dev/mmcblk1p1'
> setenv myrootfs_sdcard /dev/mmcblk1p1
> setenv myrootfs_emmc PARTUUID=012b3303-34ac-284d-99b4-34e03a2335f4
> setenv do_boot_emmc 'setenv myrootfs ${myrootfs_emmc}; run do_boot'
> setenv do_boot_sdcard 'setenv myrootfs ${myrootfs_sdcard}; run do_boot'
> setenv bootdelay 5
> saveenv
> run do_boot_sdcard
- If you want to switch to eMMC just occasionally, during the boot, on the serial console, when it prompts to press a key to stop booting, press any key and then run the below command in the U-Boot command prompt that appears:
> run do_boot_emmc