This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
do_gentoo_on_usd_for_iot-gate-imx7 [2017/11/04 23:55] admin |
do_gentoo_on_usd_for_iot-gate-imx7 [2017/11/21 17:49] (current) admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | == Parted == | ||
+ | parted /dev/sdX | ||
+ | mklabel msdos | ||
+ | mkpart primary fat32 2048s 150M | ||
+ | mkpart primary ext4 150M -1 | ||
+ | | ||
+ | mkfs.vfat -F 32 /dev/sdX1 | ||
+ | mkfs.ext4 -L root -m 0.1 /dev/sdX2 | ||
+ | |||
== Understand the firmware == | == Understand the firmware == | ||
When I open the folder **install/** into **cl-som-imx7-linux.zip**, I scan with ''file'' command to understand what I have, usually ARM hardware use uboot, then I hope uboot system + linux kernel + ramdisk. | When I open the folder **install/** into **cl-som-imx7-linux.zip**, I scan with ''file'' command to understand what I have, usually ARM hardware use uboot, then I hope uboot system + linux kernel + ramdisk. | ||
Line 29: | Line 38: | ||
Then it will be easy the boot the current kernel to uSD part to boot gentoo. | Then it will be easy the boot the current kernel to uSD part to boot gentoo. | ||
+ | |||
+ | I do: | ||
+ | dd bs=1 skip=72 if=boot.scr of=boot.script | ||
+ | I change into: | ||
+ | #System for CL-SOM-iMX7 | ||
+ | | ||
+ | # Parameters | ||
+ | setenv tty "ttymxc0,115200" | ||
+ | setenv mmcdev 0 | ||
+ | setenv rdaddr 0x82000000 | ||
+ | setenv loadaddr 0x80800000 | ||
+ | setenv fdtaddr 0x83000000 | ||
+ | setenv fdt_high 0xffffffff | ||
+ | setenv initrd_high 0xffffffff | ||
+ | | ||
+ | test -z "$fdtfile" && setenv fdtfile $fdt_file | ||
+ | | ||
+ | setenv bootargs "root=/dev/mmcblk0p2 ro console=$tty vram=16M" | ||
+ | setenv kernel kernel.img | ||
+ | | ||
+ | test -z "$storagetype" && setenv storagetype mmc | ||
+ | test -z "$storagedev" && setenv storagedev ${mmcdev} | ||
+ | | ||
+ | # Script start | ||
+ | load ${storagetype} ${storagedev} ${fdtaddr} ${fdtfile} | ||
+ | load ${storagetype} ${storagedev} ${loadaddr} ${kernel} | ||
+ | echo "Starting uSD system ..." | ||
+ | bootz ${loadaddr} ${fdtaddr} | ||
+ | | ||
+ | After install the package **dev-embedded/u-boot-tools** I do: | ||
+ | mkimage -C none -A arm -T script -d boot.script boot.scr | ||
+ | |||
+ | After I do my ext4 part with rootfs.tar.bz2 content into my second uSD partition. Or other system keeping the **/lib/modules/** at the first time util I do my own kernel. FAT32 on first part with: | ||
+ | * boot.scr | ||
+ | * kernel.img | ||
+ | * imx7d-sbc-iot-imx7.dtb |