...
ARM Cross Compiler | apt install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu |
SWIG | apt install swig |
Build Essentials | apt install build-essential |
Random
- losetup -p
- losetup -d
- make kernelversion
- rsync -av
U-Boot Bootloader
Dependencies
...
#user@localhost:~/u-boot$ make ARCH=arm CROSS_COMPILE=${CC} DEVICE_TREE=stm32mp157c-dk2 all
Useful commands
You can use simpler syntax for make defconfig
, like:
$ make ARCH=arm your_board_defconfig
See the full list of available defconfigs with:
$ make ARCH=arm help | grep defconfig
If you need to do reverse action (i.e. create a neat small defconfig
from extensive .config
), you can use savedefconfig
rule:
$ make ARCH=arm savedefconfig
Also, as 0andriy mentioned, you can use diffconfig
script to see changes from one .config
to another one:
$ scripts/diffconfig .config_old .config_new
How do I resize a partition on an img file?
I have a puppy linux img that is 8gb but I need it to fit on a 6gb drive. How do I resize the ext2 partition on the img?
NOTE Make a backup, anything can go wrong ... I ran all those as root :
- bind a loop device to the image:
losetup /dev/loop10 $image_file
- refresh partitions:
partprobe /dev/loop10
- adjust partition size:
gparted /dev/loop10
- undo the loop:
losetup -d /dev/loop10
- remove unwanted space:
truncate -s -${SIZE}G $image_file
(you might want to calculate the exact size based on values fromfdisk
/cfdisk
*sector size
)
NOTE You might need to double check the partitions' UUIDs, mine seem to have changed and I had to update fstab