아래 링크에 따라 이미지 파일을 준비한다.
1. rootfs 이미지와 device tree 파일 복사
genivi-dev-platform-salvator-x-20181226052552.rootfs.tar.bz2 Image--4.14.35+git0+118adc53e8-r1-r8a7796-salvator-xs-20181224021516.dtb |
2. sdcard 준비 및 포맺
리눅스에 SDCARD 삽입
$df -h /dev/sdb1 40M 18M 23M 43% /media/kj/raspberrypi /dev/sdb2 1.4G 1.1G 223M 83% /media/kj/75f44910-4661-4a3b-bf82-ce771c2345b0
|
- sdb 디바이스에 mount 된것을 확인
- 마운트 해제하기
sudo umount /media/kj/raspberrypi
sudo umount /media/kj/75f44910-4661-4a3b-bf82-ce771c2345b0
sudo fdisk /dev/sdb
Welcome to fdisk (util-linux 2.27.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. // d명령으로 모든 파티션 삭제 Command (m for help): d Selected partition 3 If you want to maintain SunOS/Solaris compatibility, consider leaving this partition as Whole disk (5), starting at 0, with 31116288 sectors Partition 3 has been deleted.
Command (m for help): d No partition is defined yet! Could not delete partition 1
Command (m for help): n Partition number (1-8, default 1): p Value out of range. Partition number (1-8, default 1): 1 First sector (0-31116288, default 0): 0 Last sector or +sectors or +size{K,M,G,T,P} (0-31116288, default 31116288): ENTER
Created a new partition 1 of type 'Linux native' and of size 14.9 GiB.
Command (m for help): t Selected partition 1 Partition type (type L to list all types): 83 Changed type of partition 'Linux native' to 'Linux native'. |
$ mkfs.ext3 /dev/sdb1
mke2fs 1.42.13 (17-May-2015)
Could not open /dev/sdb1: Permission denied
kj@ubuntu:~$ sudo mkfs.ext3 /dev/sdb1
mke2fs 1.42.13 (17-May-2015)
Found a sun partition table in /dev/sdb1
Proceed anyway? (y,n) y
Creating filesystem with 3889536 4k blocks and 972944 inodes
Filesystem UUID: 3bf38cc8-8960-474b-8dd8-6ddb2efc73c6
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:
kj@ubuntu:~$ sudo mount /dev/sdb1 /mnt/fs kj@ubuntu:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 1.9G 0 1.9G 0% /dev tmpfs 393M 6.2M 387M 2% /run /dev/sda1 49G 21G 26G 45% / tmpfs 2.0G 124K 2.0G 1% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup tmpfs 393M 36K 393M 1% /run/user/1000 /dev/sdb1 15G 38M 14G 1% /mnt/fs |
sudo tar xfi genivi-dev-platform-salvator-x-20181226052552.rootfs.tar.bz2 -C /mnt/fs
sync
sudo umount /mnt/fs
SDCARD 제거 후 부팅 실패
gunzip -c genivi-dev-platform-salvator-x-20181226052552.rootfs.wic.gz | sudo dd of=/dev/sdb bs=1M iflag=fullblock oflag=direct conv=fsync
gunzip -c file.gz | sudo dd of=/dev/sdb bs=4M
How to prepare and boot from eMMC/SD card
원문 링크 :
https://at.projects.genivi.org/wiki/display/GDP/Renesas+R-Car+M3+Starter+Kit+Hardware+Setup+and+Software+Installation
1. USB SDcard ext3 format 으로 포맺하기
2. 마운트 하기
3. USB root directory 로 복사하기
sudo tar --numeric-owner --preserve-permissions --preserve-order --totals -xvf <path to genivi-dev-*.tar.bz2> .
파일 genivi-dev-platform-salvator-x-20181226052552.rootfs.tar.bz2
4. dtb 파일을 루트 파일시스템의 boot directory 로 복사하기
cd boot
sudo cp file/m3ulcb.dtb
부팅후 환경변수 출력
env print
=> env print baudrate=115200 bootargs=console=ttySC0,115200 root=/dev/mmcblk1p1 rootwait ro rootfstype=ext4 bootcmd=run load_ker; run load_dtb; booti 0x48080000 - 0x48000000 bootdelay=3 fdt_high=0xffffffffffffffff initrd_high=0xffffffffffffffff load_dtb=ext4load mmc 0:1 0x48000000 /boot/r8a7796-salvator-xs.dtb load_ker=ext4load mmc 0:1 0x48080000 /boot/Image stderr=serial stdin=serial stdout=serial ver=U-Boot 2015.04 (Oct 26 2018 - 10:12:23) Environment size: 458/131068 bytes |