Skip to content

Commit

Permalink
meson: auto-repartition for EMMC (#11679)
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyu1314 authored Dec 2, 2023
1 parent b512ed9 commit f3df2a6
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
3 changes: 2 additions & 1 deletion target/linux/meson/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ DEFAULT_PACKAGES += \
mkf2fs \
automount \
resize2fs \
partx-utils
partx-utils \
losetup

KERNELNAME:=Image dtbs

Expand Down
5 changes: 5 additions & 0 deletions target/linux/meson/base-files/etc/rc.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

bash /root/resize.sh
exit 0
10 changes: 10 additions & 0 deletions target/linux/meson/base-files/root/resize.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

parted /dev/mmcblk1 resizepart 2 100%
losetup /dev/loop0 /dev/mmcblk1p2
resize2fs -f /dev/loop0
echo "# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
exit 0">/etc/rc.local
rm -rf /root/resize.sh && reboot
22 changes: 22 additions & 0 deletions target/linux/meson/meson8b/config-6.1
Original file line number Diff line number Diff line change
Expand Up @@ -120,25 +120,47 @@ CONFIG_CRC16=y
CONFIG_CRC7=y
CONFIG_CRC_ITU_T=y
CONFIG_CRYPTO_AES_ARM=y
CONFIG_CRYPTO_AES_ARM_BS=y
CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y
CONFIG_CRYPTO_ARCH_HAVE_LIB_CURVE25519=y
CONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y
CONFIG_CRYPTO_BLAKE2B=y
CONFIG_CRYPTO_BLAKE2B_NEON=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_CHACHA20_NEON=y
CONFIG_CRYPTO_CMAC=y
CONFIG_CRYPTO_CRC32=y
CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_CRC32_ARM_CE=y
CONFIG_CRYPTO_CRYPTD=y
CONFIG_CRYPTO_CURVE25519_NEON=y
CONFIG_CRYPTO_DRBG=y
CONFIG_CRYPTO_DRBG_HMAC=y
CONFIG_CRYPTO_DRBG_MENU=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_JITTERENTROPY=y
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
CONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y
CONFIG_CRYPTO_LIB_POLY1305_GENERIC=y
CONFIG_CRYPTO_LIB_SHA1=y
CONFIG_CRYPTO_LIB_SHA256=y
CONFIG_CRYPTO_LIB_UTILS=y
CONFIG_CRYPTO_NHPOLY1305=y
CONFIG_CRYPTO_NHPOLY1305_NEON=y
CONFIG_CRYPTO_POLY1305_ARM=y
CONFIG_CRYPTO_RNG=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_RNG_DEFAULT=y
CONFIG_CRYPTO_RSA=y
CONFIG_CRYPTO_SEQIV=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA1_ARM=y
CONFIG_CRYPTO_SHA1_ARM_NEON=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA256_ARM=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_SHA512_ARM=y
CONFIG_CRYPTO_SIMD=y
CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
CONFIG_DCACHE_WORD_ACCESS=y
CONFIG_DEBUG_INFO=y
Expand Down

3 comments on commit f3df2a6

@lunatickochiya
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不建议这样 这样做rclocal里一直都有这条命令 建议echo掉

最好的方法是吧脚本 放在uci_default文件夹 这样运行一次即可
另外你的depends应该也要加上bash吧
脚本是用的我这里的吧 https://github.com/lunatickochiya/Lunatic-s805-rockchip-Action/blob/master/package/kochiya/autoset/files/resize.sh

@shawnchain
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uci-defaults +1

@e6e6
Copy link
Contributor

@e6e6 e6e6 commented on f3df2a6 Apr 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是否扩容,应该交给用户决定吧

Please sign in to comment.