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
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.
I wish gentoo to have better 0-days hardened, but have to uSD card allow me debug the OS offline, save the data in all case.
Into the boot scr decompiled I see:
setenv bootargs "root=/dev/ram0 rw ramdisk_size=16384 console=$tty vram=16M auto_install ${board_param}" setenv ramimg ramdisk.img load ${storagetype} ${storagedev} ${fdtaddr} ${fdtfile} load ${storagetype} ${storagedev} ${loadaddr} ${kernel} load ${storagetype} ${storagedev} ${rdaddr} ${ramimg}
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: