Debian Package Dependencies




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

  • build-essential
  • swig
  • libssl-dev

  • gnutls-dev

Download


git clone -b v2022.10 https://github.com/u-boot/u-boot --depth=1
cd u-boot/

Configure and Build


make ARCH=arm CROSS_COMPILE=${CC} distclean
make ARCH=arm CROSS_COMPILE=${CC} stm32mp15_trusted_defconfig

stm32mp157a-dk1

#user@localhost:~/u-boot$
make ARCH=arm CROSS_COMPILE=${CC} DEVICE_TREE=stm32mp157a-dk1 all

stm32mp157c-dk2

#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 :

  1. bind a loop device to the image: losetup /dev/loop10 $image_file
  2. refresh partitions: partprobe /dev/loop10
  3. adjust partition size: gparted /dev/loop10
  4. undo the loop: losetup -d /dev/loop10
  5. remove unwanted space: truncate -s -${SIZE}G $image_file (you might want to calculate the exact size based on values from fdisk/cfdisk * sector size)

NOTE You might need to double check the partitions' UUIDs, mine seem to have changed and I had to update fstab

  • Keine Stichwörter