move: smsc95xx fixup to chroot script

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/10/merge
Robert Nelson 13 years ago
parent ba7a48a6d5
commit d011f92979

@ -808,11 +808,6 @@ function setup_bootscripts {
mkdir -p ${TEMPDIR}/bootscripts/
boot_uenv_txt_template
tweak_boot_scripts
if [ "$SMSC95XX_MOREMEM" ] ; then
sed -i 's/8192/16384/g' "${DIR}/scripts/ubuntu-tweaks.diff"
sed -i 's/8192/16384/g' "${DIR}/scripts/debian-tweaks.diff"
fi
}
function extract_base_initrd {
@ -974,10 +969,8 @@ function initrd_fixes {
#work around for the kevent smsc95xx issue
touch ${TEMPDIR}/initrd-tree/etc/sysctl.conf
if [ "$SMSC95XX_MOREMEM" ];then
echo "vm.min_free_kbytes = 16384" >> ${TEMPDIR}/initrd-tree/etc/sysctl.conf
else
echo "vm.min_free_kbytes = 8192" >> ${TEMPDIR}/initrd-tree/etc/sysctl.conf
if [ "${smsc95xx_mem}" ];then
echo "vm.min_free_kbytes = ${smsc95xx_mem}" >> ${TEMPDIR}/initrd-tree/etc/sysctl.conf
fi
}
@ -1245,6 +1238,7 @@ function populate_boot {
load_addr=${load_addr}
dtb_addr=${dtb_addr}
dtb_file=${dtb_file}
smsc95xx_mem=${smsc95xx_mem}
__EOF__
@ -1282,13 +1276,6 @@ function populate_boot {
echo "-----------------------------"
}
function reset_scripts {
if [ "${SMSC95XX_MOREMEM}" ] ; then
sed -i 's/16384/8192/g' "${DIR}/scripts/ubuntu-tweaks.diff"
sed -i 's/16384/8192/g' "${DIR}/scripts/debian-tweaks.diff"
fi
}
function check_mmc {
FDISK=$(LC_ALL=C fdisk -l 2>/dev/null | grep "Disk ${MMC}" | awk '{print $2}')
@ -1353,6 +1340,7 @@ function is_omap {
KMS_VIDEO_RESOLUTION="1280x720"
KMS_VIDEOA="video=DVI-D-1"
unset KMS_VIDEOB
smsc95xx_mem="8192"
}
function is_imx {
@ -1379,7 +1367,6 @@ function is_imx {
function check_uboot_type {
unset IN_VALID_UBOOT
unset SMSC95XX_MOREMEM
unset USE_UIMAGE
unset USE_KMS
unset dtb_file
@ -1391,6 +1378,7 @@ function check_uboot_type {
KERNEL_SEL="STABLE"
boot="bootz"
unset boot_scr_wrapper
unset smsc95xx_mem
case "${UBOOT_TYPE}" in
beagle_bx)
@ -1474,31 +1462,31 @@ function check_uboot_type {
panda)
SYSTEM="panda"
BOOTLOADER="PANDABOARD"
SMSC95XX_MOREMEM=1
is_omap
#dtb_file="omap4-panda.dtb"
VIDEO_OMAP_RAM="16MB"
KMS_VIDEOB="video=HDMI-A-1"
smsc95xx_mem="16384"
;;
panda_es)
SYSTEM="panda_es"
BOOTLOADER="PANDABOARD_ES"
SMSC95XX_MOREMEM=1
is_omap
#dtb_file="omap4-panda.dtb"
VIDEO_OMAP_RAM="16MB"
KMS_VIDEOB="video=HDMI-A-1"
smsc95xx_mem="16384"
;;
panda_kms)
SYSTEM="panda_es"
BOOTLOADER="PANDABOARD_ES"
SMSC95XX_MOREMEM=1
is_omap
#dtb_file="omap4-panda.dtb"
USE_KMS=1
unset HAS_OMAPFB_DSS2
KMS_VIDEOB="video=HDMI-A-1"
smsc95xx_mem="16384"
KERNEL_SEL="TESTING"
;;
@ -1889,5 +1877,4 @@ dl_device_firmware
unmount_all_drive_partitions
create_partitions
populate_boot
reset_scripts

@ -55,3 +55,8 @@ if [ "x${boot_fstype}" == "xext2" ] ; then
else
echo "/dev/mmcblk0p1 /boot/uboot auto defaults 0 0" >> /etc/fstab
fi
if [ "x${smsc95xx_mem}" != "x" ] ; then
echo "vm.min_free_kbytes = ${smsc95xx_mem}" >> /etc/sysctl.conf
fi

@ -3,7 +3,7 @@ new file mode 100755
index 0000000..6d06fc7
--- /dev/null
+++ b/usr/lib/finish-install.d/08rcn-ee-finish-installing-device
@@ -0,0 +1,30 @@
@@ -0,0 +1,27 @@
+#!/bin/sh -e
+cp /etc/e2fsck.conf /target/etc/e2fsck.conf
+cp /etc/finish-install.sh /target/etc/finish-install.sh
@ -13,9 +13,6 @@ index 0000000..6d06fc7
+ mkdir -p /target/boot/uboot
+ mount /dev/mmcblk0p1 /target/boot/uboot
+
+ #smsc95xx kevent workaround/hack
+ echo "vm.min_free_kbytes = 8192" >> /target/etc/sysctl.conf
+
+ if [ -d /lib/firmware/ ] ; then
+ cp -rf /lib/firmware/ /target/lib/ || true
+ fi

@ -106,3 +106,8 @@ if [ "x${boot_fstype}" == "xext2" ] ; then
else
echo "/dev/mmcblk0p1 /boot/uboot auto defaults 0 0" >> /etc/fstab
fi
if [ "x${smsc95xx_mem}" != "x" ] ; then
echo "vm.min_free_kbytes = ${smsc95xx_mem}" >> /etc/sysctl.conf
fi

@ -3,7 +3,7 @@ new file mode 100755
index 0000000..6d06fc7
--- /dev/null
+++ b/usr/lib/finish-install.d/08rcn-ee-finish-installing-device
@@ -0,0 +1,30 @@
@@ -0,0 +1,27 @@
+#!/bin/sh -e
+cp /etc/flash-kernel.conf /target/etc/flash-kernel.conf
+cp /etc/finish-install.sh /target/etc/finish-install.sh
@ -13,9 +13,6 @@ index 0000000..6d06fc7
+ mkdir -p /target/boot/uboot
+ mount /dev/mmcblk0p1 /target/boot/uboot
+
+ #smsc95xx kevent workaround/hack
+ echo "vm.min_free_kbytes = 8192" >> /target/etc/sysctl.conf
+
+ if [ -d /lib/firmware/ ] ; then
+ cp -rf /lib/firmware/ /target/lib/ || true
+ fi

Loading…
Cancel
Save